Rename nimbus binary to nimbus_execution_client (#2728)

* rename nimbus binary to nimbus_execution_client

* additional replacements

* makefile and dockerfile

* fix ci building errors

* github workflows

* improved Makefile target

---------

Co-authored-by: Pedro Miranda <pedro.miranda@nimbus.team>
This commit is contained in:
Pedro Miranda 2024-10-15 10:37:54 +01:00 committed by GitHub
parent 9c9a41a16d
commit bc0f1ba904
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 65 additions and 53 deletions

View File

@ -212,7 +212,7 @@ jobs:
gcc --version
DEFAULT_MAKE_FLAGS="-j${ncpu} ENABLE_EVMC=${ENABLE_EVMC} ENABLE_VMLOWMEM=${ENABLE_VMLOWMEM}"
mingw32-make ${DEFAULT_MAKE_FLAGS} all test_import
build/nimbus.exe --help
build/nimbus_execution_client.exe --help
# give us more space
# find . -type d -name ".git" -exec rm -rf {} +
find . -type d -name "nimcache" -exec rm -rf {} +
@ -227,10 +227,10 @@ jobs:
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
DEFAULT_MAKE_FLAGS="-j${ncpu} ENABLE_EVMC=${ENABLE_EVMC}"
env CC=gcc make ${DEFAULT_MAKE_FLAGS} all test_import
build/nimbus --help
build/nimbus_execution_client --help
# CC, GOARCH, and CGO_ENABLED are needed to select correct compiler 32/64 bit
# pushd vendor/nimbus-eth2
# env NIMBUSEL_BINARY=../../build/nimbus NIMBUSEL_GENESIS=scripts/nimbusel_genesis.json \
# env NIMBUSEL_BINARY=../../build/nimbus_execution_client NIMBUSEL_GENESIS=scripts/nimbusel_genesis.json \
# ./scripts/launch_local_testnet.sh --nodes=3 --stop-at-epoch=7 \
# --disable-htop --reuse-binaries --run-nimbus-el --dl-eth2 --verbose --kill-old-processes
# popd
@ -242,10 +242,10 @@ jobs:
export ZERO_AR_DATE=1 # avoid timestamps in binaries
DEFAULT_MAKE_FLAGS="-j${ncpu} ENABLE_EVMC=${ENABLE_EVMC}"
make ${DEFAULT_MAKE_FLAGS} all test_import
build/nimbus --help
build/nimbus_execution_client --help
# "-static" option will not work for osx unless static system libraries are provided
# pushd vendor/nimbus-eth2
# env NIMBUSEL_BINARY=../../build/nimbus NIMBUSEL_GENESIS=scripts/nimbusel_genesis.json \
# env NIMBUSEL_BINARY=../../build/nimbus_execution_client NIMBUSEL_GENESIS=scripts/nimbusel_genesis.json \
# ./scripts/launch_local_testnet.sh --nodes=3 --stop-at-epoch=7 \
# --disable-htop --reuse-binaries --run-nimbus-el --dl-eth2 --verbose --kill-old-processes
# popd

View File

@ -51,7 +51,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Linux_amd64_checksum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus.sha512sum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_execution_client.sha512sum
retention-days: 2
build-arm64:
@ -98,7 +98,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Linux_arm64_checksum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus.sha512sum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_execution_client.sha512sum
retention-days: 2
build-win64:
@ -137,7 +137,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Windows_amd64_checksum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus.sha512sum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_execution_client.sha512sum
retention-days: 2
build-macos-amd64:
@ -176,7 +176,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: macOS_amd64_checksum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus.sha512sum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_execution_client.sha512sum
retention-days: 2
build-macos-arm64:
@ -215,7 +215,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: macOS_arm64_checksum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus.sha512sum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_execution_client.sha512sum
retention-days: 2
prepare-prerelease:

View File

@ -30,7 +30,7 @@ jobs:
ARCHIVE=$(echo nimbus-eth1_Linux_amd64_*.tar.gz)
echo "archive=${ARCHIVE}" >> $GITHUB_OUTPUT
echo "archive_dir=${ARCHIVE%.tar.gz}" >> $GITHUB_OUTPUT
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus.sha512sum
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus_execution_client.sha512sum
- name: Upload archive artefact
uses: actions/upload-artifact@v4
with:
@ -41,7 +41,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Linux_amd64_checksum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus.sha512sum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_execution_client.sha512sum
retention-days: 2
- name: Login to Docker Hub
uses: docker/login-action@v1
@ -80,7 +80,7 @@ jobs:
ARCHIVE=$(echo nimbus-eth1_Linux_arm64v8_*.tar.gz)
echo "archive=${ARCHIVE}" >> $GITHUB_OUTPUT
echo "archive_dir=${ARCHIVE%.tar.gz}" >> $GITHUB_OUTPUT
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus.sha512sum
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus_execution_client.sha512sum
- name: Upload archive artefact
uses: actions/upload-artifact@v4
with:
@ -91,7 +91,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Linux_arm64_checksum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus.sha512sum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_execution_client.sha512sum
retention-days: 2
- name: Login to Docker Hub
uses: docker/login-action@v1
@ -124,7 +124,7 @@ jobs:
ARCHIVE=$(echo nimbus-eth1_Windows_amd64_*.tar.gz)
echo "archive=${ARCHIVE}" >> $GITHUB_OUTPUT
echo "archive_dir=${ARCHIVE%.tar.gz}" >> $GITHUB_OUTPUT
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus.sha512sum
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus_execution_client.sha512sum
- name: Upload archive artefact
uses: actions/upload-artifact@v4
with:
@ -135,7 +135,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Windows_amd64_checksum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus.sha512sum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_execution_client.sha512sum
retention-days: 2
build-macos-amd64:
name: macOS AMD64 release asset
@ -151,7 +151,7 @@ jobs:
ARCHIVE=$(echo nimbus-eth1_macOS_amd64_*.tar.gz)
echo "archive=${ARCHIVE}" >> $GITHUB_OUTPUT
echo "archive_dir=${ARCHIVE%.tar.gz}" >> $GITHUB_OUTPUT
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus.sha512sum
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus_execution_client.sha512sum
- name: Upload archive artefact
uses: actions/upload-artifact@v4
with:
@ -162,7 +162,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: macOS_amd64_checksum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus.sha512sum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_execution_client.sha512sum
retention-days: 2
build-macos-arm64:
name: macOS ARM64 release asset
@ -178,7 +178,7 @@ jobs:
ARCHIVE=$(echo nimbus-eth1_macOS_arm64_*.tar.gz)
echo "archive=${ARCHIVE}" >> $GITHUB_OUTPUT
echo "archive_dir=${ARCHIVE%.tar.gz}" >> $GITHUB_OUTPUT
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus.sha512sum
tar -xzf ${ARCHIVE} ${ARCHIVE%.tar.gz}/build/nimbus_execution_client.sha512sum
- name: Upload archive artefact
uses: actions/upload-artifact@v4
with:
@ -189,7 +189,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: macOS_arm64_checksum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus.sha512sum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_execution_client.sha512sum
retention-days: 2
prepare-release:
name: Prepare release draft

View File

@ -35,12 +35,12 @@ RUN apt update && apt -y upgrade
RUN ldd --version ldd
RUN rm -f /home/user/nimbus-eth1/build/nimbus
RUN rm -f /home/user/nimbus-eth1/build/nimbus_execution_client
COPY --from=build /root/nimbus-eth1/build/nimbus /home/user/nimbus-eth1/build/nimbus
COPY --from=build /root/nimbus-eth1/build/nimbus_execution_client /home/user/nimbus-eth1/build/nimbus_execution_client
ENV PATH="/home/user/nimbus-eth1/build:${PATH}"
ENTRYPOINT ["nimbus"]
ENTRYPOINT ["nimbus_execution_client"]
WORKDIR /home/user/nimbus-eth1/build
STOPSIGNAL SIGINT

View File

@ -211,9 +211,10 @@ $(TOOLS): | build deps rocksdb
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_log_level=TRACE -o:build/$@ "$${TOOL_DIR}/$@.nim"
# a phony target, because teaching `make` how to do conditional recompilation of Nim projects is too complicated
execution_client_name = nimbus_execution_client
nimbus: | build deps rocksdb
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_log_level=TRACE -o:build/$@ "nimbus/$@.nim"
echo -e $(BUILD_MSG) "build/$(execution_client_name)" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_log_level=TRACE -o:build/$(execution_client_name) "nimbus/$(execution_client_name).nim"
# symlink
nimbus.nims:
@ -256,11 +257,11 @@ test-evm: | build deps rocksdb
# deterministic order for debugging info sections - even with
# "-frandom-seed=...". Striping the binaries should make them identical, though.
test-reproducibility:
+ [ -e build/nimbus ] || $(MAKE) V=0 nimbus; \
MD5SUM1=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1) && \
rm -rf nimcache/*/nimbus && \
+ [ -e build/nimbus_execution_client ] || $(MAKE) V=0 nimbus; \
MD5SUM1=$$($(MD5SUM) build/nimbus_execution_client | cut -d ' ' -f 1) && \
rm -rf nimcache/*/nimbus_execution_client && \
$(MAKE) V=0 nimbus && \
MD5SUM2=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1) && \
MD5SUM2=$$($(MD5SUM) build/nimbus_execution_client | cut -d ' ' -f 1) && \
[ "$$MD5SUM1" = "$$MD5SUM2" ] && echo -e "\e[92mSuccess: identical binaries.\e[39m" || \
{ echo -e "\e[91mFailure: the binary changed between builds.\e[39m"; exit 1; }

