Kaizen Core (App)
The main Kaizen node written in Rust. It handles all state transitions, block production, and serves the RPC/WebSocket APIs.
Running
# Initialize config file
cargo run -- init -o config.toml
# Run the node
cargo run -- run -c config.toml
# Run with JSON logs (production)
cargo run -- run -c config.toml --json-logsCLI Options
| Option | Description |
|---|---|
--json-logs | Output logs in JSON format |
-c, --config <path> | Config file path (default: config.toml) |
Configuration
The node uses a TOML config file with the following sections:
[node]
mode = "write" # "write" (sequencer) or "read"
data_dir = "/var/lib/kaizen"
[network]
rpc_addr = "0.0.0.0:8545" # JSON-RPC + WebSocket at /ws
grpc_addr = "0.0.0.0:9000"
write_node_addr = "" # For read nodes only
[block]
interval_ms = 100 # Block production interval
max_txs_per_block = 1000
[oracle]
ring_buffer_size = 65536
max_stale_ms = 3000
[storage]
rocksdb_path = "/var/lib/kaizen/db"
snapshot_interval = 10000
[limits]
default_user_max_oi = 100000000000 # 100k USDC
default_min_bet = 1000000 # 1 USDC
default_max_bet = 10000000000 # 10k USDC
[metrics]
enabled = true
path = "/metrics"
[sentry]
enabled = false
dsn = ""
environment = "development"
traces_sample_rate = 0.1