Skip to content

perf(proof): reduce size of ProofVerificationError#135

Open
0xMars42 wants to merge 1 commit into
alloy-rs:mainfrom
0xMars42:perf-reduce-proof-error-size
Open

perf(proof): reduce size of ProofVerificationError#135
0xMars42 wants to merge 1 commit into
alloy-rs:mainfrom
0xMars42:perf-reduce-proof-error-size

Conversation

@0xMars42

@0xMars42 0xMars42 commented Feb 26, 2026

Copy link
Copy Markdown

Closes #89

Box the RootMismatch and ValueMismatch variants to shrink ProofVerificationError from 112 to 24 bytes (Result<(), ProofVerificationError> follows suit). The error was 144 bytes when #89 was filed; the nybbles 0.4 upgrade had already brought it down to 112 since, this PR takes care of the rest. #[error(transparent)] keeps the Display output identical.

Re-enables clippy result_large_err as a warning instead of allow; the new size passes with a wide margin.

Breaking change: RootMismatch and ValueMismatch become single-field tuple variants wrapping the boxed RootMismatchError / ValueMismatchError structs, so downstream code matching on the old struct fields needs updating.

@0xMars42 0xMars42 force-pushed the perf-reduce-proof-error-size branch from 6de5197 to e6cbd87 Compare June 11, 2026 21:42
@0xMars42

Copy link
Copy Markdown
Author

Rebased on current main and re-measured: nybbles 0.4 had already shrunk the error from 144 to 112 bytes since #89 was filed, so the description now states the actual 112 -> 24 reduction, and the breaking variant change is called out explicitly. @mattsse this implements the boxing you suggested in #89; CI never ran here (first-time contributor), could you approve the workflows when you get a chance?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce size of ProofVerificationError

1 participant