# Besu Configuration for Sentry Nodes
# Sentries are public-facing P2P nodes that peer with validators and other sentries

data-path="/data/besu"
genesis-file="/config/genesis.json"

# Network Configuration
network-id=138
p2p-host="0.0.0.0"
p2p-port=30303

# Consensus (sentries don't participate in consensus)
consensus-protocol="ibft2"
miner-enabled=false

# Sync Configuration
sync-mode="FULL"
fast-sync-min-peers=2

# RPC Configuration (limited, internal only)
rpc-http-enabled=true
rpc-http-host="127.0.0.1"
rpc-http-port=8545
rpc-http-api=["ETH","NET","WEB3","TXPOOL","ADMIN"]
rpc-http-cors-origins=["*"]
rpc-http-host-allowlist=["127.0.0.1","localhost"]

rpc-ws-enabled=true
rpc-ws-host="127.0.0.1"
rpc-ws-port=8546
rpc-ws-api=["ETH","NET","WEB3","TXPOOL","ADMIN"]
rpc-ws-origins=["*"]

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

# Logging
logging="INFO"
log-destination="CONSOLE"

# Permissioning
permissions-nodes-config-file-enabled=true
permissions-nodes-config-file="/config/permissions-nodes.toml"
permissions-accounts-config-file-enabled=false

# Transaction Pool
tx-pool-max-size=8192
tx-pool-price-bump=10
tx-pool-retention-hours=6

# Network Peering
# Bootnodes should be set via environment variable or config map
bootnodes=[]

# Static Nodes (validators and other sentries)
static-nodes-file="/config/static-nodes.json"

# Discovery
discovery-enabled=true
dns-enabled=true

# Privacy (disabled for public network)
privacy-enabled=false

# Data Storage
database-path="/data/besu/database"
trie-logs-enabled=false

# Gas Configuration
rpc-tx-feecap="0x0"

# Native Accounts
accounts-enabled=false

# P2P Configuration
max-peers=25
max-remote-initiated-connections=10

