Rename binaries; Mimic the original repo layout in the distribution

This commit is contained in:
Zahary Karadjov 2020-11-07 20:00:31 +02:00 committed by zah
parent 11ab3a2f4f
commit e9b9cd75ee
47 changed files with 126 additions and 200 deletions

View File

@ -34,7 +34,7 @@ build_script:
test_script: test_script:
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% LOG_LEVEL=TRACE - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% LOG_LEVEL=TRACE
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image" beacon_node - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image" nimbus_beacon_node
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_TEST_FIXTURES_SCRIPT=1 test - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_TEST_FIXTURES_SCRIPT=1 test
deploy: off deploy: off

View File

@ -273,8 +273,8 @@ jobs:
shell: bash shell: bash
working-directory: nim-beacon-chain working-directory: nim-beacon-chain
run: | run: |
make -j$ncpu ARCH_OVERRIDE=$PLATFORM LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image" beacon_node make -j$ncpu ARCH_OVERRIDE=$PLATFORM LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image" nimbus_beacon_node
make -j$ncpu ARCH_OVERRIDE=$PLATFORM LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image" validator_client make -j$ncpu ARCH_OVERRIDE=$PLATFORM LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image" nimbus_validator_client
- name: Run nim-beacon-chain tests - name: Run nim-beacon-chain tests
if: matrix.target.TEST_KIND == 'unit-tests' if: matrix.target.TEST_KIND == 'unit-tests'

View File

@ -51,5 +51,5 @@ script:
# Building Nim-1.0.4 takes up to 10 minutes on Travis - the time limit after which jobs are cancelled for having no output # Building Nim-1.0.4 takes up to 10 minutes on Travis - the time limit after which jobs are cancelled for having no output
- make -j${NPROC} NIMFLAGS="--parallelBuild:2" V=1 update # to allow a newer Nim version to be detected - make -j${NPROC} NIMFLAGS="--parallelBuild:2" V=1 update # to allow a newer Nim version to be detected
- make -j${NPROC} NIMFLAGS="--parallelBuild:2" LOG_LEVEL=TRACE - make -j${NPROC} NIMFLAGS="--parallelBuild:2" LOG_LEVEL=TRACE
- make -j${NPROC} NIMFLAGS="--parallelBuild:2 -d:testnet_servers_image" LOG_LEVEL=TRACE beacon_node - make -j${NPROC} NIMFLAGS="--parallelBuild:2 -d:testnet_servers_image" LOG_LEVEL=TRACE nimbus_beacon_node
- make -j${NPROC} NIMFLAGS="--parallelBuild:2" DISABLE_TEST_FIXTURES_SCRIPT=1 test - make -j${NPROC} NIMFLAGS="--parallelBuild:2" DISABLE_TEST_FIXTURES_SCRIPT=1 test

4
Jenkinsfile vendored
View File

@ -38,9 +38,9 @@ def runStages() {
sh """#!/bin/bash sh """#!/bin/bash
set -e set -e
make -j${env.NPROC} V=1 make -j${env.NPROC} V=1
make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' beacon_node make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' nimbus_beacon_node
# Miracl fallback # Miracl fallback
# make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:BLS_FORCE_BACKEND=miracl -d:testnet_servers_image' beacon_node # make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:BLS_FORCE_BACKEND=miracl -d:testnet_servers_image' nimbus_beacon_node
""" """
} }
}, },

View File

@ -33,8 +33,8 @@ endif
# unconditionally built by the default Make target # unconditionally built by the default Make target
# TODO re-enable ncli_query if/when it works again # TODO re-enable ncli_query if/when it works again
TOOLS := \ TOOLS := \
beacon_node_spec_0_12_3 \ nimbus_beacon_node_spec_0_12_3 \
beacon_node \ nimbus_beacon_node \
block_sim \ block_sim \
deposit_contract \ deposit_contract \
inspector \ inspector \
@ -46,8 +46,8 @@ TOOLS := \
process_dashboard \ process_dashboard \
stack_sizes \ stack_sizes \
state_sim \ state_sim \
validator_client \ nimbus_validator_client \
signing_process nimbus_signing_process
# bench_bls_sig_agggregation TODO reenable after bls v0.10.1 changes # bench_bls_sig_agggregation TODO reenable after bls v0.10.1 changes
@ -176,8 +176,8 @@ clean-testnet0:
clean-testnet1: clean-testnet1:
rm -rf build/data/testnet1* rm -rf build/data/testnet1*
testnet0 testnet1: | beacon_node signing_process testnet0 testnet1: | nimbus_beacon_node nimbus_signing_process
build/beacon_node \ build/nimbus_beacon_node \
--network=$@ \ --network=$@ \
--log-level="$(LOG_LEVEL)" \ --log-level="$(LOG_LEVEL)" \
--data-dir=build/data/$@_$(NODE_ID) \ --data-dir=build/data/$@_$(NODE_ID) \
@ -239,7 +239,7 @@ define CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT
sleep 4 sleep 4
build/validator_client \ build/nimbus_validator_client \
--log-level="$(LOG_LEVEL)" \ --log-level="$(LOG_LEVEL)" \
--log-file=build/data/shared_$(1)_$(NODE_ID)/nbc_vc_$$(date +"%Y%m%d%H%M%S").log \ --log-file=build/data/shared_$(1)_$(NODE_ID)/nbc_vc_$$(date +"%Y%m%d%H%M%S").log \
--data-dir=build/data/shared_$(1)_$(NODE_ID) \ --data-dir=build/data/shared_$(1)_$(NODE_ID) \
@ -247,7 +247,7 @@ define CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT
endef endef
define MAKE_DEPOSIT_DATA define MAKE_DEPOSIT_DATA
build/beacon_node deposits create \ build/nimbus_beacon_node deposits create \
--network=$(1) \ --network=$(1) \
--new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \ --new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \
--out-validators-dir=build/data/shared_$(1)_$(NODE_ID)/validators \ --out-validators-dir=build/data/shared_$(1)_$(NODE_ID)/validators \
@ -257,7 +257,7 @@ define MAKE_DEPOSIT_DATA
endef endef
define MAKE_DEPOSIT define MAKE_DEPOSIT
build/beacon_node deposits create \ build/nimbus_beacon_node deposits create \
--network=$(1) \ --network=$(1) \
--out-deposits-file=nbc-$(1)-deposits.json \ --out-deposits-file=nbc-$(1)-deposits.json \
--new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \ --new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \
@ -283,27 +283,27 @@ endef
### medalla ### medalla
### ###
# https://www.gnu.org/software/make/manual/html_node/Call-Function.html#Call-Function # https://www.gnu.org/software/make/manual/html_node/Call-Function.html#Call-Function
medalla: | beacon_node_spec_0_12_3 signing_process medalla: | nimbus_beacon_node_spec_0_12_3 nimbus_signing_process
$(call CONNECT_TO_NETWORK,medalla,beacon_node_spec_0_12_3) $(call CONNECT_TO_NETWORK,medalla,nimbus_beacon_node_spec_0_12_3)
medalla-vc: | beacon_node_spec_0_12_3 signing_process validator_client medalla-vc: | nimbus_beacon_node_spec_0_12_3 nimbus_signing_process nimbus_validator_client
$(call CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT,medalla,beacon_node_spec_0_12_3) $(call CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT,medalla,nimbus_beacon_node_spec_0_12_3)
medalla-fast-sync: | beacon_node_spec_0_12_3 signing_process medalla-fast-sync: | nimbus_beacon_node_spec_0_12_3 nimbus_signing_process
$(call CONNECT_TO_NETWORK,medalla,beacon_node_spec_0_12_3,FastSync) $(call CONNECT_TO_NETWORK,medalla,nimbus_beacon_node_spec_0_12_3,FastSync)
ifneq ($(LOG_LEVEL), TRACE) ifneq ($(LOG_LEVEL), TRACE)
medalla-dev: medalla-dev:
+ "$(MAKE)" LOG_LEVEL=TRACE $@ + "$(MAKE)" LOG_LEVEL=TRACE $@
else else
medalla-dev: | beacon_node_spec_0_12_3 signing_process medalla-dev: | nimbus_beacon_node_spec_0_12_3 nimbus_signing_process
$(call CONNECT_TO_NETWORK_IN_DEV_MODE,medalla,beacon_node_spec_0_12_3) $(call CONNECT_TO_NETWORK_IN_DEV_MODE,medalla,nimbus_beacon_node_spec_0_12_3)
endif endif
medalla-deposit-data: | beacon_node_spec_0_12_3 signing_process deposit_contract medalla-deposit-data: | nimbus_beacon_node_spec_0_12_3 nimbus_signing_process deposit_contract
$(call MAKE_DEPOSIT_DATA,medalla) $(call MAKE_DEPOSIT_DATA,medalla)
medalla-deposit: | beacon_node_spec_0_12_3 signing_process deposit_contract medalla-deposit: | nimbus_beacon_node_spec_0_12_3 nimbus_signing_process deposit_contract
$(call MAKE_DEPOSIT,medalla) $(call MAKE_DEPOSIT,medalla)
clean-medalla: clean-medalla:
@ -318,7 +318,7 @@ ntu: | build deps
$(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ntu c vendor/nim-testutils/ntu.nim $(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ntu c vendor/nim-testutils/ntu.nim
clean: | clean-common clean: | clean-common
rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,beacon_node_*,block_sim,state_sim,transition*} rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,nimbus_beacon_node*,beacon_node_*,block_sim,state_sim,transition*}
ifneq ($(USE_LIBBACKTRACE), 0) ifneq ($(USE_LIBBACKTRACE), 0)
+ "$(MAKE)" -C vendor/nim-libbacktrace clean $(HANDLE_OUTPUT) + "$(MAKE)" -C vendor/nim-libbacktrace clean $(HANDLE_OUTPUT)
endif endif

