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

Start a OP mainnet node with pruning enabled #171

Open
andreclaro opened this issue May 22, 2024 · 6 comments
Open

Start a OP mainnet node with pruning enabled #171

andreclaro opened this issue May 22, 2024 · 6 comments

Comments

@andreclaro
Copy link

andreclaro commented May 22, 2024

Question

How can we use op-erigon with pruning setting on optimism mainnet?

Details

we are testing op-erigon pruning features... How can we start a OP mainnet node with pruning enabled? I tried to start using the following snapshots and got error erigon[3671786]: not allowed change of --prune flag, last time you used: in op-erigon

The problem is that op-erigon requires pre-bedrock data to start, however the snapshots available have pruning disabled... Is that the problem?

How can we use op-erigon with pruning setting on optimism mainnet?

Thanks

@andreclaro
Copy link
Author

From the documentation, it seems we really need to start op-erigon from the pre-bedrock snapshop and consequently we will be unable to setup pruning...

https://github.com/testinprod-io/op-erigon?tab=readme-ov-file#caution

Could anyone confirm this assumption? Is there any workaround?

Thanks!

@mininny
Copy link
Member

mininny commented Jun 4, 2024

@andreclaro You're right in that op-erigon's pre-bedrock snapshot was built with prune disabled, and erigon requires the whole db to have the same prune setting. So, we'd need to re-create the pre-bedrock snapshot with the prune setting enabled as well. This task might take some time for us to check it and recreate the db.

Is this an active problem on your end? Do you have to have the prune enabled for your node?

@andreclaro
Copy link
Author

We want to configure our nodes (base/optimism mainnet/sepolia) to keep just 1 month worth of blocks.

Pruning flags:

# Prune blocks older than 1,300,000 (roughly 1 month).
    --prune.h.older=1300000 \
    --prune.r.older=1300000 \
    --prune.t.older=1300000 \
    --prune.c.older=1300000 \

The problem is that about snapshots is that it needs to match the pruning settings, right?

@andreclaro
Copy link
Author

op-geth with snap sync and op-reth do not need bedrock snapshots for OP mainnet.

Can you also implement something like snap sync on op-erigon?!?!

source: https://geth.ethereum.org/docs/fundamentals/sync-modes

@mininny
Copy link
Member

mininny commented Jun 5, 2024

Erigon is archive node by default and it doesn't have snap sync like op-geth. Also, the op-reth's docs says they don't support op mainnet yet because of the bedrock snapshot.

AFAIK, there is ongoing work on the next major release of erigon v3, and they plan on making something like snap sync. When the erigon team releases the v3, we will bring that feature to op-erigon too. As for brining the prune flag to the snapshot, is this high priority for your team?

@andreclaro
Copy link
Author

We will reassess op-erigon later again... so snapshots with prune flags are currently not required, but it will be nice to be able to spin-up a node from a snapshot with pruning enabled and the snapshot can have pruning enable (same of different pruning settings) or not.

Awesome to know erigon v3, will support something like snap sync. I reviewed their 2024 roadmap a couple of weeks ago (https://erigon.tech/erigons-roadmap-to-2024/). Is there a more detailed roadmap? thanks

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

No branches or pull requests

2 participants