-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from ethereum/dev
Release v1.1.0 to master
- Loading branch information
Showing
11 changed files
with
50 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,49 @@ | ||
from typing import Dict, NamedTuple | ||
|
||
|
||
DEPOSIT_CLI_VERSION = '1.0.0' | ||
DEPOSIT_CLI_VERSION = '1.1.0' | ||
|
||
|
||
class BaseChainSetting(NamedTuple): | ||
ETH2_NETWORK_NAME: str | ||
GENESIS_FORK_VERSION: bytes | ||
|
||
|
||
MAINNET = 'mainnet' | ||
WITTI = 'witti' | ||
ALTONA = 'altona' | ||
MEDALLA = 'medalla' | ||
SPADINA = 'spadina' | ||
ZINKEN = 'zinken' | ||
PYRMONT = 'pyrmont' | ||
|
||
|
||
# Eth2 Mainnet setting | ||
MainnetSetting = BaseChainSetting(GENESIS_FORK_VERSION=bytes.fromhex('00000000')) | ||
MainnetSetting = BaseChainSetting(ETH2_NETWORK_NAME=MAINNET, GENESIS_FORK_VERSION=bytes.fromhex('00000000')) | ||
# Eth2 spec v0.11.3 testnet | ||
WittiSetting = BaseChainSetting(GENESIS_FORK_VERSION=bytes.fromhex('00000113')) | ||
WittiSetting = BaseChainSetting(ETH2_NETWORK_NAME=WITTI, GENESIS_FORK_VERSION=bytes.fromhex('00000113')) | ||
# Eth2 spec v0.12.1 testnet | ||
AltonaSetting = BaseChainSetting(GENESIS_FORK_VERSION=bytes.fromhex('00000121')) | ||
AltonaSetting = BaseChainSetting(ETH2_NETWORK_NAME=ALTONA, GENESIS_FORK_VERSION=bytes.fromhex('00000121')) | ||
# Eth2 "official" public testnet (spec v0.12.2) | ||
MedallaSetting = BaseChainSetting(GENESIS_FORK_VERSION=bytes.fromhex('00000001')) | ||
MedallaSetting = BaseChainSetting(ETH2_NETWORK_NAME=MEDALLA, GENESIS_FORK_VERSION=bytes.fromhex('00000001')) | ||
# Eth2 "dress rehearsal" testnet (spec v0.12.3) | ||
SpadinaSetting = BaseChainSetting(GENESIS_FORK_VERSION=bytes.fromhex('00000002')) | ||
SpadinaSetting = BaseChainSetting(ETH2_NETWORK_NAME=SPADINA, GENESIS_FORK_VERSION=bytes.fromhex('00000002')) | ||
# Eth2 "dress rehearsal" testnet (spec v0.12.3) | ||
ZinkenSetting = BaseChainSetting(GENESIS_FORK_VERSION=bytes.fromhex('00000003')) | ||
ZinkenSetting = BaseChainSetting(ETH2_NETWORK_NAME=ZINKEN, GENESIS_FORK_VERSION=bytes.fromhex('00000003')) | ||
# Eth2 pre-launch testnet (spec v1.0.0) | ||
PyrmontSetting = BaseChainSetting(ETH2_NETWORK_NAME=PYRMONT, GENESIS_FORK_VERSION=bytes.fromhex('00002009')) | ||
|
||
|
||
MAINNET = 'mainnet' | ||
WITTI = 'witti' | ||
ALTONA = 'altona' | ||
MEDALLA = 'medalla' | ||
SPADINA = 'spadina' | ||
ZINKEN = 'zinken' | ||
ALL_CHAINS: Dict[str, BaseChainSetting] = { | ||
MAINNET: MainnetSetting, | ||
WITTI: WittiSetting, | ||
ALTONA: AltonaSetting, | ||
MEDALLA: MedallaSetting, | ||
SPADINA: SpadinaSetting, | ||
ZINKEN: ZinkenSetting, | ||
PYRMONT: PyrmontSetting, | ||
} | ||
|
||
|
||
def get_setting(chain_name: str = MAINNET) -> BaseChainSetting: | ||
def get_chain_setting(chain_name: str = MAINNET) -> BaseChainSetting: | ||
return ALL_CHAINS[chain_name] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters