-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add fuel-merkle
to the monorepo
#318
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Initial Merkle Tree Implementation * Delete verify.rs * Remove unimplemented asmut * Unpin dependencies * Remove mod verify * Add default implementation * Remove IDE specifics from gitfile * Pin minimum versions in dependencies * Fix format with fmt
* Initial Merkle Tree Implementation * Delete verify.rs * Remove IDE specifics from gitfile * Proof set * Remove unused line * fmt * Implement proof and tests * Refactor * Simplify loop * Update merkle_tree.rs * Convert next_height and next_data to return options * Refactor proof set * Clippy * Verify * Format fix * Update merkle_tree.rs * Update verify.rs * Semver for Bytes * Clean up tests * Format * Tests * Refactor tests
* Refactor hash functions into separate file for BMT * Update merkle_tree.rs * Refactor NODE and LEAF as u8 * Remove generics * Remove commented line * Update mod.rs * Remove deprecated files * Lazy static empty sum * Update Cargo.toml * Update Cargo.toml * Update hash.rs * Return ref to empty sum
* Position struct and tests * Comment * Update table comment * Document * Update position.rs * Update comments * Update comment again * Fix tests * Update position.rs
* `Storage` trait and concrete `StorageMap` struct * Remodel trait after fuel-vm store trait * Revert names to storage and storage_map * Change Storage's Key to require `Clone` instead of `Copy`
…lpers` (#30) * Refactor `binary` to `tests` * Cleanup Test imports * Convert to internal crate `fuel-merkle-test-helpers` * Format * Add helper tests to CI * Update cargo_test.yml * Fix Run helper tests args * Clean up test-helpers dependencies * Update test_data.rs
* Path iterator * Create node.rs * Add node to common * Refactor SZ to SIZE * Minor adjustment to comments * Remove unnecessary Debug req for AsPathIterator * Feedback * Msb get_bit_at_index_from_msb returns option
* Position methods for left and right child * Update position.rs * Use constants for left and right child directions * Update comment
* Bump bytes from ~1.0 to ~1.1 * Update Cargo.toml Co-authored-by: John Adler <[email protected]> Co-authored-by: John Adler <[email protected]>
* Update author. * Add more fields. * Update author.
* crates.io workflow
make bytes dep compatible with async-graphql
* Binary Merkle Sum * Clean up * Format * Update verify.rs * Replace Hash struct and impl with template functions * Update hash.rs * refactor * Refactor join_data_pair to accept fee before data * Format * Remove generics from Merkle sum tree * Refactor join_data_pair and split_data_pair * White space * assert sizes in join and split data pair * BMST lazy static empty sum * Update lib.rs * Update to use storage backing * Path iterator for sum node (WIP) * Node fmt * Isolate `root` logic * Remove unused code * Refactor * Simplify lifetimes * u64 (8 byte) fee * Remove extraneous variables * Consolidate on `common` types * Simplify * Cosmetic * Remove unnecessary references to hash * Fix node fmt * Update node.rs * Update node.rs * Include leaf fee in leaf sum calculation * update hash comment * Update sum Node `left_child` and `right_child` to return `Result` * Remove unused lifetime param * Return fee in BMST `root` call * Remove unused `StorageNode`
… and side positions from root to leaf (#55) * Path set * Add `height` to `common::Node` interface, add `Position::path_set` * Position path_set tests * Move position_iter to new file * Clean up use statements * Move position_iter to position_path * Comments * Update comments * Update comments * PR feedback
* BMT prove uses position path * Format * Remove unnecessary storage inserts * Remove unnecessary mut from Node::create_node * Remove unnecessary functions * Update version for breaking change * Change unnecessary `node_mut()` to `node()` in `join_subtrees()` * Revert "Update version for breaking change" This reverts commit db3460510b6861805b5e4a2f3b5eb24d704b10f4.
* Implement `load` for BMT * Move p2_under to common * Format * Build tree from leaf nodes * Test load error * Alphabetical order for errors * remove unnecessary mut * Simplify * Remove unnecessary cast
* Add height to sparse node * Update tests
* Configurable storage table * refactor sum tree * Minor * Update Cargo.toml * Update position.rs * Update storage_map.rs * Refactor nodes tables * Update binary.rs * Fmt * Use core over std * Update binary_proofs.rs * Revert "Update binary_proofs.rs" This reverts commit ba38107c6cff3462041b3dbe8b6255431b056dc8. * Merge fixes * Fix warnings * Clean up * Clean up * Update merkle_tree.rs * consistency * Use match over if else * Revert "Use match over if else" This reverts commit c74337a448f48c9eec89d7b436aa03a80e00e886. * Rearrangement * BMT Node buffer * Refactor buffer, add buffer views * Simplify Node interface * Clippy * Remove unnecessary node clones * Add safety comments * SMT node buffer update * Simplify * Minor * Simplify * Simplify * Fix warning * Simplify * Return references instead of copies * Cosmetic * Return hash as ref * Use Binary node buffer for tables * Replace Schema with constants * Replace Schema with constants * Remove serde feature * Update lib exports * Clean up * Update safety notes in BMT buffer * Replace Buffer with Primitive * Replace Buffer with Primitive (WIP) * Passing tests * cliipy * clippy for real tho * Remove Primitive trait * Refactor primitive * Refactor primitive * Simplify * Simplify * Clean up * Make node members private * Make Node members private * Use as ref * Replace uses of Buffer with Primitive * revert * Rename uses of buffer to primitive * Rename uses of buffer to primitive in tests * Use into for insertion in test * Fix imports * Use hex values in test * chore: Update test table names (#139) Update table names * Fix import * Fix merge side effects
* Refactor * Refactor * Infallible storage trait and impl * Parallel trait usage for getting side nodes * nostd compliance * Clippy * Infallible root * Add comment docs to root_node * Fix root_node doc line breaks * Whitespace * Fix typo * Whitespace again * Remove returned assigned values
This reverts commit df268a9.
This reverts commit 7afdd79.
This reverts commit 83acb21.
* Removed `'a` lifetime from `Mappable::Key`. Renamed `GetValue` with `OwnedValue`. Added the same `OwnedKey` for `Key` to unblock: ```rust type Key = Self::OwnedKey; type OwnedKey = u64; type Value = Self::OwnedValue; type OwnedValue = Primitive; ``` Defined two double storage key for `ContractsAssets` and `ContractsState`. Replaced `(&'a ContractId, &'a AssetId)` with corresponding double storage keys. * Make clippy happy * Make clippy happy * Make clippy happy * Fix `no_std` compilation * Remove `AsRef` and `From` for `$first` and `$second`
Voxelot
previously approved these changes
Jan 24, 2023
Voxelot
approved these changes
Jan 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.