2021-05-19 15:15:34 +00:00
# Configurations
2019-07-25 21:13:33 +00:00
2021-05-19 15:15:34 +00:00
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.
2019-07-25 21:13:33 +00:00
2021-05-19 15:15:34 +00:00
Standard configs:
- [`mainnet.yaml` ](./mainnet.yaml ): Mainnet configuration
- [`minimal.yaml` ](./minimal.yaml ): Minimal configuration, used in spec-testing along with the [`minimal` ](../presets/minimal ) preset.
2019-07-25 21:13:33 +00:00
2021-05-19 15:15:34 +00:00
Not all network configurations are in scope for the specification,
see [`github.com/eth2-clients/eth2-networks` ](https://github.com/eth2-clients/eth2-networks ) for common networks,
and additional testnet assets.
2019-07-25 21:13:33 +00:00
## Forking
2021-05-19 17:08:59 +00:00
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.
2021-05-19 15:15:34 +00:00
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.
2019-07-25 21:13:33 +00:00
Over time, the need to sync an older state may be deprecated.
2021-05-19 15:15:34 +00:00
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.
2019-07-25 21:13:33 +00:00
2021-05-06 17:49:33 +00:00
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.
2021-04-20 16:24:44 +00:00
Instead, the config essentially doubles as fork definition now, e.g. changing the value for `ALTAIR_FORK_EPOCH` changes the fork.
2019-07-25 21:13:33 +00:00
## Format
2021-05-06 17:49:33 +00:00
Each preset and configuration is a key-value mapping.
2019-07-25 21:13:33 +00:00
2021-05-06 17:49:33 +00:00
**Key**: an `UPPER_SNAKE_CASE` (a.k.a. "macro case") formatted string, name of the variable.
2019-07-25 21:13:33 +00:00
**Value** can be either:
- an unsigned integer number, can be up to 64 bits (incl.)
- a hexadecimal string, prefixed with `0x`
2021-05-06 17:49:33 +00:00
This format is fully YAML compatible.
The presets and configurations may contain comments to describe the values.