Skip to content

KVStore queries return empty when starting from genesis.json with non-zero initial_height #7975

Closed
@michaelfig

Description

Summary of Bug

When the genesis.json has a non-zero initial_height, the module KVStores appear to be empty

Version

v0.40.0-rc3

Steps to Reproduce

  1. initialize a single-node chain
  2. start the chain node
  3. appd query auth params - note that output looks normal
  4. appd export >& exported.json
  5. appd unsafe-reset-all
  6. cp exported.json ~/.appd/config/genesis.json
  7. start the chain node, note that it has a nonzero initial height
  8. appd query auth params fails with:
Error: RPC error -32603 - Internal error: UnmarshalJSON cannot decode empty bytes

Verifying with other modules (such as my custom x/swingset module), they all have empty KVStores when starting from nonzero height, despite their InitGenesis functions running correctly.

Note that if we replace copy of exported.json (step 6) to instead be jq '. + { initial_height: "0" }' exported.json > ~/.appd/config/genesis.json then it all works (but of course, starts the chain with zero height which I don't want).


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions