From a517e8718c6c7cef9579c238b6b4a167d5cbcd56 Mon Sep 17 00:00:00 2001 From: zah Date: Thu, 14 Jul 2022 23:07:16 +0300 Subject: [PATCH] Allow the user to use 'goerli' instead of 'prater' (#3874) --- Makefile | 31 ++++++++++++++++++++ beacon_chain/networking/network_metadata.nim | 2 +- run-goerli-beacon-node.sh | 13 ++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100755 run-goerli-beacon-node.sh diff --git a/Makefile b/Makefile index 10253f1a48..d423882ca8 100644 --- a/Makefile +++ b/Makefile @@ -428,6 +428,37 @@ prater-dev-deposit: | prater-build deposit_contract clean-prater: $(call CLEAN_NETWORK,prater) + +### +### Goerli +### +goerli-build: | nimbus_beacon_node nimbus_signing_node + +# https://www.gnu.org/software/make/manual/html_node/Call-Function.html#Call-Function +goerli: | goerli-build + $(call CONNECT_TO_NETWORK,goerli,nimbus_beacon_node,$(GOERLI_WEB3_URL)) + +goerli-vc: | goerli-build nimbus_validator_client + $(call CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT,goerli,nimbus_beacon_node,$(GOERLI_WEB3_URL)) + +goerli-lc: | nimbus_light_client + $(call CONNECT_TO_NETWORK_WITH_LIGHT_CLIENT,goerli) + +ifneq ($(LOG_LEVEL), TRACE) +goerli-dev: + + "$(MAKE)" LOG_LEVEL=TRACE $@ +else +goerli-dev: | goerli-build + $(call CONNECT_TO_NETWORK_IN_DEV_MODE,goerli,nimbus_beacon_node,$(GOERLI_WEB3_URL)) +endif + +goerli-dev-deposit: | goerli-build deposit_contract + $(call MAKE_DEPOSIT,goerli,$(GOERLI_WEB3_URL)) + +clean-goerli: + $(call CLEAN_NETWORK,goerli) + + ### ### Ropsten ### diff --git a/beacon_chain/networking/network_metadata.nim b/beacon_chain/networking/network_metadata.nim index b88c730209..af1981eaf1 100644 --- a/beacon_chain/networking/network_metadata.nim +++ b/beacon_chain/networking/network_metadata.nim @@ -294,7 +294,7 @@ when not defined(gnosisChainBinary): case toLowerAscii(networkName) of "mainnet": mainnetMetadata - of "prater": + of "prater", "goerli": praterMetadata of "ropsten": ropstenMetadata diff --git a/run-goerli-beacon-node.sh b/run-goerli-beacon-node.sh new file mode 100755 index 0000000000..8412d5200e --- /dev/null +++ b/run-goerli-beacon-node.sh @@ -0,0 +1,13 @@ +#!/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 goerli "$@" +