Intermittent failure in p2p_segwit.py "AssertionError: No exception raised" #20249

issue hebasto opened this issue on October 26, 2020
  1. hebasto commented at 8:45 PM on October 26, 2020: member

    https://travis-ci.org/github/bitcoin/bitcoin/jobs/738951476#L3128:

    2020-10-26T12:45:49.099000Z TestFramework (ERROR): Assertion failed
    Traceback (most recent call last):
      File "/home/travis/build/bitcoin/bitcoin/ci/scratch/build/bitcoin-s390x-linux-gnu/test/functional/test_framework/test_framework.py", line 125, in main
        self.run_test()
      File "/home/travis/build/bitcoin/bitcoin/ci/scratch/build/bitcoin-s390x-linux-gnu/test/functional/p2p_segwit.py", line 308, in run_test
        self.test_superfluous_witness()
      File "/home/travis/build/bitcoin/bitcoin/ci/scratch/build/bitcoin-s390x-linux-gnu/test/functional/p2p_segwit.py", line 319, in func_wrapper
        func(self, *args, **kwargs)
      File "/home/travis/build/bitcoin/bitcoin/ci/scratch/build/bitcoin-s390x-linux-gnu/test/functional/p2p_segwit.py", line 2107, in test_superfluous_witness
        assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decoderawtransaction, serialize_with_bogus_witness(tx).hex())
      File "/home/travis/build/bitcoin/bitcoin/ci/scratch/build/bitcoin-s390x-linux-gnu/test/functional/test_framework/util.py", line 123, in assert_raises_rpc_error
        assert try_rpc(code, message, fun, *args, **kwds), "No exception raised"
    AssertionError: No exception raised
    
  2. hebasto added the label Bug on Oct 26, 2020
  3. MarcoFalke commented at 6:57 PM on October 27, 2020: member

    Probably a regression from #17775

  4. MarcoFalke added this to the milestone 0.21.0 on Oct 27, 2020
  5. ajtowns commented at 9:53 AM on October 28, 2020: member

    Agree it's a regression from #17775 -- there's about a 1-in-3500 chance the flag=3 bogus witness is decodable as a no-witness tx, but previously that would have had CheckTxScriptsSanity() run on it, and almost always failed. Now CheckTxScriptsSanity is run for the witness decode instead, but that fails (as intended) so it successfully decodes via the non-witness path.

    I think an example of a tx that previously failed to parse but now succeeds is 020000000003013f79606f8bbc4400ae1b370559e83236025a1abf5ff7d05e17aef32e00d7500e0100000000ffffffff0100e1f505000000001600147deebbf45206af95e6e3fa8423de14bf8db71b5200ffffffff

    Fix should be to add an additional rpc argument , true).

  6. fanquake closed this on Nov 5, 2020

  7. sidhujag referenced this in commit 316556cae8 on Nov 5, 2020
  8. MarcoFalke locked this on Feb 15, 2022

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-04-17 06:14 UTC

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