From f9830836a9f2f45db424fac98e68cb7c2f385cd3 Mon Sep 17 00:00:00 2001 From: tersec Date: Mon, 24 Oct 2022 20:32:52 +0000 Subject: [PATCH] deprecate --terminal-total-difficulty-override; remove launch script for deprecated ropsten (#4241) * deprecate --terminal-total-difficulty-override; remove launch script for deprecated ropsten * remove Makefile support for Ropsten --- Makefile | 30 ------------------- beacon_chain/conf.nim | 5 +--- beacon_chain/nimbus_beacon_node.nim | 5 +--- beacon_chain/rpc/rest_key_management_api.nim | 2 +- beacon_chain/spec/eth2_apis/rest_common.nim | 2 +- .../eth2_apis/rest_remote_signer_calls.nim | 2 +- run-ropsten-beacon-node.sh | 12 -------- .../test_fixture_fork_choice.nim | 2 +- .../test_fixture_light_client_sync.nim | 2 -- 9 files changed, 6 insertions(+), 56 deletions(-) delete mode 100755 run-ropsten-beacon-node.sh diff --git a/Makefile b/Makefile index cb4967396..66e411bdd 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,6 @@ BASE_METRICS_PORT := 8008 # WARNING: Use lazy assignment to allow CI to override. EXECUTOR_NUMBER ?= 0 -ROPSTEN_WEB3_URL := "--web3-url=wss://ropsten.infura.io/ws/v3/809a18497dd74102b5f37d25aae3c85a" SEPOLIA_WEB3_URL := "--web3-url=https://rpc.sepolia.dev --web3-url=https://www.sepoliarpc.space" GOERLI_WEB3_URL := "--web3-url=wss://goerli.infura.io/ws/v3/809a18497dd74102b5f37d25aae3c85a" GNOSIS_WEB3_URLS := "--web3-url=wss://rpc.gnosischain.com/wss --web3-url=wss://xdai.poanetwork.dev/wss" @@ -531,35 +530,6 @@ clean-goerli: $(call CLEAN_NETWORK,goerli) -### -### Ropsten -### -ropsten-build: | nimbus_beacon_node nimbus_signing_node - -# https://www.gnu.org/software/make/manual/html_node/Call-Function.html#Call-Function -ropsten: | ropsten-build - $(call CONNECT_TO_NETWORK,ropsten,nimbus_beacon_node,$(ROPSTEN_WEB3_URL)) - -ropsten-vc: | ropsten-build nimbus_validator_client - $(call CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT,ropsten,nimbus_beacon_node,$(ROPSTEN_WEB3_URL)) - -ropsten-lc: | nimbus_light_client - $(call CONNECT_TO_NETWORK_WITH_LIGHT_CLIENT,ropsten) - -ifneq ($(LOG_LEVEL), TRACE) -ropsten-dev: - + "$(MAKE)" LOG_LEVEL=TRACE $@ -else -ropsten-dev: | ropsten-build - $(call CONNECT_TO_NETWORK_IN_DEV_MODE,ropsten,nimbus_beacon_node,$(ROPSTEN_WEB3_URL)) -endif - -ropsten-dev-deposit: | ropsten-build deposit_contract - $(call MAKE_DEPOSIT,ropsten,$(ROPSTEN_WEB3_URL)) - -clean-ropsten: - $(call CLEAN_NETWORK,ropsten) - ### ### Sepolia ### diff --git a/beacon_chain/conf.nim b/beacon_chain/conf.nim index aab2ad700..bbb6c553d 100644 --- a/beacon_chain/conf.nim +++ b/beacon_chain/conf.nim @@ -528,12 +528,9 @@ type defaultValueDesc: $DeploymentPhase.Mainnet name: "deployment-phase" .}: DeploymentPhase - # TODO nim-confutils on 32-bit platforms overflows decoding integers - # requiring 64-bit representations and doesn't build when specifying - # UInt256 directly, so pass this through for decoding elsewhere. terminalTotalDifficultyOverride* {. hidden - desc: "Override pre-configured TERMINAL_TOTAL_DIFFICULTY parameter" + desc: "Deprecated for removal" name: "terminal-total-difficulty-override" .}: Option[string] validatorMonitorAuto* {. diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index 3022a98c8..04bd97fd1 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -1812,6 +1812,7 @@ proc doRunBeaconNode(config: var BeaconNodeConf, rng: ref HmacDrbgContext) {.rai option = config.option.get ignoreDeprecatedOption requireEngineAPI ignoreDeprecatedOption safeSlotsToImportOptimistically + ignoreDeprecatedOption terminalTotalDifficultyOverride createPidFile(config.dataDir.string / "beacon_node.pid") @@ -1837,10 +1838,6 @@ proc doRunBeaconNode(config: var BeaconNodeConf, rng: ref HmacDrbgContext) {.rai # the db. var metadata = config.loadEth2Network() - if config.terminalTotalDifficultyOverride.isSome: - metadata.cfg.TERMINAL_TOTAL_DIFFICULTY = - parse(config.terminalTotalDifficultyOverride.get, UInt256, 10) - # Updating the config based on the metadata certainly is not beautiful but it # works for node in metadata.bootstrapNodes: diff --git a/beacon_chain/rpc/rest_key_management_api.nim b/beacon_chain/rpc/rest_key_management_api.nim index 1b3307525..ab69f4a0c 100644 --- a/beacon_chain/rpc/rest_key_management_api.nim +++ b/beacon_chain/rpc/rest_key_management_api.nim @@ -8,7 +8,7 @@ # please keep imports clear of `rest_utils` or any other module which imports # beacon node's specific networking code. -import std/[tables, os, strutils, uri] +import std/[tables, strutils, uri] import chronos, chronicles, confutils, stew/[base10, results, io2], blscurve, presto import ".."/spec/[keystore, crypto] diff --git a/beacon_chain/spec/eth2_apis/rest_common.nim b/beacon_chain/spec/eth2_apis/rest_common.nim index 810b4abce..9e1505393 100644 --- a/beacon_chain/spec/eth2_apis/rest_common.nim +++ b/beacon_chain/spec/eth2_apis/rest_common.nim @@ -10,7 +10,7 @@ else: {.push raises: [].} import - chronos, presto/client, chronicles, + chronos, presto/client, "."/[rest_types, eth2_rest_serialization] export chronos, client, rest_types, eth2_rest_serialization diff --git a/beacon_chain/spec/eth2_apis/rest_remote_signer_calls.nim b/beacon_chain/spec/eth2_apis/rest_remote_signer_calls.nim index 049c17af8..f7eac04c3 100644 --- a/beacon_chain/spec/eth2_apis/rest_remote_signer_calls.nim +++ b/beacon_chain/spec/eth2_apis/rest_remote_signer_calls.nim @@ -10,7 +10,7 @@ else: {.push raises: [].} import - std/strutils, chronicles, metrics, + chronicles, metrics, chronos, chronos/apps/http/httpclient, presto, presto/client, serialization, json_serialization, json_serialization/std/[options, net, sets], diff --git a/run-ropsten-beacon-node.sh b/run-ropsten-beacon-node.sh deleted file mode 100755 index 218d71d7f..000000000 --- a/run-ropsten-beacon-node.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2020-2021 Status Research & Development GmbH. Licensed under -# either of: -# - Apache License, version 2.0 -# - MIT license -# at your option. This file may not be copied, modified, or distributed except -# according to those terms. - -cd "$(dirname $0)" -# Allow the binary to receive signals directly. -exec scripts/run-beacon-node.sh nimbus_beacon_node ropsten "$@" diff --git a/tests/consensus_spec/test_fixture_fork_choice.nim b/tests/consensus_spec/test_fixture_fork_choice.nim index 42d47756d..762432ea8 100644 --- a/tests/consensus_spec/test_fixture_fork_choice.nim +++ b/tests/consensus_spec/test_fixture_fork_choice.nim @@ -11,7 +11,7 @@ import # Standard library std/[json, os, sequtils, strutils, tables], # Status libraries - stew/[results, endians2], chronicles, + stew/results, chronicles, eth/keys, taskpools, # Internals ../../beacon_chain/spec/[helpers, forks, state_transition_block], diff --git a/tests/consensus_spec/test_fixture_light_client_sync.nim b/tests/consensus_spec/test_fixture_light_client_sync.nim index f4d6b06bd..d51f81953 100644 --- a/tests/consensus_spec/test_fixture_light_client_sync.nim +++ b/tests/consensus_spec/test_fixture_light_client_sync.nim @@ -10,8 +10,6 @@ import # Standard library std/[json, os, streams], - # Status libraries - stew/bitops2, # Third-party yaml, # Beacon chain internals