-
Notifications
You must be signed in to change notification settings - Fork 7
Description
There's multiple problems with the way we handle a custom genesis right now.
1. Always preferring named chain
When we try to get the node config from a chain spec, we're always trying to get it via named chain first.
If we specify a custom genesis file with a chain id that is equal to any of a named chain then the rest of the custom genesis file and with it the node config will be ignored.
This could lead to problems or unintended consequences as a user might think a custom genesis file is used when in reality it is not used at all, except for reading the chain id.
2. Reading values in NodeConfig::from_chainspec and in reth via ScrollChainInfo when a custom genesis file is parsed
Currently we read some values in rollup node and some values in reth. This is messy and we should streamline this.
3. Potentially missing fields in a genesis.json file for running a node only with genesis.json (also for Scroll Mainnet/Sepolia)
As described in 1 a named chain is always preferred. This leads to the fact that some parameters like l1_message_queue_v2_deployment_block (or v2_message_queue_starting_index) are specified via constants. However, to truly run only from custom chain config all these parameters would need to be specified in the custom genesis file as well.