Command-Line Reference
When starting up your own Tangle node, there are some required and optional flags that can be used.
This page outlines the most common flags used, for an exhaustive documentation of all available flags and options please refer to the official Substrate documentation here (opens in a new tab), as well as, a list of out of the box command line tools that ships with all Substrate based nodes including the Tangle node here (opens in a new tab).
After installing the tangle
binary (or pull from Docker), you can view the Tangle command line interface (CLI). For a complete list of the available flags, you can spin up your Tangle node with --help
added to the end of the command. The command will vary depending on how you choose to spin up your node, and if you're using Docker or Systemd.
docker run --platform linux/amd64 --network="host" -v "/var/lib/data" --entrypoint ./tangle-standalone \
ghcr.io/webb-tools/tangle/tangle-standalone:main \
--help
If you have compiled the tangle-parachain binary its important to note that the command-line arguments
provided first will be passed to the parachain node, while the arguments
provided after --
will be passed to the relay chain node.
tangle-parachain <parachain-args> -- <relay-chain-args>
USAGE:
tangle-parachain [OPTIONS] [-- <RELAY_CHAIN_ARGS>...]
tangle-parachain <SUBCOMMAND>
Common Flags
The below lists the most commonly used flags for your convienance.
--alice
Shortcut for --name Alice --validator
with session keys for Alice
added to keystore. Commonly
used for development or local test networks.
tangle-standalone --alice
--blocks-pruning <COUNT>
Specify the blocks pruning mode, a number of blocks to keep or 'archive'.
Default is to keep all finalized blocks. otherwise, all blocks can be kept (i.e 'archive'), or for all canonical blocks (i.e 'archive-canonical'), or for the last N blocks (i.e a number).
NOTE: only finalized blocks are subject for removal!
tangle-standalone --blocks-pruning 120
--bob
Shortcut for --name Bob --validator
with session keys for Bob
added to keystore. Commonly
used for development or local test networks.
tangle-standalone --bob
--bootnodes
Specify a list of bootnodes.
tangle-standalone --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWAWueKNxuNwMbAtss3nDTQhMg4gG3XQBnWdQdu2DuEsZS
--chain <CHAIN_SPEC>
Specify the chain specification.
It can be one of the predefined ones (dev, local, or staging) or it can be a path to a
file with the chainspec (such as one exported by the build-spec
subcommand).
tangle-standalone --chain standalone-local
--charlie
Shortcut for --name Charlie --validator
with session keys for Charlie
added to keystore. Commonly
used for development or local test networks.
tangle-standalone --charlie
--collator
Run node as collator.
Note that this is the same as running with --validator
.
tangle-standalone --collator
-d, --base-path <PATH>
Specify custom base path.
tangle-standalone --base-path /data
--db-cache <MiB>
Limit the memory the database cache can use
tangle-standalone --db-cache 128
--detailed-log-output
Enable detailed log output.
This includes displaying the log target, log level and thread name.
This is automatically enabled when something is logged with any higher level than
info
.
tangle-standalone --detailed-log-output
--dev
Specify the development chain.
This flag sets --chain=dev
, --force-authoring
, --rpc-cors=all
, --alice
, and
--tmp
flags, unless explicitly overridden.
tangle-standalone --dev
--execution <STRATEGY>
The execution strategy that should be used by all execution contexts
[possible values: native, wasm, both, native-else-wasm]
native
- only execute with the native build
wasm
- only execute with the Wasm build
both
- execute with both native and Wasm builds
nativeelsewasm
- execute with the native build if possible and if it fails, then execute with Wasm
tangle-standalone --execution wasm
--force-authoring
Enable authoring even when offline
tangle-parachain --force-authoring
--keystore-path <PATH>
Specify custom keystore path
tangle-standalone --keystore-path /tmp/chain/data/
--keystore-uri <KEYSTORE_URI>
Specify custom URIs to connect to for keystore-services
tangle-standalone --keystore-uri foo://example.com:8042/over/
--name <NAME>
The human-readable name for this node.
The node name will be reported to the telemetry server, if enabled.
tangle-standalone --name zeus
--node-key <KEY>
The secret key to use for libp2p networking.
The value is a string that is parsed according to the choice of --node-key-type
as
follows:
ed25519
: The value is parsed as a hex-encoded Ed25519 32 byte secret key, i.e. 64 hex
characters.
The value of this option takes precedence over --node-key-file
.
WARNING: Secrets provided as command-line arguments are easily exposed. Use of this
option should be limited to development and testing. To use an externally managed secret
key, use --node-key-file
instead.
tangle-standalone --node-key b6806626f5e4490c27a4ccffed4fed513539b6a455b14b32f58878cf7c5c4e68
--node-key-file <FILE>
The file from which to read the node's secret key to use for libp2p networking.
The contents of the file are parsed according to the choice of --node-key-type
as
follows:
ed25519
: The file must contain an unencoded 32 byte or hex encoded Ed25519 secret key.
If the file does not exist, it is created with a newly generated secret key of the chosen type.
tangle-standalone --node-key-file ./node-keys-file/
--port <PORT>
Specify p2p protocol TCP port
tangle-standalone --port 9944
--prometheus-external
Expose Prometheus exporter on all interfaces.
Default is local.
tangle-standalone --prometheus-external
--prometheus-port <PORT>
Specify Prometheus exporter TCP Port
tangle-standalone --prometheus-port 9090
--rpc-cors <ORIGINS>
Specify browser Origins allowed to access the HTTP & WS RPC servers.
A comma-separated list of origins (protocol://domain or special null
value). Value of
all
will disable origin validation. Default is to allow localhost and
https://polkadot.js.org (opens in a new tab) origins. When running in --dev mode the default is to allow all origins.
tangle-standalone --rpc-cors "*"
--rpc-external
Listen to all RPC interfaces.
Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC
proxy server to filter out dangerous methods. More details:
https://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs (opens in a new tab). Use
--unsafe-rpc-external
to suppress the warning if you understand the risks.
tangle-standalone --rpc-external
--rpc-port <PORT>
Specify HTTP RPC server TCP port
tangle-standalone --rpc-port 9933
--state-pruning <PRUNING_MODE>
Specify the state pruning mode, a number of blocks to keep or 'archive'.
Default is to keep only the last 256 blocks, otherwise, the state can be kept for all of the blocks (i.e 'archive'), or for all of the canonical blocks (i.e 'archive-canonical').
tangle-standalone --state-pruning 128
--telemetry-url <URL VERBOSITY>
The URL of the telemetry server to connect to.
This flag can be passed multiple times as a means to specify multiple telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting the least verbosity. Expected format is 'URL VERBOSITY'.
tangle-standalone --telemetry-url 'wss://foo/bar 0'
--validator
Enable validator mode.
The node will be started with the authority role and actively participate in any consensus task that it can (e.g. depending on availability of local keys).
tangle-standalone --validator
--wasm-execution <METHOD>
Method for executing Wasm runtime code
[default: compiled] [possible values: interpreted-i-know-what-i-do, compiled]
compiled
- this is the default and uses the Wasmtime compiled runtime
interpreted-i-know-what-i-do
- uses the wasmi interpreter
tangle-standalone --wasm-execution compiled
--ws-external
Listen to all Websocket interfaces.
Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC
proxy server to filter out dangerous methods. More details:
https://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs (opens in a new tab). Use
--unsafe-ws-external
to suppress the warning if you understand the risks.
tangle-standalone --ws-external
--ws-port <PORT>
Specify WebSockets RPC server TCP port
tangle-standalone --ws-port 9944
Subcommands
The following subcommands are available:
USAGE:
tangle-standalone <SUBCOMMAND>
Subcommand | Description |
---|---|
benchmark | Sub-commands concerned with benchmarking. The pallet benchmarking moved to the pallet sub-command |
build-spec | Build a chain specification |
check-block | Validate blocks |
export-blocks | Export blocks |
export-genesis-state | Export the genesis state of the standalone node |
export-genesis-wasm | Export the genesis wasm of the standalone node |
export-state | Export the state of a given block into a chain spec |
help | Print this message or the help of the given subcommand(s) |
import-blocks | Import blocks |
key | Key management cli utilities |
purge-chain | Remove the whole chain |
revert | Revert the chain to a previous state |
try-runtime | Try some testing command against a specified runtime state |