Skip to content

Panic when restarting node #1672

@alienc0der

Description

@alienc0der

Describe the bug

The node cannot restart due to this error: "panic: Value missing for key [...] corresponding to nodeKey ..." when the pruning settings are either pruning = default or pruning = everything. If you set pruning = nothing, the node succesfully restarts without any errors. Tested with both goleveldb and rocksdb db backends.

This is greatly impacting the operation of full nodes as they require massive resources (in particular disk space).

Version
Build based on this commit

To Reproduce
Steps to reproduce the behavior:

  1. Stop node and wait for graceful termination
  2. Start node
  3. Check the logs/console for this error: panic: Value missing for key ...

Expected behavior
The node should restart without errors.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04, macOS 15

Additional context
I see that the developers removed the pruning for IAVL in this pull request from 2020. However, they provided a fix in this pull request that is present in their most recent release v1.3.0.

I also see that you have an indirect dependency to iavl v1.2.0.

Stacktrace:

...
INF Application gracefully shutdown module=server
panic: Value missing for key [...] corresponding to nodeKey ...

goroutine 1 [running]:
cosmossdk.io/store/iavl.(*Store).Get(0x?, {0x?, 0x?, 0x1?})
	cosmossdk.io/store/iavl/store.go:195 +0x
...

@yihuang @mmsqe feel free to ask any questions regarding this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions