Skip to content

Slasher: Add Redb schema upgrade support #8048

@owanikin

Description

@owanikin

Motivation

The Slasher database currently lacks schema upgrade logic for the Redb backend. This can cause mismatches when upgrading Lighthouse versions, as schema changes aren’t automatically migrated. We already have upgrade handling for the Beacon Node database, and Slasher should mirror this behavior for consistency and safety.

Description

We need to:

  • Add upgrade and is_redb methods to slasher/database/interface.rs.
  • Implement upgrade in the Redb backend (redb_impl.rs).
  • Increment the CURRENT_SCHEMA_VERSION.
  • Extend slasher/src/migrate.rs so that if Redb is one version behind, it performs an upgrade.
  • Ensure downgrade scenarios (where DB schema > software schema) fail cleanly with an error.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions