BIP374: replace assert with return False in dleq_verify_proof #1962

pull vibegentt wants to merge 1 commits into bitcoin:master from vibegentt:master changing 1 files +2 −1
  1. vibegentt commented at 8:48 am on September 9, 2025: none

    Replace assert with return False for proof length validation to ensure the function behaves consistently and doesn’t crash when Python runs with optimization flags (-O).

    This makes the validation consistent with other checks in the same function and improves robustness of the reference implementation. Tests: All existing unit tests pass

  2. fix: replace assert with return False in dleq_verify_proof 1e7bca73a3
  3. jonatack renamed this:
    fix: replace assert with return False in dleq_verify_proof
    BIP374: replace assert with return False in dleq_verify_proof
    on Sep 10, 2025
  4. jonatack added the label Proposed BIP modification on Sep 10, 2025
  5. jonatack added the label Pending acceptance on Sep 10, 2025
  6. in bip-0374/reference.py:85 in 1e7bca73a3
    81@@ -82,7 +82,8 @@ def dleq_verify_proof(
    82 ) -> bool:
    83     if A.infinity or B.infinity or C.infinity or G.infinity:
    84         return False
    85-    assert len(proof) == 64
    


    jonatack commented at 0:00 am on September 11, 2025:
    There are other places in this file with an assertion on the length; what is unique about this one?
  7. murchandamus commented at 0:14 am on February 28, 2026: member
    Closing for lack of activity. If you are still working on this, please respond to review and request to reopen this PR.
  8. murchandamus closed this on Feb 28, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-03-03 02:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me