-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration for the Gnosis beacon chain (#5296)
- Loading branch information
1 parent
c294974
commit 4097026
Showing
10 changed files
with
251 additions
and
2 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
Binary file added
BIN
+3.07 MB
ethereum/networks/src/main/resources/tech/pegasys/teku/networks/gnosis-genesis.ssz
Binary file not shown.
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 |
---|---|---|
|
@@ -22,6 +22,7 @@ public enum Eth2Network { | |
PRATER, | ||
KINTSUGI, | ||
KILN, | ||
GNOSIS, | ||
// Test networks | ||
MINIMAL, | ||
SWIFT, | ||
|
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
88 changes: 88 additions & 0 deletions
88
ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/gnosis.yaml
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Gnosis Beacon Chain config | ||
|
||
# Extends the gnosis preset | ||
PRESET_BASE: 'gnosis' | ||
|
||
# For backwards compatibility in the config/spec API | ||
CONFIG_NAME: 'gnosis' | ||
|
||
# Transition | ||
# --------------------------------------------------------------- | ||
# TBD, 2**256-2**10 is a placeholder | ||
TERMINAL_TOTAL_DIFFICULTY: 115792089237316195423570985008687907853269984665640564039457584007913129638912 | ||
# By default, don't use these params | ||
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000 | ||
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615 | ||
|
||
|
||
# Genesis | ||
# --------------------------------------------------------------- | ||
# `2**12` (= 4,096) | ||
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 4096 | ||
# Dec 8, 2021, 13:00 UTC | ||
MIN_GENESIS_TIME: 1638968400 | ||
# Gnosis Beacon Chain initial fork version | ||
GENESIS_FORK_VERSION: 0x00000064 | ||
# 6000 seconds (100 minutes) | ||
GENESIS_DELAY: 6000 | ||
|
||
|
||
# Forking | ||
# --------------------------------------------------------------- | ||
# Some forks are disabled for now: | ||
# - These may be re-assigned to another fork-version later | ||
# - Temporarily set to max uint64 value: 2**64 - 1 | ||
|
||
# Altair | ||
ALTAIR_FORK_VERSION: 0x01000064 | ||
ALTAIR_FORK_EPOCH: 512 | ||
# Merge | ||
BELLATRIX_FORK_VERSION: 0x02000064 | ||
BELLATRIX_FORK_EPOCH: 18446744073709551615 | ||
# Sharding | ||
SHARDING_FORK_VERSION: 0x03000064 | ||
SHARDING_FORK_EPOCH: 18446744073709551615 | ||
|
||
# TBD, 2**32 is a placeholder. Merge transition approach is in active R&D. | ||
TRANSITION_TOTAL_DIFFICULTY: 4294967296 | ||
|
||
|
||
# Time parameters | ||
# --------------------------------------------------------------- | ||
# 5 seconds | ||
SECONDS_PER_SLOT: 5 | ||
# 6 (estimate from Gnosis Chain) | ||
SECONDS_PER_ETH1_BLOCK: 6 | ||
# 2**8 (= 256) epochs ~8 hours | ||
MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256 | ||
# 2**8 (= 256) epochs ~8 hours | ||
SHARD_COMMITTEE_PERIOD: 256 | ||
# 2**10 (= 1024) ~1.4 hour | ||
ETH1_FOLLOW_DISTANCE: 1024 | ||
|
||
|
||
# Validator cycle | ||
# --------------------------------------------------------------- | ||
# 2**2 (= 4) | ||
INACTIVITY_SCORE_BIAS: 4 | ||
# 2**4 (= 16) | ||
INACTIVITY_SCORE_RECOVERY_RATE: 16 | ||
# 2**4 * 10**9 (= 16,000,000,000) Gwei | ||
EJECTION_BALANCE: 16000000000 | ||
# 2**2 (= 4) | ||
MIN_PER_EPOCH_CHURN_LIMIT: 4 | ||
# 2**12 (= 4096) | ||
CHURN_LIMIT_QUOTIENT: 4096 | ||
|
||
|
||
# Fork choice | ||
# --------------------------------------------------------------- | ||
PROPOSER_SCORE_BOOST: 70 | ||
|
||
|
||
# Deposit contract | ||
# --------------------------------------------------------------- | ||
# Gnosis Chain | ||
DEPOSIT_CHAIN_ID: 100 | ||
DEPOSIT_NETWORK_ID: 100 | ||
DEPOSIT_CONTRACT_ADDRESS: 0x0B98057eA310F4d31F2a452B414647007d1645d9 |
24 changes: 24 additions & 0 deletions
24
ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/gnosis/altair.yaml
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Gnosis Beacon Chain preset - Altair | ||
|
||
# Updated penalty values | ||
# --------------------------------------------------------------- | ||
# 3 * 2**24 (= 50,331,648) | ||
INACTIVITY_PENALTY_QUOTIENT_ALTAIR: 50331648 | ||
# 2**6 (= 64) | ||
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR: 64 | ||
# 2 | ||
PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR: 2 | ||
|
||
|
||
# Sync committee | ||
# --------------------------------------------------------------- | ||
# 2**9 (= 512) | ||
SYNC_COMMITTEE_SIZE: 512 | ||
# 2**8 (= 256) | ||
EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 512 | ||
|
||
|
||
# Sync protocol | ||
# --------------------------------------------------------------- | ||
# 1 | ||
MIN_SYNC_COMMITTEE_PARTICIPANTS: 1 |
22 changes: 22 additions & 0 deletions
22
ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/gnosis/bellatrix.yaml
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Gnosis Beacon Chain preset - Bellatrix | ||
|
||
# Updated penalty values | ||
# --------------------------------------------------------------- | ||
# 2**24 (= 16,777,216) | ||
INACTIVITY_PENALTY_QUOTIENT_BELLATRIX: 16777216 | ||
# 2**5 (= 32) | ||
MIN_SLASHING_PENALTY_QUOTIENT_BELLATRIX: 32 | ||
# 3 | ||
PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX: 3 | ||
|
||
|
||
# Execution | ||
# --------------------------------------------------------------- | ||
# 2**30 (= 1,073,741,824) | ||
MAX_BYTES_PER_TRANSACTION: 1073741824 | ||
# 2**20 (= 1,048,576) | ||
MAX_TRANSACTIONS_PER_PAYLOAD: 1048576 | ||
# 2**8 (= 256) | ||
BYTES_PER_LOGS_BLOOM: 256 | ||
# 2**5 (= 32) | ||
MAX_EXTRA_DATA_BYTES: 32 |
94 changes: 94 additions & 0 deletions
94
ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/gnosis/phase0.yaml
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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Gnosis Beacon Chain preset - Phase0 | ||
|
||
# Misc | ||
# --------------------------------------------------------------- | ||
# 2**6 (= 64) | ||
MAX_COMMITTEES_PER_SLOT: 64 | ||
# 2**7 (= 128) | ||
TARGET_COMMITTEE_SIZE: 128 | ||
# 2**11 (= 2,048) | ||
MAX_VALIDATORS_PER_COMMITTEE: 2048 | ||
# See issue 563 | ||
SHUFFLE_ROUND_COUNT: 90 | ||
# 4 | ||
HYSTERESIS_QUOTIENT: 4 | ||
# 1 (minus 0.25) | ||
HYSTERESIS_DOWNWARD_MULTIPLIER: 1 | ||
# 5 (plus 1.25) | ||
HYSTERESIS_UPWARD_MULTIPLIER: 5 | ||
|
||
|
||
# Fork Choice | ||
# --------------------------------------------------------------- | ||
# 2**3 (= 8) | ||
SAFE_SLOTS_TO_UPDATE_JUSTIFIED: 8 | ||
|
||
|
||
# Gwei values | ||
# --------------------------------------------------------------- | ||
# 2**0 * 10**9 (= 1,000,000,000) Gwei | ||
MIN_DEPOSIT_AMOUNT: 1000000000 | ||
# 2**5 * 10**9 (= 32,000,000,000) Gwei | ||
MAX_EFFECTIVE_BALANCE: 32000000000 | ||
# 2**0 * 10**9 (= 1,000,000,000) Gwei | ||
EFFECTIVE_BALANCE_INCREMENT: 1000000000 | ||
|
||
|
||
# Time parameters | ||
# --------------------------------------------------------------- | ||
# 2**0 (= 1) slots 5 seconds | ||
MIN_ATTESTATION_INCLUSION_DELAY: 1 | ||
# 2**4 (= 16) slots 1.87 minutes | ||
SLOTS_PER_EPOCH: 16 | ||
# 2**0 (= 1) epochs 1.87 minutes | ||
MIN_SEED_LOOKAHEAD: 1 | ||
# 2**2 (= 4) epochs 7.47 minutes | ||
MAX_SEED_LOOKAHEAD: 4 | ||
# 2**6 (= 64) epochs ~2 hours | ||
EPOCHS_PER_ETH1_VOTING_PERIOD: 64 | ||
# 2**13 (= 8,192) slots ~15.9 hours | ||
SLOTS_PER_HISTORICAL_ROOT: 8192 | ||
# 2**2 (= 4) epochs 7.47 minutes | ||
MIN_EPOCHS_TO_INACTIVITY_PENALTY: 4 | ||
|
||
|
||
# State list lengths | ||
# --------------------------------------------------------------- | ||
# 2**16 (= 65,536) epochs ~85 days | ||
EPOCHS_PER_HISTORICAL_VECTOR: 65536 | ||
# 2**13 (= 8,192) epochs ~10.6 days | ||
EPOCHS_PER_SLASHINGS_VECTOR: 8192 | ||
# 2**24 (= 16,777,216) historical roots, ~15,243 years | ||
HISTORICAL_ROOTS_LIMIT: 16777216 | ||
# 2**40 (= 1,099,511,627,776) validator spots | ||
VALIDATOR_REGISTRY_LIMIT: 1099511627776 | ||
|
||
|
||
# Reward and penalty quotients | ||
# --------------------------------------------------------------- | ||
# 25 | ||
BASE_REWARD_FACTOR: 25 | ||
# 2**9 (= 512) | ||
WHISTLEBLOWER_REWARD_QUOTIENT: 512 | ||
# 2**3 (= 8) | ||
PROPOSER_REWARD_QUOTIENT: 8 | ||
# 2**26 (= 67,108,864) | ||
INACTIVITY_PENALTY_QUOTIENT: 67108864 | ||
# 2**7 (= 128) (lower safety margin at Phase 0 genesis) | ||
MIN_SLASHING_PENALTY_QUOTIENT: 128 | ||
# 1 (lower safety margin at Phase 0 genesis) | ||
PROPORTIONAL_SLASHING_MULTIPLIER: 1 | ||
|
||
|
||
# Max operations per block | ||
# --------------------------------------------------------------- | ||
# 2**4 (= 16) | ||
MAX_PROPOSER_SLASHINGS: 16 | ||
# 2**1 (= 2) | ||
MAX_ATTESTER_SLASHINGS: 2 | ||
# 2**7 (= 128) | ||
MAX_ATTESTATIONS: 128 | ||
# 2**4 (= 16) | ||
MAX_DEPOSITS: 16 | ||
# 2**4 (= 16) | ||
MAX_VOLUNTARY_EXITS: 16 |