View File

@ -371,7 +371,7 @@ After cloning the repo:
# The first `make` invocation will update all Git submodules. # The first `make` invocation will update all Git submodules.
# You'll run `make update` after each `git pull`, in the future, to keep those submodules up to date. # You'll run `make update` after each `git pull`, in the future, to keep those submodules up to date.
# Build beacon_node and all the tools, using 4 parallel Make jobs # Build nimbus_beacon_node and all the tools, using 4 parallel Make jobs
make -j4 make -j4
# Run tests # Run tests
@ -444,7 +444,7 @@ make V=2 test # even more verbose
```bash ```bash
make LOG_LEVEL=DEBUG bench_bls_sig_agggregation # this is the default make LOG_LEVEL=DEBUG bench_bls_sig_agggregation # this is the default
make LOG_LEVEL=TRACE beacon_node # log everything make LOG_LEVEL=TRACE nimbus_beacon_node # log everything
``` ```
- pass arbitrary parameters to the Nim compiler: - pass arbitrary parameters to the Nim compiler:
@ -468,19 +468,19 @@ make USE_LIBBACKTRACE=0 # expect the resulting binaries to be 2-3 times slower
- disable `-march=native` because you want to run the binary on a different machine than the one you're building it on: - disable `-march=native` because you want to run the binary on a different machine than the one you're building it on:
```bash ```bash
make NIMFLAGS="-d:disableMarchNative" beacon_node make NIMFLAGS="-d:disableMarchNative" nimbus_beacon_node
``` ```
- disable link-time optimisation (LTO): - disable link-time optimisation (LTO):
```bash ```bash
make NIMFLAGS="-d:disableLTO" beacon_node make NIMFLAGS="-d:disableLTO" nimbus_beacon_node
``` ```
- build a static binary - build a static binary
```bash ```bash
make NIMFLAGS="--passL:-static" beacon_node make NIMFLAGS="--passL:-static" nimbus_beacon_node
``` ```
- publish a book using [mdBook](https://github.com/rust-lang/mdBook) from sources in "docs/" to GitHub pages: - publish a book using [mdBook](https://github.com/rust-lang/mdBook) from sources in "docs/" to GitHub pages:

View File

@ -67,9 +67,9 @@ jobs:
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} LOG_LEVEL=TRACE mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} LOG_LEVEL=TRACE
if [[ $PLATFORM == "x64" ]]; then if [[ $PLATFORM == "x64" ]]; then
# everything builds more slowly on 32-bit, since there's no libbacktrace support # everything builds more slowly on 32-bit, since there's no libbacktrace support
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image" beacon_node mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image" nimbus_beacon_node
fi fi
file build/beacon_node file build/nimbus_beacon_node
# fail fast # fail fast
export NIMTEST_ABORT_ON_ERROR=1 export NIMTEST_ABORT_ON_ERROR=1
scripts/setup_official_tests.sh jsonTestsCache scripts/setup_official_tests.sh jsonTestsCache

View File

@ -11,7 +11,7 @@ license = "MIT or Apache License 2.0"
installDirs = @["beacon_chain", "research"] installDirs = @["beacon_chain", "research"]
skipDirs = @["nfuzz"] skipDirs = @["nfuzz"]
bin = @[ bin = @[
"beacon_chain/beacon_node", "beacon_chain/nimbus_beacon_node",
"research/serialized_sizes", "research/serialized_sizes",
"nbench/nbench", "nbench/nbench",
] ]
@ -50,10 +50,10 @@ proc buildAndRunBinary(name: string, srcDir = "./", params = "", cmdParams = "",
exec "nim " & lang & " --out:./build/" & name & " -r " & extra_params & " " & srcDir & name & ".nim" & " " & cmdParams exec "nim " & lang & " --out:./build/" & name & " -r " & extra_params & " " & srcDir & name & ".nim" & " " & cmdParams
task moduleTests, "Run all module tests": task moduleTests, "Run all module tests":
buildAndRunBinary "beacon_node", "beacon_chain/", buildAndRunBinary "nimbus_beacon_node", "beacon_chain/",
"-d:chronicles_log_level=TRACE " & "-d:chronicles_log_level=TRACE " &
"-d:const_preset=minimal -d:ETH2_SPEC=\"v0.12.3\" " & "-d:const_preset=minimal -d:ETH2_SPEC=\"v0.12.3\" " &
"-d:testutils_test_build" "-d:testutils_test_build"
### tasks ### tasks
task test, "Run all tests": task test, "Run all tests":

View File

@ -1 +1,5 @@
beacon_node beacon_node
nimbus_beacon_node
nimbus_signing_process
nimbus_validator_client

View File

@ -1,2 +0,0 @@
import beacon_node

View File

@ -216,7 +216,7 @@ type
name: "rpc-address" }: ValidIpAddress name: "rpc-address" }: ValidIpAddress
inProcessValidators* {. inProcessValidators* {.
defaultValue: true # the use of the signing_process binary by default will be delayed until async I/O over stdin/stdout is developed for the child process. defaultValue: true # the use of the nimbus_signing_process binary by default will be delayed until async I/O over stdin/stdout is developed for the child process.
desc: "Disable the push model (the beacon node tells a signing process with the private keys of the validators what to sign and when) and load the validators in the beacon node itself" desc: "Disable the push model (the beacon node tells a signing process with the private keys of the validators what to sign and when) and load the validators in the beacon node itself"
name: "in-process-validators" }: bool name: "in-process-validators" }: bool

View File

