Rename binaries; Mimic the original repo layout in the distribution
This commit is contained in:
parent
11ab3a2f4f
commit
e9b9cd75ee
|
@ -34,7 +34,7 @@ build_script:
|
|||
|
||||
test_script:
|
||||
- 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
|
||||
|
||||
deploy: off
|
||||
|
|
|
@ -273,8 +273,8 @@ jobs:
|
|||
shell: bash
|
||||
working-directory: nim-beacon-chain
|
||||
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" validator_client
|
||||
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" nimbus_validator_client
|
||||
|
||||
- name: Run nim-beacon-chain tests
|
||||
if: matrix.target.TEST_KIND == 'unit-tests'
|
||||
|
|
|
@ -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
|
||||
- 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 -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
|
||||
|
|
|
@ -38,9 +38,9 @@ def runStages() {
|
|||
sh """#!/bin/bash
|
||||
set -e
|
||||
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
|
||||
# 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
|
||||
"""
|
||||
}
|
||||
},
|
||||
|
|
40
Makefile
40
Makefile
|
@ -33,8 +33,8 @@ endif
|
|||
# unconditionally built by the default Make target
|
||||
# TODO re-enable ncli_query if/when it works again
|
||||
TOOLS := \
|
||||
beacon_node_spec_0_12_3 \
|
||||
beacon_node \
|
||||
nimbus_beacon_node_spec_0_12_3 \
|
||||
nimbus_beacon_node \
|
||||
block_sim \
|
||||
deposit_contract \
|
||||
inspector \
|
||||
|
@ -46,8 +46,8 @@ TOOLS := \
|
|||
process_dashboard \
|
||||
stack_sizes \
|
||||
state_sim \
|
||||
validator_client \
|
||||
signing_process
|
||||
nimbus_validator_client \
|
||||
nimbus_signing_process
|
||||
|
||||
# bench_bls_sig_agggregation TODO reenable after bls v0.10.1 changes
|
||||
|
||||
|
@ -176,8 +176,8 @@ clean-testnet0:
|
|||
clean-testnet1:
|
||||
rm -rf build/data/testnet1*
|
||||
|
||||
testnet0 testnet1: | beacon_node signing_process
|
||||
build/beacon_node \
|
||||
testnet0 testnet1: | nimbus_beacon_node nimbus_signing_process
|
||||
build/nimbus_beacon_node \
|
||||
--network=$@ \
|
||||
--log-level="$(LOG_LEVEL)" \
|
||||
--data-dir=build/data/$@_$(NODE_ID) \
|
||||
|
@ -239,7 +239,7 @@ define CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT
|
|||
|
||||
sleep 4
|
||||
|
||||
build/validator_client \
|
||||
build/nimbus_validator_client \
|
||||
--log-level="$(LOG_LEVEL)" \
|
||||
--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) \
|
||||
|
@ -247,7 +247,7 @@ define CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT
|
|||
endef
|
||||
|
||||
define MAKE_DEPOSIT_DATA
|
||||
build/beacon_node deposits create \
|
||||
build/nimbus_beacon_node deposits create \
|
||||
--network=$(1) \
|
||||
--new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \
|
||||
--out-validators-dir=build/data/shared_$(1)_$(NODE_ID)/validators \
|
||||
|
@ -257,7 +257,7 @@ define MAKE_DEPOSIT_DATA
|
|||
endef
|
||||
|
||||
define MAKE_DEPOSIT
|
||||
build/beacon_node deposits create \
|
||||
build/nimbus_beacon_node deposits create \
|
||||
--network=$(1) \
|
||||
--out-deposits-file=nbc-$(1)-deposits.json \
|
||||
--new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \
|
||||
|
@ -283,27 +283,27 @@ endef
|
|||
### medalla
|
||||
###
|
||||
# https://www.gnu.org/software/make/manual/html_node/Call-Function.html#Call-Function
|
||||
medalla: | beacon_node_spec_0_12_3 signing_process
|
||||
$(call CONNECT_TO_NETWORK,medalla,beacon_node_spec_0_12_3)
|
||||
medalla: | nimbus_beacon_node_spec_0_12_3 nimbus_signing_process
|
||||
$(call CONNECT_TO_NETWORK,medalla,nimbus_beacon_node_spec_0_12_3)
|
||||
|
||||
medalla-vc: | beacon_node_spec_0_12_3 signing_process validator_client
|
||||
$(call CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT,medalla,beacon_node_spec_0_12_3)
|
||||
medalla-vc: | nimbus_beacon_node_spec_0_12_3 nimbus_signing_process nimbus_validator_client
|
||||
$(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
|
||||
$(call CONNECT_TO_NETWORK,medalla,beacon_node_spec_0_12_3,FastSync)
|
||||
medalla-fast-sync: | nimbus_beacon_node_spec_0_12_3 nimbus_signing_process
|
||||
$(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: | beacon_node_spec_0_12_3 signing_process
|
||||
$(call CONNECT_TO_NETWORK_IN_DEV_MODE,medalla,beacon_node_spec_0_12_3)
|
||||
medalla-dev: | nimbus_beacon_node_spec_0_12_3 nimbus_signing_process
|
||||
$(call CONNECT_TO_NETWORK_IN_DEV_MODE,medalla,nimbus_beacon_node_spec_0_12_3)
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
|
||||
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)
|
||||
+ "$(MAKE)" -C vendor/nim-libbacktrace clean $(HANDLE_OUTPUT)
|
||||
endif
|
||||
|
|
10
README.md
10
README.md
|
@ -371,7 +371,7 @@ After cloning the repo:
|
|||
# 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.
|
||||
|
||||
# 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
|
||||
|
||||
# Run tests
|
||||
|
@ -444,7 +444,7 @@ make V=2 test # even more verbose
|
|||
|
||||
```bash
|
||||
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:
|
||||
|
@ -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:
|
||||
|
||||
```bash
|
||||
make NIMFLAGS="-d:disableMarchNative" beacon_node
|
||||
make NIMFLAGS="-d:disableMarchNative" nimbus_beacon_node
|
||||
```
|
||||
|
||||
- disable link-time optimisation (LTO):
|
||||
|
||||
```bash
|
||||
make NIMFLAGS="-d:disableLTO" beacon_node
|
||||
make NIMFLAGS="-d:disableLTO" nimbus_beacon_node
|
||||
```
|
||||
|
||||
- build a static binary
|
||||
|
||||
```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:
|
||||
|
|
|
@ -67,9 +67,9 @@ jobs:
|
|||
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} LOG_LEVEL=TRACE
|
||||
if [[ $PLATFORM == "x64" ]]; then
|
||||
# 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
|
||||
file build/beacon_node
|
||||
file build/nimbus_beacon_node
|
||||
# fail fast
|
||||
export NIMTEST_ABORT_ON_ERROR=1
|
||||
scripts/setup_official_tests.sh jsonTestsCache
|
||||
|
|
|
@ -11,7 +11,7 @@ license = "MIT or Apache License 2.0"
|
|||
installDirs = @["beacon_chain", "research"]
|
||||
skipDirs = @["nfuzz"]
|
||||
bin = @[
|
||||
"beacon_chain/beacon_node",
|
||||
"beacon_chain/nimbus_beacon_node",
|
||||
"research/serialized_sizes",
|
||||
"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
|
||||
|
||||
task moduleTests, "Run all module tests":
|
||||
buildAndRunBinary "beacon_node", "beacon_chain/",
|
||||
"-d:chronicles_log_level=TRACE " &
|
||||
"-d:const_preset=minimal -d:ETH2_SPEC=\"v0.12.3\" " &
|
||||
"-d:testutils_test_build"
|
||||
buildAndRunBinary "nimbus_beacon_node", "beacon_chain/",
|
||||
"-d:chronicles_log_level=TRACE " &
|
||||
"-d:const_preset=minimal -d:ETH2_SPEC=\"v0.12.3\" " &
|
||||
"-d:testutils_test_build"
|
||||
|
||||
### tasks
|
||||
task test, "Run all tests":
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
beacon_node
|
||||
nimbus_beacon_node
|
||||
nimbus_signing_process
|
||||
nimbus_validator_client
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
import beacon_node
|
||||
|
|
@ -216,7 +216,7 @@ type
|
|||
name: "rpc-address" }: ValidIpAddress
|
||||
|
||||
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"
|
||||
name: "in-process-validators" }: bool
|
||||
|
||||
|
|
|
@ -288,7 +288,7 @@ proc init*(T: type BeaconNode,
|
|||
if res.config.inProcessValidators:
|
||||
res.addLocalValidators()
|
||||
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 workdir = io2.getCurrentDir().tryGet()
|
||||
res.vcProcess = startProcess(cmd, workdir, args)
|
|
@ -0,0 +1,3 @@
|
|||
import nimbus_beacon_node
|
||||
export nimbus_beacon_node
|
||||
|
|
@ -26,7 +26,7 @@ RUN cd /root/nim-beacon-chain \
|
|||
&& git fetch \
|
||||
&& git reset --hard ${GIT_REVISION} \
|
||||
&& 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 #
|
||||
|
@ -41,12 +41,12 @@ RUN apt-get -qq update \
|
|||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# "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>
|
||||
LABEL description="Nimbus installation that can act as an ETH2 network bootstrap node."
|
||||
|
||||
STOPSIGNAL SIGINT
|
||||
|
||||
ENTRYPOINT ["/usr/bin/beacon_node"]
|
||||
ENTRYPOINT ["/usr/bin/nimbus_beacon_node"]
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -34,7 +34,7 @@ Change options implemented as shell variables inside the script:
|
|||
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
|
||||
./run_medalla_node.sh --log-level=DEBUG --rpc-port=9290
|
||||
|
|
|
@ -5,7 +5,7 @@ set -e
|
|||
cd /home/user/nimbus-eth2
|
||||
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
|
||||
make clean
|
||||
|
@ -24,17 +24,20 @@ if [[ -d "${DIST_PATH}" ]]; then
|
|||
rm -rf "${DIST_PATH}"
|
||||
fi
|
||||
mkdir -p "${DIST_PATH}"
|
||||
mkdir "${DIST_PATH}/scripts"
|
||||
mkdir "${DIST_PATH}/build"
|
||||
|
||||
# copy and checksum binaries, copy scripts and docs
|
||||
for BINARY in ${BINARIES}; do
|
||||
cp -a ./build/${BINARY} "${DIST_PATH}/"
|
||||
cd "${DIST_PATH}"
|
||||
cp -a ./build/${BINARY} "${DIST_PATH}/build/"
|
||||
cd "${DIST_PATH}/build"
|
||||
md5sum ${BINARY} > ${BINARY}.md5sum
|
||||
sha512sum ${BINARY} > ${BINARY}.sha512sum
|
||||
cd - >/dev/null
|
||||
done
|
||||
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}/"
|
||||
|
||||
# create the tarball
|
||||
|
|
|
@ -21,7 +21,7 @@ ARCHIVE_DIR="${ARCHIVE%.tar.gz}"
|
|||
rm -rf ${ARCHIVE_DIR}
|
||||
tar xzf "${ARCHIVE}"
|
||||
cd "${ARCHIVE_DIR}"
|
||||
./beacon_node --help
|
||||
./nimbus_beacon_node --help
|
||||
cd ..
|
||||
rm -rf ${ARCHIVE_DIR}
|
||||
|
||||
|
|
|
@ -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} )) \
|
||||
"$@"
|
||||
|
|
@ -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} )) \
|
||||
"$@"
|
||||
|
|
@ -23,12 +23,12 @@ RUN=0
|
|||
|
||||
print_help() {
|
||||
cat <<EOF
|
||||
Usage: $(basename $0) <options> -- <beacon_node options>
|
||||
Usage: $(basename $0) <options> -- <nimbus_beacon_node options>
|
||||
|
||||
-h, --help this help message
|
||||
--network default: ${NETWORK}
|
||||
--build build the beacon_node
|
||||
--run run the beacon_node
|
||||
--build build the nimbus_beacon_node binary
|
||||
--run run the nimbus_beacon_node binary
|
||||
EOF
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ if [[ "$BUILD" == "1" ]]; then
|
|||
git pull
|
||||
# don't use too much RAM
|
||||
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
|
||||
|
||||
#######
|
||||
|
@ -100,7 +100,7 @@ fi
|
|||
|
||||
if [[ "$RUN" == "1" ]]; then
|
||||
cd /root/.cache/nimbus/nim-beacon-chain
|
||||
# make sure Docker's SIGINT reaches the 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}
|
||||
# make sure Docker's SIGINT reaches the nimbus_beacon_node binary
|
||||
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
|
||||
|
||||
|
|
|
@ -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. >"
|
||||
read TMP
|
||||
make clean-medalla
|
||||
make beacon_node
|
||||
make nimbus_beacon_node
|
||||
|
||||
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/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/ && \
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
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.
|
||||
|
|
|
@ -23,7 +23,7 @@ Build both repositories by following their respective build instructions.
|
|||
*nimbus-eth2*
|
||||
```console
|
||||
cd nimbus-eth2
|
||||
make beacon_node
|
||||
make nimbus_beacon_node
|
||||
```
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ cd eth2stats-client
|
|||
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
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ cd nimbus-eth2
|
|||
#### 2. Run the beacon node build process
|
||||
|
||||
```
|
||||
make beacon_node
|
||||
make nimbus_beacon_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.
|
||||
|
||||
```
|
||||
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
|
||||
|
@ -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:
|
||||
|
||||
```
|
||||
./beacon_node --help
|
||||
./nimbus_beacon_node --help
|
||||
```
|
||||
|
||||
You should see the following output:
|
||||
|
@ -91,7 +91,7 @@ You should see the following output:
|
|||
```
|
||||
Usage:
|
||||
|
||||
beacon_node [OPTIONS]... command
|
||||
nimbus_beacon_node [OPTIONS]... command
|
||||
|
||||
The following options are available:
|
||||
|
||||
|
@ -135,7 +135,7 @@ The following options are available:
|
|||
|
||||
Available sub-commands:
|
||||
|
||||
beacon_node_shared_medalla_0 createTestnet [OPTIONS]...
|
||||
nimbus_beacon_node createTestnet [OPTIONS]...
|
||||
|
||||
The following options are available:
|
||||
|
||||
|
@ -151,7 +151,7 @@ The following options are available:
|
|||
--with-genesis-root Include a genesis root in 'network.json'.
|
||||
--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:
|
||||
|
||||
|
@ -159,7 +159,7 @@ The following options are available:
|
|||
|
||||
Available sub-commands:
|
||||
|
||||
beacon_node_shared_medalla_0 deposits create [OPTIONS]...
|
||||
nimbus_beacon_node deposits create [OPTIONS]...
|
||||
|
||||
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
|
||||
later.
|
||||
|
||||
beacon_node_shared_medalla_0 deposits send [OPTIONS]...
|
||||
nimbus_beacon_node deposits send [OPTIONS]...
|
||||
|
||||
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).
|
||||
--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.
|
||||
|
||||
beacon_node_shared_medalla_0 wallets command
|
||||
nimbus_beacon_node wallets command
|
||||
|
||||
Available sub-commands:
|
||||
|
||||
beacon_node_shared_medalla_0 wallets create [OPTIONS]...
|
||||
nimbus_beacon_node wallets create [OPTIONS]...
|
||||
|
||||
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.
|
||||
--out Output wallet file.
|
||||
|
||||
beacon_node_shared_medalla_0 wallets restore [OPTIONS]...
|
||||
nimbus_beacon_node wallets restore [OPTIONS]...
|
||||
|
||||
Restores a wallet from cold storage.
|
||||
|
||||
|
@ -213,7 +213,7 @@ The following options are available:
|
|||
guess the number by inspecting the latest beacon state.
|
||||
--out Output wallet file.
|
||||
|
||||
beacon_node_shared_medalla_0 wallets list
|
||||
nimbus_beacon_node wallets list
|
||||
|
||||
Lists details about all wallets.
|
||||
```
|
||||
|
|
|
@ -25,13 +25,11 @@ To build the Nimbus beacon node and it's dependencies, run:
|
|||
|
||||
*Medalla testnet*
|
||||
```
|
||||
make beacon_node_spec_0_12_3
|
||||
make nimbus_beacon_node_spec_0_12_3
|
||||
```
|
||||
|
||||
*Mainnet*
|
||||
```
|
||||
make beacon_node
|
||||
make nimbus_beacon_node
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
```
|
||||
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.
|
||||
|
@ -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:
|
||||
```bash
|
||||
build/beacon_node wallets create --help
|
||||
build/nimbus_beacon_node wallets create --help
|
||||
```
|
||||
|
||||
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:
|
||||
```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).
|
||||
|
||||
|
@ -84,7 +84,7 @@ secretsDir=secrets
|
|||
|
||||
INF 2020-08-19 13:53:24.286+02:00 Deposit data written
|
||||
topics="beacnde" tid=330637
|
||||
file=beacon_node.nim:1406
|
||||
file=nimbus_beacon_node.nim:1406
|
||||
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:
|
||||
```bash
|
||||
build/beacon_node deposits create --help
|
||||
build/nimbus_beacon_node deposits create --help
|
||||
```
|
||||
|
||||
You should see the following:
|
||||
|
|
|
@ -46,7 +46,7 @@ mingw32-make test # run the test suite
|
|||
After cloning the repo:
|
||||
|
||||
```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
|
||||
|
||||
# Run tests
|
||||
|
@ -120,7 +120,7 @@ make V=2 test # even more verbose
|
|||
|
||||
```bash
|
||||
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:
|
||||
|
|
|
@ -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:
|
||||
|
||||
```
|
||||
make NIMFLAGS="-d:insecure" beacon_node --metrics ...
|
||||
make NIMFLAGS="-d:insecure" nimbus_beacon_node --metrics ...
|
||||
```
|
||||
|
||||
## Validating
|
||||
|
|
|
@ -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
|
||||
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="@[
|
||||
\"--network=medalla\",
|
||||
\"--log-level=DEBUG\",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
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>
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ cd nimbus-eth2
|
|||
|
||||
#### 2. Build the beacon node
|
||||
```
|
||||
make beacon_node
|
||||
make nimbus_beacon_node
|
||||
```
|
||||
|
||||
*Patience... this may take a few minutes.*
|
||||
|
@ -36,7 +36,7 @@ make beacon_node
|
|||
#### 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.
|
||||
|
@ -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
|
||||
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.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).
|
||||
|
|
|
@ -244,7 +244,7 @@ git clone https://github.com/status-im/nimbus-eth2
|
|||
Change into the directory and build the beacon node.
|
||||
```
|
||||
cd nimbus-eth2
|
||||
make beacon_node
|
||||
make nimbus_beacon_node
|
||||
```
|
||||
|
||||
*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:
|
||||
|
||||
```
|
||||
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]
|
||||
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 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:
|
||||
|
|
|
@ -57,7 +57,7 @@ proc loadGenesis*(validators: Natural, validate: bool): ref HashedBeaconState =
|
|||
# TODO check that the private keys are interop keys
|
||||
res
|
||||
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..."
|
||||
let
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd "$(dirname $0)"
|
||||
scripts/run-beacon-node.sh beacon_node mainnet $@
|
||||
scripts/run-beacon-node.sh nimbus_beacon_node mainnet $@
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
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 $@
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ CI run: $(basename "$0") --disable-htop -- --verify-finalization
|
|||
--base-port bootstrap node's Eth2 traffic port (default: ${BASE_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})
|
||||
--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)
|
||||
--enable-logtrace display logtrace asr analysis
|
||||
--log-level set the log level (default: ${LOG_LEVEL})
|
||||
|
@ -186,7 +186,7 @@ else
|
|||
fi
|
||||
|
||||
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
|
||||
$MAKE LOG_LEVEL="${LOG_LEVEL}" NIMFLAGS="${NIMFLAGS} -d:insecure -d:testnet_servers_image -d:local_testnet ${NETWORK_NIM_FLAGS}" logtrace
|
||||
fi
|
||||
|
@ -212,7 +212,7 @@ if [[ $USE_GANACHE == "0" ]]; then
|
|||
GENESIS_OFFSET=30
|
||||
BOOTSTRAP_IP="127.0.0.1"
|
||||
|
||||
./build/beacon_node createTestnet \
|
||||
./build/nimbus_beacon_node createTestnet \
|
||||
--data-dir="${DATA_DIR}" \
|
||||
--deposits-file="${DEPOSITS_FILE}" \
|
||||
--total-validators=${TOTAL_VALIDATORS} \
|
||||
|
@ -280,11 +280,11 @@ EOF
|
|||
# instance as the parent and the target process name as a pattern to the
|
||||
# "pkill" command.
|
||||
cleanup() {
|
||||
pkill -P $$ beacon_node &>/dev/null || true
|
||||
pkill -P $$ validator_client &>/dev/null || true
|
||||
pkill -P $$ nimbus_beacon_node &>/dev/null || true
|
||||
pkill -P $$ nimbus_validator_client &>/dev/null || true
|
||||
sleep 2
|
||||
pkill -9 -P $$ beacon_node &>/dev/null || true
|
||||
pkill -9 -P $$ validator_client &>/dev/null || true
|
||||
pkill -9 -P $$ nimbus_beacon_node &>/dev/null || true
|
||||
pkill -9 -P $$ nimbus_validator_client &>/dev/null || true
|
||||
}
|
||||
trap 'cleanup' SIGINT SIGTERM EXIT
|
||||
|
||||
|
@ -364,7 +364,7 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do
|
|||
done
|
||||
fi
|
||||
|
||||
./build/beacon_node \
|
||||
./build/nimbus_beacon_node \
|
||||
--non-interactive \
|
||||
--nat:extip:127.0.0.1 \
|
||||
--network="${NETWORK_METADATA_FILE}" \
|
||||
|
@ -392,7 +392,7 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do
|
|||
fi
|
||||
|
||||
if [ "${USE_VC:-}" == "1" ]; then
|
||||
./build/validator_client \
|
||||
./build/nimbus_validator_client \
|
||||
--log-level="${LOG_LEVEL}" \
|
||||
${STOP_AT_EPOCH_FLAG} \
|
||||
--data-dir="${VALIDATOR_DATA_DIR}" \
|
||||
|
@ -405,7 +405,7 @@ done
|
|||
sleep 5
|
||||
BG_JOBS="$(jobs | wc -l | tr -d ' ')"
|
||||
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_logtrace
|
||||
exit 1
|
||||
|
|
|
@ -65,8 +65,8 @@ if [ "$ETH1_PRIVATE_KEY" != "" ]; then
|
|||
echo "Done: $DEPOSIT_CONTRACT_ADDRESS"
|
||||
fi
|
||||
|
||||
echo "Building a local 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
|
||||
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}" nimbus_beacon_node nimbus_signing_process process_dashboard
|
||||
|
||||
echo "Generating Grafana dashboards for remote testnet servers"
|
||||
for testnet in 0 1; do
|
||||
|
@ -83,13 +83,13 @@ echo "Building Docker image..."
|
|||
# in docker/Makefile, and are enabled by default.
|
||||
make build
|
||||
|
||||
../build/beacon_node deposits create \
|
||||
../build/nimbus_beacon_node deposits create \
|
||||
--count=$TOTAL_VALIDATORS \
|
||||
--out-validators-dir="$VALIDATORS_DIR_ABS" \
|
||||
--out-secrets-dir="$SECRETS_DIR_ABS" \
|
||||
--dont-send
|
||||
|
||||
../build/beacon_node createTestnet \
|
||||
../build/nimbus_beacon_node createTestnet \
|
||||
--data-dir="$DATA_DIR_ABS" \
|
||||
--validators-dir="$VALIDATORS_DIR_ABS" \
|
||||
--total-validators=$TOTAL_VALIDATORS \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 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.
|
||||
-d:withoutPrompt
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -106,7 +106,7 @@ if [[ "$USE_PROMETHEUS" == "yes" ]]; then
|
|||
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
|
||||
if [[ -f "$DEPOSITS_FILE" ]]; then
|
||||
|
@ -223,7 +223,7 @@ fi
|
|||
# instance as the parent and the target process name as a pattern to the
|
||||
# "pkill" command.
|
||||
if [[ "$USE_MULTITAIL" == "no" && "$USE_TMUX" != "yes" ]]; then
|
||||
trap 'pkill -P $$ beacon_node' SIGINT EXIT
|
||||
trap 'pkill -P $$ nimbus_beacon_node' SIGINT EXIT
|
||||
fi
|
||||
|
||||
LAST_WAITING_NODE=0
|
||||
|
|
|
@ -32,8 +32,8 @@ VALIDATORS_DIR="${SIM_ROOT}/validators"
|
|||
SECRETS_DIR="${SIM_ROOT}/secrets"
|
||||
SNAPSHOT_FILE="${SIMULATION_DIR}/state_snapshot.ssz"
|
||||
NETWORK_BOOTSTRAP_FILE="${SIMULATION_DIR}/bootstrap_nodes.txt"
|
||||
BEACON_NODE_BIN="${GIT_ROOT}/build/beacon_node"
|
||||
VALIDATOR_CLIENT_BIN="${GIT_ROOT}/build/validator_client"
|
||||
BEACON_NODE_BIN="${GIT_ROOT}/build/nimbus_beacon_node"
|
||||
VALIDATOR_CLIENT_BIN="${GIT_ROOT}/build/nimbus_validator_client"
|
||||
DEPOSIT_CONTRACT_BIN="${GIT_ROOT}/build/deposit_contract"
|
||||
BOOTSTRAP_ENR_FILE="${SIMULATION_DIR}/node-${BOOTSTRAP_NODE}/beacon_node.enr"
|
||||
NETWORK_METADATA_FILE="${SIMULATION_DIR}/network.json"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
import unittest, ./testutil
|
||||
|
||||
when false:
|
||||
import ../beacon_chain/beacon_node
|
||||
import ../beacon_chain/nimbus_beacon_node
|
||||
|
||||
suiteReport "Beacon node":
|
||||
# Compile test
|
||||
|
|
Loading…
Reference in New Issue