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

cmd, eth: switch the dev synctarget to hash from block #28209

Merged
merged 2 commits into from Sep 29, 2023

Conversation

karalabe
Copy link
Member

This PR switched the --synctarget flag from requiring a block RLP in a file (which is annoyingly hard to obtain) to just using a hash and retrieving everything else from the network.

geth --synctarget 0x91c90676cab257a59cd956d7cb0bceb9b1a71d79755c23c7277a0697ccfaf8c4

@karalabe karalabe added this to the 1.13.2 milestone Sep 27, 2023
@holiman holiman modified the milestones: 1.13.2, 1.13.3 Sep 28, 2023
@holiman
Copy link
Contributor

holiman commented Sep 28, 2023

Cool

[user@work ~]$ geth --datadir ./tmp/deleteme --synctarget=0x165f73c83ca0393c988c8b4bbc2c62db6052ddd97697dbeb49c61c979a38a7e4 
INFO [09-28|10:58:26.835] Starting Geth on Ethereum mainnet... 
INFO [09-28|10:58:26.836] Bumping default cache on mainnet         provided=1024 updated=4096
INFO [09-28|10:58:26.841] Maximum peer count                       ETH=50 LES=0 total=50

...
INFO [09-28|10:58:28.325] Waiting for peers to retrieve sync target 
INFO [09-28|10:58:28.440] Generated state snapshot                 accounts=8893 slots=0 storage=409.64KiB dangling=0 elapsed=225.272ms
INFO [09-28|10:58:30.966] New local node record                    seq=1,695,891,508,322 id=256353e9dc5ee98c ip=84.55.65.82 udp=30303 tcp=30303
INFO [09-28|10:58:38.356] Looking for peers                        peercount=0 tried=22 static=0
INFO [09-28|10:58:48.359] Looking for peers                        peercount=0 tried=29 static=0
INFO [09-28|10:58:52.339] Attempting to retrieve sync target       peer=6f0bf62ee28c9ad07a50b297bfad5af90879da6c7c57263ec08ff458d82d64a6
INFO [09-28|10:58:52.665] Syncing beacon headers                   downloaded=499 left=0 eta=0s
INFO [09-28|10:58:52.667] Block synchronisation started 
INFO [09-28|10:58:52.710] Imported new chain segment               number=2 hash=b495a1..4698c9 blocks=2 txs=0 mgas=0.000 elapsed=33.304ms  mgasps=0.000 age=8y3mo1w  snapdiffs=90.00B triedirty=4.74KiB
INFO [09-28|10:58:52.739] Imported new chain segment               number=3 hash=3d6122..8cf741 blocks=1 txs=0 mgas=0.000 elapsed=17.402ms  mgasps=0.000 age=8y3mo1w  snapdiffs=180.00B triedirty=9.09KiB
INFO [09-28|10:58:55.812] Imported new chain segment               number=201 hash=b840bb..374c8c blocks=198 txs=0 mgas=0.000 elapsed=3.014s    mgasps=0.000 age=8y3mo1w  snapdiffs=10.81KiB triedirty=388.81KiB
INFO [09-28|10:58:58.687] Looking for peers                        peercount=2 tried=32 static=0
INFO [09-28|10:58:59.640] Imported new chain segment               number=500 hash=165f73..38a7e4 blocks=299 txs=0 mgas=0.000 elapsed=3.827s    mgasps=0.000 age=8y3mo1w  snapdiffs=28.01KiB triedirty=425.07KiB
INFO [09-28|10:58:59.640] Snap sync complete, auto disabling 
WARN [09-28|10:59:00.890] Peer delivering stale transactions       peer=6f0bf62ee28c9ad07a50b297bfad5af90879da6c7c57263ec08ff458d82d64a6 rejected=104
WARN [09-28|10:59:01.936] Peer delivering stale transactions       peer=6c61a3069f4f71be0ad732b43bb00813cda0f6ecbe1d9bc54e095e9a0bb45bc1 rejected=128
WARN [09-28|10:59:02.137] Peer delivering stale transactions       peer=6c61a3069f4f71be0ad732b43bb00813cda0f6ecbe1d9bc54e095e9a0bb45bc1 rejected=116

@karalabe
Copy link
Member Author

Erm, what's with snap sync in there? cc @rjl493456442

@karalabe
Copy link
Member Author

Ah ok, it's unrelated to any changes. The original synctarget code required --syncmode=full. I just dropped that requirement and defaulted to it, but the node thinks it's snap syncing until done. Lemme see if I can hard swap the sync-flag out to full.

@karalabe
Copy link
Member Author

@holiman PTAL

@karalabe karalabe merged commit 7b6ff52 into ethereum:master Sep 29, 2023
1 of 2 checks passed
hyunchel pushed a commit to hyunchel/go-ethereum that referenced this pull request Oct 6, 2023
* cmd, eth: switch the dev synctarget to hash from block

* cmd/utils, eth/catalyst: terminate node wyen synctarget reached
tyler-smith pushed a commit to blocknative/go-ethereum that referenced this pull request Oct 12, 2023
* cmd, eth: switch the dev synctarget to hash from block

* cmd/utils, eth/catalyst: terminate node wyen synctarget reached
tyler-smith pushed a commit to blocknative/go-ethereum that referenced this pull request Oct 16, 2023
* cmd, eth: switch the dev synctarget to hash from block

* cmd/utils, eth/catalyst: terminate node wyen synctarget reached
0x366 pushed a commit to Dexcelerate/go-ethereum that referenced this pull request Nov 8, 2023
* cmd, eth: switch the dev synctarget to hash from block

* cmd/utils, eth/catalyst: terminate node wyen synctarget reached
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
* cmd, eth: switch the dev synctarget to hash from block

* cmd/utils, eth/catalyst: terminate node wyen synctarget reached
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants