Nodes
Last updated
mkdir -p network/node1/datacp network/node1/databesu --data-path=data public-key export --to=data/key.pubcd network/node1cd network/node1
nano config.toml # Valid TOML config file
data-path="data" # Path
#static-nodes-file="data/static-nodes.json"
# Network
bootnodes=["enode://23b6a539306cc1f3a61230e3253cebf9b6cad37fa045954fe27cef265ab232329456c786d16d6c132eaf957b75f5e87629ec7e6a7aa271e9c346b2cde2e0a4d0@95.111.219.167:30301"]
#p2p-host="0.0.0.0"
p2p-port=30305
max-peers=42
host-allowlist=["*"]
[sync]
#sync-mode="X_SNAP" # Enables Snap sync
logging="DEBUG"
min-gas-price=0
revert-reason-enabled=true
rpc-http-enabled=true
#rpc-http-host="0.0.0.0"
rpc-http-port=22005
rpc-http-cors-origins=["*"]
rpc-http-api=["ADMIN", "ETH", "NET", "WEB3", "QBFT"]
#rpc-ws-host="0.0.0.0"
rpc-ws-enabled=true
rpc-ws-port=32005
rpc-ws-api=["ADMIN", "ETH", "NET", "WEB3", "QBFT"]
# Chain
genesis-file="genesis.json" # Path to the custom genesis file# Valid TOML config file
data-path="data" # Path
#static-nodes-file="data/static-nodes.json"
bootnodes=["enode://39f394a6c9bec694d2c7dc5b1c5b20611fbfb9212a5f75c28febdff92eb290ea7ec1c5a3873d7e14a32ec3bc7072f52ef4dfbf9c7387c8315b9d3a5b48e981df@94.237.66.224:30301"]
#p2p-host="0.0.0.0"
p2p-port=30306
max-peers=42
host-allowlist=["*"]
logging="ALL"
min-gas-price=0
revert-reason-enabled=true
rpc-http-enabled=true
rpc-http-host="0.0.0.0"
rpc-http-port=22006
rpc-http-cors-origins=["*"]
rpc-http-api=["ETH", "NET", "WEB3", "QBFT", "DEBUG", "TRACE", "TXPOOL"]
rpc-ws-host="0.0.0.0"
rpc-ws-enabled=true
rpc-ws-port=32006
rpc-ws-api=["ETH", "NET", "WEB3", "QBFT", "DEBUG", "TRACE", "TXPOOL"]
# Chain
genesis-file="genesis.json" # Path to the custom genesis file
static-nodes-file="data/static-nodes.json"cd network/node1/data[
"enode://23b6a539306cc1f3a61230e3253cebf9b6cad37fa045954fe27cef265ab232329456c786d16d6c132eaf957b75f5e87629ec7e6a7aa271e9c346b2cde2e0a4d0@95.111.219.167:30301"
][
"enode://39f394a6c9bec694d2c7dc5b1c5b20611fbfb9212a5f75c28febdff92eb290ea7ec1c5a3873d7e14a32ec3bc7072f52ef4dfbf9c7387c8315b9d3a5b48e981df@94.237.66.224:30301"
]
besu --config-file=config.tomlsudo adduser --system --no-create-home --group besu
sudo chown -R besu:besu /path/to/NodeDirectorysudo nano /etc/systemd/system/besu.service[Unit]
Description=Hyperledger Besu Ethereum Node
After=network.target
[Service]
Type=simple
User=besu
Group=besu
WorkingDirectory=/path/to/Node1
ExecStart=/path/to/besu-24.1.1/bin/besu --config-file /path/to/Node1/config.toml
KillMode=process
KillSignal=SIGINT
TimeoutStopSec=90
Restart=on-failure
RestartSec=100
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reloadsudo systemctl enable besu
sudo systemctl start besu
sudo systemctl status besujournalctl -fu besu
sudo journalctl -f -u besu.service -o cat
sudo journalctl -f -u besu.service -o cat | ccze -Asudo netstat -tulpn | grep LISTENkill <PID> or kill -9 <PID> (to force)sudo systemctl restart besucurl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":51}' http://127.0.0.1:22005