[local sim] Download the latest nimbus-eth2 when --dl-nimbus-eth2 is used
This commit is contained in:
parent
05d99185c9
commit
7f2a3b7130
|
@ -98,8 +98,8 @@ DL_GETH="0"
|
||||||
: ${DL_NIMBUS_ETH2:="0"}
|
: ${DL_NIMBUS_ETH2:="0"}
|
||||||
|
|
||||||
# TODO: Add command-line flags for these
|
# TODO: Add command-line flags for these
|
||||||
: ${NIMBUS_ETH2_VERSION:=22.12.0}
|
: ${NIMBUS_ETH2_VERSION:=23.3.2}
|
||||||
: ${NIMBUS_ETH2_REVISION:=f6a5a5b1}
|
: ${NIMBUS_ETH2_REVISION:=6c0d756d}
|
||||||
|
|
||||||
: ${BEACON_NODE_COMMAND:="./build/nimbus_beacon_node$EXE_EXTENSION"}
|
: ${BEACON_NODE_COMMAND:="./build/nimbus_beacon_node$EXE_EXTENSION"}
|
||||||
: ${CAPELLA_FORK_EPOCH:=40}
|
: ${CAPELLA_FORK_EPOCH:=40}
|
||||||
|
@ -609,7 +609,6 @@ download_nimbus_eth2() {
|
||||||
NIMBUS_ETH2_TARBALL_URL="https://github.com/status-im/nimbus-eth2/releases/download/v${NIMBUS_ETH2_VERSION}/${NIMBUS_ETH2_TARBALL_NAME}"
|
NIMBUS_ETH2_TARBALL_URL="https://github.com/status-im/nimbus-eth2/releases/download/v${NIMBUS_ETH2_VERSION}/${NIMBUS_ETH2_TARBALL_NAME}"
|
||||||
|
|
||||||
log "Downloading Nimbus ETH2 binary"
|
log "Downloading Nimbus ETH2 binary"
|
||||||
|
|
||||||
"${CURL_BINARY}" -o "$NIMBUS_ETH2_TARBALL_NAME" -sSL "$NIMBUS_ETH2_TARBALL_URL"
|
"${CURL_BINARY}" -o "$NIMBUS_ETH2_TARBALL_NAME" -sSL "$NIMBUS_ETH2_TARBALL_URL"
|
||||||
local tmp_extract_dir
|
local tmp_extract_dir
|
||||||
tmp_extract_dir=$(mktemp -d nimbus-eth2-tarball-XXX)
|
tmp_extract_dir=$(mktemp -d nimbus-eth2-tarball-XXX)
|
||||||
|
@ -618,6 +617,7 @@ download_nimbus_eth2() {
|
||||||
mkdir -p "$(dirname "$BEACON_NODE_COMMAND")"
|
mkdir -p "$(dirname "$BEACON_NODE_COMMAND")"
|
||||||
mv "$tmp_extract_dir/build/nimbus_beacon_node$EXE_EXTENSION" "$BEACON_NODE_COMMAND"
|
mv "$tmp_extract_dir/build/nimbus_beacon_node$EXE_EXTENSION" "$BEACON_NODE_COMMAND"
|
||||||
chmod +x "$BEACON_NODE_COMMAND"
|
chmod +x "$BEACON_NODE_COMMAND"
|
||||||
|
patchelf_when_on_nixos "$BEACON_NODE_COMMAND"
|
||||||
|
|
||||||
REUSE_BINARIES=1
|
REUSE_BINARIES=1
|
||||||
fi
|
fi
|
||||||
|
@ -654,24 +654,24 @@ if [[ "${USE_VC}" == "1" && "${LIGHTHOUSE_VC_NODES}" != "0" && ! -e "build/${LH_
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BINARIES="ncli_testnet"
|
||||||
|
|
||||||
|
if [[ "$LC_NODES" -ge "1" ]]; then
|
||||||
|
BINARIES="${BINARIES} nimbus_light_client"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$NIMBUS_SIGNER_NODES" -gt "0" ]]; then
|
||||||
|
BINARIES="${BINARIES} nimbus_signing_node"
|
||||||
|
fi
|
||||||
|
|
||||||
# Don't build binaries if we are downloading them
|
# Don't build binaries if we are downloading them
|
||||||
if [[ "${DL_NIMBUS_ETH2}" != "1" ]]; then
|
if [[ "${DL_NIMBUS_ETH2}" != "1" ]]; then
|
||||||
# Build the binaries
|
# Build the binaries
|
||||||
BINARIES="ncli_testnet"
|
|
||||||
|
|
||||||
if [[ "$NIMBUS_SIGNER_NODES" -gt "0" ]]; then
|
|
||||||
BINARIES="${BINARIES} nimbus_signing_node"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${USE_VC}" == "1" ]]; then
|
if [[ "${USE_VC}" == "1" ]]; then
|
||||||
BINARIES="${BINARIES} nimbus_validator_client"
|
BINARIES="${BINARIES} nimbus_validator_client"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$LC_NODES" -ge "1" ]]; then
|
|
||||||
BINARIES="${BINARIES} nimbus_light_client"
|
|
||||||
fi
|
|
||||||
|
|
||||||
BINARIES="${BINARIES} nimbus_beacon_node"
|
BINARIES="${BINARIES} nimbus_beacon_node"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -695,7 +695,6 @@ else
|
||||||
CONTAINER_DATA_DIR="${DATA_DIR}"
|
CONTAINER_DATA_DIR="${DATA_DIR}"
|
||||||
if [[ "${DL_NIMBUS_ETH2}" == "1" ]]; then
|
if [[ "${DL_NIMBUS_ETH2}" == "1" ]]; then
|
||||||
download_nimbus_eth2
|
download_nimbus_eth2
|
||||||
BINARIES=""
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -709,10 +708,8 @@ for BINARY in ${BINARIES}; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "${REUSE_BINARIES}" == "0" || "${BINARIES_MISSING}" == "1" ]]; then
|
if [[ "${REUSE_BINARIES}" == "0" || "${BINARIES_MISSING}" == "1" ]]; then
|
||||||
if [[ "${DL_NIMBUS_ETH2}" == "0" ]]; then
|
log "Rebuilding binaries ${BINARIES}"
|
||||||
log "Rebuilding binaries ${BINARIES}"
|
${MAKE} -j ${NPROC} LOG_LEVEL=TRACE NIMFLAGS="${NIMFLAGS} -d:local_testnet -d:const_preset=${CONST_PRESET} -d:web3_consensus_const_preset=${CONST_PRESET}" ${BINARIES}
|
||||||
${MAKE} -j ${NPROC} LOG_LEVEL=TRACE NIMFLAGS="${NIMFLAGS} -d:local_testnet -d:const_preset=${CONST_PRESET} -d:web3_consensus_const_preset=${CONST_PRESET}" ${BINARIES}
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${RUN_NIMBUS_ETH1}" == "1" ]]; then
|
if [[ "${RUN_NIMBUS_ETH1}" == "1" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue