Skip to content

backup and restore state subcommands do not support bonsai #9811

@macfarla

Description

@macfarla

Description

Running besu operator x-backup-state or besu operator x-restore-state throws a ClassCastException because these subcommands are hardcoded to use Forest world state (ForestWorldStateArchive / ForestWorldStateKeyValueStorage), but the default storage format is now
Bonsai.

Steps to Reproduce

  1. Run a Besu node with default configuration (Bonsai storage format)
  2. Execute: besu operator x-backup-state --backup-path=/tmp/backup

Expected Behavior

The backup completes successfully, writing chain data and account state to the specified path.

Actual Behavior

A ClassCastException is thrown:

java.lang.ClassCastException: class org.hyperledger.besu.ethereum.trie.pathbased.bonsai.BonsaiWorldStateProvider
cannot be cast to class org.hyperledger.besu.ethereum.trie.forest.ForestWorldStateArchive

The same issue occurs with x-restore-state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions