Documentation

Kanari Documentation

Multi-node Devnet

Run a current 4-validator devnet with explicit consensus keys and transaction-driven checkpoints.

Last updated

Multi-node Devnet

Use the scripts in crates/kanari-node for local validator clusters. The recommended fast reset path is:

cd D:\kanari-sdk\crates\kanari-node

.\setup-multi-node.ps1 `
  -NodeCount 4 `
  -Network devnet `
  -RpcHost 0.0.0.0 `
  -ResetSourceData `
  -ResetReplicaData `
  -ResetConsensusKeys

For localhost-only RPC:

.\setup-multi-node.ps1 `
  -NodeCount 4 `
  -Network devnet `
  -RpcHost 127.0.0.1 `
  -ResetSourceData `
  -ResetReplicaData `
  -ResetConsensusKeys

Consensus keys

Every validator needs:

  • one unique private consensus key file;
  • one shared public-key map for the full authority set.

The setup script generates these under:

%USERPROFILE%\.kanari\consensus-keys

Set KANARI_CONSENSUS_KEY_PASSWORD before generating or starting nodes if you want encrypted local consensus key files.

Ports

The default 4-node layout is:

NodeP2PRPC
11900019001
21901019011
31902019021
41903019031

If -RpcHost 0.0.0.0 is used, connect through the LAN IP, for example:

http://192.168.1.101:19001/rpc

JSON-RPC requests are POST requests to /rpc; opening the base URL in a browser may not show a web page.

Transaction-driven checkpoints

After reset, height may stay at 0 or the last committed checkpoint until real transactions are submitted. This is expected. Empty time does not create blocks/checkpoints.

To verify the cluster, submit a small transfer and then check:

  • all nodes eventually report the same height;
  • pending transactions return to zero on synced authorities;
  • state roots match in explorer/RPC diagnostics.

Tunable node limits

The node exposes bounded, clamped runtime settings:

Environment variableDefaultClamp
KANARI_P2P_CHANNEL_CAPACITY12816..4096
KANARI_MAX_CONCURRENT_SYNC_MESSAGES641..1024
KANARI_DAG_VERTICES_PER_RESPONSE641..512
KANARI_P2P_MAX_INFLIGHT_CHUNKED_PAYLOADS161..256
KANARI_P2P_MAX_INFLIGHT_CHUNKED_PAYLOADS_PER_PEER41..64
KANARI_P2P_MAX_CONCURRENT_DECOMPRESSIONS81..128

Increase these only after measuring CPU, memory, disk IO, and network pressure.