### Nimbus Beacon Node Startup Log Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/quick-start.md An example log output indicating that the Nimbus beacon node has successfully launched and is starting its processes. It includes version information and topic logging. ```shell INF 2022-07-19 15:42:58.145+02:00 Launching beacon node topics="beacnde" version=v22.10.1-97a1cdc4-stateofus ... ``` -------------------------------- ### Nimbus Beacon Node Command-line Options Example Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/start-syncing.md Example of starting the Nimbus beacon node with custom TCP and UDP ports. This demonstrates how to modify network settings for the node, in addition to specifying the network and data directory. ```bash build/nimbus_beacon_node \ --network=hoodi \ --data-dir=build/data/shared_hoodi_0 \ --tcp-port=9100 \ --udp-port=9100 ``` -------------------------------- ### Install Nimbus Beacon Node (Manual) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Manually installs the Nimbus eth2 client by downloading a release archive, extracting it, and cleaning up the downloaded file. Requires replacing a placeholder with the actual download link. ```sh mkdir nimbus-eth2 wget tar -xzf nimbus-eth2_Linux_arm64v8*.tar.gz -C nimbus-eth2 rm nimbus-eth2_Linux_arm64v8*.tar.gz ``` -------------------------------- ### Start Nimbus Beacon Node (Mainnet) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/quick-start.md Launches the Nimbus beacon node for the Ethereum mainnet. It requires specifying the web3 URL for the execution client and the path to the JWT secret for authentication. ```shell # Start a mainnet node ./run-mainnet-beacon-node.sh \ --web3-url=http://127.0.0.1:8551 \ --jwt-secret=/tmp/jwtsecret ``` -------------------------------- ### Start Nimbus Beacon Node (Hoodi Testnet) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/quick-start.md Starts the Nimbus beacon node for the Hoodi testnet. This command specifies the network, data directory, web3 URL, and JWT secret. ```shell # Start a hoodi testnet node build/nimbus_beacon_node \ --network=hoodi \ --data-dir=build/data/shared_hoodi_0 \ --web3-url=http://127.0.0.1:8551 \ --jwt-secret=/tmp/jwtsecret ``` -------------------------------- ### Install and Activate MkDocs Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/contribute.md Commands to install MkDocs within a virtual environment and activate it for documentation development. Assumes the user is in the 'docs' directory. ```shell make . mkdocs/bin/activate ``` -------------------------------- ### Setup rpi-clone with Hostname Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Initializes the 'rpi-clone' setup process, specifying a target hostname. This is part of preparing the system for cloning the SD card to an SSD. ```sh sudo rpi-clone-setup -t testhostname ``` -------------------------------- ### Preview Documentation Locally Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/contribute.md Command to start a local development server for previewing MkDocs documentation. The documentation will be available at http://localhost:8000. ```shell mkdocs serve ``` -------------------------------- ### Install Nimbus Beacon Node (Package Manager) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Installs the Nimbus beacon node and validator client using the system's package manager (APT). It first adds the Nimbus APT repository and GPG key, then performs the installation. ```sh echo 'deb https://apt.status.im/nimbus all main' | sudo tee /etc/apt/sources.list.d/nimbus.list # Import the GPG key used to sign the releases: sudo curl https://apt.status.im/pubkey.asc -o /etc/apt/trusted.gpg.d/apt-status-im.asc sudo apt-get update sudo apt-get install nimbus-beacon-node nimbus-validator-client ``` -------------------------------- ### Beacon Node Connection Logs (Nimbus) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Example log output from a Nimbus beacon node indicating a successful startup and validator attachment. These logs help confirm the node is running and connected. ```log INF 2023-10-01 11:25:33.487+01:00 Launching beacon node ... INF 2023-10-01 11:25:34.556+01:00 Loading block dag from database topics="beacnde" tid=19985314 file=nimbus_beacon_node.nim:198 path=build/data/shared_hoodi_0/db INF 2023-10-01 11:25:35.921+01:00 Block dag initialized INF 2023-10-01 11:25:37.073+01:00 Generating new networking key ... NTC 2023-10-01 11:25:45.267+00:00 Local validator attached tid=22009 file=validator_pool.nim:33 pubkey=95e3cbe88c71ab2d0e3053b7b12ead329a37e9fb8358bdb4e56251993ab68e46b9f9fa61035fe4cf2abf4c07dfad6c45 validator=95e3cbe8 ... NTC 2023-10-01 11:25:59.512+00:00 Eth1 sync progress topics="eth1" tid=21914 blockNumber=3836397 depositsProcessed=106147 NTC 2023-10-01 11:26:02.574+00:00 Eth1 sync progress topics="eth1" tid=21914 blockNumber=3841412 depositsProcessed=106391 ... INF 2023-10-01 11:26:31.000+00:00 Slot start topics="beacnde" tid=21815 file=nimbus_beacon_node.nim:505 lastSlot=96566 scheduledSlot=96567 beaconTime=1w6d9h53m24s944us774ns peers=7 head=b54486c4:96563 headEpoch=3017 finalized=2f5d12e4:96479 finalizedEpoch=3014 INF 2023-10-01 11:26:36.285+00:00 Slot end topics="beacnde" tid=21815 file=nimbus_beacon_node.nim:593 slot=96567 nextSlot=96568 head=b54486c4:96563 headEpoch=3017 finalizedHead=2f5d12e4:96479 finalizedEpoch=3014 ``` -------------------------------- ### Copy rpi-clone Scripts Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Copies the 'rpi-clone' and 'rpi-clone-setup' scripts to the system's executable path, making them available for system-wide use. ```sh sudo cp rpi-clone rpi-clone-setup /usr/local/sbin ``` -------------------------------- ### Install Prometheus via Package Manager (Ubuntu Example) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/metrics-pretty-pictures.md Command to install Prometheus on Ubuntu using apt-get. This is one method for obtaining the Prometheus binary. ```bash apt-get install prometheus ``` -------------------------------- ### Navigate to Nimbus Directory Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/quick-start.md Changes the current directory to the 'nimbus-eth2' project folder. This is a prerequisite for running subsequent commands. ```shell cd nimbus-eth2 ``` -------------------------------- ### Get All Peer Info Source: https://github.com/status-im/nimbus-eth2/wiki/RPC-cookbook Fetches detailed information for all connected peers. This provides a comprehensive list of peers and their associated data. ```bash curl -sd '{"jsonrpc":"2.0","method":"peers","params":[],"id":1}' -H 'Content-Type: application/json' localhost:9190 | jq -r '.result' | less ``` -------------------------------- ### Start Nimbus Beacon Node on Testnet Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/start-syncing.md Command to launch the Nimbus beacon node and connect to the 'hoodi' testnet. It specifies the network to sync with and the directory where chain data will be stored. ```bash build/nimbus_beacon_node \ --network=hoodi \ --data-dir=build/data/shared_hoodi_0 ``` -------------------------------- ### Clone rpi-clone Repository Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Clones the 'rpi-clone' repository from GitHub, which is used for copying the contents of an SD card to an external SSD for booting. ```sh git clone https://github.com/billw2/rpi-clone.git ``` -------------------------------- ### Nimbus Beacon Node Log Output Example Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/start-syncing.md Sample log output from a running Nimbus beacon node. It shows informational messages about launching the node, loading the block DAG, generating networking keys, Eth1 sync progress, and slot progression. ```text INF 2023-10-01 11:25:33.487+01:00 Launching beacon node ... INF 2023-10-01 11:25:34.556+01:00 Loading block dag from database topics="beacnde" tid=19985314 path=build/data/shared_hoodi_0/db INF 2023-10-01 11:25:35.921+01:00 Block dag initialized INF 2023-10-01 11:25:37.073+01:00 Generating new networking key ... NTC 2023-10-01 11:25:59.512+00:00 Eth1 sync progress topics="eth1" tid=21914 blockNumber=3836397 depositsProcessed=106147 NTC 2023-10-01 11:26:02.574+00:00 Eth1 sync progress topics="eth1" tid=21914 blockNumber=3841412 depositsProcessed=106391 ... INF 2023-10-01 11:26:31.000+00:00 Slot start topics="beacnde" tid=21815 file=nimbus_beacon_node.nim:505 lastSlot=96566 scheduledSlot=96567 beaconTime=1w6d9h53m24s944us774ns peers=7 head=b54486c4:96563 headEpoch=3017 finalized=2f5d12e4:96479 finalizedEpoch=3014 INF 2023-10-01 11:26:36.285+00:00 Slot end topics="beacnde" tid=21815 file=nimbus_beacon_node.nim:593 slot=96567 nextSlot=96568 head=b54486c4:96563 headEpoch=3017 finalizedHead=2f5d12e4:96479 finalizedEpoch=3014 ... ``` -------------------------------- ### Run Besu Execution Client Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/hoodi.md Starts the Besu execution client on the Hoodi testnet. It enables RPC and WS endpoints, sets sync mode to X_SNAP, and configures JWT authentication for the engine RPC. ```sh build/install/besu/bin/besu \ --network=hoodi \ --rpc-http-enabled=true \ --rpc-http-host="0.0.0.0" \ --rpc-http-cors-origins="*" \ --sync-mode="X_SNAP" \ --data-storage-format="BONSAI" \ --Xmerge-support=true \ --rpc-ws-host="0.0.0.0" \ --host-allowlist="*" \ --engine-rpc-enabled=true \ --engine-host-allowlist="*" \ --engine-jwt-enabled=true \ --engine-jwt-secret=/opt/jwtsecret ``` -------------------------------- ### Execute rpi-clone for SSD Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Initiates the 'rpi-clone' process to copy the SD card's contents to the specified target device, 'sda' (typically an SSD). ```sh rpi-clone sda ``` -------------------------------- ### Start Nimbus Beacon Node on Mainnet Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/start-syncing.md Shell script command to initiate syncing the Nimbus beacon node with the Ethereum mainnet. This is used for production environments where real assets are at stake. ```bash ./run-mainnet-beacon-node.sh ``` -------------------------------- ### Checking Peer Support for BeaconSync in Nim Source: https://github.com/status-im/nimbus-eth2/wiki/The-macro-skeptics-guide-to-the-p2pProtocol-macro This example shows how to check if a remote peer supports the BeaconSync protocol using the supports method. It illustrates referencing protocols as symbols in other APIs. ```nim if remotePeer.supports(BeaconSync): ... ``` -------------------------------- ### SystemD Service Unit File Source: https://github.com/status-im/nimbus-eth2/wiki/SystemD-setup-for-running-a-Nimbus-beacon-node SystemD service unit file to manage the Nimbus beacon node process. It defines the description, execution command, user, group, and restart policy. ```systemd [Unit] Description=Nimbus beacon node [Service] ExecStart=/run_nimbus_node.sh medalla User= Group= Restart=always RuntimeMaxSec=10800 [Install] WantedBy=default.target ``` -------------------------------- ### Run Nimbus Eth2 with Checkpoint Sync (Mainnet Network) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/start-syncing.md This command starts the Nimbus beacon node for the Mainnet network with checkpoint sync enabled. It depends on the CHECKPOINT_SYNC_ENDPOINT environment variable and a TRUSTED_BLOCK_ROOT. The Nimbus database must be empty for this to function correctly. ```shell TRUSTED_BLOCK_ROOT=0x1234567890123456789012345678901234567890123456789012345678901234 ./run-mainnet-beacon-node.sh \ --external-beacon-api-url=$CHECKPOINT_SYNC_ENDPOINT \ --trusted-block-root=$TRUSTED_BLOCK_ROOT ``` -------------------------------- ### Start and enable Nimbus service (shell) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/beacon-node-systemd.md Starts the Nimbus beacon node service immediately and optionally configures it to start automatically upon system boot. These commands manage the lifecycle of the Nimbus service. ```shell # start the beacon node sudo systemctl start nimbus_beacon_node # (Optional) Set the beacon node to start automatically at boot sudo systemctl enable nimbus_beacon_node ``` -------------------------------- ### Import Validator Keys into Nimbus (Manual) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Imports validator keys into the Nimbus client when installed manually. This command is executed from the 'nimbus-eth2' directory and points to the location of your validator keys. ```sh build/nimbus_beacon_node deposits import --data-dir=build/data/shared_hoodi_0 ../validator_keys ``` -------------------------------- ### Import Validator Keys into Nimbus (Package Manager) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Imports validator keys into the Nimbus client when installed via the package manager. This command should be run as the 'nimbus' user and requires the path to your validator keys. ```sh # Run import command as the `nimbus` user sudo -u nimbus /usr/bin/nimbus_beacon_node deposits import --data-dir=/var/lib/nimbus/shared_hoodi_0 /path/to/keys ``` -------------------------------- ### Connect Nimbus to Hoodi Testnet (Package Manager) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Connects the Nimbus beacon node to the Hoodi testnet when installed via the package manager. It specifies the network and data directory, running the command as the 'nimbus' user. ```sh sudo -u nimbus /usr/bin/nimbus_beacon_node \ --network=hoodi \ --data-dir=/var/lib/nimbus/shared_hoodi_0 ``` -------------------------------- ### Download Nimbus systemd service file (shell) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/beacon-node-systemd.md Downloads the example systemd service file for the Nimbus beacon node from the official GitHub repository and saves it to the systemd services directory. This file defines how the Nimbus service should run. ```shell # Download example service file and save it to `/etc/systemd/system/nimbus_beacon_node.service` curl -s https://raw.githubusercontent.com/status-im/nimbus-eth2/stable/scripts/package_src/nimbus_beacon_node/image/lib/systemd/system/nimbus_beacon_node.service | sudo tee /etc/systemd/system/nimbus_beacon_node.service > /dev/null ``` -------------------------------- ### Validator Sync Progress Indicator Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Example status output from a running validator, showing key synchronization metrics like peer count, finalized block, head block, and sync progress status. This helps in monitoring the overall health of the validator. ```text peers: 15 ❯ finalized: ada7228a:8765 ❯ head: b2fe11cd:8767:2 ❯ time: 9900:7 (316807) ❯ sync: wPwwwwwDwwDPwPPPwwww:7:1.2313:1.0627:12h01m(280512) ``` -------------------------------- ### View Nimbus Beacon Node Help and Options Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/start-syncing.md Command to display all available command-line options and their descriptions for the Nimbus beacon node. This is useful for understanding and configuring various aspects of the node's operation. ```bash ./build/nimbus_beacon_node --help ``` -------------------------------- ### Build libnfuzz Static and Dynamic Libraries (Bash) Source: https://github.com/status-im/nimbus-eth2/blob/stable/nfuzz/README.md Demonstrates cloning the nimbus-eth2 repository and building the libnfuzz static (.a) and dynamic (.so) libraries using the make command. This is the foundational step for using the wrapper. ```bash git clone https://github.com/status-im/nimbus-eth2.git cd nimbus-eth2 make # static library make libnfuzz.a # dynamic loaded library make libnfuzz.so ``` -------------------------------- ### Install and Manage mdBook with Plugins (Bash) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/README.md Installs or updates the mdBook CLI and several useful plugins for enhancing documentation. It also includes commands to serve the book locally for preview and to build a local copy. Assumes Cargo is installed and the ~/.cargo/bin directory is in the PATH. ```bash # Install or update tooling (make sure you add "~/.cargo/bin" to PATH): cargo install mdbook --version 0.4.36 cargo install mdbook-toc --version 0.14.1 cargo install mdbook-open-on-gh --version 2.4.1 cargo install mdbook-admonish --version 1.14.0 # Work on the book locally - open "http://localhost:4000" for live version cd docs/the_auditors_handbook mdbook serve -p 4000 # Create a local copy of the book make book # Publish book using makefile (in the top-level dir) make publish-book ``` -------------------------------- ### Install Specific Nimbus Version via APT (Debian/Ubuntu) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/keep-updated.md Shell command to install a precise version of the Nimbus beacon node package using apt. ```shell sudo apt-get install nimbus-beacon-node=23.2.0 ``` -------------------------------- ### Manual Binary Installation Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/binaries.md Steps to manually install Nimbus Eth2 binaries. This involves creating a directory, unpacking a tarball, and potentially verifying checksums. Dependencies include `tar` and the downloaded release archive. ```sh # Create a directory that can hold the beacon chain data and applications - this should be a fast SSD mkdir -p nimbus-eth2 # Unpack the archive into the `nimbus-eth2` directory you just created tar xvf nimbus-eth2_Linux_amd64_22.6.1_2444e994.tar.gz --strip-components 1 -C nimbus-eth2 ``` -------------------------------- ### Get Proposer Duties (JSON-RPC & REST) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/api.md Retrieves proposer duties for a given epoch. Examples are provided for JSON-RPC requests to localhost:9190 and REST API GET requests to localhost:5052. ```jsonrpc curl -d '{"jsonrpc":"2.0","id":"id","method":"get_v1_validator_duties_proposer","params":[1] }' -H 'Content-Type: application/json' localhost:9190 -s | jq ``` ```rest curl http://localhost:5052/eth/v1/validator/duties/proposer/1 -s | jq ``` -------------------------------- ### Get Beacon Headers (JSON-RPC) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/api.md This JSON-RPC endpoint for retrieving beacon headers is deprecated and has no provided code example. -------------------------------- ### Upgrade Nimbus Execution Client Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/eth1.md Commands to update and build the Nimbus execution client from source. Requires git and make. ```shell git pull make -j4 update make -j4 nimbus ``` -------------------------------- ### APT Repository Installation (Debian/Ubuntu) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/binaries.md Instructions for installing Nimbus Eth2 using an APT repository on Debian/Ubuntu systems. This involves adding the repository, importing the GPG key, updating package lists, and installing the necessary Nimbus components. Dependencies include `curl`, `sudo`, and `apt-get`. ```sh # Add the nimbus repository echo 'deb https://apt.status.im/nimbus all main' | sudo tee /etc/apt/sources.list.d/nimbus.list # Import the GPG key sudo curl https://apt.status.im/pubkey.asc -o /etc/apt/trusted.gpg.d/apt-status-im.asc # Update repository files and install Nimbus components sudo apt-get update sudo apt-get install nimbus-beacon-node nimbus-validator-client ``` -------------------------------- ### Get Genesis State Source: https://github.com/status-im/nimbus-eth2/wiki/RPC-cookbook Retrieves the genesis state of the beacon chain. This command queries the beacon state at the genesis block. ```bash curl -sd '{"jsonrpc":"2.0","method":"get_v1_debug_beacon_states_stateId","params":["genesis"],"id":1}' -H 'Content-Type: application/json' localhost:9190 | jq -r '.result' | less ``` -------------------------------- ### Shutdown Raspberry Pi Safely Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Safely shuts down the Raspberry Pi. This command ensures that all data is written to disk before powering off the system. ```sh sudo shutdown -h now ``` -------------------------------- ### Build and Run State Transition Simulation Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/developers.md Builds the state transition simulator for the Nimbus Eth2 client and then displays its help message. The '-d:release' flag is used to speed up the build process. ```bash make NIMFLAGS="-d:release" nimbus_state_transition_sim -h ``` -------------------------------- ### Get Node Version (JSON-RPC & REST) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/api.md Fetches the version information of the Nimbus Eth2 node. Examples demonstrate both JSON-RPC and REST API calls. ```bash curl -d '{"jsonrpc":"2.0","method":"getNodeVersion","params":[],"id":1}' -H 'Content-Type: application/json' localhost:9190 -s | jq ``` ```bash curl http://localhost:5052/nimbus/v1/node/version -s | jq ``` -------------------------------- ### Build Nimbus on Windows Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/developers.md Commands to build the Nimbus beacon node and run tests on Windows using mingw32-make. It also shows how to update Git submodules. ```bash mingw32-make # this first invocation will update the Git submodules mingw32-make test # run the test suite ``` -------------------------------- ### Reboot Raspberry Pi Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/pi-guide.md Restarts the Raspberry Pi to apply system configuration changes. After rebooting, the user needs to reconnect via SSH. ```sh sudo reboot ``` -------------------------------- ### Get Syncing Status (JSON-RPC & REST) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/api.md Provides the current synchronization status of the forward syncing manager. Examples cover JSON-RPC and REST API interactions. ```bash curl -d '{"jsonrpc":"2.0","method":"getSyncing","params":[],"id":1}' -H 'Content-Type: application/json' localhost:9190 -s | jq ``` ```bash curl http://localhost:5052/nimbus/v1/syncmanager/status -s | jq ``` -------------------------------- ### Display help for ncli_transition Source: https://github.com/status-im/nimbus-eth2/blob/stable/ncli/README.md Shows the help message for the ncli_transition tool, outlining its available options and usage. ```bash ./ncli_transition --help ``` -------------------------------- ### Install macOS Build Dependencies Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/install.md Installs the necessary Command Line Tools for Xcode on macOS, which includes a C compiler, Make, and Git, via a single terminal command. ```sh xcode-select --install ``` -------------------------------- ### Build Nimbus Light Client Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/el-light-client.md Builds the Nimbus light client and its dependencies using the make command. The `-j4` flag specifies the number of parallel jobs, which can be omitted on systems with less memory. ```sh make -j4 nimbus_light_client ``` -------------------------------- ### Run Nethermind Execution Client Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/hoodi.md Starts the Nethermind execution client configured for the Hoodi testnet. It specifies the JWT secret file for authentication and enables the JSON-RPC interface. ```sh cd nethermind/src/Nethermind/Nethermind.Runner dotnet run -c Release -- --config hoodi \ --JsonRpc.Host=0.0.0.0 \ --JsonRpc.JwtSecretFile=/opt/jwtsecret ``` -------------------------------- ### Get Futures Info Source: https://github.com/status-im/nimbus-eth2/wiki/RPC-cookbook Retrieves information about futures, which requires the Nimbus beacon node to be built with specific flags (`-d:chronosFutureTracking`). It then filters and counts unique future states. ```bash curl -sd '{"jsonrpc":"2.0","method":"debug_getChronosFutures","params":[],"id":1}' -H 'Content-Type: application/json' localhost:9190 | jq '.result[]' | grep state | sort | uniq -c ``` -------------------------------- ### Get Eth1 Chain Data (JSON-RPC & REST) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/api.md Retrieves the list of Eth1 blocks currently stored in memory by the beacon node. Examples for both JSON-RPC and REST API are provided. ```bash curl -d '{"jsonrpc":"2.0","id":"id","method":"getEth1Chain","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq '.result' ``` ```bash curl http://localhost:5052/nimbus/v1/eth1/chain -s | jq ``` -------------------------------- ### Manage Nimbus Build Environment Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/developers.md Commands to manage the Nimbus build environment, ensuring the correct Nim version and dependencies are used. This includes starting an interactive shell, checking Nim version, and launching Visual Studio Code within the environment. ```bash ./env.sh bash # start a new interactive shell with the right env vars set which nim nim --version # Nimbus is tested and supported on 1.2.12 at the moment # or without starting a new interactive shell: ./env.sh which nim ./env.sh nim --version # Start Visual Studio code with environment ./env.sh code ``` -------------------------------- ### Build Nimbus Execution Client Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/execution-client.md Builds the Nimbus execution client using the make command with parallel jobs. Ensure all prerequisites are installed before running this command. The executable will be located in the 'build' subdirectory. ```sh make -j4 nimbus_execution_client ``` -------------------------------- ### Get Node Version (JSON-RPC & REST) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/api.md Fetches the version information of the Nimbus Eth2 node. Examples are provided for JSON-RPC requests to localhost:9190 and REST API requests to localhost:5052. ```jsonrpc curl -d '{"jsonrpc":"2.0","method":"get_v1_node_version","params":[],"id":1}' -H 'Content-Type: application/json' localhost:9190 -s | jq ``` ```rest curl http://localhost:5052/eth/v1/node/version -s | jq ``` -------------------------------- ### Get Beacon Block by ID via RPC Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/api.md Retrieves a specific beacon block using its ID via the RPC endpoint. The example shows fetching the 'finalized' block. ```bash curl -d '{"jsonrpc":"2.0","method":"get_v1_beacon_blocks_blockId","params":["finalized"],"id":1}' -H 'Content-Type: application/json' localhost:9190 -s | jq ``` -------------------------------- ### Split Keystore Command Example Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/web3signer.md An example of how to use the `ncli_split_keystore` program to split a validator's key into shares for distributed signing. This command requires specifying the data directory, validator public key, signing threshold, and URLs of remote signers. ```bash build/ncli_split_keystore \ --data-dir=$NIMBUS_DATA_DIR \ --key=$VALIDATOR_PUBLIC_KEY \ --threshold=2 \ --remote-signer=http://signer-1-url \ --remote-signer=http://signer-2-url \ --remote-signer=http://signer-3-url \ --out-dir=$OUT_DIR ``` -------------------------------- ### Verify Nimbus Beacon Node Installation Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/build.md Checks if the Nimbus beacon node was successfully built by running it with the `--help` flag. A successful execution will display the available command-line options. ```sh build/nimbus_beacon_node --help ``` -------------------------------- ### Download and Extract Pre-synced Database Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/execution-client.md These commands demonstrate how to download a pre-synced database for Nimbus Eth2 using wget and then extract it into the data directory using tar. This is an optional step to speed up initial synchronization. ```sh # Download the pre-synced database wget https://eth1-db.nimbus.team/mainnet-static-vid-keyed.tar.gz # Extract the database into the data directory tar -xzf mainnet-static-vid-keyed.tar.gz ``` -------------------------------- ### Get Finalized Block Root from Trusted Beacon Node Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/el-light-client.md Retrieves the root of the finalized block from a trusted beacon node using its REST interface. This command requires `curl` and `jq` to be installed. ```sh curl -s "http://localhost:5052/eth/v1/beacon/headers/finalized" | \ jq -r '.data.root' ``` -------------------------------- ### Build and Run Block Simulator (Shell) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/developers.md Builds the block simulator with release flags and then runs it. The simulator can be configured with options like the number of slots, validators, and attester ratio. ```shell make NIMFLAGS="-d:release" block_sim build/block_sim --help ``` ```shell build/block_sim --slots=384 --validators=20000 --attesterRatio=0.66 ``` -------------------------------- ### Debug Get Chronos Futures (JSON-RPC & REST) Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/api.md Fetches the current list of live asynchronous futures. Requires compilation with `-d:chronosFutureTracking`. Examples provided for JSON-RPC and REST API. ```bash curl -d '{"jsonrpc":"2.0","id":"id","method":"debug_getChronosFutures","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq '.result | (.[0] | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' ``` ```bash curl http://localhost:5052/nimbus/v1/debug/chronos/futures -s | jq ``` -------------------------------- ### Start Nimbus Light Client on Mainnet Source: https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/el-light-client.md Starts the Nimbus light client for the Ethereum mainnet. It requires the path to the execution client's JWT secret and a trusted block root. The client connects to the execution client via the `--web3-url`. ```sh TRUSTED_BLOCK_ROOT=0x1234567890123456789012345678901234567890123456789012345678901234 JWTSECRET=path/to/execution/client/jwt.hex build/nimbus_light_client \ --web3-url=http://127.0.0.1:8551 --jwt-secret="$JWTSECRET" \ --trusted-block-root=$TRUSTED_BLOCK_ROOT ``` -------------------------------- ### Start Prometheus Server Source: https://github.com/status-im/nimbus-eth2/blob/stable/README.md Starts the Prometheus server after the local testnet simulation has begun. This allows for monitoring of simulation metrics. ```bash cd tests/simulation/prometheus prometheus ```