ANR Commands
Commands for the Avalanche Network Runner.
Global Flags
--dial-timeout duration
server dial timeout (default 10s)--endpoint string
server endpoint (default "localhost:8080")--log-dir string
log directory--log-level string
log level (default "INFO")--request-timeout duration
client request timeout (default 3m0s)
Ping
Pings the server.
Example
Server
Starts a network runner server.
Flags
--dial-timeout duration
server dial timeout (default 10s)--disable-grpc-gateway
true to disable grpc-gateway server (overrides--grpc-gateway-port
)--disable-nodes-output
true to disable nodes stdout/stderr--grpc-gateway-port string
grpc-gateway server port (default ":8081")--log-dir string
log directory--log-level string
log level for server logs (default "INFO")--port string
server port (default ":8080")--snapshots-dir string
directory for snapshots
Example
Control
Network runner control commands.
add-node
Adds a new node to the network.
Flags
--avalanchego-path string
AvalancheGo binary path--chain-configs string
[optional] JSON string of map from chain id to its config file contents--node-config string
node config as string--plugin-dir string
[optional] plugin directory--subnet-configs string
[optional] JSON string of map from Avalanche L1 id (SubnetID) to its config file contents--upgrade-configs string
[optional] JSON string of map from chain id to its upgrade file contents
Example
add-subnet-validators
Adds Avalanche L1 validators.
Example
attach-peer
Attaches a peer to the node.
Example
create-blockchains
Creates blockchains.
Example
create-subnets
Creates Avalanche L1s.
Example
get-snapshot-names
Lists available snapshots.
Example
health
Waits until local cluster is ready.
Example
list-blockchains
Lists all blockchain ids of the network.
Example
list-rpcs
Lists RPCs for all blockchains in the network.
Flags
Example
list-subnets
Lists all Avalanche L1 IDs (SubnetID) of the network.
Example
load-snapshot
Loads a network snapshot.
Flags
--avalanchego-path string
AvalancheGo binary path--chain-configs string
[optional] JSON string of map from chain id to its config file contents--global-node-config string
[optional] global node config as JSON string, applied to all nodes--plugin-dir string
plugin directory--reassign-ports-if-used
true to reassign snapshot ports if already taken--root-data-dir string
root data directory to store logs and configurations--subnet-configs string
[optional] JSON string of map from Avalanche L1 id to its config file contents--upgrade-configs string
[optional] JSON string of map from chain id to its upgrade file contents
Example
pause-node
Pauses a node.
Example
remove-node
Removes a node.
Example
remove-snapshot
Removes a network snapshot.
Example
remove-subnet-validator
Removes an Avalanche L1 validator.
Example
restart-node
Restarts a node.
Flags
--avalanchego-path string
AvalancheGo binary path--chain-configs string
[optional] JSON string of map from chain id to its config file contents--plugin-dir string
[optional] plugin directory--subnet-configs string
[optional] JSON string of map from Avalanche L1 id (SubnetID) to its config file contents--upgrade-configs string
[optional] JSON string of map from chain id to its upgrade file contents--whitelisted-subnets string
[optional] whitelisted Avalanche L1s (comma-separated)
Example
resume-node
Resumes a node.
Example
rpc_version
Gets RPC server version.
Example
save-snapshot
Saves a network snapshot.
Example
send-outbound-message
Sends an outbound message to an attached peer.
Flags
--message-bytes-b64 string
Message bytes in base64 encoding--message-op uint32
Message operation type--peer-id string
peer ID to send a message to
Example
start
Starts a network.
Flags
--avalanchego-path string
AvalancheGo binary path--blockchain-specs string
[optional] JSON string of array of [(VM name, genesis file path)]--chain-configs string
[optional] JSON string of map from chain id to its config file contents--custom-node-configs global-node-config
[optional] custom node configs as JSON string of map, for each node individually. Common entries override global-node-config, but can be combined. Invalidatesnumber-of-nodes
(provide all node configs if used).--dynamic-ports
true to assign dynamic ports--global-node-config string
[optional] global node config as JSON string, applied to all nodes--number-of-nodes uint32
number of nodes of the network (default 5)--plugin-dir string
[optional] plugin directory--reassign-ports-if-used
true to reassign default/given ports if already taken--root-data-dir string
[optional] root data directory to store logs and configurations--subnet-configs string
[optional] JSON string of map from Avalanche L1 id (SubnetID) to its config file contents--upgrade-configs string
[optional] JSON string of map from chain id to its upgrade file contents--whitelisted-subnets string
[optional] whitelisted Avalanche L1s (comma-separated)
Example
status
Gets network status.
Example
stop
Stops the network.
Example
stream-status
Gets a stream of network status.
Flags
--push-interval duration
interval that server pushes status updates to the client (default 5s)
Example
uris
Lists network URIs.
Example
vmid
Returns the VM ID associated to the given VM name.
Example
wait-for-healthy
Waits until local cluster and custom VMs are ready.
Example
Is this guide helpful?