View File

@ -115,7 +115,7 @@ ln -s mingw32-make.exe make.exe
You can now follow those instructions in the previous section. For example:
```bash
make nimbus # build the Nimbus binary
make nimbus # build the Nimbus execution client binary
make test # run the test suite
# etc.
```
@ -326,7 +326,7 @@ cd vendor/nim-rocksdb
Install Prometheus and Grafana. On Gentoo, it's `emerge prometheus grafana-bin`.
```bash
# build Nimbus
# build Nimbus execution client
make nimbus
# the Prometheus daemon will create its data dir in the current dir, so give it its own directory
mkdir ../my_metrics
@ -336,7 +336,7 @@ cp -a examples/prometheus.yml ../my_metrics/
cd ../my_metrics
prometheus --config.file=prometheus.yml # loads ./prometheus.yml, writes metric data to ./data
# start a fresh Nimbus sync and export metrics
rm -rf ~/.cache/nimbus/db; ./build/nimbus --prune:archive --metricsServer
rm -rf ~/.cache/nimbus/db; ./build/nimbus_execution_client --prune:archive --metricsServer
```
Start the Grafana server. On Gentoo it's `/etc/init.d/grafana start`. Go to

View File

@ -1,3 +1,14 @@
# Nimbus
# Copyright (c) 2024 Status Research & Development GmbH
# Licensed and distributed under either of
# * MIT license (license terms in the root directory or at
# https://opensource.org/licenses/MIT).
# * Apache v2 license (license terms in the root directory or at
# https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed
# except according to those terms.
# Docker container spec for building the master branch of nimbus.
FROM debian:buster-slim AS build
@ -16,7 +27,7 @@ RUN git clone --depth 1 --branch non_blocking_startup https://github.com/status-
RUN cd nimbus-eth1 && \
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" nimbus && \
mv build/nimbus /usr/bin/
mv build/nimbus_execution_client /usr/bin/
# --------------------------------- #
# Starting new image to reduce size #
@ -28,8 +39,8 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY --from=build /usr/bin/nimbus /usr/bin/nimbus
RUN usr/bin/nimbus --version > /version.txt
COPY --from=build /usr/bin/nimbus_execution_client /usr/bin/nimbus_execution_client
RUN usr/bin/nimbus_execution_client --version > /version.txt
# Add genesis mapper script.
ADD genesis.json /genesis.json

