reth icon indicating copy to clipboard operation
reth copied to clipboard

Opstack superchain registry support for genesis files

Open mattsse opened this issue 9 months ago • 9 comments

Describe the feature

by default we have builtin support for base,optimism (sepolia+main) but ideally we can natively support more vanilla opstacks via the superchain registry:

https://github.com/ethereum-optimism/superchain-registry

the way the chain is configured is via the chainspec parser:

https://github.com/paradigmxyz/reth/blob/031b99a0c45d0b4ebf14b901e66f441c9ab43e45/crates/optimism/cli/src/chainspec.rs#L12-L28

ideally we can also query the registry and download it on demand.

for example unichain-sepolia: https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/extra/genesis/sepolia/unichain.json.zst

this use compressed json so we'd need to unpack that as well.

we want this as on demand download, because opstack genesis files are quite large and would massively bloat the binary if we would embedd all of those.

we also don't want to download+decompress on launch all the time so ideally we can store all of this in a local location that we can check first.

TODO

  • add new crate for op-chain-registry that manages a local copy (we can either checkout the repo entirely or download on demand, I think the latter is easier for now) and download
  • once we have that we can integrate this into the op chainspec parser

Note: this assumption here is that all those chains are vanilla opstack

Additional context

No response

mattsse avatar Feb 05 '25 15:02 mattsse