@ -288,7 +288,7 @@ proc init*(T: type BeaconNode,
if res.config.inProcessValidators: if res.config.inProcessValidators:
res.addLocalValidators() res.addLocalValidators()
else: else:
let cmd = getAppDir() / "signing_process".addFileExt(ExeExt) let cmd = getAppDir() / "nimbus_signing_process".addFileExt(ExeExt)
let args = [$res.config.validatorsDir, $res.config.secretsDir] let args = [$res.config.validatorsDir, $res.config.secretsDir]
let workdir = io2.getCurrentDir().tryGet() let workdir = io2.getCurrentDir().tryGet()
res.vcProcess = startProcess(cmd, workdir, args) res.vcProcess = startProcess(cmd, workdir, args)

View File

@ -0,0 +1,3 @@
import nimbus_beacon_node
export nimbus_beacon_node

View File

@ -26,7 +26,7 @@ RUN cd /root/nim-beacon-chain \
&& git fetch \ && git fetch \
&& git reset --hard ${GIT_REVISION} \ && git reset --hard ${GIT_REVISION} \
&& make -j$(nproc) update \ && make -j$(nproc) update \
&& make LOG_LEVEL=TRACE NIMFLAGS="-d:insecure -d:testnet_servers_image ${NETWORK_NIM_FLAGS} ${MARCH_NIM_FLAGS}" beacon_node && make LOG_LEVEL=TRACE NIMFLAGS="-d:insecure -d:testnet_servers_image ${NETWORK_NIM_FLAGS} ${MARCH_NIM_FLAGS}" nimbus_beacon_node
# --------------------------------- # # --------------------------------- #
# Starting new image to reduce size # # Starting new image to reduce size #
@ -41,12 +41,12 @@ RUN apt-get -qq update \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# "COPY" creates new image layers, so we cram all we can into one command # "COPY" creates new image layers, so we cram all we can into one command
COPY --from=build /root/nim-beacon-chain/build/beacon_node /usr/bin/ COPY --from=build /root/nim-beacon-chain/build/nimbus_beacon_node /usr/bin/
MAINTAINER Zahary Karadjov <zahary@status.im> MAINTAINER Zahary Karadjov <zahary@status.im>
LABEL description="Nimbus installation that can act as an ETH2 network bootstrap node." LABEL description="Nimbus installation that can act as an ETH2 network bootstrap node."
STOPSIGNAL SIGINT STOPSIGNAL SIGINT
ENTRYPOINT ["/usr/bin/beacon_node"] ENTRYPOINT ["/usr/bin/nimbus_beacon_node"]

View File

@ -1,4 +1,4 @@
# Binary Nimbus beacon_node distribution # Binary Nimbus beacon node distribution
This binary distribution was created from https://github.com/status-im/nimbus-eth2 This binary distribution was created from https://github.com/status-im/nimbus-eth2
@ -34,7 +34,7 @@ Change options implemented as shell variables inside the script:
LOG_LEVEL=DEBUG BASE_PORT=9100 ./run_medalla_node.sh LOG_LEVEL=DEBUG BASE_PORT=9100 ./run_medalla_node.sh
``` ```
Add arbitrary `beacon_node` parameters (yes, you can combine this with env vars): Add arbitrary `nimbus_beacon_node` parameters (yes, you can combine this with env vars):
```bash ```bash
./run_medalla_node.sh --log-level=DEBUG --rpc-port=9290 ./run_medalla_node.sh --log-level=DEBUG --rpc-port=9290

View File

@ -5,7 +5,7 @@ set -e
cd /home/user/nimbus-eth2 cd /home/user/nimbus-eth2
git config --global core.abbrev 8 git config --global core.abbrev 8
BINARIES="beacon_node beacon_node_spec_0_12_3" BINARIES="nimbus_beacon_node nimbus_beacon_node_spec_0_12_3 nimbus_signing_process"
# we need to build everything against libraries available inside this container, including the Nim compiler # we need to build everything against libraries available inside this container, including the Nim compiler
make clean make clean
@ -24,17 +24,20 @@ if [[ -d "${DIST_PATH}" ]]; then
rm -rf "${DIST_PATH}" rm -rf "${DIST_PATH}"
fi fi
mkdir -p "${DIST_PATH}" mkdir -p "${DIST_PATH}"
mkdir "${DIST_PATH}/scripts"
mkdir "${DIST_PATH}/build"
# copy and checksum binaries, copy scripts and docs # copy and checksum binaries, copy scripts and docs
for BINARY in ${BINARIES}; do for BINARY in ${BINARIES}; do
cp -a ./build/${BINARY} "${DIST_PATH}/" cp -a ./build/${BINARY} "${DIST_PATH}/build/"
cd "${DIST_PATH}" cd "${DIST_PATH}/build"
md5sum ${BINARY} > ${BINARY}.md5sum md5sum ${BINARY} > ${BINARY}.md5sum
sha512sum ${BINARY} > ${BINARY}.sha512sum sha512sum ${BINARY} > ${BINARY}.sha512sum
cd - >/dev/null cd - >/dev/null
done done
sed -e "s/GIT_COMMIT/${GIT_COMMIT}/" docker/dist/README.md > "${DIST_PATH}/README.md" sed -e "s/GIT_COMMIT/${GIT_COMMIT}/" docker/dist/README.md > "${DIST_PATH}/README.md"
cp -a scripts/makedir.sh docker/dist/run_*_node.sh "${DIST_PATH}/" cp -a scripts/makedir.sh scripts/run-beacon-node.sh "${DIST_PATH}/scripts"
cp -a ./run-*-beacon-node.sh "${DIST_PATH}/"
#cp -a docs/the_nimbus_book "${DIST_PATH}/" #cp -a docs/the_nimbus_book "${DIST_PATH}/"
# create the tarball # create the tarball

View File

@ -21,7 +21,7 @@ ARCHIVE_DIR="${ARCHIVE%.tar.gz}"
rm -rf ${ARCHIVE_DIR} rm -rf ${ARCHIVE_DIR}
tar xzf "${ARCHIVE}" tar xzf "${ARCHIVE}"
cd "${ARCHIVE_DIR}" cd "${ARCHIVE_DIR}"
./beacon_node --help ./nimbus_beacon_node --help
cd .. cd ..
rm -rf ${ARCHIVE_DIR} rm -rf ${ARCHIVE_DIR}

View File

@ -1,42 +0,0 @@
#!/bin/bash
# Copyright (c) 2020 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.
set -e
REL_PATH="$(dirname $0)"
# Overridable from the environment.
: ${LOG_LEVEL:="INFO"}
: ${NODE_ID:=0}
: ${NETWORK:="mainnet"}
: ${DATA_DIR:="shared_${NETWORK}_${NODE_ID}"}
: ${BASE_PORT:=9000}
: ${BASE_RPC_PORT:=9190}
# Sanity checks.
if [[ -z "${WEB3_URL}" ]]; then
echo "WEB3_URL not set in the environment. Aborting."
exit 1
fi
# Create the data directory with the proper permissions.
"${REL_PATH}"/makedir.sh "${DATA_DIR}"
# Run the beacon node.
"${REL_PATH}"/beacon_node \
--log-level="${LOG_LEVEL}" \
--log-file="${DATA_DIR}"/nbc_bn_$(date +"%Y%m%d%H%M%S").log \
--data-dir="${DATA_DIR}" \
--web3-url=${WEB3_URL} \
--tcp-port=$(( ${BASE_PORT} + ${NODE_ID} )) \
--udp-port=$(( ${BASE_PORT} + ${NODE_ID} )) \
--rpc \
--rpc-port=$(( ${BASE_RPC_PORT} +${NODE_ID} )) \
"$@"

View File

@ -1,38 +0,0 @@
#!/bin/bash
# Copyright (c) 2020 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.
set -e
REL_PATH="$(dirname $0)"
# Overridable from the environment.
: ${LOG_LEVEL:="INFO"}
: ${NODE_ID:=0}
: ${NETWORK:="medalla"}
: ${DATA_DIR:="shared_${NETWORK}_${NODE_ID}"}
: ${BASE_PORT:=9000}
: ${BASE_RPC_PORT:=9190}
: ${GOERLI_WEB3_URL:="wss://goerli.infura.io/ws/v3/809a18497dd74102b5f37d25aae3c85a"}
# Create the data directory with the proper permissions.
"${REL_PATH}"/makedir.sh "${DATA_DIR}"
# Run the beacon node.
"${REL_PATH}"/${NETWORK}_beacon_node \
--network="${NETWORK}" \
--log-level="${LOG_LEVEL}" \
--log-file="${DATA_DIR}"/nbc_bn_$(date +"%Y%m%d%H%M%S").log \
--data-dir="${DATA_DIR}" \
--web3-url=${GOERLI_WEB3_URL} \
--tcp-port=$(( ${BASE_PORT} + ${NODE_ID} )) \
--udp-port=$(( ${BASE_PORT} + ${NODE_ID} )) \
--rpc \
--rpc-port=$(( ${BASE_RPC_PORT} +${NODE_ID} )) \
"$@"

View File

@ -23,12 +23,12 @@ RUN=0
print_help() { print_help() {
cat <<EOF cat <<EOF
Usage: $(basename $0) <options> -- <beacon_node options> Usage: $(basename $0) <options> -- <nimbus_beacon_node options>
-h, --help this help message -h, --help this help message
--network default: ${NETWORK} --network default: ${NETWORK}
--build build the beacon_node --build build the nimbus_beacon_node binary
--run run the beacon_node --run run the nimbus_beacon_node binary
EOF EOF
} }
@ -91,7 +91,7 @@ if [[ "$BUILD" == "1" ]]; then
git pull git pull
# don't use too much RAM # don't use too much RAM
make update make update
make LOG_LEVEL="TRACE" NIMFLAGS="-d:insecure -d:testnet_servers_image --parallelBuild:1" beacon_node signing_process make LOG_LEVEL="TRACE" NIMFLAGS="-d:insecure -d:testnet_servers_image --parallelBuild:1" nimbus_beacon_node nimbus_signing_process
fi fi
####### #######
@ -100,7 +100,7 @@ fi
if [[ "$RUN" == "1" ]]; then if [[ "$RUN" == "1" ]]; then
cd /root/.cache/nimbus/nim-beacon-chain cd /root/.cache/nimbus/nim-beacon-chain
# make sure Docker's SIGINT reaches the beacon_node binary # make sure Docker's SIGINT reaches the nimbus_beacon_node binary
exec build/beacon_node --network="${NETWORK}" --data-dir="build/data/shared_${NETWORK}_0" --web3-url="wss://goerli.infura.io/ws/v3/6224f3c792cc443fafb64e70a98f871e" ${EXTRA_ARGS} exec build/nimbus_beacon_node --network="${NETWORK}" --data-dir="build/data/shared_${NETWORK}_0" --web3-url="wss://goerli.infura.io/ws/v3/6224f3c792cc443fafb64e70a98f871e" ${EXTRA_ARGS}
fi fi

View File

@ -12,10 +12,10 @@ cd "$(dirname "${BASH_SOURCE[0]}")/../.."
echo -ne "About to delete \"build/data/shared_medalla_0\".\nMake a backup, if you need to, then press Enter. >" echo -ne "About to delete \"build/data/shared_medalla_0\".\nMake a backup, if you need to, then press Enter. >"
read TMP read TMP
make clean-medalla make clean-medalla
make beacon_node make nimbus_beacon_node
for N in $(seq 6 9); do for N in $(seq 6 9); do
build/beacon_node deposits create --deposit-private-key=$1 --dont-send && \ build/nimbus_beacon_node deposits create --deposit-private-key=$1 --dont-send && \
ssh node-0${N}.aws-eu-central-1a.nimbus.test.statusim.net "sudo rm -rf /docker/beacon-node-testnet2-1/data/nim-beacon-chain/build/data/shared_medalla_0/secrets" && \ ssh node-0${N}.aws-eu-central-1a.nimbus.test.statusim.net "sudo rm -rf /docker/beacon-node-testnet2-1/data/nim-beacon-chain/build/data/shared_medalla_0/secrets" && \
ssh node-0${N}.aws-eu-central-1a.nimbus.test.statusim.net "sudo rm -rf /docker/beacon-node-testnet2-1/data/nim-beacon-chain/build/data/shared_medalla_0/validators" && \ ssh node-0${N}.aws-eu-central-1a.nimbus.test.statusim.net "sudo rm -rf /docker/beacon-node-testnet2-1/data/nim-beacon-chain/build/data/shared_medalla_0/validators" && \
rsync -a -zz --rsync-path="sudo rsync" build/data/shared_medalla_0/{secrets,validators} node-0${N}.aws-eu-central-1a.nimbus.test.statusim.net:/docker/beacon-node-testnet2-1/data/nim-beacon-chain/build/data/shared_medalla_0/ && \ rsync -a -zz --rsync-path="sudo rsync" build/data/shared_medalla_0/{secrets,validators} node-0${N}.aws-eu-central-1a.nimbus.test.statusim.net:/docker/beacon-node-testnet2-1/data/nim-beacon-chain/build/data/shared_medalla_0/ && \

View File

@ -12,7 +12,7 @@ The `nimbus-eth2` API is implemented using JSON-RPC 2.0. To query it, you can us
curl -d '{"jsonrpc":"2.0","id":"id","method":"peers","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq curl -d '{"jsonrpc":"2.0","id":"id","method":"peers","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq
``` ```
Before you can access the API, make sure it's enabled using the RPC flag (`beacon_node --rpc`): Before you can access the API, make sure it's enabled using the RPC flag (`nimbus_beacon_node --rpc`):
``` ```
--rpc Enable the JSON-RPC server. --rpc Enable the JSON-RPC server.

View File

@ -23,7 +23,7 @@ Build both repositories by following their respective build instructions.
*nimbus-eth2* *nimbus-eth2*
```console ```console
cd nimbus-eth2 cd nimbus-eth2
make beacon_node make nimbus_beacon_node
``` ```
@ -33,7 +33,7 @@ cd eth2stats-client
make build make build
``` ```
The resulting binaries should appear in `nimbus-eth2/build/beacon_node` and `eth2stats-client/eth2stats-client`, respectively. The resulting binaries should appear in `nimbus-eth2/build/nimbus_beacon_node` and `eth2stats-client/eth2stats-client`, respectively.
### 3. Create an executable script ### 3. Create an executable script

View File

@ -22,7 +22,7 @@ cd nimbus-eth2
#### 2. Run the beacon node build process #### 2. Run the beacon node build process
``` ```
make beacon_node make nimbus_beacon_node
``` ```
## Running the node ## Running the node
@ -51,7 +51,7 @@ This will build Nimbus and its dependencies, and connect you to Medalla.
You should see that the beacon node has launched and started syncing. You should see that the beacon node has launched and started syncing.
``` ```
INF 2020-07-03 15:28:15+02:00 Starting beacon node topics="beacnde" tid=176865 file=beacon_node.nim:866 SECONDS_PER_SLOT=12 SLOTS_PER_EPOCH=32 SPEC_VERSION=0.12.1 cat=init dataDir=/home/arnetheduck/status/nim-beacon-chain/build/data/shared_medalla_0 finalizedRoot=72e7b21c finalizedSlot=20064 headRoot=f92bf720 headSlot=20142 nim="Nim Compiler Version 1.2.2 [Linux: amd64] (be34b5ab)" pcs=start_beacon_node timeSinceFinalization=-108322 version="0.5.0 (c64737e)" INF 2020-07-03 15:28:15+02:00 Starting beacon node topics="beacnde" tid=176865 file=nimbus_beacon_node.nim:866 SECONDS_PER_SLOT=12 SLOTS_PER_EPOCH=32 SPEC_VERSION=0.12.1 cat=init dataDir=/home/arnetheduck/status/nim-beacon-chain/build/data/shared_medalla_0 finalizedRoot=72e7b21c finalizedSlot=20064 headRoot=f92bf720 headSlot=20142 nim="Nim Compiler Version 1.2.2 [Linux: amd64] (be34b5ab)" pcs=start_beacon_node timeSinceFinalization=-108322 version="0.5.0 (c64737e)"
peers: 7 finalized: 3a806c9f:634 head: b364f8e9:636:29 time: 909:7 (29095) ETH: 0.0 peers: 7 finalized: 3a806c9f:634 head: b364f8e9:636:29 time: 909:7 (29095) ETH: 0.0
@ -83,7 +83,7 @@ make NIMFLAGS="-d:insecure" medalla
To see a list of command line options with descriptions, navigate to the `build` directory and run: To see a list of command line options with descriptions, navigate to the `build` directory and run:
``` ```
./beacon_node --help ./nimbus_beacon_node --help
``` ```
You should see the following output: You should see the following output:
@ -91,7 +91,7 @@ You should see the following output:
``` ```
Usage: Usage:
beacon_node [OPTIONS]... command nimbus_beacon_node [OPTIONS]... command
The following options are available: The following options are available:
@ -135,7 +135,7 @@ The following options are available:
Available sub-commands: Available sub-commands:
beacon_node_shared_medalla_0 createTestnet [OPTIONS]... nimbus_beacon_node createTestnet [OPTIONS]...
The following options are available: The following options are available:
@ -151,7 +151,7 @@ The following options are available:
--with-genesis-root Include a genesis root in 'network.json'. --with-genesis-root Include a genesis root in 'network.json'.
--output-bootstrap-file Output file with list of bootstrap nodes for the network. --output-bootstrap-file Output file with list of bootstrap nodes for the network.
beacon_node_shared_medalla_0 deposits [OPTIONS]... command nimbus_beacon_node deposits [OPTIONS]... command
The following options are available: The following options are available:
@ -159,7 +159,7 @@ The following options are available:
Available sub-commands: Available sub-commands:
beacon_node_shared_medalla_0 deposits create [OPTIONS]... nimbus_beacon_node deposits create [OPTIONS]...
Creates validator keystores and deposits. Creates validator keystores and deposits.
@ -174,7 +174,7 @@ The following options are available:
`deposits send` command to send the deposit transactions at your convenience `deposits send` command to send the deposit transactions at your convenience
later. later.
beacon_node_shared_medalla_0 deposits send [OPTIONS]... nimbus_beacon_node deposits send [OPTIONS]...
Sends prepared deposits to the validator deposit contract. Sends prepared deposits to the validator deposit contract.
@ -184,15 +184,15 @@ The following options are available:
--min-delay Minimum possible delay between making two deposits (in seconds). --min-delay Minimum possible delay between making two deposits (in seconds).
--max-delay Maximum possible delay between making two deposits (in seconds). --max-delay Maximum possible delay between making two deposits (in seconds).
beacon_node_shared_medalla_0 deposits status nimbus_beacon_node deposits status
Displays status information about all deposits. Displays status information about all deposits.
beacon_node_shared_medalla_0 wallets command nimbus_beacon_node wallets command
Available sub-commands: Available sub-commands:
beacon_node_shared_medalla_0 wallets create [OPTIONS]... nimbus_beacon_node wallets create [OPTIONS]...
Creates a new EIP-2386 wallet. Creates a new EIP-2386 wallet.
@ -202,7 +202,7 @@ The following options are available:
--next-account Initial value for the 'nextaccount' property of the wallet. --next-account Initial value for the 'nextaccount' property of the wallet.
--out Output wallet file. --out Output wallet file.
beacon_node_shared_medalla_0 wallets restore [OPTIONS]... nimbus_beacon_node wallets restore [OPTIONS]...
Restores a wallet from cold storage. Restores a wallet from cold storage.
@ -213,7 +213,7 @@ The following options are available:
guess the number by inspecting the latest beacon state. guess the number by inspecting the latest beacon state.
--out Output wallet file. --out Output wallet file.
beacon_node_shared_medalla_0 wallets list nimbus_beacon_node wallets list
Lists details about all wallets. Lists details about all wallets.
``` ```

View File

@ -25,13 +25,11 @@ To build the Nimbus beacon node and it's dependencies, run:
*Medalla testnet* *Medalla testnet*
``` ```
make beacon_node_spec_0_12_3 make nimbus_beacon_node_spec_0_12_3
``` ```
*Mainnet* *Mainnet*
``` ```
make beacon_node make nimbus_beacon_node
``` ```

View File

@ -32,7 +32,7 @@ You need to have installed Nimbus' [external dependencies](./install.md#external
Run the following command from the the home directory of the `nimbus-eth2` repository to launch the command line interface app: Run the following command from the the home directory of the `nimbus-eth2` repository to launch the command line interface app:
``` ```
build/beacon_node wallets create build/nimbus_beacon_node wallets create
``` ```
Now follow the instructions presented to you in the terminal window to create your wallet. Now follow the instructions presented to you in the terminal window to create your wallet.
@ -51,7 +51,7 @@ At the end of the process, you should see the above message printed to the termi
To see a list of the options/flags available, run: To see a list of the options/flags available, run:
```bash ```bash
build/beacon_node wallets create --help build/nimbus_beacon_node wallets create --help
``` ```
You should see the following: You should see the following:
@ -68,7 +68,7 @@ The following options are available:
To generate 1 keystore and create a `deposit_data` JSON file using an existing wallet, run: To generate 1 keystore and create a `deposit_data` JSON file using an existing wallet, run:
```bash ```bash
build/beacon_node deposits create --wallet="<YOUR_WALLET_ID>" --count=1 build/nimbus_beacon_node deposits create --wallet="<YOUR_WALLET_ID>" --count=1
``` ```
> **Tip:** To find your wallet id, look at your terminal history. You should see it printed right after you created your wallet. It's also saved in the `uuid` field of your wallet (remember your wallet is simply a JSON file). > **Tip:** To find your wallet id, look at your terminal history. You should see it printed right after you created your wallet. It's also saved in the `uuid` field of your wallet (remember your wallet is simply a JSON file).
@ -84,7 +84,7 @@ secretsDir=secrets
INF 2020-08-19 13:53:24.286+02:00 Deposit data written INF 2020-08-19 13:53:24.286+02:00 Deposit data written
topics="beacnde" tid=330637 topics="beacnde" tid=330637
file=beacon_node.nim:1406 file=nimbus_beacon_node.nim:1406
filename=validators/deposit_data-1597838004.284995.json filename=validators/deposit_data-1597838004.284995.json
``` ```
@ -98,7 +98,7 @@ In the `validators` directory you should also see a folder with a name that look
To see a list of the options/flags available, run: To see a list of the options/flags available, run:
```bash ```bash
build/beacon_node deposits create --help build/nimbus_beacon_node deposits create --help
``` ```
You should see the following: You should see the following:

View File

@ -46,7 +46,7 @@ mingw32-make test # run the test suite
After cloning the repo: After cloning the repo:
```bash ```bash
# Build beacon_node and all the tools, using 4 parallel Make jobs # Build nimbus_beacon_node and all the tools, using 4 parallel Make jobs
make -j4 make -j4
# Run tests # Run tests
@ -120,7 +120,7 @@ make V=2 test # even more verbose
```bash ```bash
make LOG_LEVEL=DEBUG bench_bls_sig_agggregation # this is the default make LOG_LEVEL=DEBUG bench_bls_sig_agggregation # this is the default
make LOG_LEVEL=TRACE beacon_node # log everything make LOG_LEVEL=TRACE nimbus_beacon_node # log everything
``` ```
- pass arbitrary parameters to the Nim compiler: - pass arbitrary parameters to the Nim compiler:

View File

@ -7,7 +7,7 @@
Metrics are currently implemented using a HTTP server that hasn't been hardened sufficiently (which means it can't be exposed as a public endpoint). It must therefore be enabled specifically during build: Metrics are currently implemented using a HTTP server that hasn't been hardened sufficiently (which means it can't be exposed as a public endpoint). It must therefore be enabled specifically during build:
``` ```
make NIMFLAGS="-d:insecure" beacon_node --metrics ... make NIMFLAGS="-d:insecure" nimbus_beacon_node --metrics ...
``` ```
## Validating ## Validating