View File

@ -3,7 +3,7 @@
# Startup script to initialize and boot a nimbus instance.
#
# This script assumes the following files:
# - `nimbus` binary is located in the filesystem root
# - `nimbus_execution_client` binary is located in the filesystem root
# - `genesis.json` file is located in the filesystem root (mandatory)
# - `chain.rlp` file is located in the filesystem root (optional)
# - `blocks` folder is located in the filesystem root (optional)
@ -48,7 +48,7 @@
# Immediately abort the script on any error encountered
set -e
nimbus=/usr/bin/nimbus
nimbus_execution_client=/usr/bin/nimbus_execution_client
FLAGS="--prune-mode:archive --nat:extip:0.0.0.0"
if [ "$HIVE_LOGLEVEL" != "" ]; then
@ -86,8 +86,8 @@ set +e
echo "Loading initial blockchain..."
if [ -f /chain.rlp ]; then
CMD="import /chain.rlp"
echo "Running nimbus: $nimbus $CMD $FLAGS"
$nimbus $CMD $FLAGS
echo "Running nimbus execution client: $nimbus_execution_client $CMD $FLAGS"
$nimbus_execution_client $CMD $FLAGS
else
echo "Warning: chain.rlp not found."
fi
@ -95,7 +95,7 @@ fi
# Load the remainder of the test chain
echo "Loading remaining individual blocks..."
if [ -d /blocks ]; then
(cd /blocks && cat `ls | sort -n` > blocks.rlp && $nimbus import blocks.rlp $FLAGS)
(cd /blocks && cat `ls | sort -n` > blocks.rlp && $nimbus_execution_client import blocks.rlp $FLAGS)
else
echo "Warning: blocks folder not found."
fi
@ -111,5 +111,5 @@ else
FLAGS="$FLAGS --engine-api:true --engine-api-address:0.0.0.0 --engine-api-port:8551"
fi
echo "Running nimbus with flags $FLAGS"
$nimbus $FLAGS
echo "Running nimbus execution client with flags $FLAGS"
$nimbus_execution_client $FLAGS

