diff --git a/server/v2/store/commands.go b/server/v2/store/commands.go index 3ebe6e6ecba6..ce74c795973f 100644 --- a/server/v2/store/commands.go +++ b/server/v2/store/commands.go @@ -1,7 +1,12 @@ package store import ( + "encoding/hex" + "encoding/json" "fmt" + "sort" + "strconv" + "strings" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -9,6 +14,7 @@ import ( "cosmossdk.io/log" serverv2 "cosmossdk.io/server/v2" storev2 "cosmossdk.io/store/v2" + "cosmossdk.io/store/v2/proof" "cosmossdk.io/store/v2/root" ) @@ -74,6 +80,90 @@ Supported app-db-backend types include 'goleveldb', 'pebbledb'.`, return cmd } +// ModuleHashByHeightQuery retrieves the module hashes at a given height. +func (s *Server[T]) ModuleHashByHeightQuery() *cobra.Command { + cmd := &cobra.Command{ + Use: "module-hash-by-height ", + Short: "Get module hashes at a given height", + Long: "Get module hashes at a given height. This command is useful for debugging and verifying the state of the application at a given height. Daemon should not be running when calling this command.", + Example: "