Remove `CONFIG_NAME` from the config files. And add it back to pyspec context for testing

This commit is contained in:
Hsiao-Wei Wang 2021-04-15 15:49:29 +08:00
parent 1235e58a8d
commit 26f54d6f22
No known key found for this signature in database
GPG Key ID: 1111A8A81778319E
11 changed files with 1 additions and 22 deletions

View File

@ -1,7 +1,5 @@
# Mainnet preset - Altair
CONFIG_NAME: "mainnet"
# Updated penalty values
# ---------------------------------------------------------------
# 3 * 2**24 (= 50,331,648)

View File

@ -1,7 +1,5 @@
# Mainnet preset - Custody Game
CONFIG_NAME: "mainnet"
# Time parameters
# ---------------------------------------------------------------
# 2**1 (= 2) epochs, 12.8 minutes

View File

@ -1,7 +1,5 @@
# Mainnet preset - The Merge
CONFIG_NAME: "mainnet"
# Fork
# ---------------------------------------------------------------
MERGE_FORK_VERSION: 0x02000000

View File

@ -1,7 +1,5 @@
# Mainnet preset
CONFIG_NAME: "mainnet"
# Misc
# ---------------------------------------------------------------
# 2**6 (= 64)

View File

@ -1,7 +1,5 @@
# Mainnet preset - Sharding
CONFIG_NAME: "mainnet"
# Fork
# ---------------------------------------------------------------
SHARDING_FORK_VERSION: 0x03000000

View File

@ -1,7 +1,5 @@
# Minimal preset - Altair
CONFIG_NAME: "minimal"
# Updated penalty values
# ---------------------------------------------------------------
# 3 * 2**24 (= 50,331,648)

View File

@ -1,7 +1,5 @@
# Minimal preset - Custody Game
CONFIG_NAME: "minimal"
# Time parameters
# ---------------------------------------------------------------
# 2**1 (= 2) epochs, 12.8 minutes

View File

@ -1,7 +1,5 @@
# Minimal preset - The Merge
CONFIG_NAME: "minimal"
# Fork
# ---------------------------------------------------------------
MERGE_FORK_VERSION: 0x02000001

View File

@ -1,7 +1,5 @@
# Minimal preset
CONFIG_NAME: "minimal"
# Misc
# ---------------------------------------------------------------

View File

@ -1,7 +1,5 @@
# Minimal preset - Sharding
CONFIG_NAME: "minimal"
# Fork
# ---------------------------------------------------------------
SHARDING_FORK_VERSION: 0x03000001

View File

@ -54,8 +54,7 @@ def load_config_file(configs_dir: str, presets_name: str) -> Dict[str, Any]:
out[k] = [int(item) if item.isdigit() else item for item in v]
elif isinstance(v, str) and v.startswith("0x"):
out[k] = bytes.fromhex(v[2:])
elif k == "CONFIG_NAME":
out[k] = str(v)
else:
out[k] = int(v)
out['CONFIG_NAME'] = presets_name
return out