View File

@ -37,7 +37,7 @@ binDir = "build"
when declared(namedBin):
namedBin = {
"nimbus/nimbus": "nimbus",
"nimbus/nimbus_execution_client": "nimbus_execution_client",
"fluffy/fluffy": "fluffy",
"nimbus_verified_proxy/nimbus_verified_proxy": "nimbus_verified_proxy",
}.toTable()
@ -81,20 +81,20 @@ task test_import, "Run block import test":
echo "Remove directory before running test: " & tmp
quit(QuitFailure)
const nimbus = when defined(windows):
"build/nimbus.exe"
const nimbus_exec_client = when defined(windows):
"build/nimbus_execution_client.exe"
else:
"build/nimbus"
"build/nimbus_execution_client"
if not fileExists(nimbus):
echo "Build nimbus before running this test"
if not fileExists(nimbus_exec_client):
echo "Build nimbus execution client before running this test"
quit(QuitFailure)
# Test that we can resume import
exec "build/nimbus import --data-dir:" & tmp & " --era1-dir:tests/replay --max-blocks:1"
exec "build/nimbus import --data-dir:" & tmp & " --era1-dir:tests/replay --max-blocks:1023"
exec "build/nimbus_execution_client import --data-dir:" & tmp & " --era1-dir:tests/replay --max-blocks:1"
exec "build/nimbus_execution_client import --data-dir:" & tmp & " --era1-dir:tests/replay --max-blocks:1023"
# There should only be 8k blocks
exec "build/nimbus import --data-dir:" & tmp & " --era1-dir:tests/replay --max-blocks:10000"
exec "build/nimbus_execution_client import --data-dir:" & tmp & " --era1-dir:tests/replay --max-blocks:10000"
task test_evm, "Run EVM tests":
test "tests", "evm_tests", "-d:chronicles_log_level=ERROR -d:unittest2DisableParamFiltering"

View File

@ -191,7 +191,7 @@ As the syncing process is quite slow, it makes sense to pre-load the database
from an *Era1* archive (if available) before starting the real sync process.
The command for importing an *Era1* reproitory would be something like
./build/nimbus import \
./build/nimbus_execution_client import \
--era1-dir:/path/to/main-era1/repo \
...
@ -202,7 +202,7 @@ On a system with memory considerably larger than *8GiB* the *nimbus* binary is
started on the same machine where the beacon node runs with the command
./build/nimbus \
./build/nimbus_execution_client \
--network=mainnet \
--engine-api=true \
--engine-api-port=8551 \