Skip to main content

kwil-admin setup testnet

kwil-admin setup testnet

The testnet command is used to create multiple node configurations, all with the same genesis config, and pre-configured to connect to each other.

Synopsis

The testnet command is used to create multiple node configurations, all with the same genesis config, and pre-configured to connect to each other. It will generate a directory for each node, with the necessary files to run each node.

The config files for each of the nodes will specify all of the other nodes as persistent peers so that they will connect to each other on startup. This is generally only practical for small test networks with fewer than 12 nodes.

The testnet command creates "v + n" node root directories and populates each with necessary files to start the new network. The genesis file includes list of v validators under the validators section.

NOTE: strict routability for addresses is turned off in the config file so that the test network of nodes can run on a LAN.

kwil-admin setup testnet [flags]

Examples

# Generate a network with 4 validators and 4 non-validators with the IPs
# 192.168.10.{2,...,9}
kwil-admin setup testnet --validators 4 --non-validators 4 --output-dir ~/.kwild-testnet

# Same as above but only 2 additional (non-validator) nodes
kwil-admin setup testnet -v 4 -n 2 --o ./output --starting-ip 192.168.10.2

# Manually specify hostnames for the nodes
kwil-admin setup testnet -v 4 -o ./output --hostnames 192.168.10.2 192.168.10.3 ...

Options

      ----max-snaps uint          maximum number of snapshots to store in the device (default 3)
----snap-heights uint recurring heights(multipes of --snap-heights) to take snapshots at (default 10000)
----snaps enables db snapshots
--alloc allocFlag account=amount pairs of genesis account allocations (default map[])
-i, --block-interval duration shortest block interval in seconds (default 6s)
--chain-id string chain ID to use for the genesis file
--config string path to a config file to use as a template for all nodes
--gas enable gas
-h, --help help for testnet
--hostname-prefix string prefix for hostnames of nodes
--hostname-suffix string suffix for hostnames of nodes
--hostnames strings override all hostnames of the nodes (list of hostnames must be the same length as the number of nodes)
--join-expiry int number of blocks before a join request expires (default 14400)
--node-dir-prefix string prefix for the node directories (node results in node0, node1, ...) (default "node")
-n, --non-validators int number of non-validators to generate
-o, --output-dir string parent directory for all of generated node folders (default "./.testnet")
-p, --p2p-port int p2p port for nodes (default 26656)
--starting-ip string starting IP address for nodes (default "172.10.100.2")
-v, --validators int number of validators to generate (default 3)
--without-nonces disable account nonces

Options inherited from parent commands

      --output string   the format for command output - either 'text' or 'json' (default "text")
-S, --silence Silence logs

SEE ALSO

  • kwil-admin setup - The setup command provides functions for creating and managing node configuration and data.