Besu
Overview
Official Links
Documentation
1. Initial configuration
Create a service user for the execution service, create data directory and assign ownership.
sudo adduser --system --no-create-home --group execution
sudo mkdir -p /var/lib/besu
sudo chown -R execution:execution /var/lib/besuInstall dependencies.
sudo apt install -y openjdk-21-jdk libjemalloc-dev jq2. Install Binaries
Downloading binaries is often faster and more convenient.
Building from source code can offer better compatibility and is more aligned with the spirit of FOSS (free open source software).
3. Setup and configure systemd
Create a systemd unit file to define your execution.service configuration.
sudo nano /etc/systemd/system/execution.servicePaste the following configuration into the file.
[Unit]
Description=Besu Execution Layer Client service for Hoodi
Wants=network-online.target
After=network-online.target
Documentation=https://www.coincashew.com
[Service]
Type=simple
User=execution
Group=execution
Restart=on-failure
RestartSec=3
KillSignal=SIGINT
TimeoutStopSec=900
Environment="JAVA_OPTS=-Xmx5g"
ExecStart=/usr/local/bin/besu/bin/besu \
--network=hoodi \
--p2p-port=30303 \
--rpc-http-port=8545 \
--engine-rpc-port=8551 \
--max-peers=25 \
--metrics-enabled=true \
--metrics-port=6060 \
--rpc-http-enabled=true \
--sync-mode=SNAP \
--data-storage-format=BONSAI \
--data-path="/var/lib/besu" \
--engine-jwt-secret=/secrets/jwtsecret
[Install]
WantedBy=multi-user.targetTo exit and save, press Ctrl + X, then Y, then Enter.
Run the following to enable auto-start at boot time.
sudo systemctl daemon-reload
sudo systemctl enable executionFinally, start your execution layer client and check it's status.
sudo systemctl start execution
sudo systemctl status executionPress Ctrl + C to exit the status.
4. Helpful execution client commands
sudo journalctl -fu execution | cczeA properly functioning Besu execution client will indicate "Fork-Choice-Updates". For example,
2022-03-19 04:09:36.315+00:00 | vert.x-worker-thread-0 | INFO | EngineForkchoiceUpdated | Consensus fork-choice-update: head: 0xcd2a_8b32..., finalized: 0xfa22_1142...
2022-03-19 04:09:48.328+00:00 | vert.x-worker-thread-0 | INFO | EngineForkchoiceUpdated | Consensus fork-choice-update: head: 0xff1a_f12a..., finalized: 0xfa22_1142...Now that your execution client is configured and started, proceed to the next step on setting up your consensus client.
If you're checking the logs and see any warnings or errors, please be patient as these will normally resolve once both your execution and consensus clients are fully synced to the Ethereum network.
Last updated