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

feat: support importing blocks without merkle calculation #123

Merged
merged 16 commits into from
Sep 10, 2024

Conversation

j75689
Copy link
Collaborator

@j75689 j75689 commented Aug 28, 2024

Description

support importing blocks without merkle calculation mode

Rationale

Add a flag --optimize.skip-state-root-validation to disable state root calculation during block importing. This can be useful if the state root calculation is taking too long.
However, be cautious when using this mode, as the accuracy of node data (PlainState) will no longer be strongly guaranteed.

Example

  1. start a node with --optimize.skip-state-root-validation flag
bsc-reth node --chain bsc --http --http.port 8545 --optimize.skip-state-root-validation

(Optional) 2. Clear Trie/Hashed Account/Storage table to save database cost.

bsc-reth db clear mdbx StoragesTrie
bsc-reth db clear mdbx AccountsTrie
bsc-reth db clear mdbx HashedAccounts
bsc-reth db clear mdbx HashedStorages

bsc-reth db stats

Changes

Notable changes:

  • add new flag to start nodes bypassing merkle root calculation

Potential Impacts

  • no

@pythonberg1997 pythonberg1997 added this pull request to the merge queue Sep 10, 2024
Merged via the queue into bnb-chain:develop with commit 0493eac Sep 10, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants