Etherlink/Tezlink/Kernel: Regroup information on a chain in the configuration
What
This MR reorders the configuration structure in the kernel. It regroups information specific to a chain and introduces notion of chain_family to differentiate the case of running an Evm chain and the case of running a Michelson chain. We're not doing anything for now with the chain family.
Why
The kernel should be able to run Tezlink in the future, with a feature flag we'll say whether we are in Etherlink mode (the current kernel) or in Tezlink mode.
As Tezlink and Etherlink are going to run on the same rollup, we are isolating parameters specific to a L2 chain. For now we only take the chain_id and the chain_family of the chain (Evm or Michelson).
How
- The first commit adds a
chain_idfield in the configuration. At this point, the value of thechain_idis the default chain id (1337). - The second commit changes the initialization of this field to be the correct chain id (the result of
retrieve_chain_id). - The third commit removes the
chain_idargument ofblock::producein favor of the configuration field. - The fourth commit turns the
chain_idfield in the configuration into a singletonChainConfigstruct. - The fifth and last commit adds a
chain_familyfield toChainConfig.
Manually testing the MR
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Raphaël Cauderlier