perf(proof): reduce size of ProofVerificationError#135
Open
0xMars42 wants to merge 1 commit into
Open
Conversation
6de5197 to
e6cbd87
Compare
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #89
Box the
RootMismatchandValueMismatchvariants to shrinkProofVerificationErrorfrom 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_erras a warning instead ofallow; the new size passes with a wide margin.Breaking change:
RootMismatchandValueMismatchbecome single-field tuple variants wrapping the boxedRootMismatchError/ValueMismatchErrorstructs, so downstream code matching on the old struct fields needs updating.