-
Notifications
You must be signed in to change notification settings - Fork 20
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
Interface and logic to support snap sync for Paprika #349
Conversation
- handling of boundary node (only hash stored) - checking root hash without commit - encoding keccak hash as NibblePath for merkle Leaf type - IReadOnlyWorldState implementation for BlockState
…rt healing tests.
- handling of boundary node (only hash stored) - checking root hash without commit - encoding keccak hash as NibblePath for merkle Leaf type - IReadOnlyWorldState implementation for BlockState
…rt healing tests.
…into snap-sync
…mo. Added ForceFlush to aid testing.
- handling of boundary node (only hash stored) - checking root hash without commit - encoding keccak hash as NibblePath for merkle Leaf type - IReadOnlyWorldState implementation for BlockState
…rt healing tests.
- handling of boundary node (only hash stored) - checking root hash without commit - encoding keccak hash as NibblePath for merkle Leaf type - IReadOnlyWorldState implementation for BlockState
…rt healing tests.
…calculate storage root hash.
… BlockState implementation.
…en processing snap sync response.
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.
Generally, I'd move more parts into Merkle
behavior. The usual take with the Blockchain
component that I try to apply is make it as Merkle
agnostic as possible. If more was moved to the Merkle
, it could limit the cast downs as well.
private class SyncBlockState : BlockState | ||
{ | ||
private readonly PooledSpanDictionary _proofKeys; | ||
private readonly HashSet<ulong> _proofHashSet; |
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.
How big is it? Have you considered BitFilter
here?
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.
This should not be big - max 2 x height of the synced trie.
|
||
public void RecalculateStorageTries(ICommitWithStats commit, CacheBudget budget) | ||
{ | ||
using (_storageProcessing.Measure()) |
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.
Is this measurement useful here? It's used for regular node running so that we can attach with dotnet counters
I'd remove.
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.
This method was removed, but removed I removed gathering these metrics for RecalculateStorageTrie
. This can be useful for measuring sync performance.
Co-authored-by: Szymon Kulec <[email protected]>
Implement changes to the
IRawState
interface required to fully support sync process for Paprika:RlpMemo
which contains hashes of child nodes outside of currently processed data ranges (account or storage). Merkle data created for snap sync is used only to ensure correct root hash calculation and is not persisted onCommit
(newEntryType
-Proof
.CreateMerkleBranch
CreateMerkleExtension
,CreateMerkleLeaf