Node Configuration
Full annotated configuration for a BESC Hyperchain full node (/etc/besu/node-config.toml):
toml
# ─── Data ───────────────────────────────────────────────────────────────────
data-path="/var/lib/besu-node"
genesis-file="/etc/besu/genesis.json"
# ─── P2P Network ────────────────────────────────────────────────────────────
p2p-host="YOUR_PUBLIC_IP"
p2p-port=30303
bootnodes=[
"enode://<contact BESC team — bootnode shared during onboarding>"
]
# Allow connections from any host (nginx handles auth)
host-allowlist=["*"]
# ─── HTTP RPC ────────────────────────────────────────────────────────────────
# Bind to localhost — let nginx terminate SSL and proxy requests
rpc-http-enabled=true
rpc-http-host="127.0.0.1"
rpc-http-port=8545
rpc-http-cors-origins=["all"]
rpc-http-api=["ETH","NET","WEB3","TXPOOL","IBFT","DEBUG","TRACE"]
rpc-http-max-active-connections=500
# ─── WebSocket RPC ───────────────────────────────────────────────────────────
rpc-ws-enabled=true
rpc-ws-host="127.0.0.1"
rpc-ws-port=8546
rpc-ws-api=["ETH","NET","WEB3","TXPOOL","IBFT"]
# ─── Performance ─────────────────────────────────────────────────────────────
# Cache bloom filters for fast eth_getLogs queries
auto-log-bloom-caching-enabled=true
# ─── Gas ─────────────────────────────────────────────────────────────────────
# Minimum gas price — match the chain minimum
min-gas-price=1000000000000
# ─── Permissioning ───────────────────────────────────────────────────────────
# Block transactions from banned addresses at the RPC level
permissions-accounts-contract-enabled=true
permissions-accounts-contract-address="0x7fE182b8Dd4Af1cE7DeD446dB7174fbE6656695c"
logging="INFO"Nginx Reverse Proxy
Configure nginx to expose your node's RPC via HTTPS:
nginx
server {
server_name rpc.yourdomain.com;
location / {
proxy_pass http://127.0.0.1:8545;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# CORS
add_header Access-Control-Allow-Origin * always;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
add_header Access-Control-Allow-Headers "Content-Type" always;
proxy_read_timeout 300;
}
location /ws {
proxy_pass http://127.0.0.1:8546;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/rpc.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/rpc.yourdomain.com/privkey.pem;
}Checking Sync Status
bash
# Check current block
curl -s -X POST http://127.0.0.1:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' | python3 -c "
import sys, json
r = json.load(sys.stdin)
print('Current block:', int(r['result'], 16))
"
# Check peer count
curl -s -X POST http://127.0.0.1:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}'A healthy node has 4–6 peers and imports a new block every 3 seconds.
