Skip to main content

Network Commands (modal net / modal network)

Query configured Modality networks and inspect full-wrapper network runtime data. These commands are available in the full Rust wrapper, not in the lean first-contract onboarding wrapper.

Network Info

modal net info [NETWORK]

Display configured bootstrapper and DNS information for a named network. NETWORK is positional and defaults to mainnet.

Arguments:

ArgumentDescription
NETWORKNetwork name, such as mainnet, testnet, or a configured devnet

Example output:

Modality Network Information

Network Name: mainnet
Description: ...
Bootstrappers: 2

Bootstrapper Addresses:
/ip4/boot1.modality.network/tcp/9000/p2p/12D3Koo...
/ip4/boot2.modality.network/tcp/9000/p2p/12D3Koo...

DNS Record:
_dnsaddr.mainnet.modality.network

Network Storage

modal net storage --config <CONFIG> [OPTIONS]

Inspect the datastore named by a node config.json and show canonical miner block statistics.

Options:

OptionDescription
--config <CONFIG>Path to the node configuration file
--detailedShow a detailed block list
--epoch <EPOCH>Filter blocks by epoch
--limit <LIMIT>Maximum detailed blocks to show; defaults to 10

Mining Commands

Sync Mining Data

modal net mining sync --config <CONFIG> --target <MULTIADDR> [OPTIONS]

Sync miner blocks from a specified node.

Options:

OptionDescription
--config <CONFIG>Path to the local node configuration file
--target <MULTIADDR>Source node multiaddress
--mode <MODE>Sync mode: all, epoch, or range; defaults to all
--epoch <EPOCH>Epoch number, required when --mode epoch
--from-index <INDEX>Start block index, required when --mode range
--to-index <INDEX>End block index, required when --mode range
--format <FORMAT>Output format: summary or json; defaults to summary
--persistPersist synced blocks to the local datastore

Local Development

List Local Nodes

modal local nodes [OPTIONS]

Find all running modal node processes.

On macOS, discovery uses process cwd and --dir on the command line, then node.pid files. Prefer modal node stop --dir <node> (or the PID in node.pid) when you already know the node directory. killall is a convenience around the same discovery.

Options:

OptionDescription
--verbose / -vShow verbose output with full paths
--network <FILTER>Filter by network config path; supports trailing * wildcards
--devnetShorthand for --network devnet*
--dir <DIR>Only show nodes in this directory or its subdirectories

Kill All Nodes

modal local killall-nodes [OPTIONS]
modal killall # shortcut

Kill all running modal node processes.

Options:

OptionDescription
--force / -fUse SIGKILL instead of graceful shutdown
--dry-runShow what would be killed without killing processes
--network <FILTER>Filter by network config path; supports trailing * wildcards
--devnetShorthand for --network devnet*
--dir <DIR>Only kill nodes in this directory or its subdirectories

Chain Commands

Validate Chain

modal chain validate [OPTIONS]

Run local chain validation tests. Without --test, it runs all validation tests against an in-memory datastore unless --datastore is supplied.

Options:

OptionDescription
--test <TEST> / -t <TEST>Test to run: fork, gap, missing-parent, integrity, promotion, or duplicate-canonical; may be repeated
--datastore <PATH> / -d <PATH>Existing datastore directory; otherwise uses in-memory storage
--jsonOutput results as JSON

Heal Chain

modal chain heal --datastore <PATH> [OPTIONS]

Detect duplicate canonical blocks in a datastore and optionally mark duplicates as orphaned.

Options:

OptionDescription
--datastore <PATH> / -d <PATH>Datastore directory to inspect or heal
--dry-runShow what would be done

Quick Run Commands

Shortcuts for running different node types:

# Run a miner
modal run miner --dir ./my-node

# Run a hybrid miner+sequencer
modal run hybrid --dir ./my-node

# Run a validator
modal run validator --dir ./my-node

# Run an observer
modal run observer --dir ./my-node

These are equivalent to modal node run-miner, modal node run-validator, etc.