-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(flat-storage and state-sync): Delay updating Flat Head to let us …
…obtain state parts from a state snapshot (#9338) When requested to move flat head to block X, set flat head to the second-to-last predecessor block with flat changes. This way blocks without flat state changes are effectively ignored. This is done by keeping a bit of metadata in `FlatStateDeltaMetadata`, it keeps a pointer to a predecessor block with flat state change. The metadata bit is trivially constructed from the current and the prev block. Getting flat values remains to be O(1). Block head and flat head can have arbitrarily large height differences, but the number of blocks with flat state changes is limited to 2 (explained above) + 2 (gap between the final block and the block head). The PR lets us obtain state parts when the last chunk of an epoch is not in the last block.
- Loading branch information
Showing
20 changed files
with
938 additions
and
94 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
Oops, something went wrong.