View File

@ -19,7 +19,7 @@ If you look at the initial logs you should see something similar to the followin
``` ```
DBG 2020-09-29 12:15:41.969+02:00 Launching beacon node DBG 2020-09-29 12:15:41.969+02:00 Launching beacon node
topics="beacnde" tid=8941404 file=beacon_node.nim:1190 version="0.5.0 (78ceeed8)" bls_backend=BLST topics="beacnde" tid=8941404 file=nimbus_beacon_node.nim:1190 version="0.5.0 (78ceeed8)" bls_backend=BLST
cmdParams="@[ cmdParams="@[
\"--network=medalla\", \"--network=medalla\",
\"--log-level=DEBUG\", \"--log-level=DEBUG\",

View File

@ -7,7 +7,7 @@
To import your signing key(s) into Nimbus, from the `nimbus-eth2` directory run: To import your signing key(s) into Nimbus, from the `nimbus-eth2` directory run:
``` ```
build/beacon_node deposits import --data-dir=build/data/shared_medalla_0 <YOUR VALIDATOR KEYS DIRECTORY> build/nimbus_beacon_node deposits import --data-dir=build/data/shared_medalla_0 <YOUR VALIDATOR KEYS DIRECTORY>
``` ```

View File

@ -28,7 +28,7 @@ cd nimbus-eth2
#### 2. Build the beacon node #### 2. Build the beacon node
``` ```
make beacon_node make nimbus_beacon_node
``` ```
*Patience... this may take a few minutes.* *Patience... this may take a few minutes.*
@ -36,7 +36,7 @@ make beacon_node
#### 3. Import keystore(s) #### 3. Import keystore(s)
``` ```
build/beacon_node deposits import --data-dir=build/data/shared_medalla_0 <YOUR VALIDATOR KEYS DIRECTORY> build/nimbus_beacon_node deposits import --data-dir=build/data/shared_medalla_0 <YOUR VALIDATOR KEYS DIRECTORY>
``` ```
Replacing `<YOUR VALIDATOR KEYS DIRECTORY>` with the full pathname of your `validator_keys` directory. Replacing `<YOUR VALIDATOR KEYS DIRECTORY>` with the full pathname of your `validator_keys` directory.
@ -59,7 +59,7 @@ You should see that the beacon node has launched with your validator attached:
WRN 2020-08-03 16:24:17.950+02:00 Validator not in registry (yet?) topics="beacval" tid=11677993 file=validator_duties.nim:53 pubKey=a9c4df36 WRN 2020-08-03 16:24:17.950+02:00 Validator not in registry (yet?) topics="beacval" tid=11677993 file=validator_duties.nim:53 pubKey=a9c4df36
INF 2020-08-03 16:24:17.951+02:00 Local validator attached tid=11677993 file=validator_pool.nim:21 pubKey=a9c4df36 validator=a9c4df36 INF 2020-08-03 16:24:17.951+02:00 Local validator attached tid=11677993 file=validator_pool.nim:21 pubKey=a9c4df36 validator=a9c4df36
INF 2020-08-03 16:24:17.951+02:00 Local validators attached topics="beacval" tid=11677993 file=validator_duties.nim:61 count=1 INF 2020-08-03 16:24:17.951+02:00 Local validators attached topics="beacval" tid=11677993 file=validator_duties.nim:61 count=1
INF 2020-08-03 16:24:17.958+02:00 Starting beacon node topics="beacnde" tid=11677993 file=beacon_node.nim:875 version="0.5.0 (31b33907)" nim="Nim Compiler Version 1.2.6 [MacOSX: amd64] (bf320ed1)" timeSinceFinalization=81350 head=ebe49843:0 finalizedHead=ebe49843:0 SLOTS_PER_EPOCH=32 SECONDS_PER_SLOT=12 SPEC_VERSION=0.12.2 dataDir=build/data/shared_medalla_0 pcs=start_beacon_node INF 2020-08-03 16:24:17.958+02:00 Starting beacon node topics="beacnde" tid=11677993 file=nimbus_beacon_node.nim:875 version="0.5.0 (31b33907)" nim="Nim Compiler Version 1.2.6 [MacOSX: amd64] (bf320ed1)" timeSinceFinalization=81350 head=ebe49843:0 finalizedHead=ebe49843:0 SLOTS_PER_EPOCH=32 SECONDS_PER_SLOT=12 SPEC_VERSION=0.12.2 dataDir=build/data/shared_medalla_0 pcs=start_beacon_node
``` ```
> **Note:** when you run `make medalla`, the beacon node launches with an Infura endpoint supplied by us. This endpoint is passed through the `web3-url` option (which takes as input the url of the web3 server from which you'd like to observe the eth1 chain). > **Note:** when you run `make medalla`, the beacon node launches with an Infura endpoint supplied by us. This endpoint is passed through the `web3-url` option (which takes as input the url of the web3 server from which you'd like to observe the eth1 chain).

View File

@ -244,7 +244,7 @@ git clone https://github.com/status-im/nimbus-eth2
Change into the directory and build the beacon node. Change into the directory and build the beacon node.
``` ```
cd nimbus-eth2 cd nimbus-eth2
make beacon_node make nimbus_beacon_node
``` ```
*Patience... this may take a few minutes.* *Patience... this may take a few minutes.*
@ -275,7 +275,7 @@ As usual, replace `195.177.101.93` with your Pi's IP address, and `<VALIDATOR_KE
To import your signing key into Nimbus, from the `nimbus-eth2` directory run: To import your signing key into Nimbus, from the `nimbus-eth2` directory run:
``` ```
build/beacon_node deposits import --data-dir=build/data/shared_medalla_0 ../validator_keys build/nimbus_beacon_node deposits import --data-dir=build/data/shared_medalla_0 ../validator_keys
``` ```
@ -342,7 +342,7 @@ If you look near the top of the logs printed to your console, you should see con
INF 2020-10-07 17:04:09.213+02:00 Initializing networking topics="networking" tid=11688398 file=eth2_network.nim:1335 hostAddress=/ip4/0.0.0.0/tcp/9000 network_public_key=0802122102defb020c8e47dd8f5da89f51ed6c3998aaa0dd59eeb2784e29d47fdbdab69235 announcedAddresses=@[/ip4/195.177.101.93/tcp/9000] INF 2020-10-07 17:04:09.213+02:00 Initializing networking topics="networking" tid=11688398 file=eth2_network.nim:1335 hostAddress=/ip4/0.0.0.0/tcp/9000 network_public_key=0802122102defb020c8e47dd8f5da89f51ed6c3998aaa0dd59eeb2784e29d47fdbdab69235 announcedAddresses=@[/ip4/195.177.101.93/tcp/9000]
WRN 2020-10-07 17:04:09.215+02:00 Ignoring invalid bootstrap address tid=11688398 file=eth2_discovery.nim:45 bootstrapAddr= reason="an empty string is not a valid bootstrap node" WRN 2020-10-07 17:04:09.215+02:00 Ignoring invalid bootstrap address tid=11688398 file=eth2_discovery.nim:45 bootstrapAddr= reason="an empty string is not a valid bootstrap node"
NOT 2020-10-07 17:04:09.231+02:00 Local validators attached topics="beacval" tid=11688398 file=validator_duties.nim:65 count=0 NOT 2020-10-07 17:04:09.231+02:00 Local validators attached topics="beacval" tid=11688398 file=validator_duties.nim:65 count=0
NOT 2020-10-07 17:04:09.231+02:00 Starting beacon node topics="beacnde" tid=11688398 file=beacon_node.nim:923 version="0.5.0 (1dec860b)" nim="Nim Compiler Version 1.2.6 [MacOSX: amd64] (bf320ed1)" timeSinceFinalization=0ns head=0814b036:0 finalizedHead=0814b036:0 SLOTS_PER_EPOCH=32 SECONDS_PER_SLOT=12 SPEC_VERSION=0.12.3 dataDir=build/data/shared_medalla_0 NOT 2020-10-07 17:04:09.231+02:00 Starting beacon node topics="beacnde" tid=11688398 file=nimbus_beacon_node.nim:923 version="0.5.0 (1dec860b)" nim="Nim Compiler Version 1.2.6 [MacOSX: amd64] (bf320ed1)" timeSinceFinalization=0ns head=0814b036:0 finalizedHead=0814b036:0 SLOTS_PER_EPOCH=32 SECONDS_PER_SLOT=12 SPEC_VERSION=0.12.3 dataDir=build/data/shared_medalla_0
``` ```
To keep track of your syncing progress, have a look at the output at the very bottom of the terminal window in which your validator is running. You should see something like: To keep track of your syncing progress, have a look at the output at the very bottom of the terminal window in which your validator is running. You should see something like:

View File

@ -57,7 +57,7 @@ proc loadGenesis*(validators: Natural, validate: bool): ref HashedBeaconState =
# TODO check that the private keys are interop keys # TODO check that the private keys are interop keys
res res
else: else:
echo "Genesis file not found, making one up (use beacon_node createTestnet to make one)" echo "Genesis file not found, making one up (use nimbus_beacon_node createTestnet to make one)"
echo "Preparing validators..." echo "Preparing validators..."
let let

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
cd "$(dirname $0)" cd "$(dirname $0)"
scripts/run-beacon-node.sh beacon_node mainnet $@ scripts/run-beacon-node.sh nimbus_beacon_node mainnet $@

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
cd "$(dirname $0)" cd "$(dirname $0)"
scripts/run-beacon-node.sh beacon_node_spec_0_12_3 medalla $@ scripts/run-beacon-node.sh nimbus_beacon_node_spec_0_12_3 medalla $@

View File

@ -65,7 +65,7 @@ CI run: $(basename "$0") --disable-htop -- --verify-finalization
--base-port bootstrap node's Eth2 traffic port (default: ${BASE_PORT}) --base-port bootstrap node's Eth2 traffic port (default: ${BASE_PORT})
--base-rpc-port bootstrap node's RPC port (default: ${BASE_RPC_PORT}) --base-rpc-port bootstrap node's RPC port (default: ${BASE_RPC_PORT})
--base-metrics-port bootstrap node's metrics server port (default: ${BASE_METRICS_PORT}) --base-metrics-port bootstrap node's metrics server port (default: ${BASE_METRICS_PORT})
--disable-htop don't use "htop" to see the beacon_node processes --disable-htop don't use "htop" to see the nimbus_beacon_node processes
--disable-vc don't use validator client binaries for validators (by default validators are split 50/50 between beacon nodes and validator clients) --disable-vc don't use validator client binaries for validators (by default validators are split 50/50 between beacon nodes and validator clients)
--enable-logtrace display logtrace asr analysis --enable-logtrace display logtrace asr analysis
--log-level set the log level (default: ${LOG_LEVEL}) --log-level set the log level (default: ${LOG_LEVEL})
@ -186,7 +186,7 @@ else
fi fi
NETWORK_NIM_FLAGS=$(scripts/load-testnet-nim-flags.sh "${NETWORK}") NETWORK_NIM_FLAGS=$(scripts/load-testnet-nim-flags.sh "${NETWORK}")
$MAKE -j2 LOG_LEVEL="${LOG_LEVEL}" NIMFLAGS="${NIMFLAGS} -d:insecure -d:testnet_servers_image -d:local_testnet ${NETWORK_NIM_FLAGS}" beacon_node signing_process validator_client deposit_contract $MAKE -j2 LOG_LEVEL="${LOG_LEVEL}" NIMFLAGS="${NIMFLAGS} -d:insecure -d:testnet_servers_image -d:local_testnet ${NETWORK_NIM_FLAGS}" nimbus_beacon_node nimbus_signing_process nimbus_validator_client deposit_contract
if [[ "$ENABLE_LOGTRACE" == "1" ]]; then if [[ "$ENABLE_LOGTRACE" == "1" ]]; then
$MAKE LOG_LEVEL="${LOG_LEVEL}" NIMFLAGS="${NIMFLAGS} -d:insecure -d:testnet_servers_image -d:local_testnet ${NETWORK_NIM_FLAGS}" logtrace $MAKE LOG_LEVEL="${LOG_LEVEL}" NIMFLAGS="${NIMFLAGS} -d:insecure -d:testnet_servers_image -d:local_testnet ${NETWORK_NIM_FLAGS}" logtrace
fi fi
@ -212,7 +212,7 @@ if [[ $USE_GANACHE == "0" ]]; then
GENESIS_OFFSET=30 GENESIS_OFFSET=30
BOOTSTRAP_IP="127.0.0.1" BOOTSTRAP_IP="127.0.0.1"
./build/beacon_node createTestnet \ ./build/nimbus_beacon_node createTestnet \
--data-dir="${DATA_DIR}" \ --data-dir="${DATA_DIR}" \
--deposits-file="${DEPOSITS_FILE}" \ --deposits-file="${DEPOSITS_FILE}" \
--total-validators=${TOTAL_VALIDATORS} \ --total-validators=${TOTAL_VALIDATORS} \
@ -280,11 +280,11 @@ EOF
# instance as the parent and the target process name as a pattern to the # instance as the parent and the target process name as a pattern to the
# "pkill" command. # "pkill" command.
cleanup() { cleanup() {
pkill -P $$ beacon_node &>/dev/null || true pkill -P $$ nimbus_beacon_node &>/dev/null || true
pkill -P $$ validator_client &>/dev/null || true pkill -P $$ nimbus_validator_client &>/dev/null || true
sleep 2 sleep 2
pkill -9 -P $$ beacon_node &>/dev/null || true pkill -9 -P $$ nimbus_beacon_node &>/dev/null || true
pkill -9 -P $$ validator_client &>/dev/null || true pkill -9 -P $$ nimbus_validator_client &>/dev/null || true
} }
trap 'cleanup' SIGINT SIGTERM EXIT trap 'cleanup' SIGINT SIGTERM EXIT
@ -364,7 +364,7 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do
done done
fi fi
./build/beacon_node \ ./build/nimbus_beacon_node \
--non-interactive \ --non-interactive \
--nat:extip:127.0.0.1 \ --nat:extip:127.0.0.1 \
--network="${NETWORK_METADATA_FILE}" \ --network="${NETWORK_METADATA_FILE}" \
@ -392,7 +392,7 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do
fi fi
if [ "${USE_VC:-}" == "1" ]; then if [ "${USE_VC:-}" == "1" ]; then
./build/validator_client \ ./build/nimbus_validator_client \
--log-level="${LOG_LEVEL}" \ --log-level="${LOG_LEVEL}" \
${STOP_AT_EPOCH_FLAG} \ ${STOP_AT_EPOCH_FLAG} \
--data-dir="${VALIDATOR_DATA_DIR}" \ --data-dir="${VALIDATOR_DATA_DIR}" \
@ -405,7 +405,7 @@ done
sleep 5 sleep 5
BG_JOBS="$(jobs | wc -l | tr -d ' ')" BG_JOBS="$(jobs | wc -l | tr -d ' ')"
if [[ "$BG_JOBS" != "$NUM_JOBS" ]]; then if [[ "$BG_JOBS" != "$NUM_JOBS" ]]; then
echo "$(( NUM_JOBS - BG_JOBS )) beacon_node/validator_client instance(s) exited early. Aborting." echo "$(( NUM_JOBS - BG_JOBS )) nimbus_beacon_node/nimbus_validator_client instance(s) exited early. Aborting."
dump_logs dump_logs
dump_logtrace dump_logtrace
exit 1 exit 1

View File

@ -65,8 +65,8 @@ if [ "$ETH1_PRIVATE_KEY" != "" ]; then
echo "Done: $DEPOSIT_CONTRACT_ADDRESS" echo "Done: $DEPOSIT_CONTRACT_ADDRESS"
fi fi
echo "Building a local beacon_node instance for 'deposits create' and 'createTestnet'" echo "Building a local nimbus_beacon_node instance for 'deposits create' and 'createTestnet'"
make -j2 NIMFLAGS="-d:insecure -d:testnet_servers_image ${NETWORK_NIM_FLAGS}" beacon_node signing_process process_dashboard make -j2 NIMFLAGS="-d:insecure -d:testnet_servers_image ${NETWORK_NIM_FLAGS}" nimbus_beacon_node nimbus_signing_process process_dashboard
echo "Generating Grafana dashboards for remote testnet servers" echo "Generating Grafana dashboards for remote testnet servers"
for testnet in 0 1; do for testnet in 0 1; do
@ -83,13 +83,13 @@ echo "Building Docker image..."
# in docker/Makefile, and are enabled by default. # in docker/Makefile, and are enabled by default.
make build make build
../build/beacon_node deposits create \ ../build/nimbus_beacon_node deposits create \
--count=$TOTAL_VALIDATORS \ --count=$TOTAL_VALIDATORS \
--out-validators-dir="$VALIDATORS_DIR_ABS" \ --out-validators-dir="$VALIDATORS_DIR_ABS" \
--out-secrets-dir="$SECRETS_DIR_ABS" \ --out-secrets-dir="$SECRETS_DIR_ABS" \
--dont-send --dont-send
../build/beacon_node createTestnet \ ../build/nimbus_beacon_node createTestnet \
--data-dir="$DATA_DIR_ABS" \ --data-dir="$DATA_DIR_ABS" \
--validators-dir="$VALIDATORS_DIR_ABS" \ --validators-dir="$VALIDATORS_DIR_ABS" \
--total-validators=$TOTAL_VALIDATORS \ --total-validators=$TOTAL_VALIDATORS \

View File

@ -1,5 +1,5 @@
# TODO: # TODO:
# This prevents a strange build failure in beacon_node.nim. # This prevents a strange build failure in nimbus_beacon_node.nim.
# Investigate why it's needed. # Investigate why it's needed.
-d:withoutPrompt -d:withoutPrompt

View File

@ -1 +1 @@
build/validator_client --log-level=INFO --log-file=build/data/shared_medalla_0/nbc_vc_20201009202103.log --data-dir=build/data/shared_medalla_0 --rpc-port=9190 build/nimbus_validator_client --log-level=INFO --log-file=build/data/shared_medalla_0/nbc_vc_20201009202103.log --data-dir=build/data/shared_medalla_0 --rpc-port=9190

View File

@ -106,7 +106,7 @@ if [[ "$USE_PROMETHEUS" == "yes" ]]; then
fi fi
fi fi
$MAKE -j2 --no-print-directory NIMFLAGS="$CUSTOM_NIMFLAGS $DEFS" LOG_LEVEL="${LOG_LEVEL:-DEBUG}" beacon_node signing_process validator_client $MAKE -j2 --no-print-directory NIMFLAGS="$CUSTOM_NIMFLAGS $DEFS" LOG_LEVEL="${LOG_LEVEL:-DEBUG}" nimbus_beacon_node nimbus_signing_process nimbus_validator_client
EXISTING_VALIDATORS=0 EXISTING_VALIDATORS=0
if [[ -f "$DEPOSITS_FILE" ]]; then if [[ -f "$DEPOSITS_FILE" ]]; then
@ -223,7 +223,7 @@ fi
# instance as the parent and the target process name as a pattern to the # instance as the parent and the target process name as a pattern to the
# "pkill" command. # "pkill" command.
if [[ "$USE_MULTITAIL" == "no" && "$USE_TMUX" != "yes" ]]; then if [[ "$USE_MULTITAIL" == "no" && "$USE_TMUX" != "yes" ]]; then
trap 'pkill -P $$ beacon_node' SIGINT EXIT trap 'pkill -P $$ nimbus_beacon_node' SIGINT EXIT
fi fi
LAST_WAITING_NODE=0 LAST_WAITING_NODE=0

View File

@ -32,8 +32,8 @@ VALIDATORS_DIR="${SIM_ROOT}/validators"
SECRETS_DIR="${SIM_ROOT}/secrets" SECRETS_DIR="${SIM_ROOT}/secrets"
SNAPSHOT_FILE="${SIMULATION_DIR}/state_snapshot.ssz" SNAPSHOT_FILE="${SIMULATION_DIR}/state_snapshot.ssz"
NETWORK_BOOTSTRAP_FILE="${SIMULATION_DIR}/bootstrap_nodes.txt" NETWORK_BOOTSTRAP_FILE="${SIMULATION_DIR}/bootstrap_nodes.txt"
BEACON_NODE_BIN="${GIT_ROOT}/build/beacon_node" BEACON_NODE_BIN="${GIT_ROOT}/build/nimbus_beacon_node"
VALIDATOR_CLIENT_BIN="${GIT_ROOT}/build/validator_client" VALIDATOR_CLIENT_BIN="${GIT_ROOT}/build/nimbus_validator_client"
DEPOSIT_CONTRACT_BIN="${GIT_ROOT}/build/deposit_contract" DEPOSIT_CONTRACT_BIN="${GIT_ROOT}/build/deposit_contract"
BOOTSTRAP_ENR_FILE="${SIMULATION_DIR}/node-${BOOTSTRAP_NODE}/beacon_node.enr" BOOTSTRAP_ENR_FILE="${SIMULATION_DIR}/node-${BOOTSTRAP_NODE}/beacon_node.enr"
NETWORK_METADATA_FILE="${SIMULATION_DIR}/network.json" NETWORK_METADATA_FILE="${SIMULATION_DIR}/network.json"

View File

@ -10,7 +10,7 @@
import unittest, ./testutil import unittest, ./testutil
when false: when false:
import ../beacon_chain/beacon_node import ../beacon_chain/nimbus_beacon_node
suiteReport "Beacon node": suiteReport "Beacon node":
# Compile test # Compile test