Node Configuration Runbook¶
Audience: Operators and developers configuring Fukuii nodes
Estimated Time: 20-30 minutes
Prerequisites: Basic understanding of HOCON configuration format
Overview¶
This runbook provides comprehensive documentation of Fukuii's configuration system, covering chain configuration files, node configuration files, and command line options for launching nodes. Understanding these configuration options is essential for customizing node behavior for different networks, performance tuning, and operational requirements.
Table of Contents¶
- Configuration System Overview
- Configuration File Hierarchy
- Chain Configuration Files
- Node Configuration Files
- Command Line Options
- Environment Variables
- Common Configuration Examples
- Configuration Reference
- Developer Tools
Configuration System Overview¶
Fukuii uses the Typesafe Config (HOCON) format for configuration management. The configuration system provides:
- Layered Configuration: Base settings, network-specific overrides, and custom configurations
- Environment Variable Support: Override configuration values using environment variables
- JVM System Properties: Set configuration via
-Dflags - Type Safety: Strongly-typed configuration with validation
- Sensible Defaults: Production-ready defaults that can be customized as needed
Configuration File Locations¶
Embedded Configurations (in JAR/distribution):
src/main/resources/conf/
├── base.conf # Base configuration with all defaults
├── app.conf # Application entry point (includes base.conf)
├── etc.conf # Ethereum Classic mainnet
├── eth.conf # Ethereum mainnet
├── mordor.conf # Mordor testnet
├── testmode.conf # Test mode configuration
├── metrics.conf # Metrics configuration
└── chains/
├── etc-chain.conf # ETC chain parameters
├── eth-chain.conf # ETH chain parameters
├── mordor-chain.conf # Mordor chain parameters
└── ...
Runtime Configurations:
<distribution>/conf/
├── app.conf # Copied from embedded configs
├── logback.xml # Logging configuration
└── <custom>.conf # Your custom configuration files
Configuration File Hierarchy¶
Fukuii loads configuration in the following order (later sources override earlier ones):
- base.conf - Core defaults for all configurations
- Network-specific config (e.g., etc.conf, mordor.conf) - Includes app.conf and sets network
- app.conf - Application configuration (includes base.conf)
- Custom config - Specified via
-Dconfig.file=<path> - Environment variables - Override specific settings
- JVM system properties - Highest priority overrides
Example Configuration Chain¶
When starting with ./bin/fukuii etc:
base.conf (defaults)
↓
app.conf (includes base.conf)
↓
etc.conf (includes app.conf, sets network="etc")
↓
etc-chain.conf (loaded automatically for "etc" network)
↓
Custom config (if specified with -Dconfig.file)
↓
Environment variables
↓
JVM system properties
Chain Configuration Files¶
Chain configuration files define blockchain-specific parameters such as fork block numbers, network IDs, consensus rules, and bootstrap nodes. These files are located in src/main/resources/conf/chains/.
Available Chain Configurations¶
| Chain File | Network | Network ID | Chain ID |
|---|---|---|---|
etc-chain.conf |
Ethereum Classic | 1 | 0x3d (61) |
eth-chain.conf |
Ethereum | 1 | 0x01 (1) |
mordor-chain.conf |
Mordor Testnet | 7 | 0x3f (63) |
pottery-chain.conf |
Pottery Testnet | 10 | 0xa (10) |
test-chain.conf |
Test/Dev | Varies | Varies |
Chain Configuration Parameters¶
Network Identity¶
{
# Network identifier for peer discovery and handshaking
network-id = 1
# Chain ID used for transaction signing (EIP-155)
chain-id = "0x3d"
# Supported Ethereum protocol capabilities
capabilities = ["eth/63", "eth/64", "eth/65", "eth/66", "eth/67", "eth/68"]
}
Hard Fork Block Numbers¶
Chain configs define when specific protocol upgrades activate:
{
# Frontier (genesis)
frontier-block-number = "0"
# Homestead fork
homestead-block-number = "1150000"
# EIP-150 (Gas cost changes)
eip150-block-number = "2500000"
# EIP-155 (Replay protection)
eip155-block-number = "3000000"
# Atlantis (ETC-specific, includes Byzantium changes)
atlantis-block-number = "8772000"
# Agharta (ETC-specific, includes Constantinople + Petersburg)
agharta-block-number = "9573000"
# Phoenix (ETC-specific, includes Istanbul changes)
phoenix-block-number = "10500839"
# Magneto (ETC-specific)
magneto-block-number = "13189133"
# Mystique (ETC-specific, EIP-3529)
mystique-block-number = "14525000"
# Spiral (ETC-specific, EIP-3855, EIP-3651, EIP-3860)
spiral-block-number = "19250000"
}
Consensus and Mining Parameters¶
{
# Monetary policy (ECIP-1017 for ETC)
monetary-policy {
# Initial block reward (5 ETC)
first-era-block-reward = "5000000000000000000"
# Era duration in blocks
era-duration = 5000000
# Reward reduction rate per era (20%)
reward-reduction-rate = 0.2
}
# Difficulty bomb configuration
difficulty-bomb-pause-block-number = "3000000"
difficulty-bomb-continue-block-number = "5000000"
difficulty-bomb-removal-block-number = "5900000"
}
Bootstrap Nodes¶
Chain configs include a list of bootstrap nodes for peer discovery:
{
bootstrap-nodes = [
"enode://158ac5a4817265d0d8b977660b3dbe9abee5694ed212f7091cbf784ddf47623ed015e1cb54594d10c1c46118747ddabe86ebf569cf24ae91f2daa0f1adaae390@159.203.56.33:30303",
"enode://942bf2f0754972391467765be1d98206926fc8ad0be8a49cd65e1730420c37fa63355bddb0ae5faa1d3505a2edcf8fad1cf00f3c179e244f047ec3a3ba5dacd7@176.9.51.216:30355",
# ... more bootstrap nodes
]
}
Node Configuration Files¶
Node configuration files control the operational behavior of the Fukuii client, including networking, storage, RPC endpoints, mining, and synchronization settings.
Key Configuration Sections¶
Data Directory¶
fukuii {
# Base directory for all node data
datadir = ${user.home}"/.fukuii/"${fukuii.blockchains.network}
# Node private key location
node-key-file = ${fukuii.datadir}"/node.key"
# Keystore directory for account keys
keyStore {
keystore-dir = ${fukuii.datadir}"/keystore"
minimal-passphrase-length = 7
allow-no-passphrase = true
}
}
For ETC mainnet, the default data directory is ~/.fukuii/etc/.
Network Configuration¶
P2P Networking:
fukuii {
network {
server-address {
# Listening interface for P2P connections
interface = "0.0.0.0"
# P2P port
port = 9076
}
# Enable UPnP port forwarding
automatic-port-forwarding = true
discovery {
# Enable peer discovery
discovery-enabled = true
# Discovery protocol interface
interface = "0.0.0.0"
# Discovery port (UDP)
port = 30303
# Reuse previously known nodes on restart
reuse-known-nodes = true
# Discovery scan interval
scan-interval = 1.minutes
}
}
}
Static Nodes Configuration:
In addition to bootstrap nodes configured in chain configuration files, Fukuii supports loading static nodes from a static-nodes.json file in the data directory. This allows for dynamic peer configuration without modifying configuration files.
The static-nodes.json file should be placed in the data directory (e.g., ~/.fukuii/etc/static-nodes.json) and contain a JSON array of enode URLs:
[
"enode://6eecbdcc74c0b672ce505b9c639c3ef2e8ee8cddd8447ca7ab82c65041932db64a9cd4d7e723ba180b0c3d88d1f0b2913fda48972cdd6742fea59f900af084af@192.168.1.1:9076",
"enode://a335a7e86eab05929266de232bec201a49fdcfc1115e8f8b861656e8afb3a6e5d3ffd172d153ae6c080401a56e3d620db2ac0695038a19e9b0c5220212651493@192.168.1.2:9076"
]
How it works:
- Default/Public mode: Static nodes are merged with bootstrap nodes from config - both are used
- Enterprise mode (fukuii enterprise <network>): Only static nodes are used, bootstrap nodes are ignored
- This allows complete control over peer connections in private networks while preventing accidental connections to public infrastructure
Modifier behavior:
# Public mode - uses both bootstrap nodes and static-nodes.json
fukuii public etc
# Enterprise mode - uses ONLY static-nodes.json (ignores bootstrap nodes)
fukuii enterprise gorgoroth
Use cases: - Private/permissioned networks where peer lists change frequently - Test networks where nodes are dynamically created - Automated deployments where peer configuration is managed externally - Enterprise environments with scripted node management requiring strict peer control
Notes: - The file is optional - if it doesn't exist, only bootstrap nodes from config are used (unless in enterprise mode) - Invalid enode URLs are logged and skipped - Changes to the file require a node restart to take effect - For the Gorgoroth test network, this is the recommended way to configure peers
Peer Management:
fukuii {
network {
peer {
# Minimum outgoing peer connections
min-outgoing-peers = 20
# Maximum outgoing peer connections
max-outgoing-peers = 50
# Maximum incoming peer connections
max-incoming-peers = 30
# Connection retry configuration
connect-retry-delay = 5.seconds
connect-max-retries = 1
# Timeouts
wait-for-hello-timeout = 3.seconds
wait-for-status-timeout = 30.seconds
}
}
}
RPC Configuration¶
HTTP JSON-RPC:
fukuii {
network {
rpc {
http {
# Enable HTTP RPC endpoint
enabled = true
# RPC mode: "http" or "https"
mode = "http"
# Listening interface (use "localhost" for security)
interface = "localhost"
# RPC port
port = 8546
# CORS configuration
cors-allowed-origins = []
# Rate limiting
rate-limit {
enabled = false
min-request-interval = 10.seconds
}
}
# Enabled RPC APIs
apis = "eth,web3,net,personal,fukuii,debug,qa,checkpointing"
}
}
}
IPC JSON-RPC:
fukuii {
network {
rpc {
ipc {
# Enable IPC endpoint
enabled = false
# IPC socket file location
socket-file = ${fukuii.datadir}"/fukuii.ipc"
}
}
}
}
Database Configuration¶
fukuii {
db {
# Data source: "rocksdb"
data-source = "rocksdb"
rocksdb {
# Database path
path = ${fukuii.datadir}"/rocksdb"
# Create if missing
create-if-missing = true
# Paranoid checks
paranoid-checks = true
# Block cache size (in bytes)
block-cache-size = 33554432
}
}
}
Mining Configuration¶
fukuii {
mining {
# Miner coinbase address
coinbase = "0011223344556677889900112233445566778899"
# Extra data in mined blocks
header-extra-data = "fukuii"
# Mining protocol: "pow", "mocked", "restricted-pow"
protocol = pow
# Enable mining on this node
mining-enabled = false
# Number of parallel mining threads
num-threads = 1
}
}
Sync and Blockchain¶
fukuii {
sync {
# Perform state sync as part of fast sync
do-fast-sync = true
# Peers to use for fast sync
peers-scan-interval = 3.seconds
# Block resolving properties
max-concurrent-requests = 10
block-headers-per-request = 128
block-bodies-per-request = 128
# Pivot block offset for fast sync
pivot-block-offset = 500
}
blockchain {
# Custom genesis file (null = use default)
custom-genesis-file = null
# Checkpoint configuration
checkpoint-interval = 1000
}
}
Test Mode¶
Command Line Options¶
Fukuii provides several command line options for launching the node with different configurations.
Main Node Launcher¶
Syntax:
Network Options (positional argument):
| Network | Description |
|---|---|
etc |
Ethereum Classic mainnet (default if no argument) |
eth |
Ethereum mainnet |
mordor |
Mordor testnet (ETC testnet) |
testnet-internal |
Internal test network |
| (none) | Defaults to ETC mainnet |
Examples:
# Start ETC mainnet node
./bin/fukuii etc
# Start Ethereum mainnet node
./bin/fukuii eth
# Start Mordor testnet node
./bin/fukuii mordor
# Default (ETC mainnet)
./bin/fukuii
Custom Configuration Files¶
You can specify a custom configuration file using either the --config flag or the -Dconfig.file JVM system property:
Using --config flag (recommended):
# Absolute path
./bin/fukuii --config /path/to/custom.conf
# Relative path
./bin/fukuii --config ./conf/mining-node.conf
# With equals sign
./bin/fukuii --config=./conf/archive-node.conf
Using -D flag (JVM system property):
Examples with network names:
# Custom config for mining on ETC
./bin/fukuii etc --config ./conf/mining.conf
# Custom config for archive node
./bin/fukuii --config /path/to/archive-node.conf
⚠️ Important: Custom Configuration File Requirements
Custom configuration files must include the base configuration at the top of the file:
# At the top of your custom config file
include "app.conf"
# Then add your custom settings
fukuii {
blockchains {
network = "etc" # or "mordor", "eth", etc.
}
# Your custom overrides here
network {
rpc {
http {
interface = "0.0.0.0"
port = 8545
}
}
}
}
Example: Custom Mining Configuration
Create a file mining-node.conf:
# Include base configuration (required)
include "app.conf"
# Override settings for mining
fukuii {
blockchains {
network = "etc"
}
# Enable mining
mining {
enabled = true
coinbase = "0x1234567890123456789012345678901234567890"
mining-threads = 4
}
# Increase memory for mining
blockchain {
cache-size = 4096
}
}
Then start with:
Java System Properties¶
You can override any configuration value using JVM system properties with the -D flag:
Override Specific Values:
# Change RPC port
./bin/fukuii -Dfukuii.network.rpc.http.port=8545 etc
# Change data directory
./bin/fukuii -Dfukuii.datadir=/data/fukuii-etc etc
# Enable test mode
./bin/fukuii -Dfukuii.testmode=true testnet-internal
# Change P2P port
./bin/fukuii -Dfukuii.network.server-address.port=30303 etc
Multiple Overrides:
./bin/fukuii \
-Dfukuii.network.rpc.http.interface=0.0.0.0 \
-Dfukuii.network.rpc.http.port=8545 \
-Dfukuii.datadir=/custom/data \
etc
JVM Options¶
Control JVM behavior using options in .jvmopts file or via command line:
# Set heap size
./bin/fukuii -J-Xms2g -J-Xmx8g etc
# Enable GC logging
./bin/fukuii -J-Xlog:gc:file=gc.log etc
# Set custom tmp directory
./bin/fukuii -J-Djava.io.tmpdir=/data/tmp etc
CLI Subcommands¶
Fukuii includes CLI utilities accessible via the cli subcommand. For help on any command, use the --help flag:
Show All CLI Commands:
Get Help on a Specific Command:
Available CLI Commands¶
Generate Private Key:
Generates a new random private key for use with Ethereum accounts.Derive Address from Private Key:
Derives the Ethereum address from a given private key (without 0x prefix).Example:
Generate Key Pairs:
Generates one or more private/public key pairs. If no number is specified, generates one key pair.Example:
Encrypt Private Key:
Encrypts a private key with an optional passphrase, producing JSON keystore format.Example:
./bin/fukuii cli encrypt-key 00b11c32957057651d56cd83085ef3b259319057e0e887bd0fdaee657e6f75d0 --passphrase mypassword
Generate Genesis Allocs:
./bin/fukuii cli generate-allocs [--key <private-key>]... [--address <address>]... --balance <amount>
Example:
./bin/fukuii cli generate-allocs --key 00b11c32957057651d56cd83085ef3b259319057e0e887bd0fdaee657e6f75d0 --balance 1000000000000000000000
Other Launch Modes¶
The App.scala entry point supports additional modes. For a complete list of available commands, use:
Available launch modes include:
Start Node (Default):
Networks:etc, eth, mordor, testnet-internal
CLI Utilities:
See the CLI Subcommands section above for details.Key Management Tool:
Interactive tool for managing keystores and keys.Bootstrap Database Download:
Downloads and extracts blockchain bootstrap data to speed up initial sync.Faucet Server:
Runs a faucet service for testnet token distribution.CLI Utilities:
Command-line utilities for key generation, address derivation, and more. Use--help to see all available subcommands.
For RPC-based key generation, see personal_newAccount endpoint.
Signature Validator:
Tool for validating cryptographic signatures.Environment Variables¶
While Fukuii primarily uses configuration files and JVM properties, you can set environment variables that are referenced in configuration files:
Data Directory:
Test Mode:
User Home (automatically used):
Common Configuration Examples¶
Example 1: Custom Data Directory¶
Create a custom configuration file custom-datadir.conf:
Launch:
Example 2: Expose RPC to Network¶
⚠️ Security Warning: Only expose RPC on trusted networks with proper firewall rules.
include "base.conf"
fukuii {
network {
rpc {
http {
interface = "0.0.0.0"
port = 8545
# Enable rate limiting for external access
rate-limit {
enabled = true
min-request-interval = 1.second
}
# Restrict CORS origins
cors-allowed-origins = ["https://mydapp.example.com"]
}
}
}
}
Example 3: Custom Ports¶
include "base.conf"
fukuii {
network {
server-address {
port = 30304 # P2P port
}
discovery {
port = 30305 # Discovery port
}
rpc {
http {
port = 8547 # RPC port
}
}
}
}
Example 4: Mining Configuration¶
include "base.conf"
fukuii {
mining {
# Set your mining address
coinbase = "0xYOUR_ADDRESS_HERE"
# Enable mining
mining-enabled = true
# Number of mining threads
num-threads = 4
# Custom extra data
header-extra-data = "My Mining Pool"
}
}
Example 5: Performance Tuning¶
include "base.conf"
fukuii {
# Increase peer limits for better connectivity
network {
peer {
min-outgoing-peers = 30
max-outgoing-peers = 100
max-incoming-peers = 50
}
}
# Optimize sync settings
sync {
max-concurrent-requests = 20
block-headers-per-request = 256
block-bodies-per-request = 256
}
# Larger database cache
db {
rocksdb {
block-cache-size = 134217728 # 128 MB
}
}
}
Launch with JVM tuning:
./bin/fukuii \
-J-Xms4g \
-J-Xmx16g \
-J-XX:+UseG1GC \
-Dconfig.file=/path/to/performance.conf \
etc
Example 6: Development/Testing Node¶
include "base.conf"
fukuii {
# Enable test mode
testmode = true
# Local-only RPC
network {
rpc {
http {
interface = "localhost"
port = 8545
}
# Enable all APIs for testing
apis = "eth,web3,net,personal,fukuii,debug,qa,test,checkpointing"
}
# Minimal peers for faster startup
peer {
min-outgoing-peers = 1
max-outgoing-peers = 5
}
}
}
Configuration Reference¶
Quick Reference: Common Settings¶
| Setting | Config Path | Default | Description |
|---|---|---|---|
| Data Directory | fukuii.datadir |
~/.fukuii/<network> |
Base data directory |
| P2P Port | fukuii.network.server-address.port |
9076 |
Ethereum P2P port |
| Discovery Port | fukuii.network.discovery.port |
30303 |
Peer discovery port |
| RPC Port | fukuii.network.rpc.http.port |
8546 |
JSON-RPC HTTP port |
| RPC Interface | fukuii.network.rpc.http.interface |
localhost |
RPC bind address |
| Min Peers | fukuii.network.peer.min-outgoing-peers |
20 |
Minimum peer connections |
| Max Peers | fukuii.network.peer.max-outgoing-peers |
50 |
Maximum peer connections |
| Test Mode | fukuii.testmode |
false |
Enable test mode |
| Mining Enabled | fukuii.mining.mining-enabled |
false |
Enable mining |
| Coinbase | fukuii.mining.coinbase |
- | Mining reward address |
Configuration File Syntax¶
HOCON (Human-Optimized Config Object Notation) syntax basics:
Include Files:
Nested Objects:
Dot Notation:
Variable Substitution:
fukuii {
datadir = ${user.home}"/.fukuii/"${fukuii.blockchains.network}
node-key-file = ${fukuii.datadir}"/node.key"
}
Lists:
Comments:
Troubleshooting¶
Configuration Not Taking Effect¶
Problem: Changed configuration doesn't apply.
Solutions: 1. Ensure you're using the correct config file:
-
Check configuration precedence - JVM properties override config files:
-
Verify HOCON syntax is correct (quotes, braces, commas)
-
Check logs for configuration parsing errors on startup
Port Already in Use¶
Problem: Node fails to start with "port already in use" error.
Solution: Change ports in configuration:
./bin/fukuii \
-Dfukuii.network.server-address.port=9077 \
-Dfukuii.network.discovery.port=30304 \
etc
Can't Connect to RPC¶
Problem: RPC requests fail with connection refused.
Solutions: 1. Check RPC is enabled:
-
Verify interface binding:
-
Check firewall allows RPC port (default 8546)
-
Verify node is running:
Related Documentation¶
- First Start Runbook - Initial node setup and startup
- Peering Runbook - Network connectivity and peer management
- Security Runbook - Security configuration and best practices
- Disk Management - Storage configuration and optimization
- Docker Documentation - Docker-based deployment
Additional Resources¶
- Typesafe Config Documentation
- HOCON Syntax Guide
- Ethereum Classic ECIPs - Protocol upgrade specifications
- Fukuii GitHub Repository
Document Version: 1.0
Last Updated: 2025-11-04
Maintainer: Chippr Robotics LLC
Developer Tools¶
Fukuii CLI Tool¶
The Fukuii CLI is a unified command-line toolkit for managing Fukuii node deployments and configurations. It consolidates all deployment and configuration operations into a single, consistent interface.
Installation (Linux)¶
# Copy the tool to a system-wide location
sudo cp ops/tools/fukuii-cli.sh /usr/local/bin/fukuii-cli
sudo chmod +x /usr/local/bin/fukuii-cli
# Verify installation
fukuii-cli help
Installation (User-specific)¶
# Create a local bin directory if it doesn't exist
mkdir -p ~/.local/bin
# Copy the tool
cp ops/tools/fukuii-cli.sh ~/.local/bin/fukuii-cli
chmod +x ~/.local/bin/fukuii-cli
# Add to PATH (add this to ~/.bashrc or ~/.zshrc)
export PATH="$HOME/.local/bin:$PATH"
# Reload your shell or run:
source ~/.bashrc # or source ~/.zshrc
# Verify installation
fukuii-cli help
Features¶
The fukuii-cli tool provides a comprehensive set of commands:
Network Deployment:
- start [config] - Start the Gorgoroth test network with specified configuration
- stop [config] - Stop the network
- restart [config] - Restart the network
- status [config] - Show status of all containers
- logs [config] - Follow logs from all containers
- clean [config] - Stop and remove all containers and volumes
Node Configuration:
- sync-static-nodes - Collect enode URLs and synchronize static-nodes.json across all nodes
- collect-logs [config] - Collect logs from all containers for debugging
Utility:
- help - Show detailed usage information
- version - Show version information
Usage Examples¶
# Start a 3-node network
fukuii-cli start 3nodes
# Wait for nodes to initialize
sleep 45
# Synchronize peer connections
fukuii-cli sync-static-nodes
# Check network status
fukuii-cli status
# View logs
fukuii-cli logs 3nodes
# Collect logs for debugging
fukuii-cli collect-logs 3nodes
# Stop the network
fukuii-cli stop 3nodes
Note: The fukuii-cli tool is the primary interface for all deployment and configuration operations. Install it system-wide for easy access from anywhere.