comet
CometBFT subcommands for managing consensus engine operations, validator information, and node state. These commands provide essential tools for node operators to interact with the underlying CometBFT consensus layer.
Overview
The comet
command group provides access to CometBFT-specific functionality including state management, validator information retrieval, and node diagnostics.
babylond comet [command] [flags]
Aliases: comet
, cometbft
, tendermint
Quick Reference
Command | Description | Use Case |
---|---|---|
bootstrap-state | Bootstrap CometBFT state at arbitrary block height | State sync, fast sync |
reset-state | Remove all data and WAL | Clean restart |
show-address | Show validator consensus address | Validator setup |
show-node-id | Show node's unique ID | Network configuration |
show-validator | Show validator information | Validator diagnostics |
unsafe-reset-all | Reset everything to genesis state | Emergency reset |
version | Show CometBFT version | Version checking |
Global Flags
Flag | Type | Default | Description |
---|---|---|---|
--home | string | ~/.babylond | Directory for config and data |
--log_format | string | plain | The logging format (json |plain ) |
--log_level | string | info | The logging level (trace |debug |info |warn |error |fatal |panic |disabled or '*:<level>,<key>:<level>' ) |
--log_no_color | Disable colored logs | ||
--trace | Print out full stack trace on errors |
bootstrap-state
Bootstrap CometBFT state at an arbitrary block height using a light client. This is useful for state sync operations and fast synchronization with the network.
Usage
babylond comet bootstrap-state [flags]
Flags
Flag | Type | Description |
---|---|---|
--height | int | Block height to bootstrap state at, if not provided it uses the latest block height in app state |
Examples
babylond comet bootstrap-state
babylond comet bootstrap-state --height 1000000
reset-state
Remove all the data and WAL (Write-Ahead Log). This command cleans the node's state while preserving configuration files.
Usage
babylond comet reset-state [flags]
Aliases: reset-state
, reset_state
Examples
babylond comet reset-state
babylond comet reset-state --home /custom/babylon/home
This command permanently removes blockchain data and WAL files. Only configuration files are preserved.
show-address
Shows this node's CometBFT validator consensus address. Essential for validator setup and network configuration.
Usage
babylond comet show-address [flags]
Examples
babylond comet show-address
Sample Output:
babylonvalcons1abc123def456...
show-node-id
Show this node's unique identifier. Used for peer-to-peer network connections and node discovery.
Usage
babylond comet show-node-id [flags]
Examples
babylond comet show-node-id
NODE_ID=$(babylond comet show-node-id)
echo "Persistent peers: ${NODE_ID}@192.168.1.100:26656"
Sample Output:
a1b2c3d4e5f6789012345678901234567890abcd
show-validator
Show this node's CometBFT validator info including the public key and other validator-specific data.
Usage
babylond comet show-validator [flags]
Examples
babylond comet show-validator
Sample Output:
{
"type": "tendermint/PubKeyEd25519",
"value": "abc123def456..."
}
unsafe-reset-all
(UNSAFE) Remove all the data and WAL, reset this node's validator to genesis state. This is the most destructive reset option.
Usage
babylond comet unsafe-reset-all [flags]
Aliases: unsafe-reset-all
, unsafe_reset_all
Flags
Flag | Type | Description |
---|---|---|
--keep-addr-book | Keep the address book intact |
Examples
babylond comet unsafe-reset-all
babylond comet unsafe-reset-all --keep-addr-book
This command removes ALL data including validator state and resets to genesis. Use with extreme caution. This can result in double-signing if used on an active validator.
version
Print CometBFT libraries' version numbers against which this app has been compiled.
Usage
babylond comet version [flags]
Examples
babylond comet version
Sample Output:
0.38.0
Common Workflows
New Validator Setup
# Get node ID for peer connections
NODE_ID=$(babylond comet show-node-id)
echo "Node ID: $NODE_ID"
# Get consensus address for delegation
CONS_ADDR=$(babylond comet show-address)
echo "Consensus Address: $CONS_ADDR"
# Get validator public key
babylond comet show-validator
Node Troubleshooting
# Check CometBFT version
babylond comet version
# Check node connectivity info
babylond comet show-node-id
# Verify validator setup
babylond comet show-validator
State Management
# Stop the node first
# systemctl stop babylond
# Reset state (preserves config)
babylond comet reset-state
# Or complete reset (if needed)
babylond comet unsafe-reset-all --keep-addr-book
# Restart node
# systemctl start babylond
Fast Sync Setup
# Configure state sync in config.toml first
# Then bootstrap from specific height
babylond comet bootstrap-state --height 1000000
# Start the node
babylond start
Best Practices
- Always stop the node before running reset commands
- Use
reset-state
for routine cleanup, reserveunsafe-reset-all
for emergencies - Keep backups of your validator key and node configuration
- Never run
unsafe-reset-all
on an active validator without proper coordination - Always use
--keep-addr-book
to preserve peer connections when possible - Monitor for double-signing after any reset operation
- Use
bootstrap-state
for faster initial sync instead of syncing from genesis - Verify the target height is available from your peers before bootstrapping
Troubleshooting
Common Issues
Node won't start after reset
# Check if genesis file is valid
babylond validate-genesis
# Verify node configuration
babylond config
State sync fails
# Check peer connectivity
babylond comet show-node-id
# Verify state sync configuration in config.toml
cat ~/.babylond/config/config.toml | grep -A 10 "\[statesync\]"
Validator not signing
# Check validator info
babylond comet show-validator
# Verify consensus address matches
babylond comet show-address