From 39a893ea90c7d1f2cb525f2ee4e62dc89868676c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Fri, 24 Apr 2020 17:28:03 +0200 Subject: [PATCH] use the right preset in "make testnet{0,1}" [skip ci] (#932) ...and stop pretending to handle the preset in "connect_to_testnet.nims". --- Makefile | 10 +++++----- scripts/connect_to_testnet.nims | 6 +----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index d8c854cfe..50f3132fe 100644 --- a/Makefile +++ b/Makefile @@ -119,11 +119,11 @@ clean-testnet0: clean-testnet1: rm -rf build/data/testnet1 -testnet0: | build deps - NIM_PARAMS="$(NIM_PARAMS)" LOG_LEVEL="$(LOG_LEVEL)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) testnet0 - -testnet1: | build deps - NIM_PARAMS="$(NIM_PARAMS)" LOG_LEVEL="$(LOG_LEVEL)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) testnet1 +# - we're getting the preset from a testnet-specific .env file +# - try SCRIPT_PARAMS="--skipGoerliKey" +testnet0 testnet1: | build deps + source scripts/$@.env; \ + NIM_PARAMS="$(NIM_PARAMS) -d:const_preset=$$CONST_PRESET" LOG_LEVEL="$(LOG_LEVEL)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) $@ clean: | clean-common rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,beacon_node_testnet*,state_sim,transition*} diff --git a/scripts/connect_to_testnet.nims b/scripts/connect_to_testnet.nims index a4934d437..c70505bf9 100644 --- a/scripts/connect_to_testnet.nims +++ b/scripts/connect_to_testnet.nims @@ -7,7 +7,6 @@ const bootstrapYamlFileName = "boot_enr.yaml" depositContractFileName = "deposit_contract.txt" genesisFile = "genesis.ssz" - configFile = "config.yaml" testnetsRepo = "eth2-testnets" web3Url = "wss://goerli.infura.io/ws/v3/809a18497dd74102b5f37d25aae3c85a" @@ -68,9 +67,6 @@ cli do (skipGoerliKey {. else: echo "Warning: the network metadata doesn't include a bootstrap file" - var preset = testnetDir / configFile - if not system.fileExists(preset): preset = "minimal" - let dataDirName = testnetName.replace("/", "_") .replace("(", "_") @@ -100,7 +96,7 @@ cli do (skipGoerliKey {. rmDir dataDir cd rootDir - exec &"""nim c {nimFlags} -d:"const_preset={preset}" -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim""" + exec &"""nim c {nimFlags} -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim""" mkDir dumpDir