Skip to content
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

Keep canonical trie updates until finalization #10572

Closed
Tracked by #10570
Rjected opened this issue Aug 27, 2024 · 0 comments · Fixed by #10579
Closed
Tracked by #10570

Keep canonical trie updates until finalization #10572

Rjected opened this issue Aug 27, 2024 · 0 comments · Fixed by #10579
Assignees
Labels
A-blockchain-tree Related to sidechains, reorgs and pending blocks C-enhancement New feature or request

Comments

@Rjected
Copy link
Member

Rjected commented Aug 27, 2024

In the reorg case mentioned in #10552, we need to be able to restore ExecutedBlocks from disk. We can get all information required for the bundle state, except for the trie updates, from the database.

There are two solutions to this:

  • Keep around TrieUpdates for non-finalized canonical blocks. This will likely impose a high memory requirement. These trie updates however will not be used for state root calculation
  • Re-calculate the state root for each block during a reorg. This would cause a bit of a performance hit, but impose a lower memory requirement.

Screenshot 2024-08-27 at 4 16 42 PM

@Rjected Rjected added C-enhancement New feature or request A-blockchain-tree Related to sidechains, reorgs and pending blocks labels Aug 27, 2024
@Rjected Rjected self-assigned this Aug 27, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-blockchain-tree Related to sidechains, reorgs and pending blocks C-enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant