-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix(stages): add commit threshold to merkle stage v2 #1656
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
00e650e
stage progress table wip
joshieDo 762cdde
add root() to TrieProgress
joshieDo 15233f3
rename to checkpoint
joshieDo d6f3078
remove custom error
joshieDo d280573
rename fields
joshieDo cd1f393
update Cargo.lock
joshieDo f1301c8
use PatriciaTrie::from
joshieDo 5182fc0
fix merkle dump_stage
joshieDo 34a31e8
Merge remote-tracking branch 'origin/main' into fix/merkle-oom-v2
joshieDo bba73f2
Merge branch 'main' into fix/merkle-oom-v2
joshieDo c136f4b
Merge remote-tracking branch 'origin/main' into fix/merkle-oom-v2
joshieDo 114d085
Merge branch 'main' into fix/merkle-oom-v2
gakonst 72b39fd
fix(trie): use mutable database where needed
gakonst 5a59a20
fix(merkle): work around borrow checker
gakonst 1b7524c
chore: fix lint
gakonst 07225e2
chore: fix clippy nightly lint
gakonst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,7 +76,7 @@ impl<'a, 'b, TX: DbTx<'a>> StateProvider for LatestStateProviderRef<'a, 'b, TX> | |
| .state_root; | ||
|
|
||
| let (account_proof, storage_root) = loader | ||
| .generate_acount_proof(self.db, root, hashed_address) | ||
| .generate_acount_proof(root, hashed_address) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| .map_err(|_| ProviderError::StateTree)?; | ||
| let account_proof = account_proof.into_iter().map(Bytes::from).collect(); | ||
|
|
||
|
|
@@ -86,7 +86,7 @@ impl<'a, 'b, TX: DbTx<'a>> StateProvider for LatestStateProviderRef<'a, 'b, TX> | |
| } else { | ||
| let hashed_keys: Vec<H256> = keys.iter().map(keccak256).collect(); | ||
| loader | ||
| .generate_storage_proofs(self.db, storage_root, hashed_address, &hashed_keys) | ||
| .generate_storage_proofs(storage_root, hashed_address, &hashed_keys) | ||
| .map_err(|_| ProviderError::StateTree)? | ||
| .into_iter() | ||
| .map(|v| v.into_iter().map(Bytes::from).collect()) | ||
|
|
||
This file contains hidden or 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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note this new method of instantiation of the DBTrieLoader since #1515