-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AV-1682] State sync server side snapshot optimization (#784)
* add account to LeafsRequest * add snapshot iterators * step 1: read from the snapshot * refactor: move FillAccounts to trie package * add UT * step 2: partial data from the snapshot * tests: add snapshot cleanup * bugfixes and nits * pr comments: iterator key len and comments * pr comments: test cleanup and renaming * leafs_request: adding comments and reordering args * leafs_request: fix grammar in comment * refactor: move IncrOne to utils * leafs_request: refactor and comment improvements * add storage trie test * test: move cleanup to test body * add "done" check to prefixedIterator * Readability improvements via builder struct * iterator: add value * bugfix (on ctx expiry) * nits * remove root check optimization * add stat * refactor: rb.readLeafsFromSnapshot * Improve readability via a builder struct (#793) * test: move cleanup to test body * add "done" check to prefixedIterator * Readability improvements via builder struct * iterator: add value * bugfix (on ctx expiry) * nits * remove root check optimization * add stat * refactor: rb.readLeafsFromSnapshot * nits and more comments * typo * test: add assertRangeProofIsValid * cleaner buffer allocation * use sync pool for response allocations * use snapshot.Tree to get iterators to the snapshot (#794) * use snapshot.Tree to get iterators to the snapshot * iterator wrappers to clean up code duplication * minor simplification * fix iterator Error call * fix storage iterator creation to be thread safe * use sync pool for snapKeys/snapVals * handle late init. of sync'ed client snapshot * pass proof around explicitly (#795) * pass proof around explicitly * close memdb on err paths * bump min sync version (we changed LeafsRequest) * Revert "use sync pool for snapKeys/snapVals" This reverts commit f73138e0d36087962ae30a0b2c0b6a80f54e3a04. * clear out slices before returning them to pool * switch to using interface over passing Fn (#796)
- Loading branch information
Showing
24 changed files
with
991 additions
and
328 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
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
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.