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

all: pull snap sync PRs from upstream v1.13.5 #2035

Merged
merged 8 commits into from
Dec 19, 2023

Conversation

weiihann
Copy link
Contributor

@weiihann weiihann commented Dec 5, 2023

Description

This PR cherrypicks PRs related to snap sync from the Geth upstream. There were some bugs related to snap sync + PBSS which are fixed in these PRs.

Upstream PRs

  1. trie: refactor stacktrie ethereum/go-ethereum#28233
  2. trie: remove owner and binary marshaling from stacktrie ethereum/go-ethereum#28291
  3. core, trie, eth: refactor stacktrie constructor ethereum/go-ethereum#28350
  4. trie: reduce allocs in recHash ethereum/go-ethereum#27770
  5. core, eth, trie: filter out boundary nodes and remove dangling nodes in stacktrie ethereum/go-ethereum#28327
  6. eth/protocols/snap: fix snap sync failure on empty storage range ethereum/go-ethereum#28306
  7. trie/triedb/pathdb, core/rawdb: enhance error message in freezer ethereum/go-ethereum#28198

Sync Result

Machine: x64, 4TB, 8Core, 30GB, ssd
Start up command:

nohup ./bsc --datadir data-seed --history.transactions=0 --syncmode=snap --config config.toml --state.scheme path \
--db.engine=pebble --http.port 8565 --cache 10000 --maxpeers 200 --port 30304 --ws --ws.origins "127.0.0.1" --ws.port 8566 2>&1 &

Time taken to sync to the latest block: 1 day and 10 hours
Time taken to download chain data: 1 day and 3 hours 12 minutes
Time taken to download state data: 1 day and 6 hours 36 minutes
Time taken for state healing: 3 hours 26 minutes

Copy link
Contributor

@emailtovamos emailtovamos left a comment

Choose a reason for hiding this comment

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

I did a basic check on the code & it looks good to me based on my limited understanding of sync/snapshot/trie package.
However someone who has worked in these directly in the past should also have a look.

@buddh0
Copy link
Collaborator

buddh0 commented Dec 15, 2023

I reviewed the origin 7 patches one by one
LGTM

@zzzckck zzzckck merged commit 474860e into bnb-chain:develop Dec 19, 2023
5 checks passed
@weiihann weiihann deleted the v1.3.4-snapsync branch March 13, 2024 05:36
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.

None yet

7 participants