paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.78k stars 1.02k forks source link

`--debug.etherscan` starts pipeline for one block when near the tip #9592

Open shekhirin opened 1 month ago

shekhirin commented 1 month ago

Describe the feature

Pipeline sync finished:

2024-07-17T19:46:05.063533Z  INFO Executing stage pipeline_stages=14/14 stage=Finish checkpoint=1947683 target=1947684
2024-07-17T19:46:05.063561Z  INFO Finished stage pipeline_stages=14/14 stage=Finish checkpoint=1947684 target=1947684

New FCU with one block to download received:

2024-07-17T19:46:14.029976Z  INFO Live sync in progress, downloading blocks remaining_blocks=1 target_block_hash=0x1747869d7fa366e43b53f3022e654855f8ffbd639433cce14c82ba71d5eb115b
2024-07-17T19:46:14.030012Z  INFO Received forkchoice updated message when syncing head_block_hash=0x5ee245ab5d657fdeab02d502f2f97797cc277a3fef145f16a003678e373f3938 safe_block_hash=0x02564aa641292027b479f4e86b7b025aed29c53859850e31ba4b6bda85bf2c60 finalized_block_hash=0x4753ec05184767e1c586c32f2c0a305d9ee99bf11e2de54affc914ff51165781

Starting another pipeline sync for just one block:

2024-07-17T19:46:14.422697Z  INFO Preparing stage pipeline_stages=1/14 stage=Headers checkpoint=1947684 target=None
2024-07-17T19:46:14.448138Z  INFO Received headers total=1 from_block=1947685 to_block=1947685
2024-07-17T19:46:14.448265Z  INFO Writing headers total=1
2024-07-17T19:46:14.448321Z  INFO Executing stage pipeline_stages=1/14 stage=Headers checkpoint=1947684 target=None

It repeats over and over for a while.

Additional context

No response

sevazhidkov commented 1 month ago

can look into

mattsse commented 1 month ago

this seems to follow the received finalized block hash 0x4753ec05184767e1c586c32f2c0a305d9ee99bf11e2de54affc914ff51165781 == 1947685 which would explain why it only syncs one block at a time

so I wonder if the newPayload is actually converted correctly