test: p2p block malleability #33172

pull musaHaruna wants to merge 1 commits into bitcoin:master from musaHaruna:test-p2p-block-malleability changing 1 files +30 −1
  1. musaHaruna commented at 3:45 pm on August 11, 2025: none

    This PR adds a functional test to repeat the existing malleability check for oversized coinbase witness nonce size using a block that is small enough to be relayed over the P2P network.

    This addresses the TODO in test_block_malleability by ensuring behavior is consistent between submitblock RPC and P2P relay.

  2. DrahtBot added the label Tests on Aug 11, 2025
  3. DrahtBot commented at 3:45 pm on August 11, 2025: contributor

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

    Code Coverage & Benchmarks

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK bc1cindy

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

  4. test: repeat block malleability test with relayable block over P2P
    Adds a functional test that repeats the existing witness nonce size
    malleability check using a block under MAX_BLOCK_WEIGHT so it can be
    relayed over the P2P network, addressing the TODO in test_block_malleability.
    
    Includes rejection check for 'bad-witness-nonce-size' and confirmation
    that a corrected block is accepted.
    19c5dba8ca
  5. musaHaruna force-pushed on Aug 11, 2025
  6. bc1cindy commented at 0:17 am on August 12, 2025: none

    ACK 19c5dba

    Tested on macOS, completed successfully in ~64 seconds.

    The implementation properly addresses the TODO comment by adding P2P test coverage for block malleability. Uses 100KB witness data - large enough to trigger bad-witness-nonce-size but small enough to stay under MAX_BLOCK_WEIGHT. Follows existing patterns and tests both rejection and acceptance paths consistently.

    Good addition to test coverage.


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: 2025-08-12 09:13 UTC

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