Skip to content

bug: revert_to() should fail when no TrieLogs are available #42

@notlesh

Description

@notlesh

Currently revert_to() will try to look up the TrieLog for each block as it walks backwards. It uses this to undo state.

However, I believe it is silently returning an empty Vec when there is no TrieLog stored for the requested block. From here, it fails to replay those changes and silently moves on, leaving it in an inconsistent state.

It should instead fail hard. An additional sanity check would be to make sure the requested blocks fits within the configured max trie logs setting.

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