Skip to content

Conversation

@emhane
Copy link
Collaborator

@emhane emhane commented Dec 3, 2025

This PR contains one of the bindings which is needed to use DatabaseError in a type safe way in l2 code, for example in the OP historical proofs workstream. This allows downcast to OP error enum as opposed to adding additional wrapper cursor traits to be able to propagate OP errors in a type safe way (matching on error strings out ruled).

  • Adds variant wrapping trait object error to DatabaseError
  • Removes redundant PartialEq impl for DatabaseError, this was almost exclusively used in tests
  • Updates tests to match on errors or compare the error variant data instead or relying on PartialEq

Ref op-rs#388

@emhane emhane added the C-debt A clean up/refactor of existing code label Dec 3, 2025
@emhane emhane requested a review from Rjected as a code owner December 3, 2025 14:01
@emhane emhane added the A-db Related to the database label Dec 3, 2025
@emhane emhane added A-op-reth Related to Optimism and op-reth A-sdk Related to reth's use as a library labels Dec 3, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Reth Tracker Dec 3, 2025
@emhane emhane enabled auto-merge December 3, 2025 14:26
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be quite useful, now that we rollout another db for index data

wdyt @Rjected

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

Labels

A-db Related to the database A-op-reth Related to Optimism and op-reth A-sdk Related to reth's use as a library C-debt A clean up/refactor of existing code

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants