From 3c4cf95d0ed78e55f7654203af7c0e3667446701 Mon Sep 17 00:00:00 2001 From: tersec Date: Fri, 20 Nov 2020 14:49:49 +0100 Subject: [PATCH] remove v0.12.3 and medalla support (#2038) --- Makefile | 33 ---- beacon_chain.nimble | 40 ++--- .../nimbus_beacon_node_spec_0_12_3.nim | 3 - .../nimbus_beacon_node_spec_0_12_3.nim.cfg | 14 -- beacon_chain/spec/datatypes.nim | 7 +- beacon_chain/spec/presets.nim | 33 +--- beacon_chain/spec/presets/v0_12_3/mainnet.nim | 168 ------------------ beacon_chain/spec/presets/v0_12_3/minimal.nim | 146 --------------- docker/dist/entry_point.sh | 2 +- run-medalla-beacon-node.sh | 5 - tests/test_interop.nim | 5 +- 11 files changed, 32 insertions(+), 424 deletions(-) delete mode 100644 beacon_chain/nimbus_beacon_node_spec_0_12_3.nim delete mode 100644 beacon_chain/nimbus_beacon_node_spec_0_12_3.nim.cfg delete mode 100644 beacon_chain/spec/presets/v0_12_3/mainnet.nim delete mode 100644 beacon_chain/spec/presets/v0_12_3/minimal.nim delete mode 100755 run-medalla-beacon-node.sh diff --git a/Makefile b/Makefile index 42f73c090..fbd44f3b0 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,6 @@ endif # unconditionally built by the default Make target # TODO re-enable ncli_query if/when it works again TOOLS := \ - nimbus_beacon_node_spec_0_12_3 \ nimbus_beacon_node \ block_sim \ deposit_contract \ @@ -292,38 +291,6 @@ define CLEAN_NETWORK rm -rf build/data/shared_$(1)*/*.log endef -### -### medalla -### -medalla-build: | nimbus_beacon_node_spec_0_12_3 nimbus_signing_process - -# https://www.gnu.org/software/make/manual/html_node/Call-Function.html#Call-Function -medalla: | medalla-build - $(call CONNECT_TO_NETWORK,medalla,nimbus_beacon_node_spec_0_12_3) - -medalla-vc: | medalla-build nimbus_validator_client - $(call CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT,medalla,nimbus_beacon_node_spec_0_12_3) - -medalla-fast-sync: | medalla-build - $(call CONNECT_TO_NETWORK,medalla,nimbus_beacon_node_spec_0_12_3,FastSync) - -ifneq ($(LOG_LEVEL), TRACE) -medalla-dev: - + "$(MAKE)" LOG_LEVEL=TRACE $@ -else -medalla-dev: | medalla-build - $(call CONNECT_TO_NETWORK_IN_DEV_MODE,medalla,nimbus_beacon_node_spec_0_12_3) -endif - -medalla-deposit-data: | medalla-build deposit_contract - $(call MAKE_DEPOSIT_DATA,medalla) - -medalla-deposit: | medalla-build deposit_contract - $(call MAKE_DEPOSIT,medalla) - -clean-medalla: - $(call CLEAN_NETWORK,medalla) - ### ### toledo ### diff --git a/beacon_chain.nimble b/beacon_chain.nimble index 27113c470..2d4ce630e 100644 --- a/beacon_chain.nimble +++ b/beacon_chain.nimble @@ -52,7 +52,7 @@ proc buildAndRunBinary(name: string, srcDir = "./", params = "", cmdParams = "", task moduleTests, "Run all module tests": buildAndRunBinary "nimbus_beacon_node", "beacon_chain/", "-d:chronicles_log_level=TRACE " & - "-d:const_preset=minimal -d:ETH2_SPEC=\"v0.12.3\" " & + "-d:const_preset=minimal " & "-d:testutils_test_build" ### tasks @@ -61,35 +61,35 @@ task test, "Run all tests": # pieces of code get tested regularly. Increased test output verbosity is the # price we pay for that. - buildAndRunBinary "test_fixture_const_sanity_check", "tests/official/", """-d:const_preset=minimal -d:ETH2_SPEC="v1.0.0" -d:chronicles_sinks="json[file]"""" - buildAndRunBinary "test_fixture_const_sanity_check", "tests/official/", """-d:const_preset=mainnet -d:ETH2_SPEC="v1.0.0" -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "test_fixture_const_sanity_check", "tests/official/", """-d:const_preset=minimal -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "test_fixture_const_sanity_check", "tests/official/", """-d:const_preset=mainnet -d:chronicles_sinks="json[file]"""" # Generic SSZ test, doesn't use consensus objects minimal/mainnet presets - buildAndRunBinary "test_fixture_ssz_generic_types", "tests/official/", """-d:ETH2_SPEC="v1.0.0" -d:chronicles_log_level=TRACE -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "test_fixture_ssz_generic_types", "tests/official/", """-d:chronicles_log_level=TRACE -d:chronicles_sinks="json[file]"""" # Consensus object SSZ tests - buildAndRunBinary "test_fixture_ssz_consensus_objects", "tests/official/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:ETH2_SPEC="v1.0.0" -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "test_fixture_ssz_consensus_objects", "tests/official/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:chronicles_sinks="json[file]"""" # EF tests - buildAndRunBinary "all_fixtures_require_ssz", "tests/official/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:ETH2_SPEC="v1.0.0" -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "all_fixtures_require_ssz", "tests/official/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:chronicles_sinks="json[file]"""" # Mainnet config - buildAndRunBinary "proto_array", "beacon_chain/fork_choice/", """-d:const_preset=mainnet -d:ETH2_SPEC="v1.0.0" -d:chronicles_sinks="json[file]"""" - buildAndRunBinary "fork_choice", "beacon_chain/fork_choice/", """-d:const_preset=mainnet -d:ETH2_SPEC="v1.0.0" -d:chronicles_sinks="json[file]"""" - buildAndRunBinary "all_tests", "tests/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:ETH2_SPEC="v1.0.0" -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "proto_array", "beacon_chain/fork_choice/", """-d:const_preset=mainnet -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "fork_choice", "beacon_chain/fork_choice/", """-d:const_preset=mainnet -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "all_tests", "tests/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:chronicles_sinks="json[file]"""" # TODO `test_keystore` is extracted from the rest of the tests because it uses conflicting BLST headers - buildAndRunBinary "test_keystore", "tests/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:ETH2_SPEC="v1.0.0" -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "test_keystore", "tests/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:chronicles_sinks="json[file]"""" # Check Miracl/Milagro fallback on select tests - buildAndRunBinary "test_interop", "tests/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:ETH2_SPEC="v1.0.0" -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" - buildAndRunBinary "test_process_attestation", "tests/spec_block_processing/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:ETH2_SPEC="v0.12.3" -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" - buildAndRunBinary "test_process_deposits", "tests/spec_block_processing/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:ETH2_SPEC="v0.12.3" -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" - buildAndRunBinary "all_fixtures_require_ssz", "tests/official/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:ETH2_SPEC="v1.0.0" -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" - buildAndRunBinary "test_attestation_pool", "tests/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:ETH2_SPEC="v0.12.3" -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" - buildAndRunBinary "test_block_pool", "tests/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:ETH2_SPEC="v0.12.3" -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "test_interop", "tests/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "test_process_attestation", "tests/spec_block_processing/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "test_process_deposits", "tests/spec_block_processing/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "all_fixtures_require_ssz", "tests/official/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "test_attestation_pool", "tests/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" + buildAndRunBinary "test_block_pool", "tests/", """-d:chronicles_log_level=TRACE -d:const_preset=mainnet -d:BLS_FORCE_BACKEND=miracl -d:chronicles_sinks="json[file]"""" # State and block sims; getting to 4th epoch triggers consensus checks - buildAndRunBinary "state_sim", "research/", "-d:const_preset=mainnet -d:ETH2_SPEC=\"v1.0.0\" -d:chronicles_log_level=INFO", "--validators=3000 --slots=128" - # buildAndRunBinary "state_sim", "research/", "-d:const_preset=mainnet -d:ETH2_SPEC=\"v1.0.0\" -d:BLS_FORCE_BACKEND=miracl -d:chronicles_log_level=INFO", "--validators=3000 --slots=128" - buildAndRunBinary "block_sim", "research/", "-d:const_preset=mainnet -d:ETH2_SPEC=\"v1.0.0\"", "--validators=3000 --slots=128" - # buildAndRunBinary "block_sim", "research/", "-d:const_preset=mainnet -d:ETH2_SPEC=\"v1.0.0\" -d:BLS_FORCE_BACKEND=miracl", "--validators=3000 --slots=128" + buildAndRunBinary "state_sim", "research/", "-d:const_preset=mainnet -d:chronicles_log_level=INFO", "--validators=3000 --slots=128" + # buildAndRunBinary "state_sim", "research/", "-d:const_preset=mainnet -d:BLS_FORCE_BACKEND=miracl -d:chronicles_log_level=INFO", "--validators=3000 --slots=128" + buildAndRunBinary "block_sim", "research/", "-d:const_preset=mainnet", "--validators=3000 --slots=128" + # buildAndRunBinary "block_sim", "research/", "-d:const_preset=mainnet -d:BLS_FORCE_BACKEND=miracl", "--validators=3000 --slots=128" diff --git a/beacon_chain/nimbus_beacon_node_spec_0_12_3.nim b/beacon_chain/nimbus_beacon_node_spec_0_12_3.nim deleted file mode 100644 index ee7236572..000000000 --- a/beacon_chain/nimbus_beacon_node_spec_0_12_3.nim +++ /dev/null @@ -1,3 +0,0 @@ -import nimbus_beacon_node -export nimbus_beacon_node - diff --git a/beacon_chain/nimbus_beacon_node_spec_0_12_3.nim.cfg b/beacon_chain/nimbus_beacon_node_spec_0_12_3.nim.cfg deleted file mode 100644 index 1227ccd61..000000000 --- a/beacon_chain/nimbus_beacon_node_spec_0_12_3.nim.cfg +++ /dev/null @@ -1,14 +0,0 @@ --d:"chronicles_sinks=textlines,json[file]" --d:"chronicles_runtime_filtering=on" --d:"chronicles_default_output_device=dynamic" - -# Use only `secp256k1` public key cryptography as an identity in LibP2P. --d:"libp2p_pki_schemes=secp256k1" - --d:"ETH2_SPEC=v0.12.3" - -@if testnet_servers_image: - -d:"chronicles_sinks=json" - -d:"withoutPrompt" -@end - diff --git a/beacon_chain/spec/datatypes.nim b/beacon_chain/spec/datatypes.nim index 8357fe61e..6c39ba9ed 100644 --- a/beacon_chain/spec/datatypes.nim +++ b/beacon_chain/spec/datatypes.nim @@ -48,11 +48,8 @@ export # Eventually, we could also differentiate between user/tainted data and # internal state that's gone through sanity checks already. -when ETH2_SPEC == "v0.12.3": - const SPEC_VERSION* = "0.12.3" -else: - const SPEC_VERSION* = "1.0.0" - ## Spec version we're aiming to be compatible with, right now +const SPEC_VERSION* = "1.0.0" +## Spec version we're aiming to be compatible with, right now const GENESIS_SLOT* = Slot(0) diff --git a/beacon_chain/spec/presets.nim b/beacon_chain/spec/presets.nim index 946682ccb..d59d9787f 100644 --- a/beacon_chain/spec/presets.nim +++ b/beacon_chain/spec/presets.nim @@ -122,23 +122,12 @@ proc readPresetFile*(path: string): PresetFile result.missingValues = PresetValue.entireSet - presetValues -const ETH2_SPEC* {.strdefine.} = "v1.0.0" -static: doAssert: ETH2_SPEC == "v0.12.3" or ETH2_SPEC == "v1.0.0" - -when ETH2_SPEC == "v0.12.3": - const mainnetRuntimePreset* = RuntimePreset( - MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 16384, - MIN_GENESIS_TIME: 1606824000, # Dec 1, 2020, 12pm UTC - GENESIS_FORK_VERSION: Version [byte 0, 0, 0, 0], - GENESIS_DELAY: 604800, - ETH1_FOLLOW_DISTANCE: 2048) -else: - const mainnetRuntimePreset* = RuntimePreset( - MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 16384, - MIN_GENESIS_TIME: 1606824000, # Dec 1, 2020, 12pm UTC - GENESIS_FORK_VERSION: Version [byte 0, 0, 0, 0], - GENESIS_DELAY: 604800, - ETH1_FOLLOW_DISTANCE: 2048) +const mainnetRuntimePreset* = RuntimePreset( + MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 16384, + MIN_GENESIS_TIME: 1606824000, # Dec 1, 2020, 12pm UTC + GENESIS_FORK_VERSION: Version [byte 0, 0, 0, 0], + GENESIS_DELAY: 604800, + ETH1_FOLLOW_DISTANCE: 2048) const minimalRuntimePreset* = RuntimePreset( @@ -150,18 +139,12 @@ const when const_preset == "mainnet": template defaultRuntimePreset*: auto = mainnetRuntimePreset - when ETH2_SPEC == "v0.12.3": - import ./presets/v0_12_3/mainnet - else: - import ./presets/v1_0_0/mainnet + import ./presets/v1_0_0/mainnet export mainnet elif const_preset == "minimal": template defaultRuntimePreset*: auto = minimalRuntimePreset - when ETH2_SPEC == "v0.12.3": - import ./presets/v0_12_3/minimal - else: - import ./presets/v1_0_0/minimal + import ./presets/v1_0_0/minimal export minimal else: diff --git a/beacon_chain/spec/presets/v0_12_3/mainnet.nim b/beacon_chain/spec/presets/v0_12_3/mainnet.nim deleted file mode 100644 index 6a6622d4b..000000000 --- a/beacon_chain/spec/presets/v0_12_3/mainnet.nim +++ /dev/null @@ -1,168 +0,0 @@ -# beacon_chain -# Copyright (c) 2018-2020 Status Research & Development GmbH -# Licensed and distributed under either of -# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). -# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). -# at your option. This file may not be copied, modified, or distributed except according to those terms. - -# This file contains constants that are part of the spec and thus subject to -# serialization and spec updates. - -import - math - -{.experimental: "codeReordering".} # SLOTS_PER_EPOCH is use before being defined in spec - -const - # Misc - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/mainnet/phase0.yaml#L6 - CONFIG_NAME* = "mainnet" - - MAX_COMMITTEES_PER_SLOT* {.intdefine.}: uint64 = 64 - - TARGET_COMMITTEE_SIZE*: uint64 = 128 ##\ - ## Number of validators in the committee attesting to one shard - ## Per spec: - ## For the safety of crosslinks `TARGET_COMMITTEE_SIZE` exceeds - ## [the recommended minimum committee size of 111](https://vitalik.ca/files/Ithaca201807_Sharding.pdf); - ## with sufficient active validators (at least - ## `SLOTS_PER_EPOCH * TARGET_COMMITTEE_SIZE`), the shuffling algorithm ensures - ## committee sizes at least `TARGET_COMMITTEE_SIZE`. (Unbiasable randomness - ## with a Verifiable Delay Function (VDF) will improve committee robustness - ## and lower the safe minimum committee size.) - - MAX_VALIDATORS_PER_COMMITTEE*: uint64 = 2048 ##\ - ## votes - - MIN_PER_EPOCH_CHURN_LIMIT*: uint64 = 4 - CHURN_LIMIT_QUOTIENT*: uint64 = 2'u64 ^ 16 - SHUFFLE_ROUND_COUNT*: uint64 = 90 - - HYSTERESIS_QUOTIENT*: uint64 = 4 - HYSTERESIS_DOWNWARD_MULTIPLIER*: uint64 = 1 - HYSTERESIS_UPWARD_MULTIPLIER*: uint64 = 5 - - PROPORTIONAL_SLASHING_MULTIPLIER*: uint64 = 3 - - # Gwei values - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/mainnet/phase0.yaml#L61 - - MIN_DEPOSIT_AMOUNT*: uint64 = 2'u64^0 * 10'u64^9 ##\ - ## Minimum amounth of ETH that can be deposited in one call - deposits can - ## be used either to top up an existing validator or commit to a new one - - MAX_EFFECTIVE_BALANCE*: uint64 = 2'u64^5 * 10'u64^9 ##\ - ## Maximum amounth of ETH that can be deposited in one call - - EJECTION_BALANCE*: uint64 = 2'u64^4 * 10'u64^9 ##\ - ## Once the balance of a validator drops below this, it will be ejected from - ## the validator pool - - EFFECTIVE_BALANCE_INCREMENT*: uint64 = 2'u64^0 * 10'u64^9 - - # Initial values - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/mainnet/phase0.yaml#L73 - BLS_WITHDRAWAL_PREFIX*: byte = 0 - - # Time parameters - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/mainnet/phase0.yaml#L80 - SECONDS_PER_SLOT* {.intdefine.}: uint64 = 12'u64 # Compile with -d:SECONDS_PER_SLOT=1 for 12x faster slots - ## TODO consistent time unit across projects, similar to C++ chrono? - - MIN_ATTESTATION_INCLUSION_DELAY*: uint64 = 1 ##\ - ## (12 seconds) - ## Number of slots that attestations stay in the attestation - ## pool before being added to a block. - ## The attestation delay exists so that there is time for attestations to - ## propagate before the block is created. - ## When creating an attestation, the validator will look at the best - ## information known to at that time, and may not revise it during the same - ## slot (see `is_double_vote`) - the delay gives the validator a chance to - ## wait towards the end of the slot and still have time to publish the - ## attestation. - - SLOTS_PER_EPOCH* {.intdefine.}: uint64 = 32 ##\ - ## (~6.4 minutes) - ## slots that make up an epoch, at the end of which more heavy - ## processing is done - ## Compile with -d:SLOTS_PER_EPOCH=4 for shorter epochs - - MIN_SEED_LOOKAHEAD*: uint64 = 1 ##\ - ## epochs (~6.4 minutes) - - MAX_SEED_LOOKAHEAD*: uint64 = 4 ##\ - ## epochs (~25.6 minutes) - - EPOCHS_PER_ETH1_VOTING_PERIOD*: uint64 = 32 ##\ - ## epochs (~3.4 hours) - - SLOTS_PER_HISTORICAL_ROOT*: uint64 = 8192 ##\ - ## slots (13 hours) - - MIN_VALIDATOR_WITHDRAWABILITY_DELAY*: uint64 = 2'u64^8 ##\ - ## epochs (~27 hours) - - SHARD_COMMITTEE_PERIOD*: uint64 = 256 # epochs (~27 hours) - - MIN_EPOCHS_TO_INACTIVITY_PENALTY*: uint64 = 2'u64^2 ##\ - ## epochs (25.6 minutes) - - # State vector lengths - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/mainnet/phase0.yaml#L108 - - EPOCHS_PER_HISTORICAL_VECTOR*: uint64 = 65536 ##\ - ## epochs (~0.8 years) - - EPOCHS_PER_SLASHINGS_VECTOR*: uint64 = 8192 ##\ - ## epochs (~36 days) - - HISTORICAL_ROOTS_LIMIT*: uint64 = 16777216 ##\ - ## epochs (~26,131 years) - - VALIDATOR_REGISTRY_LIMIT*: uint64 = 1099511627776'u64 - - # Reward and penalty quotients - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/mainnet/phase0.yaml#L120 - BASE_REWARD_FACTOR*: uint64 = 2'u64^6 - WHISTLEBLOWER_REWARD_QUOTIENT*: uint64 = 2'u64^9 - PROPOSER_REWARD_QUOTIENT*: uint64 = 2'u64^3 - INACTIVITY_PENALTY_QUOTIENT*: uint64 = 2'u64^24 - MIN_SLASHING_PENALTY_QUOTIENT*: uint64 = 32 # 2^5 - - # Max operations per block - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/mainnet/phase0.yaml#L134 - MAX_PROPOSER_SLASHINGS*: uint64 = 2'u64 ^ 4 - MAX_ATTESTER_SLASHINGS*: uint64 = 2'u64 ^ 1 - MAX_ATTESTATIONS*: uint64 = 2'u64 ^ 7 - MAX_DEPOSITS*: uint64 = 2'u64 ^ 4 - MAX_VOLUNTARY_EXITS*: uint64 = 2'u64 ^ 4 - - # Fork choice - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/mainnet/phase0.yaml#L32 - SAFE_SLOTS_TO_UPDATE_JUSTIFIED*: uint64 = 8 # 96 seconds - - # Validators - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/mainnet/phase0.yaml#L38 - ETH1_FOLLOW_DISTANCE* {.intdefine.}: uint64 = 1024 # blocks ~ 4 hours - TARGET_AGGREGATORS_PER_COMMITTEE*: uint64 = 16 # validators - RANDOM_SUBNETS_PER_VALIDATOR*: uint64 = 1 # subnet - EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION*: uint64 = 256 # epochs ~ 27 hours - SECONDS_PER_ETH1_BLOCK* {.intdefine.}: uint64 = 14 # (estimate from Eth1 mainnet) - - # Deposit contract - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/mainnet/phase0.yaml#L52 - - # Ethereum PoW Mainnet - # TODO(zah) These violate the spec (this is a temporary change to allow `make medalla` to work) - DEPOSIT_CHAIN_ID* = 5 - DEPOSIT_NETWORK_ID* = 5 diff --git a/beacon_chain/spec/presets/v0_12_3/minimal.nim b/beacon_chain/spec/presets/v0_12_3/minimal.nim deleted file mode 100644 index 4b2330015..000000000 --- a/beacon_chain/spec/presets/v0_12_3/minimal.nim +++ /dev/null @@ -1,146 +0,0 @@ -# beacon_chain -# Copyright (c) 2018-2020 Status Research & Development GmbH -# Licensed and distributed under either of -# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). -# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). -# at your option. This file may not be copied, modified, or distributed except according to those terms. - -# This file contains constants that are part of the spec and thus subject to -# serialization and spec updates. - -import - math - -{.experimental: "codeReordering".} # SLOTS_PER_EPOCH is use before being defined in spec - -const - # Misc - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/minimal/phase0.yaml#L4 - CONFIG_NAME* = "minimal" - - # Changed - MAX_COMMITTEES_PER_SLOT*: uint64 = 4 - TARGET_COMMITTEE_SIZE*: uint64 = 4 - - # Unchanged - MAX_VALIDATORS_PER_COMMITTEE*: uint64 = 2048 - MIN_PER_EPOCH_CHURN_LIMIT*: uint64 = 4 - CHURN_LIMIT_QUOTIENT*: uint64 = 2'u64 ^ 16 - - # Changed - SHUFFLE_ROUND_COUNT*: uint64 = 10 - - # Unchanged - HYSTERESIS_QUOTIENT*: uint64 = 4 - HYSTERESIS_DOWNWARD_MULTIPLIER*: uint64 = 1 - HYSTERESIS_UPWARD_MULTIPLIER*: uint64 = 5 - - PROPORTIONAL_SLASHING_MULTIPLIER*: uint64 = 3 - - # Gwei values - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/minimal/phase0.yaml#L61 - - # Changed - ETH1_FOLLOW_DISTANCE* {.intdefine.}: uint64 = 16 # blocks - - # Unchanged - MIN_DEPOSIT_AMOUNT*: uint64 = 2'u64^0 * 10'u64^9 - MAX_EFFECTIVE_BALANCE*: uint64 = 2'u64^5 * 10'u64^9 - EJECTION_BALANCE*: uint64 = 2'u64^4 * 10'u64^9 - EFFECTIVE_BALANCE_INCREMENT*: uint64 = 2'u64^0 * 10'u64^9 - - # Initial values - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/minimal/phase0.yaml#L73 - - BLS_WITHDRAWAL_PREFIX*: byte = 0 - - # Time parameters - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/minimal/phase0.yaml#L80 - # Changed: Faster to spin up testnets, but does not give validator - # reasonable warning time for genesis - - # Unchanged - SECONDS_PER_SLOT*{.intdefine.}: uint64 = 6 - - # Unchanged - MIN_ATTESTATION_INCLUSION_DELAY*: uint64 = 1 - - # Changed - SLOTS_PER_EPOCH* {.intdefine.}: uint64 = 8 - - # Unchanged - MIN_SEED_LOOKAHEAD*: uint64 = 1 - MAX_SEED_LOOKAHEAD*: uint64 = 4 - - # Changed - EPOCHS_PER_ETH1_VOTING_PERIOD*: uint64 = 4 - SLOTS_PER_HISTORICAL_ROOT*: uint64 = 64 - - # Unchanged - MIN_VALIDATOR_WITHDRAWABILITY_DELAY*: uint64 = 2'u64^8 - - SHARD_COMMITTEE_PERIOD*: uint64 = 64 # epochs - - # Changed - MIN_EPOCHS_TO_INACTIVITY_PENALTY*: uint64 = 2'u64^2 - - # State vector lengths - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/minimal/phase0.yaml#L108 - - # Changed - EPOCHS_PER_HISTORICAL_VECTOR*: uint64 = 64 - EPOCHS_PER_SLASHINGS_VECTOR*: uint64 = 64 - - # Unchanged - HISTORICAL_ROOTS_LIMIT*: uint64 = 16777216 - VALIDATOR_REGISTRY_LIMIT*: uint64 = 1099511627776'u64 - - # Reward and penalty quotients - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/minimal/phase0.yaml#L120 - - BASE_REWARD_FACTOR*: uint64 = 2'u64^6 - WHISTLEBLOWER_REWARD_QUOTIENT*: uint64 = 2'u64^9 - PROPOSER_REWARD_QUOTIENT*: uint64 = 2'u64^3 - INACTIVITY_PENALTY_QUOTIENT*: uint64 = 2'u64^24 - MIN_SLASHING_PENALTY_QUOTIENT*: uint64 = 32 # 2^5 - - # Max operations per block - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/minimal/phase0.yaml#L134 - - MAX_PROPOSER_SLASHINGS*: uint64 = 2'u64 ^ 4 - MAX_ATTESTER_SLASHINGS*: uint64 = 2'u64 ^ 1 - MAX_ATTESTATIONS*: uint64 = 2'u64 ^ 7 - MAX_DEPOSITS*: uint64 = 2'u64 ^ 4 - MAX_VOLUNTARY_EXITS*: uint64 = 2'u64 ^ 4 - - # Deposit contract - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/minimal/phase0.yaml#L52 - - # Ethereum Goerli testnet - DEPOSIT_CHAIN_ID* = 5 - DEPOSIT_NETWORK_ID* = 5 - - # Fork choice - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/minimal/phase0.yaml#L32 - - # Changed - SAFE_SLOTS_TO_UPDATE_JUSTIFIED*: uint64 = 2 - - # Validators - # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/configs/minimal/phase0.yaml#L38 - - # Unchanged - TARGET_AGGREGATORS_PER_COMMITTEE*: uint64 = 16 # validators - RANDOM_SUBNETS_PER_VALIDATOR*: uint64 = 1 # subnet - EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION*: uint64 = 256 # epochs ~ 27 hours - SECONDS_PER_ETH1_BLOCK* {.intdefine.}: uint64 = 14 # estimate from Eth1 mainnet) diff --git a/docker/dist/entry_point.sh b/docker/dist/entry_point.sh index db5d5d067..bf15e8025 100755 --- a/docker/dist/entry_point.sh +++ b/docker/dist/entry_point.sh @@ -5,7 +5,7 @@ set -e cd /home/user/nimbus-eth2 git config --global core.abbrev 8 -BINARIES="nimbus_beacon_node nimbus_beacon_node_spec_0_12_3 nimbus_signing_process" +BINARIES="nimbus_beacon_node nimbus_signing_process" # we need to build everything against libraries available inside this container, including the Nim compiler make clean diff --git a/run-medalla-beacon-node.sh b/run-medalla-beacon-node.sh deleted file mode 100755 index 77c94eeb3..000000000 --- a/run-medalla-beacon-node.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd "$(dirname $0)" -scripts/run-beacon-node.sh nimbus_beacon_node_spec_0_12_3 medalla $@ - diff --git a/tests/test_interop.nim b/tests/test_interop.nim index 2dda68dcd..ef545c6ba 100644 --- a/tests/test_interop.nim +++ b/tests/test_interop.nim @@ -159,10 +159,7 @@ suiteReport "Interop": when const_preset == "minimal": "051d1a9c0fb61fce627e3990b930791fd17cb9fa7fb84a9a0051e55bf1759ec8" elif const_preset == "mainnet": - when ETH2_SPEC == "v0.12.3": - "ffe85e9b0e3af1b86a177e5b9dc28d5e1237ff5a046482cb45cbd036e918c676" - else: - "07358d9660c0534e0055201084f6ddd13d418193ec48a451b572cfe2ee6a35c6" + "07358d9660c0534e0055201084f6ddd13d418193ec48a451b572cfe2ee6a35c6" else: "unimplemented" check: