Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deny clippy::arithmetic_side_effects for fuel-merkle #729

Merged
merged 35 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
937e242
Rename Instruction -> Size and reuse it for orientation
Dentosal May 2, 2024
ccff21e
Small refactorings
Dentosal May 2, 2024
234d53b
Rework path_length_from_key
Dentosal May 2, 2024
9c4b9d5
Promote key_size_bits to a constant
Dentosal May 2, 2024
25569cc
More checks
Dentosal May 2, 2024
912d001
Simplify, add lints, add comments
Dentosal May 2, 2024
05cf75e
Remove Bit type and GetBit trait
Dentosal May 2, 2024
52a96e2
Make common_prefix_count unable to overflow
Dentosal May 2, 2024
82031ee
Fix key_size_bits
Dentosal May 2, 2024
ca41cc0
Add changelog entry
Dentosal May 2, 2024
d6149e7
Relax lints for tests
Dentosal May 2, 2024
2dbeecd
Merge branch 'master' into dento/deny-unchecked-arithmetic-merkle
Dentosal May 3, 2024
26eb400
Use Bit alias, remove unused impl
Dentosal May 5, 2024
fcf3874
Revert some tests back to {left,right}_child
Dentosal May 5, 2024
2099bc2
Update fuel-merkle/src/common/position.rs
Dentosal May 5, 2024
16e4ba7
Address PR comments
Dentosal May 5, 2024
05b7ce2
Restore comment
Dentosal May 5, 2024
c4fa08f
Document panic on getting a child of a leaf node
Dentosal May 7, 2024
2a46ae5
fmt
Dentosal May 7, 2024
6bf695b
Add some tests to show the problem
xgreenx May 7, 2024
2d4e444
Something
xgreenx May 7, 2024
52db5a3
Merge branch 'master' into dento/deny-unchecked-arithmetic-merkle
Dentosal May 7, 2024
0a68b5d
Fix a possible overflow in path_length_from_key for large inputs
Dentosal May 7, 2024
ced9f8c
Address PR comments
Dentosal May 7, 2024
5ea05c0
Address PR feedback
Dentosal May 13, 2024
8182335
Update fuel-merkle/src/common/position.rs
Dentosal May 13, 2024
9a3cc41
Fix potential overflow in 'orientation'
Dentosal May 13, 2024
432e7c9
Move sibling and uncle fns under cfg(test)
Dentosal May 14, 2024
51e37c0
Change TreeExtendError into MerkleTreeError
Dentosal May 14, 2024
b041b45
WIP: Subtree -> VecDeque
Dentosal May 15, 2024
9eee009
Remove Subtree, use VecDeque instead
Dentosal May 15, 2024
39fe1a5
Reverse internal node order in binary MerkleTree to use Vec instead o…
Dentosal May 15, 2024
ff9e33e
Use MerkleRootCalculator in MerkleTree to unify impls
Dentosal May 15, 2024
20cd6cc
More docs
Dentosal May 15, 2024
801df03
Cleanup
Dentosal May 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed

- [#725](https://github.com/FuelLabs/fuel-vm/pull/725): Adds more clippy lints to catch possible integer overflow and casting bugs on compile time.
- [#729](https://github.com/FuelLabs/fuel-vm/pull/729): Adds more clippy lints to `fuel-merkle` to catch possible integer overflow and casting bugs on compile time. It also does some internal refactoring.

### Added

#### Breaking

- [#725](https://github.com/FuelLabs/fuel-vm/pull/725): `UtxoId::from_str` now rejects inputs with multiple `0x` prefixes. Many `::from_str` implementations also reject extra data in the end of the input, instead of silently ignoring it. `UtxoId::from_str` allows a single `:` between the fields. Unused `GasUnit` struct removed.
- [#726](https://github.com/FuelLabs/fuel-vm/pull/726): Removed code related to Binary Merkle Sum Trees (BMSTs). The BMST is deprecated and not used in production environments.
- [#729](https://github.com/FuelLabs/fuel-vm/pull/729): Removed default implementation of `Node::key_size_bits`, implementors must now define it themselves. Also some helper traits have been merged together, or their types changed.

## [Version 0.49.0]

Expand Down
13 changes: 13 additions & 0 deletions fuel-merkle/proptest-regressions/tests/binary_verify.txt

Large diffs are not rendered by default.

Loading
Loading