forked from paritytech/trie
-
Notifications
You must be signed in to change notification settings - Fork 0
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
switch to single subtrie crate dep #1
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
* trie-db: Add `get_closest_merkle_value` to Trie trait Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Extract the merkle value Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db/test: Check merkle value on update key Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update trie-db/src/lookup.rs Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com> * Update trie-db/src/lookup.rs Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com> * trie-db: Rename look_up_merkle_without_cache function Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db/tests: Check closest descendant of partial keys Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Adjust lookups for partial keys Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db/tests: Check non-existent key and branch nodes Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Ensure recording of `NonExisting` for leaves Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Ensure the merkle descedent hash is returned Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db/tests: Extend tests with branch nodes and single key db Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db/tests: Check trie modification and merkle propagation Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db/tests: Use `PrefixedKey` instead of `HashKey` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db/tests: Test extra keys for `test_merkle_value` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Return the extension node hash Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Use `starts_with` method instead of common prefix Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Return no merkle value on empty node Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db/tests: Ensure inline nodes Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db/tests: Check empty trie with empty keys Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db/tests: Add extra keys to check Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Use `starts_with` for extension nodes Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Rename merkle lookups to lookup_first_descendant Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Return inline hashes properly Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Implement starts_with_slice for NibbleVec Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Use cache for finding first descendent hash Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Introduce caching for descedent node access Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Use rstd::vec::Vec Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Forward merkle value for fatdb and sectriedb Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Rename `get_closest_merkle_value` to `lookup_first_descendant` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Introduce MerkleValue to return inline nodes and hashes Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Remove inner function for merkle value lookups Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update trie-db/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update trie-db/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Apply fmt Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com> Co-authored-by: Bastian Köcher <git@kchr.de>
…#194) * Make `trie_nodes_recorded_for_key` work for inline values `trie_nodes_recorded_for_key` was not working properly for inline values. It would always return `RecordedForKey::None` while we actually have accessed and recorded all the trie nodes for the value. The pr introduces `TrieAccess::InlineValue` to communicate this access to the recorder properly to make it then return `RecordedForKey::Value`. * FMT * Add soe comments
* Update changelog Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * trie-db: Bump version to 0.28 Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update trie-db across workspace Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update trie-bench to 0.38.0 Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
We handle `NonExisting` keys as if we have recorded the value. The reason behind this is that we have recorded all the trie nodes to proof that the key doesn't exist in the `trie`. So, next time we want to access the key we can use the `cache` (if present) and do not net to iterate over the trie nodes again.
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Updates the requirements on [hex-literal](https://github.com/RustCrypto/utils) to permit the latest version. - [Release notes](https://github.com/RustCrypto/utils/releases) - [Commits](RustCrypto/utils@hex-literal-v0.3.0...hex-literal-v0.4.0) --- updated-dependencies: - dependency-name: hex-literal dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* totally remove hashbrown dep * fix no_std
Updates the requirements on [hashbrown](https://github.com/rust-lang/hashbrown) to permit the latest version. - [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md) - [Commits](rust-lang/hashbrown@v0.13.2...v0.14.1) --- updated-dependencies: - dependency-name: hashbrown dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version. - [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md) - [Commits](bheisler/criterion.rs@0.4.0...0.5.1) --- updated-dependencies: - dependency-name: criterion dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* double ended iterator implementation
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.
changes from paritytech#210 .
I also rename the main crate trie-db to subtrie version 0.0.1 so we can publish it freely, cc @arkpar sounds good?