eth2.0-specs/configs
Jacek Sieka 46bc206740
Add `CONFIG_NAME` to configs
Runtime configurations apply to a certain network and the name of that
network is useful for humans such that they can talk about it.

Some of the existing configs already include a `CONFIG_NAME` toggle -
might as well add it here as well and avoid some confusion - this name
above all becomes useful in the beacon API.

By extension, the `CONFIG_NAME` config will appear in the beacon api as
a result of being defined here.
2021-12-29 13:02:36 +01:00
..
README.md Update configs/README.md 2021-05-19 19:08:59 +02:00
mainnet.yaml Add `CONFIG_NAME` to configs 2021-12-29 13:02:36 +01:00
minimal.yaml Add `CONFIG_NAME` to configs 2021-12-29 13:02:36 +01:00

README.md

Configurations

This directory contains a set of configurations used for testing, testnets, and mainnet. A client binary may be compiled for a specific PRESET_BASE, and then load different configurations around that preset to participate in different networks or tests.

Standard configs:

Not all network configurations are in scope for the specification, see github.com/eth2-clients/eth2-networks for common networks, and additional testnet assets.

Forking

Variables are not replaced but extended with forks. This is to support syncing from one state to another over a fork boundary, without hot-swapping a config. Instead, for forks that introduce changes in a variable, the variable name is suffixed with the fork name, e.g. INACTIVITY_PENALTY_QUOTIENT_ALTAIR.

Future-fork variables can be ignored, e.g. ignore Sharding variables as a client that only supports Phase 0 currently.

Over time, the need to sync an older state may be deprecated. In this case, the suffix on the new variable may be removed, and the old variable will keep a special name before completely being removed.

A previous iteration of forking made use of "timelines", but this collides with the definitions used in the spec (variables for special forking slots, etc.), and was not integrated sufficiently in any of the spec tools or implementations. Instead, the config essentially doubles as fork definition now, e.g. changing the value for ALTAIR_FORK_EPOCH changes the fork.

Format

Each preset and configuration is a key-value mapping.

Key: an UPPER_SNAKE_CASE (a.k.a. "macro case") formatted string, name of the variable.

Value can be either:

  • an unsigned integer number, can be up to 64 bits (incl.)
  • a hexadecimal string, prefixed with 0x

This format is fully YAML compatible. The presets and configurations may contain comments to describe the values.