test: fix and augment block tests of invalid_txs #32591

pull instagibbs wants to merge 2 commits into bitcoin:master from instagibbs:2025-05-fix_invalidtx_test changing 2 files +12 −2
  1. instagibbs commented at 2:45 PM on May 22, 2025: member

    We are not actually testing some cases accidentally, for block inclusion.

    Issue discovered while reviewing https://github.com/bitcoin/bitcoin/pull/32533

  2. test: fix block tests of invalid_txs 1a689a2c88
  3. test: ensure reason is checked for invalid blocks rejection 8fcd684505
  4. DrahtBot commented at 2:45 PM on May 22, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32591.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. DrahtBot added the label Tests on May 22, 2025
  6. theStack commented at 2:49 PM on May 22, 2025: contributor

    Concept ACK, good catch!

  7. in test/functional/data/invalid_txs.py:262 in 1a689a2c88 outdated
     258 | @@ -260,7 +259,7 @@ def get_tx(self):
     259 |          'reject_reason': "disabled opcode",
     260 |          'expect_disconnect': True,
     261 |          'get_tx': get_tx,
     262 | -        'valid_in_block' : True
     263 | +        'valid_in_block' : False
    


    theStack commented at 2:43 PM on May 23, 2025:

    nit: alternatively, could just remove the line since False is the default anyways, but no blocker

  8. theStack approved
  9. theStack commented at 2:45 PM on May 23, 2025: contributor

    ACK 8fcd6845052354fad80ae7e5feda3f6a2e441e12

    Diff of feature_block.py test runs between merge-base and PR (patched out the timestamps from the logging formatter in order to compare):

    > TestFramework (INFO): Reject block with invalid tx: InvalidOPIFConstruction
    14a16,30
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_CAT
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_SUBSTR
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_LEFT
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_RIGHT
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_INVERT
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_AND
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_OR
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_XOR
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_2MUL
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_2DIV
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_MUL
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_DIV
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_MOD
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_LSHIFT
    > TestFramework (INFO): Reject block with invalid tx: DisabledOpcode_OP_RSHIFT
    
  10. maflcko commented at 8:00 AM on May 26, 2025: member

    review ACK 8fcd6845052354fad80ae7e5feda3f6a2e441e12 🔶

    <details><summary>Show signature</summary>

    Signature:

    untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
    RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
    trusted comment: review ACK 8fcd6845052354fad80ae7e5feda3f6a2e441e12 🔶
    e066qpLseQp5Fo5KxGJdcA7vJSlbVMRlI7Q1n8fYQkubEeOeazm3ds2n8dgztwr9hLYBFQQor2zSept36SnWAw==
    

    </details>

  11. BrandonOdiwuor commented at 11:19 AM on May 26, 2025: contributor

    Code Review ACK 8fcd6845052354fad80ae7e5feda3f6a2e441e12

  12. sedited approved
  13. sedited commented at 10:56 AM on May 27, 2025: contributor

    ACK 8fcd6845052354fad80ae7e5feda3f6a2e441e12

  14. fanquake merged this on May 27, 2025
  15. fanquake closed this on May 27, 2025

  16. sedited referenced this in commit cb3cd9b8b9 on May 29, 2025
  17. yuvicc referenced this in commit 069643f094 on Jul 6, 2025
  18. yuvicc referenced this in commit 22f55cf11d on Aug 26, 2025
  19. bug-castercv502 referenced this in commit 2858098810 on Sep 28, 2025
  20. Fabcien referenced this in commit 18a0ba609a on Nov 14, 2025
  21. Fabcien referenced this in commit 95386e73f1 on Nov 14, 2025
  22. roqqit referenced this in commit 6cef39b732 on Jun 4, 2026
  23. roqqit referenced this in commit e2c09cac86 on Jun 4, 2026
  24. Kino1994 referenced this in commit e0da10297c on Jun 28, 2026
  25. BigcoinBGC referenced this in commit 0c73382f9c on Jun 30, 2026
  26. bitcoin locked this on Jul 30, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-06 18:52 UTC

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