-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trie-db: Fetch the closest merkle value (#199)
* trie-db: Add `get_closest_merkle_value` to Trie trait Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Extract the merkle value Signed-off-by: Alexandru Vasile <[email protected]> * trie-db/test: Check merkle value on update key Signed-off-by: Alexandru Vasile <[email protected]> * Update trie-db/src/lookup.rs Co-authored-by: Arkadiy Paronyan <[email protected]> * Update trie-db/src/lookup.rs Co-authored-by: Arkadiy Paronyan <[email protected]> * trie-db: Rename look_up_merkle_without_cache function Signed-off-by: Alexandru Vasile <[email protected]> * trie-db/tests: Check closest descendant of partial keys Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Adjust lookups for partial keys Signed-off-by: Alexandru Vasile <[email protected]> * trie-db/tests: Check non-existent key and branch nodes Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Ensure recording of `NonExisting` for leaves Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Ensure the merkle descedent hash is returned Signed-off-by: Alexandru Vasile <[email protected]> * trie-db/tests: Extend tests with branch nodes and single key db Signed-off-by: Alexandru Vasile <[email protected]> * trie-db/tests: Check trie modification and merkle propagation Signed-off-by: Alexandru Vasile <[email protected]> * trie-db/tests: Use `PrefixedKey` instead of `HashKey` Signed-off-by: Alexandru Vasile <[email protected]> * trie-db/tests: Test extra keys for `test_merkle_value` Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Return the extension node hash Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Use `starts_with` method instead of common prefix Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Return no merkle value on empty node Signed-off-by: Alexandru Vasile <[email protected]> * trie-db/tests: Ensure inline nodes Signed-off-by: Alexandru Vasile <[email protected]> * trie-db/tests: Check empty trie with empty keys Signed-off-by: Alexandru Vasile <[email protected]> * trie-db/tests: Add extra keys to check Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Use `starts_with` for extension nodes Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Rename merkle lookups to lookup_first_descendant Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Return inline hashes properly Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Implement starts_with_slice for NibbleVec Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Use cache for finding first descendent hash Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Introduce caching for descedent node access Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Use rstd::vec::Vec Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Forward merkle value for fatdb and sectriedb Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Rename `get_closest_merkle_value` to `lookup_first_descendant` Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Introduce MerkleValue to return inline nodes and hashes Signed-off-by: Alexandru Vasile <[email protected]> * trie-db: Remove inner function for merkle value lookups Signed-off-by: Alexandru Vasile <[email protected]> * Update trie-db/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * Update trie-db/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * Apply fmt Signed-off-by: Alexandru Vasile <[email protected]> --------- Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: Arkadiy Paronyan <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
- Loading branch information
1 parent
c4be095
commit 08a2305
Showing
7 changed files
with
517 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.