# Besu Configuration for Core/Admin RPC Nodes
data-path="/data/besu"
genesis-file="/genesis/genesis.json"

network-id=138
# Placeholder only: node-specific generated configs must advertise the real LAN IP.
# Do not deploy this base template as-is to production core/admin RPC nodes.
p2p-host="0.0.0.0"
p2p-port=30303

sync-mode="FULL"
data-storage-format="FOREST"

rpc-http-enabled=true
rpc-http-host="0.0.0.0"
rpc-http-port=8545
rpc-http-api=["ETH","NET","WEB3","TXPOOL","QBFT","ADMIN","DEBUG","TRACE"]
# CORS: Internal network only (firewall should block external access)
rpc-http-cors-origins=["http://192.168.11.0/24","http://localhost","http://127.0.0.1"]
rpc-ws-enabled=true
rpc-ws-host="0.0.0.0"
rpc-ws-port=8546
rpc-ws-api=["ETH","NET","WEB3","TXPOOL","QBFT","ADMIN"]
rpc-ws-origins=["*"]

metrics-enabled=true
metrics-port=9545
metrics-host="0.0.0.0"
metrics-push-enabled=false

logging="WARN"

permissions-nodes-config-file-enabled=true
permissions-nodes-config-file="/var/lib/besu/permissions/permissions-nodes.toml"
# Require address on allowlist (permissions-accounts.toml); only listed address can send txs.
permissions-accounts-config-file-enabled=true
permissions-accounts-config-file="/permissions/permissions-accounts.toml"

# Transaction Pool Configuration
tx-pool-max-size=8192
tx-pool-limit-by-account-percentage=0.5
tx-pool-price-bump=10

bootnodes=[]

static-nodes-file="/var/lib/besu/static-nodes.json"

discovery-enabled=false

# Data Storage (using default paths)

# Gas Configuration


max-peers=32

# RPC Timeout Configuration (increased for large deployments)
rpc-http-timeout=120
