celo-org / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
3 stars 2 forks source link

Prepare for geth storage changes in 1.14 #49

Open palango opened 11 months ago

palango commented 11 months ago

Geth 1.13 adds an improved storage layout: https://blog.ethereum.org/2023/09/12/geth-v1-13-0

There's no migration to it, instead nodes need to resync. We need to test if syncing fresh nodes with the new storage layout works. However, as of geth 1.14, the old storage format is still supported.

### Tasks
- [ ] https://github.com/celo-org/optimism/issues/204
- [ ] Full-sync an archive node with `path` storage
- [ ] Create archive node snapshot based on `path` storage
- [ ] Create full node snapshot based on `path` storage
lvpeschke commented 1 month ago

@palango @piersy can you update the description if the merge into op-geth has happened?

piersy commented 1 month ago

Get will remove support for the old storage layout in 1.14 and in order to move to the new layout you will need to re-sync your node.

palango commented 1 month ago

My memory was wrong here, just checked the changelogs again. They plan to deprecate the old hash storage, but it's still working as expected in 1.14: https://github.com/ethereum/go-ethereum/releases/tag/v1.14.0

They still advise to switch:

That said, we will be dropping hash mode sooner rather than later, so we advise everyone running full nodes to gradually switch, if they haven't yet.

With the following caveat, which means we can't do the full switchover yet:

Archive mode support is not yet finalised for path mode, so archive nodes will still run in hash mode. Naturally, hash mode will not be dropped until a full path archive lands and people have enough time to switch to it.

So this epic isn't as urgent as we thought.

piersy commented 1 month ago

Hey @palango this sounds problematic.

As an L2 we don't have any way to full sync a node from genesis, since you have to start from a migrated datadir. So currently the only nodes that will be able to switch over to path based storage will be nodes that snap sync. But you can't be an archive node and snap-sync, so as it stands our archive nodes will have no way to upgrade to a path based layout.