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

Atomic trie height map repair #413

Merged
merged 34 commits into from
Dec 20, 2023
Merged

Conversation

darioush
Copy link
Collaborator

@darioush darioush commented Dec 1, 2023

Why this should be merged

Some nodes may have a non-canonical mapping of block heights to corresponding atomic trie roots.
This can be caused by either:

  • a bug in state sync client which incorrectly included the next heights in creating the root,
  • changing the definition of the canonical mapping to include bonus blocks on nodes that did not index these.

How this works

Rebuilds the index by iterating the trie in the background

How this was tested

CI, pending fuji/mainnet testing.

@darioush darioush changed the base branch from master to repair-atomic-trie-bonus-blocks December 5, 2023 19:31
@darioush darioush marked this pull request as ready for review December 15, 2023 11:39
Copy link
Collaborator

@aaronbuchwald aaronbuchwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - optional nits / questions

plugin/evm/atomic_trie_height_map_repair.go Outdated Show resolved Hide resolved
plugin/evm/atomic_trie_height_map_repair.go Outdated Show resolved Hide resolved
plugin/evm/atomic_trie_iterator.go Outdated Show resolved Hide resolved
plugin/evm/vm.go Outdated Show resolved Hide resolved
plugin/evm/atomic_trie_height_map_repair_test.go Outdated Show resolved Hide resolved
@darioush darioush changed the title initial height map repair Atomic trie height map repair Dec 20, 2023
Base automatically changed from repair-atomic-trie-bonus-blocks to master December 20, 2023 20:02
@darioush darioush enabled auto-merge (squash) December 20, 2023 20:18
@darioush darioush merged commit 58d524f into master Dec 20, 2023
8 checks passed
@darioush darioush deleted the repair-atomic-trie-root-height-map branch December 20, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants