Skip to main content

babylond rollback

Perform a state rollback to recover from an incorrect application state transition.

Overview

The babylond rollback command is used to recover from situations where CometBFT has persisted an incorrect application hash and is unable to make progress. This command rolls back the application state from height n to height n - 1.

Important Notes
  • No blocks are removed during the rollback process
  • Upon restarting CometBFT, the transactions in block n will be re-executed against the application
  • Use this command with caution as it affects the blockchain state

When to Use

State rollback should be performed when:

  • An incorrect application state transition has occurred
  • CometBFT has persisted an incorrect app hash
  • The node is unable to make progress due to state inconsistencies

Usage

babylond rollback [flags]

Flags

Command-Specific Flags

FlagDescription
--hardRemove the last block as well as the state
-h, --helpShow help information for the rollback command
--home <string>Specify the application home directory
Default: /Users/dariaagadzhanova/.babylond

Global Flags

FlagTypeDescriptionDefault
--log_formatstringSet the logging format (json | plain)plain
--log_levelstringSet the logging level
Options: trace | debug | info | warn | error | fatal | panic | disabled
Or use pattern: *:<level>,<key>:<level>
info
--log_no_colorbooleanDisable colored logsfalse
--tracebooleanPrint out full stack trace on errorsfalse

Examples

Basic Rollback

babylond rollback

Hard Rollback (Remove Last Block)

babylond rollback --hard

Rollback with Custom Home Directory

babylond rollback --home /path/to/custom/home

Rollback with Debug Logging

babylond rollback --log_level debug