Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interface and logic to support snap sync for Paprika (#349)
* Multiple changes to support snap sync via RawState: - 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 * Enabled flag SNAP_SYNC_SUPPORT * Removed duplicated call to EnsureHash * New IRawState implementation to easier parallelize. Elements to support healing tests. * Multiple changes to support snap sync via RawState: - 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 * Enabled flag SNAP_SYNC_SUPPORT * Removed duplicated call to EnsureHash * New IRawState implementation to easier parallelize. Elements to support healing tests. * Fix method call after merge * Dispose CommittedBlockState during commit. * Added SNAP_SYNC_SUPPORT for release * Added ReadOnlySyncWorldStateAccessor. Changed visitor to hanlde RlpMemo. Added ForceFlush to aid testing. * Fixes for leaves at last level. * Hash calc fixes and changes for arbitrary paths and snap sync specific. * Hash calc changes. New methods to create nodes from proof data. * Proof creation changes and sync accessor changes. * Multiple changes to support snap sync via RawState: - 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 * Enabled flag SNAP_SYNC_SUPPORT * Removed duplicated call to EnsureHash * New IRawState implementation to easier parallelize. Elements to support healing tests. * Multiple changes to support snap sync via RawState: - 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 * New IRawState implementation to easier parallelize. Elements to support healing tests. * Fix method call after merge * Dispose CommittedBlockState during commit. * Added SNAP_SYNC_SUPPORT for release * Added ReadOnlySyncWorldStateAccessor. Changed visitor to hanlde RlpMemo. Added ForceFlush to aid testing. * Fixes for leaves at last level. * Hash calc fixes and changes for arbitrary paths and snap sync specific. * Hash calc changes. New methods to create nodes from proof data. * Proof creation changes and sync accessor changes. * Fixing merge * Add RegisterDeleteByPrefix to RawStateMT * Cleanup * Whitespace format * Use RlpMemo for parallel branch hash calc. Removed unused code. * Format fix * Remove unused proof leaves logic. * More code cleanup * Do not override Proof entries as Persistent * Don't persist Proof entry type. New methods to check persistance and calculate storage root hash. * Whitespace format * ApplyRaw doesn't recalculate root hash * Move Proof entry type handling out of dictionary into a specific sync BlockState implementation. * Move processing proof nodes into SyncBlockState to avoid 2 commits when processing snap sync response. * Measure recalculation of storage tree * Allow parallel store trie recalculation for a single storage trie. * Do not open new read only transaction after RawState commit - draft change * Fix test, fix whitespace * Apply suggestions from code review Co-authored-by: Szymon Kulec <[email protected]> * Refactoring and cleanup * Merkle trie visitor refactoring * no compiler constant, hint used for Merkle behavior instead * Changes to RecalculateStorageHash for snap sync RlpMemo dependency. Added tests. --------- Co-authored-by: Szymon Kulec <[email protected]>
- Loading branch information