From c91d0dc6dfd9b3be4325e5830e2b21c6564de38d Mon Sep 17 00:00:00 2001 From: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:40:41 +0300 Subject: [PATCH] merge preset files --- presets/mainnet.yaml | 270 +++++++++++++++++ presets/mainnet/altair.yaml | 26 -- presets/mainnet/bellatrix.yaml | 21 -- presets/mainnet/capella.yaml | 17 -- presets/mainnet/custody_game.yaml | 35 --- presets/mainnet/deneb.yaml | 12 - presets/mainnet/eip6110.yaml | 6 - presets/mainnet/phase0.yaml | 88 ------ presets/mainnet/sharding.yaml | 32 --- .../trusted_setups/trusted_setup_4096.json | 3 +- presets/mainnet/whisk.yaml | 16 -- presets/minimal.yaml | 271 ++++++++++++++++++ presets/minimal/altair.yaml | 26 -- presets/minimal/bellatrix.yaml | 21 -- presets/minimal/capella.yaml | 17 -- presets/minimal/custody_game.yaml | 35 --- presets/minimal/deneb.yaml | 12 - presets/minimal/eip6110.yaml | 6 - presets/minimal/phase0.yaml | 88 ------ presets/minimal/sharding.yaml | 33 --- .../trusted_setups/trusted_setup_4096.json | 3 +- presets/minimal/whisk.yaml | 16 -- pysetup/typing.py | 2 +- setup.py | 41 +-- .../pyspec/eth2spec/config/config_util.py | 20 +- tests/generators/README.md | 5 - 26 files changed, 557 insertions(+), 565 deletions(-) create mode 100644 presets/mainnet.yaml delete mode 100644 presets/mainnet/altair.yaml delete mode 100644 presets/mainnet/bellatrix.yaml delete mode 100644 presets/mainnet/capella.yaml delete mode 100644 presets/mainnet/custody_game.yaml delete mode 100644 presets/mainnet/deneb.yaml delete mode 100644 presets/mainnet/eip6110.yaml delete mode 100644 presets/mainnet/phase0.yaml delete mode 100644 presets/mainnet/sharding.yaml delete mode 100644 presets/mainnet/whisk.yaml create mode 100644 presets/minimal.yaml delete mode 100644 presets/minimal/altair.yaml delete mode 100644 presets/minimal/bellatrix.yaml delete mode 100644 presets/minimal/capella.yaml delete mode 100644 presets/minimal/custody_game.yaml delete mode 100644 presets/minimal/deneb.yaml delete mode 100644 presets/minimal/eip6110.yaml delete mode 100644 presets/minimal/phase0.yaml delete mode 100644 presets/minimal/sharding.yaml delete mode 100644 presets/minimal/whisk.yaml diff --git a/presets/mainnet.yaml b/presets/mainnet.yaml new file mode 100644 index 00000000000..4108262b1d7 --- /dev/null +++ b/presets/mainnet.yaml @@ -0,0 +1,270 @@ +# Mainnet 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 + + +# 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 12 seconds +MIN_ATTESTATION_INCLUSION_DELAY: 1 +# 2**5 (= 32) slots 6.4 minutes +SLOTS_PER_EPOCH: 32 +# 2**0 (= 1) epochs 6.4 minutes +MIN_SEED_LOOKAHEAD: 1 +# 2**2 (= 4) epochs 25.6 minutes +MAX_SEED_LOOKAHEAD: 4 +# 2**6 (= 64) epochs ~6.8 hours +EPOCHS_PER_ETH1_VOTING_PERIOD: 64 +# 2**13 (= 8,192) slots ~27 hours +SLOTS_PER_HISTORICAL_ROOT: 8192 +# 2**2 (= 4) epochs 25.6 minutes +MIN_EPOCHS_TO_INACTIVITY_PENALTY: 4 + + +# State list lengths +# --------------------------------------------------------------- +# 2**16 (= 65,536) epochs ~0.8 years +EPOCHS_PER_HISTORICAL_VECTOR: 65536 +# 2**13 (= 8,192) epochs ~36 days +EPOCHS_PER_SLASHINGS_VECTOR: 8192 +# 2**24 (= 16,777,216) historical roots, ~26,131 years +HISTORICAL_ROOTS_LIMIT: 16777216 +# 2**40 (= 1,099,511,627,776) validator spots +VALIDATOR_REGISTRY_LIMIT: 1099511627776 + + +# Reward and penalty quotients +# --------------------------------------------------------------- +# 2**6 (= 64) +BASE_REWARD_FACTOR: 64 +# 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 + +# Mainnet 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: 256 + + +# Sync protocol +# --------------------------------------------------------------- +# 1 +MIN_SYNC_COMMITTEE_PARTICIPANTS: 1 +# SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD (= 32 * 256) +UPDATE_TIMEOUT: 8192 + + +# Mainnet 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 + + +# Mainnet preset - Capella + +# Misc +# Max operations per block +# --------------------------------------------------------------- +# 2**4 (= 16) +MAX_BLS_TO_EXECUTION_CHANGES: 16 + +# Execution +# --------------------------------------------------------------- +# 2**4 (= 16) withdrawals +MAX_WITHDRAWALS_PER_PAYLOAD: 16 + +# Withdrawals processing +# --------------------------------------------------------------- +# 2**14 (= 16384) validators +MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP: 16384 + + +# Mainnet preset - Deneb + +# Misc +# --------------------------------------------------------------- +# `uint64(4096)` +FIELD_ELEMENTS_PER_BLOB: 4096 +# `uint64(2**12)` (= 4096) +MAX_BLOB_COMMITMENTS_PER_BLOCK: 4096 +# `uint64(6)` +MAX_BLOBS_PER_BLOCK: 6 +# `floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments')) + 1 + ceillog2(MAX_BLOB_COMMITMENTS_PER_BLOCK)` = 4 + 1 + 12 = 17 +KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: 17 + + +# Mainnet preset - Custody Game + +# Time parameters +# --------------------------------------------------------------- +# 2**1 (= 2) epochs, 12.8 minutes +RANDAO_PENALTY_EPOCHS: 2 +# 2**15 (= 32,768) epochs, ~146 days +EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS: 32768 +# 2**14 (= 16,384) epochs ~73 days +EPOCHS_PER_CUSTODY_PERIOD: 16384 +# 2**11 (= 2,048) epochs, ~9 days +CUSTODY_PERIOD_TO_RANDAO_PADDING: 2048 +# 2**15 (= 32,768) epochs, ~146 days +MAX_CHUNK_CHALLENGE_DELAY: 32768 + + +# Max operations +# --------------------------------------------------------------- +# 2**8 (= 256) +MAX_CUSTODY_KEY_REVEALS: 256 +# 2**0 (= 1) +MAX_EARLY_DERIVED_SECRET_REVEALS: 1 +# 2**2 (= 2) +MAX_CUSTODY_CHUNK_CHALLENGES: 4 +# 2** 4 (= 16) +MAX_CUSTODY_CHUNK_CHALLENGE_RESP: 16 +# 2**0 (= 1) +MAX_CUSTODY_SLASHINGS: 1 + + +# Reward and penalty quotients +# --------------------------------------------------------------- +EARLY_DERIVED_SECRET_REVEAL_SLOT_REWARD_MULTIPLE: 2 +# 2**8 (= 256) +MINOR_REWARD_QUOTIENT: 256 + + +# Mainnet preset - EIP6110 + +# Execution +# --------------------------------------------------------------- +# 2**13 (= 8192) receipts +MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 8192 + + +# Mainnet preset - Sharding + +# Misc +# --------------------------------------------------------------- +# 2**10 (= 1,024) +MAX_SHARDS: 1024 +# 2**6 (= 64) +INITIAL_ACTIVE_SHARDS: 64 +# 2**3 (= 8) +SAMPLE_PRICE_ADJUSTMENT_COEFFICIENT: 8 +# 2**4 (= 16) +MAX_SHARD_PROPOSER_SLASHINGS: 16 +# +MAX_SHARD_HEADERS_PER_SHARD: 4 +# 2**8 (= 256) +SHARD_STATE_MEMORY_SLOTS: 256 +# 2**40 (= 1,099,511,627,776) +BLOB_BUILDER_REGISTRY_LIMIT: 1099511627776 + +# Shard blob samples +# --------------------------------------------------------------- +# 2**11 (= 2,048) +MAX_SAMPLES_PER_BLOCK: 2048 +# 2**10 (= 1,1024) +TARGET_SAMPLES_PER_BLOCK: 1024 + +# Gwei values +# --------------------------------------------------------------- +# 2**33 (= 8,589,934,592) Gwei +MAX_SAMPLE_PRICE: 8589934592 +# 2**3 (= 8) Gwei +MIN_SAMPLE_PRICE: 8 + + +# Mainnet preset - Whisk + +# Misc +# --------------------------------------------------------------- +# `uint64(4)` +CURDLEPROOFS_N_BLINDERS: 4 +# `uint64(2**14)` +WHISK_CANDIDATE_TRACKERS_COUNT: 16384 +# `uint64(2**13)` must be < WHISK_CANDIDATE_TRACKERS_COUNT +WHISK_PROPOSER_TRACKERS_COUNT: 8192 +# `uint64(2**7 - CURDLEPROOFS_N_BLINDERS)` +WHISK_VALIDATORS_PER_SHUFFLE: 124 +# `uint64(2**15)` TODO: will be replaced by a fix format once there's a serialized format +WHISK_MAX_SHUFFLE_PROOF_SIZE: 32768 +# `uint64(2**10)` TODO: will be replaced by a fix format once there's a serialized format +WHISK_MAX_OPENING_PROOF_SIZE: 1024 + + diff --git a/presets/mainnet/altair.yaml b/presets/mainnet/altair.yaml deleted file mode 100644 index 813ef72122a..00000000000 --- a/presets/mainnet/altair.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Mainnet 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: 256 - - -# Sync protocol -# --------------------------------------------------------------- -# 1 -MIN_SYNC_COMMITTEE_PARTICIPANTS: 1 -# SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD (= 32 * 256) -UPDATE_TIMEOUT: 8192 diff --git a/presets/mainnet/bellatrix.yaml b/presets/mainnet/bellatrix.yaml deleted file mode 100644 index 7ae61b732f1..00000000000 --- a/presets/mainnet/bellatrix.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# Mainnet 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 diff --git a/presets/mainnet/capella.yaml b/presets/mainnet/capella.yaml deleted file mode 100644 index 913c2956ba7..00000000000 --- a/presets/mainnet/capella.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Mainnet preset - Capella - -# Misc -# Max operations per block -# --------------------------------------------------------------- -# 2**4 (= 16) -MAX_BLS_TO_EXECUTION_CHANGES: 16 - -# Execution -# --------------------------------------------------------------- -# 2**4 (= 16) withdrawals -MAX_WITHDRAWALS_PER_PAYLOAD: 16 - -# Withdrawals processing -# --------------------------------------------------------------- -# 2**14 (= 16384) validators -MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP: 16384 diff --git a/presets/mainnet/custody_game.yaml b/presets/mainnet/custody_game.yaml deleted file mode 100644 index 2930f9c783e..00000000000 --- a/presets/mainnet/custody_game.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# Mainnet preset - Custody Game - -# Time parameters -# --------------------------------------------------------------- -# 2**1 (= 2) epochs, 12.8 minutes -RANDAO_PENALTY_EPOCHS: 2 -# 2**15 (= 32,768) epochs, ~146 days -EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS: 32768 -# 2**14 (= 16,384) epochs ~73 days -EPOCHS_PER_CUSTODY_PERIOD: 16384 -# 2**11 (= 2,048) epochs, ~9 days -CUSTODY_PERIOD_TO_RANDAO_PADDING: 2048 -# 2**15 (= 32,768) epochs, ~146 days -MAX_CHUNK_CHALLENGE_DELAY: 32768 - - -# Max operations -# --------------------------------------------------------------- -# 2**8 (= 256) -MAX_CUSTODY_KEY_REVEALS: 256 -# 2**0 (= 1) -MAX_EARLY_DERIVED_SECRET_REVEALS: 1 -# 2**2 (= 2) -MAX_CUSTODY_CHUNK_CHALLENGES: 4 -# 2** 4 (= 16) -MAX_CUSTODY_CHUNK_CHALLENGE_RESP: 16 -# 2**0 (= 1) -MAX_CUSTODY_SLASHINGS: 1 - - -# Reward and penalty quotients -# --------------------------------------------------------------- -EARLY_DERIVED_SECRET_REVEAL_SLOT_REWARD_MULTIPLE: 2 -# 2**8 (= 256) -MINOR_REWARD_QUOTIENT: 256 diff --git a/presets/mainnet/deneb.yaml b/presets/mainnet/deneb.yaml deleted file mode 100644 index 0f56b8bdfac..00000000000 --- a/presets/mainnet/deneb.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Mainnet preset - Deneb - -# Misc -# --------------------------------------------------------------- -# `uint64(4096)` -FIELD_ELEMENTS_PER_BLOB: 4096 -# `uint64(2**12)` (= 4096) -MAX_BLOB_COMMITMENTS_PER_BLOCK: 4096 -# `uint64(6)` -MAX_BLOBS_PER_BLOCK: 6 -# `floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments')) + 1 + ceillog2(MAX_BLOB_COMMITMENTS_PER_BLOCK)` = 4 + 1 + 12 = 17 -KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: 17 diff --git a/presets/mainnet/eip6110.yaml b/presets/mainnet/eip6110.yaml deleted file mode 100644 index 16bf787d0c1..00000000000 --- a/presets/mainnet/eip6110.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# Mainnet preset - EIP6110 - -# Execution -# --------------------------------------------------------------- -# 2**13 (= 8192) receipts -MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 8192 diff --git a/presets/mainnet/phase0.yaml b/presets/mainnet/phase0.yaml deleted file mode 100644 index 00133ba3690..00000000000 --- a/presets/mainnet/phase0.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# Mainnet 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 - - -# 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 12 seconds -MIN_ATTESTATION_INCLUSION_DELAY: 1 -# 2**5 (= 32) slots 6.4 minutes -SLOTS_PER_EPOCH: 32 -# 2**0 (= 1) epochs 6.4 minutes -MIN_SEED_LOOKAHEAD: 1 -# 2**2 (= 4) epochs 25.6 minutes -MAX_SEED_LOOKAHEAD: 4 -# 2**6 (= 64) epochs ~6.8 hours -EPOCHS_PER_ETH1_VOTING_PERIOD: 64 -# 2**13 (= 8,192) slots ~27 hours -SLOTS_PER_HISTORICAL_ROOT: 8192 -# 2**2 (= 4) epochs 25.6 minutes -MIN_EPOCHS_TO_INACTIVITY_PENALTY: 4 - - -# State list lengths -# --------------------------------------------------------------- -# 2**16 (= 65,536) epochs ~0.8 years -EPOCHS_PER_HISTORICAL_VECTOR: 65536 -# 2**13 (= 8,192) epochs ~36 days -EPOCHS_PER_SLASHINGS_VECTOR: 8192 -# 2**24 (= 16,777,216) historical roots, ~26,131 years -HISTORICAL_ROOTS_LIMIT: 16777216 -# 2**40 (= 1,099,511,627,776) validator spots -VALIDATOR_REGISTRY_LIMIT: 1099511627776 - - -# Reward and penalty quotients -# --------------------------------------------------------------- -# 2**6 (= 64) -BASE_REWARD_FACTOR: 64 -# 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 \ No newline at end of file diff --git a/presets/mainnet/sharding.yaml b/presets/mainnet/sharding.yaml deleted file mode 100644 index 120a716c9ae..00000000000 --- a/presets/mainnet/sharding.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Mainnet preset - Sharding - -# Misc -# --------------------------------------------------------------- -# 2**10 (= 1,024) -MAX_SHARDS: 1024 -# 2**6 (= 64) -INITIAL_ACTIVE_SHARDS: 64 -# 2**3 (= 8) -SAMPLE_PRICE_ADJUSTMENT_COEFFICIENT: 8 -# 2**4 (= 16) -MAX_SHARD_PROPOSER_SLASHINGS: 16 -# -MAX_SHARD_HEADERS_PER_SHARD: 4 -# 2**8 (= 256) -SHARD_STATE_MEMORY_SLOTS: 256 -# 2**40 (= 1,099,511,627,776) -BLOB_BUILDER_REGISTRY_LIMIT: 1099511627776 - -# Shard blob samples -# --------------------------------------------------------------- -# 2**11 (= 2,048) -MAX_SAMPLES_PER_BLOCK: 2048 -# 2**10 (= 1,1024) -TARGET_SAMPLES_PER_BLOCK: 1024 - -# Gwei values -# --------------------------------------------------------------- -# 2**33 (= 8,589,934,592) Gwei -MAX_SAMPLE_PRICE: 8589934592 -# 2**3 (= 8) Gwei -MIN_SAMPLE_PRICE: 8 diff --git a/presets/mainnet/trusted_setups/trusted_setup_4096.json b/presets/mainnet/trusted_setups/trusted_setup_4096.json index c6d724efafd..5840c6ef7a1 100644 --- a/presets/mainnet/trusted_setups/trusted_setup_4096.json +++ b/presets/mainnet/trusted_setups/trusted_setup_4096.json @@ -4164,4 +4164,5 @@ "0xa92039a08b5502d5b211a7744099c9f93fa8c90cedcb1d05e92f01886219dd464eb5fb0337496ad96ed09c987da4e5f019035c5b01cc09b2a18b8a8dd419bc5895388a07e26958f6bd26751929c25f89b8eb4a299d822e2d26fec9ef350e0d3c", "0x92dcc5a1c8c3e1b28b1524e3dd6dbecd63017c9201da9dbe077f1b82adc08c50169f56fc7b5a3b28ec6b89254de3e2fd12838a761053437883c3e01ba616670cea843754548ef84bcc397de2369adcca2ab54cd73c55dc68d87aec3fc2fe4f10" ] -} \ No newline at end of file +} + diff --git a/presets/mainnet/whisk.yaml b/presets/mainnet/whisk.yaml deleted file mode 100644 index f39b15bd332..00000000000 --- a/presets/mainnet/whisk.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Mainnet preset - Whisk - -# Misc -# --------------------------------------------------------------- -# `uint64(4)` -CURDLEPROOFS_N_BLINDERS: 4 -# `uint64(2**14)` -WHISK_CANDIDATE_TRACKERS_COUNT: 16384 -# `uint64(2**13)` must be < WHISK_CANDIDATE_TRACKERS_COUNT -WHISK_PROPOSER_TRACKERS_COUNT: 8192 -# `uint64(2**7 - CURDLEPROOFS_N_BLINDERS)` -WHISK_VALIDATORS_PER_SHUFFLE: 124 -# `uint64(2**15)` TODO: will be replaced by a fix format once there's a serialized format -WHISK_MAX_SHUFFLE_PROOF_SIZE: 32768 -# `uint64(2**10)` TODO: will be replaced by a fix format once there's a serialized format -WHISK_MAX_OPENING_PROOF_SIZE: 1024 diff --git a/presets/minimal.yaml b/presets/minimal.yaml new file mode 100644 index 00000000000..1e116088e34 --- /dev/null +++ b/presets/minimal.yaml @@ -0,0 +1,271 @@ +# Minimal preset - Phase0 + +# Misc +# --------------------------------------------------------------- +# [customized] Just 4 committees for slot for testing purposes +MAX_COMMITTEES_PER_SLOT: 4 +# [customized] insecure, but fast +TARGET_COMMITTEE_SIZE: 4 +# 2**11 (= 2,048) +MAX_VALIDATORS_PER_COMMITTEE: 2048 +# [customized] Faster, but insecure. +SHUFFLE_ROUND_COUNT: 10 +# 4 +HYSTERESIS_QUOTIENT: 4 +# 1 (minus 0.25) +HYSTERESIS_DOWNWARD_MULTIPLIER: 1 +# 5 (plus 1.25) +HYSTERESIS_UPWARD_MULTIPLIER: 5 + + +# 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 6 seconds +MIN_ATTESTATION_INCLUSION_DELAY: 1 +# [customized] fast epochs +SLOTS_PER_EPOCH: 8 +# 2**0 (= 1) epochs +MIN_SEED_LOOKAHEAD: 1 +# 2**2 (= 4) epochs +MAX_SEED_LOOKAHEAD: 4 +# [customized] higher frequency new deposits from eth1 for testing +EPOCHS_PER_ETH1_VOTING_PERIOD: 4 +# [customized] smaller state +SLOTS_PER_HISTORICAL_ROOT: 64 +# 2**2 (= 4) epochs +MIN_EPOCHS_TO_INACTIVITY_PENALTY: 4 + + +# State list lengths +# --------------------------------------------------------------- +# [customized] smaller state +EPOCHS_PER_HISTORICAL_VECTOR: 64 +# [customized] smaller state +EPOCHS_PER_SLASHINGS_VECTOR: 64 +# 2**24 (= 16,777,216) historical roots +HISTORICAL_ROOTS_LIMIT: 16777216 +# 2**40 (= 1,099,511,627,776) validator spots +VALIDATOR_REGISTRY_LIMIT: 1099511627776 + + +# Reward and penalty quotients +# --------------------------------------------------------------- +# 2**6 (= 64) +BASE_REWARD_FACTOR: 64 +# 2**9 (= 512) +WHISTLEBLOWER_REWARD_QUOTIENT: 512 +# 2**3 (= 8) +PROPOSER_REWARD_QUOTIENT: 8 +# [customized] 2**25 (= 33,554,432) +INACTIVITY_PENALTY_QUOTIENT: 33554432 +# [customized] 2**6 (= 64) +MIN_SLASHING_PENALTY_QUOTIENT: 64 +# [customized] 2 (lower safety margin than Phase 0 genesis but different than mainnet config for testing) +PROPORTIONAL_SLASHING_MULTIPLIER: 2 + + +# 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 + +# Minimal 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 +# --------------------------------------------------------------- +# [customized] +SYNC_COMMITTEE_SIZE: 32 +# [customized] +EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 8 + + +# Sync protocol +# --------------------------------------------------------------- +# 1 +MIN_SYNC_COMMITTEE_PARTICIPANTS: 1 +# SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD (= 8 * 8) +UPDATE_TIMEOUT: 64 + + +# Minimal 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 + + +# Minimal preset - Capella + +# Max operations per block +# --------------------------------------------------------------- +# 2**4 (= 16) +MAX_BLS_TO_EXECUTION_CHANGES: 16 + + +# Execution +# --------------------------------------------------------------- +# [customized] 2**2 (= 4) +MAX_WITHDRAWALS_PER_PAYLOAD: 4 + +# Withdrawals processing +# --------------------------------------------------------------- +# [customized] 2**4 (= 16) validators +MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP: 16 + + +# Minimal preset - Deneb + +# Misc +# --------------------------------------------------------------- +# `uint64(4096)` +FIELD_ELEMENTS_PER_BLOB: 4096 +# [customized] +MAX_BLOB_COMMITMENTS_PER_BLOCK: 16 +# `uint64(6)` +MAX_BLOBS_PER_BLOCK: 6 +# [customized] `floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments')) + 1 + ceillog2(MAX_BLOB_COMMITMENTS_PER_BLOCK)` = 4 + 1 + 4 = 9 +KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: 9 + + +# Minimal preset - Custody Game + +# Time parameters +# --------------------------------------------------------------- +# 2**1 (= 2) epochs, 12.8 minutes +RANDAO_PENALTY_EPOCHS: 2 +# [customized] quicker for testing +EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS: 64 +# [customized] quicker for testing +EPOCHS_PER_CUSTODY_PERIOD: 32 +# [customized] quicker for testing +CUSTODY_PERIOD_TO_RANDAO_PADDING: 8 +# [customize for faster testing] +MAX_CHUNK_CHALLENGE_DELAY: 64 + + +# Max operations +# --------------------------------------------------------------- +# 2**8 (= 256) +MAX_CUSTODY_KEY_REVEALS: 256 +# 2**0 (= 1) +MAX_EARLY_DERIVED_SECRET_REVEALS: 1 +# [customized] +MAX_CUSTODY_CHUNK_CHALLENGES: 2 +# [customized] +MAX_CUSTODY_CHUNK_CHALLENGE_RESP: 8 +# 2**0 (= 1) +MAX_CUSTODY_SLASHINGS: 1 + + +# Reward and penalty quotients +# --------------------------------------------------------------- +EARLY_DERIVED_SECRET_REVEAL_SLOT_REWARD_MULTIPLE: 2 +# 2**8 (= 256) +MINOR_REWARD_QUOTIENT: 256 + + +# Minimal preset - EIP6110 + +# Execution +# --------------------------------------------------------------- +# [customized] +MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 4 + + +# Minimal preset - Sharding + +# Misc +# --------------------------------------------------------------- +# Misc +# [customized] reduced for testing +MAX_SHARDS: 8 +# [customized] reduced for testing +INITIAL_ACTIVE_SHARDS: 2 +# 2**3 (= 8) +SAMPLE_PRICE_ADJUSTMENT_COEFFICIENT: 8 +# [customized] reduced for testing +MAX_SHARD_PROPOSER_SLASHINGS: 4 +# +MAX_SHARD_HEADERS_PER_SHARD: 4 +# 2**8 (= 256) +SHARD_STATE_MEMORY_SLOTS: 256 +# 2**40 (= 1,099,511,627,776) +BLOB_BUILDER_REGISTRY_LIMIT: 1099511627776 + +# Shard blob samples +# --------------------------------------------------------------- +# 2**11 (= 2,048) +MAX_SAMPLES_PER_BLOCK: 2048 +# 2**10 (= 1,1024) +TARGET_SAMPLES_PER_BLOCK: 1024 + +# Gwei values +# --------------------------------------------------------------- +# 2**33 (= 8,589,934,592) Gwei +MAX_SAMPLE_PRICE: 8589934592 +# 2**3 (= 8) Gwei +MIN_SAMPLE_PRICE: 8 + + +# Minimal preset - Whisk + +# Misc +# --------------------------------------------------------------- +# [customized] +CURDLEPROOFS_N_BLINDERS: 4 +# [customized] +WHISK_CANDIDATE_TRACKERS_COUNT: 32 +# [customized] +WHISK_PROPOSER_TRACKERS_COUNT: 16 +# [customized] +WHISK_VALIDATORS_PER_SHUFFLE: 4 +# `uint64(2**15)` TODO: will be replaced by a fix format once there's a serialized format +WHISK_MAX_SHUFFLE_PROOF_SIZE: 32768 +# `uint64(2**10)` TODO: will be replaced by a fix format once there's a serialized format +WHISK_MAX_OPENING_PROOF_SIZE: 1024 + + diff --git a/presets/minimal/altair.yaml b/presets/minimal/altair.yaml deleted file mode 100644 index 5e472c49cf3..00000000000 --- a/presets/minimal/altair.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Minimal 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 -# --------------------------------------------------------------- -# [customized] -SYNC_COMMITTEE_SIZE: 32 -# [customized] -EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 8 - - -# Sync protocol -# --------------------------------------------------------------- -# 1 -MIN_SYNC_COMMITTEE_PARTICIPANTS: 1 -# SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD (= 8 * 8) -UPDATE_TIMEOUT: 64 diff --git a/presets/minimal/bellatrix.yaml b/presets/minimal/bellatrix.yaml deleted file mode 100644 index 3417985fad1..00000000000 --- a/presets/minimal/bellatrix.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# Minimal 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 diff --git a/presets/minimal/capella.yaml b/presets/minimal/capella.yaml deleted file mode 100644 index d27253de871..00000000000 --- a/presets/minimal/capella.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Minimal preset - Capella - -# Max operations per block -# --------------------------------------------------------------- -# 2**4 (= 16) -MAX_BLS_TO_EXECUTION_CHANGES: 16 - - -# Execution -# --------------------------------------------------------------- -# [customized] 2**2 (= 4) -MAX_WITHDRAWALS_PER_PAYLOAD: 4 - -# Withdrawals processing -# --------------------------------------------------------------- -# [customized] 2**4 (= 16) validators -MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP: 16 diff --git a/presets/minimal/custody_game.yaml b/presets/minimal/custody_game.yaml deleted file mode 100644 index c06fccad4fb..00000000000 --- a/presets/minimal/custody_game.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# Minimal preset - Custody Game - -# Time parameters -# --------------------------------------------------------------- -# 2**1 (= 2) epochs, 12.8 minutes -RANDAO_PENALTY_EPOCHS: 2 -# [customized] quicker for testing -EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS: 64 -# [customized] quicker for testing -EPOCHS_PER_CUSTODY_PERIOD: 32 -# [customized] quicker for testing -CUSTODY_PERIOD_TO_RANDAO_PADDING: 8 -# [customize for faster testing] -MAX_CHUNK_CHALLENGE_DELAY: 64 - - -# Max operations -# --------------------------------------------------------------- -# 2**8 (= 256) -MAX_CUSTODY_KEY_REVEALS: 256 -# 2**0 (= 1) -MAX_EARLY_DERIVED_SECRET_REVEALS: 1 -# [customized] -MAX_CUSTODY_CHUNK_CHALLENGES: 2 -# [customized] -MAX_CUSTODY_CHUNK_CHALLENGE_RESP: 8 -# 2**0 (= 1) -MAX_CUSTODY_SLASHINGS: 1 - - -# Reward and penalty quotients -# --------------------------------------------------------------- -EARLY_DERIVED_SECRET_REVEAL_SLOT_REWARD_MULTIPLE: 2 -# 2**8 (= 256) -MINOR_REWARD_QUOTIENT: 256 diff --git a/presets/minimal/deneb.yaml b/presets/minimal/deneb.yaml deleted file mode 100644 index bc4fe4369a6..00000000000 --- a/presets/minimal/deneb.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Minimal preset - Deneb - -# Misc -# --------------------------------------------------------------- -# `uint64(4096)` -FIELD_ELEMENTS_PER_BLOB: 4096 -# [customized] -MAX_BLOB_COMMITMENTS_PER_BLOCK: 16 -# `uint64(6)` -MAX_BLOBS_PER_BLOCK: 6 -# [customized] `floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments')) + 1 + ceillog2(MAX_BLOB_COMMITMENTS_PER_BLOCK)` = 4 + 1 + 4 = 9 -KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: 9 diff --git a/presets/minimal/eip6110.yaml b/presets/minimal/eip6110.yaml deleted file mode 100644 index 7486aa16e7d..00000000000 --- a/presets/minimal/eip6110.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# Minimal preset - EIP6110 - -# Execution -# --------------------------------------------------------------- -# [customized] -MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 4 diff --git a/presets/minimal/phase0.yaml b/presets/minimal/phase0.yaml deleted file mode 100644 index d9a6a2b6c0d..00000000000 --- a/presets/minimal/phase0.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# Minimal preset - Phase0 - -# Misc -# --------------------------------------------------------------- -# [customized] Just 4 committees for slot for testing purposes -MAX_COMMITTEES_PER_SLOT: 4 -# [customized] insecure, but fast -TARGET_COMMITTEE_SIZE: 4 -# 2**11 (= 2,048) -MAX_VALIDATORS_PER_COMMITTEE: 2048 -# [customized] Faster, but insecure. -SHUFFLE_ROUND_COUNT: 10 -# 4 -HYSTERESIS_QUOTIENT: 4 -# 1 (minus 0.25) -HYSTERESIS_DOWNWARD_MULTIPLIER: 1 -# 5 (plus 1.25) -HYSTERESIS_UPWARD_MULTIPLIER: 5 - - -# 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 6 seconds -MIN_ATTESTATION_INCLUSION_DELAY: 1 -# [customized] fast epochs -SLOTS_PER_EPOCH: 8 -# 2**0 (= 1) epochs -MIN_SEED_LOOKAHEAD: 1 -# 2**2 (= 4) epochs -MAX_SEED_LOOKAHEAD: 4 -# [customized] higher frequency new deposits from eth1 for testing -EPOCHS_PER_ETH1_VOTING_PERIOD: 4 -# [customized] smaller state -SLOTS_PER_HISTORICAL_ROOT: 64 -# 2**2 (= 4) epochs -MIN_EPOCHS_TO_INACTIVITY_PENALTY: 4 - - -# State list lengths -# --------------------------------------------------------------- -# [customized] smaller state -EPOCHS_PER_HISTORICAL_VECTOR: 64 -# [customized] smaller state -EPOCHS_PER_SLASHINGS_VECTOR: 64 -# 2**24 (= 16,777,216) historical roots -HISTORICAL_ROOTS_LIMIT: 16777216 -# 2**40 (= 1,099,511,627,776) validator spots -VALIDATOR_REGISTRY_LIMIT: 1099511627776 - - -# Reward and penalty quotients -# --------------------------------------------------------------- -# 2**6 (= 64) -BASE_REWARD_FACTOR: 64 -# 2**9 (= 512) -WHISTLEBLOWER_REWARD_QUOTIENT: 512 -# 2**3 (= 8) -PROPOSER_REWARD_QUOTIENT: 8 -# [customized] 2**25 (= 33,554,432) -INACTIVITY_PENALTY_QUOTIENT: 33554432 -# [customized] 2**6 (= 64) -MIN_SLASHING_PENALTY_QUOTIENT: 64 -# [customized] 2 (lower safety margin than Phase 0 genesis but different than mainnet config for testing) -PROPORTIONAL_SLASHING_MULTIPLIER: 2 - - -# 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 \ No newline at end of file diff --git a/presets/minimal/sharding.yaml b/presets/minimal/sharding.yaml deleted file mode 100644 index 6b8d223b415..00000000000 --- a/presets/minimal/sharding.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Minimal preset - Sharding - -# Misc -# --------------------------------------------------------------- -# Misc -# [customized] reduced for testing -MAX_SHARDS: 8 -# [customized] reduced for testing -INITIAL_ACTIVE_SHARDS: 2 -# 2**3 (= 8) -SAMPLE_PRICE_ADJUSTMENT_COEFFICIENT: 8 -# [customized] reduced for testing -MAX_SHARD_PROPOSER_SLASHINGS: 4 -# -MAX_SHARD_HEADERS_PER_SHARD: 4 -# 2**8 (= 256) -SHARD_STATE_MEMORY_SLOTS: 256 -# 2**40 (= 1,099,511,627,776) -BLOB_BUILDER_REGISTRY_LIMIT: 1099511627776 - -# Shard blob samples -# --------------------------------------------------------------- -# 2**11 (= 2,048) -MAX_SAMPLES_PER_BLOCK: 2048 -# 2**10 (= 1,1024) -TARGET_SAMPLES_PER_BLOCK: 1024 - -# Gwei values -# --------------------------------------------------------------- -# 2**33 (= 8,589,934,592) Gwei -MAX_SAMPLE_PRICE: 8589934592 -# 2**3 (= 8) Gwei -MIN_SAMPLE_PRICE: 8 diff --git a/presets/minimal/trusted_setups/trusted_setup_4096.json b/presets/minimal/trusted_setups/trusted_setup_4096.json index c6d724efafd..5840c6ef7a1 100644 --- a/presets/minimal/trusted_setups/trusted_setup_4096.json +++ b/presets/minimal/trusted_setups/trusted_setup_4096.json @@ -4164,4 +4164,5 @@ "0xa92039a08b5502d5b211a7744099c9f93fa8c90cedcb1d05e92f01886219dd464eb5fb0337496ad96ed09c987da4e5f019035c5b01cc09b2a18b8a8dd419bc5895388a07e26958f6bd26751929c25f89b8eb4a299d822e2d26fec9ef350e0d3c", "0x92dcc5a1c8c3e1b28b1524e3dd6dbecd63017c9201da9dbe077f1b82adc08c50169f56fc7b5a3b28ec6b89254de3e2fd12838a761053437883c3e01ba616670cea843754548ef84bcc397de2369adcca2ab54cd73c55dc68d87aec3fc2fe4f10" ] -} \ No newline at end of file +} + diff --git a/presets/minimal/whisk.yaml b/presets/minimal/whisk.yaml deleted file mode 100644 index 0cb4b3a60cf..00000000000 --- a/presets/minimal/whisk.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Minimal preset - Whisk - -# Misc -# --------------------------------------------------------------- -# [customized] -CURDLEPROOFS_N_BLINDERS: 4 -# [customized] -WHISK_CANDIDATE_TRACKERS_COUNT: 32 -# [customized] -WHISK_PROPOSER_TRACKERS_COUNT: 16 -# [customized] -WHISK_VALIDATORS_PER_SHUFFLE: 4 -# `uint64(2**15)` TODO: will be replaced by a fix format once there's a serialized format -WHISK_MAX_SHUFFLE_PROOF_SIZE: 32768 -# `uint64(2**10)` TODO: will be replaced by a fix format once there's a serialized format -WHISK_MAX_OPENING_PROOF_SIZE: 1024 diff --git a/pysetup/typing.py b/pysetup/typing.py index 28c2220c50e..11548a931b8 100644 --- a/pysetup/typing.py +++ b/pysetup/typing.py @@ -29,5 +29,5 @@ class SpecObject(NamedTuple): class BuildTarget(NamedTuple): name: str - preset_paths: List[Path] + preset_path: Path config_path: Path diff --git a/setup.py b/setup.py index 87a3dc3ca87..8f4de44c49b 100644 --- a/setup.py +++ b/setup.py @@ -276,24 +276,6 @@ def get_spec(file_name: Path, preset: Dict[str, str], config: Dict[str, str], pr ) -def load_preset(preset_files: Sequence[Path]) -> Dict[str, str]: - """ - Loads the a directory of preset files, merges the result into one preset. - """ - preset = {} - for fork_file in preset_files: - yaml = YAML(typ='base') - fork_preset: dict = yaml.load(fork_file) - if fork_preset is None: # for empty YAML files - continue - if not set(fork_preset.keys()).isdisjoint(preset.keys()): - duplicates = set(fork_preset.keys()).intersection(set(preset.keys())) - raise Exception(f"duplicate config var(s) in preset files: {', '.join(duplicates)}") - preset.update(fork_preset) - assert preset != {} - return parse_config_vars(preset) - - def load_config(config_path: Path) -> Dict[str, str]: """ Loads the given configuration file. @@ -306,9 +288,9 @@ def load_config(config_path: Path) -> Dict[str, str]: def build_spec(fork: str, preset_name: str, source_files: Sequence[Path], - preset_files: Sequence[Path], + preset_file: Path, config_file: Path) -> str: - preset = load_preset(preset_files) + preset = load_config(preset_file) config = load_config(config_file) all_specs = [get_spec(spec, preset, config, preset_name) for spec in source_files] @@ -354,8 +336,8 @@ def initialize_options(self): self.md_doc_paths = '' self.out_dir = 'pyspec_output' self.build_targets = """ - minimal:presets/minimal:configs/minimal.yaml - mainnet:presets/mainnet:configs/mainnet.yaml + minimal:presets/minimal.yaml:configs/minimal.yaml + mainnet:presets/mainnet.yaml:configs/mainnet.yaml """ def finalize_options(self): @@ -379,28 +361,25 @@ def finalize_options(self): data = target.split(':') if len(data) != 3: raise Exception('invalid target, expected "name:preset_dir:config_file" format, but got: %s' % target) - name, preset_dir_path, config_path = data + name, preset_path, config_path = data if any((c not in string.digits + string.ascii_letters) for c in name): raise Exception('invalid target name: "%s"' % name) - if not os.path.exists(preset_dir_path): - raise Exception('Preset dir "%s" does not exist' % preset_dir_path) - _, _, preset_file_names = next(os.walk(preset_dir_path)) - preset_paths = [(Path(preset_dir_path) / name) for name in preset_file_names] - + if not os.path.exists(preset_path): + raise Exception('Preset file "%s" does not exist' % preset_path) if not os.path.exists(config_path): raise Exception('Config file "%s" does not exist' % config_path) - self.parsed_build_targets.append(BuildTarget(name, preset_paths, Path(config_path))) + self.parsed_build_targets.append(BuildTarget(name, Path(preset_path), Path(config_path))) def run(self): if not self.dry_run: dir_util.mkpath(self.out_dir) - for (name, preset_paths, config_path) in self.parsed_build_targets: + for (name, preset_path, config_path) in self.parsed_build_targets: spec_str = build_spec( spec_builders[self.spec_fork].fork, name, self.parsed_md_doc_paths, - preset_paths, + preset_path, config_path, ) if self.dry_run: diff --git a/tests/core/pyspec/eth2spec/config/config_util.py b/tests/core/pyspec/eth2spec/config/config_util.py index 8fe2d8344af..690b1fbf64f 100644 --- a/tests/core/pyspec/eth2spec/config/config_util.py +++ b/tests/core/pyspec/eth2spec/config/config_util.py @@ -1,5 +1,5 @@ from pathlib import Path -from typing import Dict, Iterable, Union, BinaryIO, TextIO, Any +from typing import Dict, Union, BinaryIO, TextIO, Any from ruamel.yaml import YAML @@ -21,24 +21,6 @@ def parse_config_vars(conf: Dict[str, Any]) -> Dict[str, Any]: return out -def load_preset(preset_files: Iterable[Union[Path, BinaryIO, TextIO]]) -> Dict[str, Any]: - """ - Loads the a directory of preset files, merges the result into one preset. - """ - preset = {} - for fork_file in preset_files: - yaml = YAML(typ='base') - fork_preset: dict = yaml.load(fork_file) - if fork_preset is None: # for empty YAML files - continue - if not set(fork_preset.keys()).isdisjoint(preset.keys()): - duplicates = set(fork_preset.keys()).intersection(set(preset.keys())) - raise Exception(f"duplicate config var(s) in preset files: {', '.join(duplicates)}") - preset.update(fork_preset) - assert preset != {} - return parse_config_vars(preset) - - def load_config_file(config_path: Union[Path, BinaryIO, TextIO]) -> Dict[str, Any]: """ Loads the given configuration file. diff --git a/tests/generators/README.md b/tests/generators/README.md index 0146ca35e88..f0fe6ef971f 100644 --- a/tests/generators/README.md +++ b/tests/generators/README.md @@ -128,11 +128,6 @@ def shuffling_test_cases(): def create_provider(config_name: str) -> gen_typing.TestProvider: - def prepare_fn(configs_path: str) -> str: - presets = loader.load_presets(configs_path, config_name) - spec.apply_constants_preset(presets) - return config_name - def cases_fn() -> Iterable[gen_typing.TestCase]: for (case_name, case_fn) in shuffling_test_cases(): yield gen_typing.TestCase(