test(zebra-consensus): assert the Orchard proof failure, not a UTXO timeout - #11397
Merged
Conversation
…imeout `block_with_garbage_orchard_proofs_is_rejected` discarded the UTXO map from `mock_transparent_transfer` and sent an empty `known_utxos` for a transaction with a transparent input. The mock state never answers the lookup, so the request failed on `UTXO_LOOKUP_TIMEOUT` six minutes later and `assert!(resp.is_err())` was satisfied by that timeout: the test never reached proof verification, and would have passed with Orchard proof checking removed. It was also the slowest test in the CI profile, at 360s of the run's 623s. Pass the funding UTXO through and assert `Halo2VerificationFailed`, so the rejection under test is the one the CVE-2026-34377 advisory is about. The test now finishes in 0.7s.
|
Warning No auditable source files found in this PR's diff. |
|
Warning No auditable source files found in this PR's diff. |
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.
Motivation
Closes #11396.
Solution
Pass the funding UTXO from
mock_transparent_transferinto the block request, andassert the specific
TransactionError::Halo2VerificationFailedvariant instead of anyerror.
Tests
block_with_garbage_orchard_proofs_is_rejectedsent an emptyknown_utxosfor atransaction with a transparent input, so the mock state's unanswered UTXO lookup failed
on
UTXO_LOOKUP_TIMEOUTand satisfiedassert!(resp.is_err())six minutes later,without ever verifying a proof: the test passed whether or not Orchard proofs were
checked, which is the property CVE-2026-34377 is about. It now reaches proof
verification and pins the error variant, so removing or weakening Halo2 verification
fails it. It also drops from 360s to 0.7s — it was the slowest test in the CI profile.
AI Disclosure
PR Checklist
type(scope): description