testinprod-io / op-erigon

Optimism implementation on the efficiency frontier
https://op-erigon.testinprod.io
GNU Lesser General Public License v3.0
85 stars 14 forks source link

Is batching disabled ? #191

Open arnaudbriche opened 2 weeks ago

arnaudbriche commented 2 weeks ago

Hi,

I just spun up a new node out of a snpashot of Base mainnet from here. The node starts correctly, but it's taking forever to keep up with the chain; the machine if beefy, but it's doing only 2 blocks/second. Looking at the log, it seems like erigon is not batching many blocks in the staged sync process like normal, but going through the whole stages 1 block at a time.

Is this the case ? I there something to configure to prevent this ?

mininny commented 1 week ago

Hi @arnaudbriche , thanks for raising the issue!

Unlike regular erigon, we cannot process multiple blocks in batch in the staged sync process because syncing through p2p is not yet supported. Syncing via p2p is what allows erigon to download multiple block data from its peers and process them in batches.

In op-erigon, every block is individually derived by the op-node and inserted to op-erigon, which is why you see it go trough the whole stages for 1 block at a time. (Consensus-layer syncing)

We are currently working on supporting staged-sync process for op-erigon as well, and I'll let you know when it's ready! Sorry for the inconvenience 🙏

arnaudbriche commented 1 week ago

Hi @mininny ,

This all make sense. Curious to learn more about your plan to support staged-sync. Is there any PR open ?

mininny commented 1 week ago

@arnaudbriche There are multiple PRs, but this PR is mostly related to supporting staged-sync in op-erigon: https://github.com/ethereum-optimism/optimism/pull/10767/