Skip to main content

module-hash-by-height

Get module hashes at a given height. This debugging command is essential for verifying application state consistency, diagnosing state-related issues, and performing forensic analysis of blockchain state at specific block heights.

Overview

The module-hash-by-height command retrieves cryptographic hashes of each application module's state at a specified block height. This information is crucial for debugging state inconsistencies, verifying state transitions, and performing detailed analysis of blockchain state evolution.

babylond module-hash-by-height [height] [flags]

Prerequisites

Before using this command, ensure you have:

  • Node stopped - The daemon must NOT be running when executing this command
  • Database access - Read access to the node's state database
  • Height availability - The target height must exist and not be pruned
  • Sufficient resources - Adequate memory and CPU for state analysis
Critical Requirement

The babylond daemon MUST be stopped before running this command. Running it while the daemon is active can cause database corruption or inconsistent results.

Arguments

ArgumentDescription
heightBlock height to query module hashes from

Flags

Query Configuration

FlagTypeDefaultDescription
--heightintAlternative way to specify height (overrides positional argument)
-o, --outputstringtextOutput format (text|json)

Network Connection

FlagTypeDefaultDescription
--grpc-addrstringThe gRPC endpoint to use for this chain
--grpc-insecureAllow gRPC over insecure channels
--nodestringtcp://localhost:26657CometBFT RPC interface host:port

Global Flags

FlagTypeDefaultDescription
--homestring~/.babylondDirectory for config and data
--log_formatstringplainThe logging format (json|plain)
--log_levelstringinfoThe logging level
--log_no_colorDisable colored logs
--tracePrint full stack trace on errors