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

[config change] Improve BlocksReExecutor implementation #2714

Merged
merged 11 commits into from
Nov 7, 2024

Conversation

ganeshvanahalli
Copy link
Contributor

@ganeshvanahalli ganeshvanahalli commented Oct 1, 2024

This PR changes the implementation of blocks re-execution mainly to use a separate stateDB during each block's re-execution and to verify that the resulting state successfully commits.

Config option --blocks-reexecutor.blocks-per-thread is renamed to --blocks-reexecutor.min-blocks-per-thread.
A new config option --blocks-reexecutor.trie-clean-limit (memory allowance in MB to use for caching trie nodes in memory) is added.

Pulls geth PR- OffchainLabs/go-ethereum#364
Resolves NIT-2810

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Oct 1, 2024
@ganeshvanahalli ganeshvanahalli marked this pull request as ready for review October 1, 2024 11:58
eljobe
eljobe previously approved these changes Oct 1, 2024
Copy link
Member

@eljobe eljobe left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@magicxyyz magicxyyz left a comment

Choose a reason for hiding this comment

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

looks good, but we should configure cleans cache + we potentially can simplify / clean up arbitrum.AdvanceStateUpToBlock and follow the release func pattern

blocks_reexecutor/blocks_reexecutor.go Outdated Show resolved Hide resolved
blocks_reexecutor/blocks_reexecutor.go Show resolved Hide resolved
eljobe
eljobe previously approved these changes Oct 3, 2024
@tsahee tsahee self-requested a review October 15, 2024 00:46
Copy link
Contributor

@tsahee tsahee left a comment

Choose a reason for hiding this comment

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

Most comments are small / optional.
The important comment is about solving a possible race condition - hold a lock from Commit to Reference"

blocks_reexecutor/blocks_reexecutor.go Outdated Show resolved Hide resolved
blocks_reexecutor/blocks_reexecutor.go Show resolved Hide resolved
blocks_reexecutor/blocks_reexecutor.go Outdated Show resolved Hide resolved
blocks_reexecutor/blocks_reexecutor.go Outdated Show resolved Hide resolved
blocks_reexecutor/blocks_reexecutor.go Outdated Show resolved Hide resolved
blocks_reexecutor/blocks_reexecutor.go Show resolved Hide resolved
tsahee
tsahee previously approved these changes Nov 4, 2024
magicxyyz
magicxyyz previously approved these changes Nov 5, 2024
Copy link
Contributor

@magicxyyz magicxyyz left a comment

Choose a reason for hiding this comment

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

LGTM

blocks_reexecutor/blocks_reexecutor.go Show resolved Hide resolved
@ganeshvanahalli ganeshvanahalli dismissed stale reviews from magicxyyz and tsahee via 860f54a November 6, 2024 06:55
joshuacolvin0
joshuacolvin0 previously approved these changes Nov 7, 2024
Copy link
Member

@joshuacolvin0 joshuacolvin0 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@tsahee tsahee left a comment

Choose a reason for hiding this comment

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

no changes since prev approval, only merge

@joshuacolvin0 joshuacolvin0 merged commit 7e547ad into master Nov 7, 2024
15 checks passed
@joshuacolvin0 joshuacolvin0 deleted the improve-blocksreexecutor-impl branch November 7, 2024 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-approved s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants