mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-19 15:11:05 +00:00
Fix MAX_SHARDS
and move config files to configs/{network}/{fork}
This commit is contained in:
parent
85ec791935
commit
aa75fb0b69
@ -1,7 +1,7 @@
|
||||
# Mainnet preset - phase 1
|
||||
|
||||
|
||||
# # phase1-fork
|
||||
# phase1-fork
|
||||
# ---------------------------------------------------------------
|
||||
PHASE_1_FORK_VERSION: 0x01000000
|
||||
# [STUB]
|
||||
@ -13,7 +13,7 @@ INITIAL_ACTIVE_SHARDS: 64
|
||||
# ---------------------------------------------------------------
|
||||
# Misc
|
||||
# 2**10 (= 1,024)
|
||||
MAX_SHARDS: 8
|
||||
MAX_SHARDS: 1024
|
||||
# 2**7 (= 128)
|
||||
LIGHT_CLIENT_COMMITTEE_SIZE: 128
|
||||
# 2**3 (= 8)
|
||||
@ -48,9 +48,8 @@ DOMAIN_LIGHT_CLIENT: 0x82000000
|
||||
DOMAIN_CUSTODY_BIT_SLASHING: 0x83000000
|
||||
|
||||
|
||||
# Phase 1: Custody Game
|
||||
# custody-game
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
# Time parameters
|
||||
# 2**1 (= 2) epochs, 12.8 minutes
|
||||
RANDAO_PENALTY_EPOCHS: 2
|
@ -1,5 +1,4 @@
|
||||
import os
|
||||
from os.path import join
|
||||
from pathlib import Path
|
||||
from typing import Dict, Any
|
||||
|
||||
@ -37,15 +36,15 @@ def load_config_file(configs_dir: str, presets_name: str) -> Dict[str, Any]:
|
||||
:param presets_name: The name of the presets. (lowercase snake_case)
|
||||
:return: Dictionary, mapping of constant-name -> constant-value
|
||||
"""
|
||||
_, _, config_files = next(os.walk(configs_dir))
|
||||
present_dir = Path(configs_dir) / presets_name
|
||||
_, _, config_files = next(os.walk(present_dir))
|
||||
config_files.sort()
|
||||
loaded_config = {}
|
||||
for config_file_name in config_files:
|
||||
if config_file_name.startswith(presets_name):
|
||||
yaml = YAML(typ='base')
|
||||
path = Path(join(configs_dir, config_file_name))
|
||||
loaded = yaml.load(path)
|
||||
loaded_config.update(loaded)
|
||||
yaml = YAML(typ='base')
|
||||
path = present_dir / config_file_name
|
||||
loaded = yaml.load(path)
|
||||
loaded_config.update(loaded)
|
||||
assert loaded_config != {}
|
||||
|
||||
out: Dict[str, Any] = dict()
|
||||
|
Loading…
x
Reference in New Issue
Block a user