[go: up one dir, main page]

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_id field in the configuration. At this point, the value of the chain_id is 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_id argument of block::produce in favor of the configuration field.
  • The fourth commit turns the chain_id field in the configuration into a singleton ChainConfig struct.
  • The fifth and last commit adds a chain_family field to ChainConfig.

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.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Raphaël Cauderlier

Merge request reports

Loading