2019-10-28 07:53:10 +00:00
|
|
|
# Eth2 config helpers
|
2019-04-07 07:02:20 +00:00
|
|
|
|
2020-01-10 18:42:55 +00:00
|
|
|
`preset_loader`: A util to load config-presets with.
|
|
|
|
See [Configs documentation](../../../configs/README.md).
|
2019-04-07 07:02:20 +00:00
|
|
|
|
|
|
|
Usage:
|
|
|
|
|
|
|
|
```python
|
|
|
|
configs_path = 'configs/'
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
import preset_loader
|
|
|
|
from eth2spec.phase0 import spec
|
2019-04-15 13:32:51 +00:00
|
|
|
my_presets = preset_loader.load_presets(configs_path, 'mainnet')
|
2019-04-07 07:02:20 +00:00
|
|
|
spec.apply_constants_preset(my_presets)
|
|
|
|
```
|
|
|
|
|
|
|
|
WARNING: this overwrites globals, make sure to prevent accidental collisions with other usage of the same imported specs package.
|