Skip to content

test(zebra-consensus): assert the Orchard proof failure, not a UTXO timeout - #11397

Merged
conradoplg merged 1 commit into
mainfrom
11396-garbage-proof-test
Sep 4, 2026
Merged

test(zebra-consensus): assert the Orchard proof failure, not a UTXO timeout#11397
conradoplg merged 1 commit into
mainfrom
11396-garbage-proof-test

Conversation

@upbqdn

@upbqdn upbqdn commented Sep 4, 2026

Copy link
Copy Markdown
Member

Motivation

Closes #11396.

Solution

Pass the funding UTXO from mock_transparent_transfer into the block request, and
assert the specific TransactionError::Halo2VerificationFailed variant instead of any
error.

Tests

block_with_garbage_orchard_proofs_is_rejected sent an empty known_utxos for a
transaction with a transparent input, so the mock state's unanswered UTXO lookup failed
on UTXO_LOOKUP_TIMEOUT and satisfied assert!(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

  • No AI tools were used in this PR
  • AI tools were used: Claude, to diagnose the timeout and write the fix.

PR Checklist

  • The PR title follows conventional commits format: type(scope): description
  • The PR follows the contribution guidelines.
  • This change was discussed in an issue or with the team beforehand.
  • The solution is tested.
  • The documentation and changelogs are up to date.

…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.
@upbqdn upbqdn self-assigned this Sep 4, 2026
@v12-auditor

v12-auditor Bot commented Sep 4, 2026

Copy link
Copy Markdown

Warning

No auditable source files found in this PR's diff.

@upbqdn
upbqdn marked this pull request as ready for review September 4, 2026 14:54
@v12-auditor

v12-auditor Bot commented Sep 4, 2026

Copy link
Copy Markdown

Warning

No auditable source files found in this PR's diff.

@conradoplg conradoplg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good catch!

@conradoplg
conradoplg added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit d1fd7ad Sep 4, 2026
128 of 129 checks passed
@conradoplg
conradoplg deleted the 11396-garbage-proof-test branch September 4, 2026 23:29
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.

test(zebra-consensus): the garbage-Orchard-proof test passes on a 6-minute UTXO timeout

2 participants