[local sim] Download the latest nimbus-eth2 when --dl-nimbus-eth2 is used

This commit is contained in:
Zahary Karadjov 2023-04-05 19:12:28 +03:00
parent 05d99185c9
commit 7f2a3b7130
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 14 additions and 17 deletions

View File

@ -98,8 +98,8 @@ DL_GETH="0"
: ${DL_NIMBUS_ETH2:="0"}
# TODO: Add command-line flags for these
: ${NIMBUS_ETH2_VERSION:=22.12.0}
: ${NIMBUS_ETH2_REVISION:=f6a5a5b1}
: ${NIMBUS_ETH2_VERSION:=23.3.2}
: ${NIMBUS_ETH2_REVISION:=6c0d756d}
: ${BEACON_NODE_COMMAND:="./build/nimbus_beacon_node$EXE_EXTENSION"}
: ${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}"
log "Downloading Nimbus ETH2 binary"
"${CURL_BINARY}" -o "$NIMBUS_ETH2_TARBALL_NAME" -sSL "$NIMBUS_ETH2_TARBALL_URL"
local tmp_extract_dir
tmp_extract_dir=$(mktemp -d nimbus-eth2-tarball-XXX)
@ -618,6 +617,7 @@ download_nimbus_eth2() {
mkdir -p "$(dirname "$BEACON_NODE_COMMAND")"
mv "$tmp_extract_dir/build/nimbus_beacon_node$EXE_EXTENSION" "$BEACON_NODE_COMMAND"
chmod +x "$BEACON_NODE_COMMAND"
patchelf_when_on_nixos "$BEACON_NODE_COMMAND"
REUSE_BINARIES=1
fi
@ -654,24 +654,24 @@ if [[ "${USE_VC}" == "1" && "${LIGHTHOUSE_VC_NODES}" != "0" && ! -e "build/${LH_
popd >/dev/null
fi
# Don't build binaries if we are downloading them
if [[ "${DL_NIMBUS_ETH2}" != "1" ]]; then
# Build the binaries
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
if [[ "${DL_NIMBUS_ETH2}" != "1" ]]; then
# Build the binaries
if [[ "${USE_VC}" == "1" ]]; then
BINARIES="${BINARIES} nimbus_validator_client"
fi
if [[ "$LC_NODES" -ge "1" ]]; then
BINARIES="${BINARIES} nimbus_light_client"
fi
BINARIES="${BINARIES} nimbus_beacon_node"
fi
@ -695,7 +695,6 @@ else
CONTAINER_DATA_DIR="${DATA_DIR}"
if [[ "${DL_NIMBUS_ETH2}" == "1" ]]; then
download_nimbus_eth2
BINARIES=""
fi
fi
@ -709,11 +708,9 @@ for BINARY in ${BINARIES}; do
done
if [[ "${REUSE_BINARIES}" == "0" || "${BINARIES_MISSING}" == "1" ]]; then
if [[ "${DL_NIMBUS_ETH2}" == "0" ]]; then
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}
fi
fi
if [[ "${RUN_NIMBUS_ETH1}" == "1" ]]; then
if [[ "${DL_NIMBUS_ETH1}" == "1" ]]; then