Add test for superfluous witness record in deserialization #15893
pull instagibbs wants to merge 2 commits into bitcoin:master from instagibbs:test_super_witness changing 3 files +34 −15-
instagibbs commented at 6:22 pm on April 25, 2019: memberAdds coverage for changed behavior in https://github.com/bitcoin/bitcoin/pull/14039
-
instagibbs force-pushed on Apr 25, 2019
-
instagibbs renamed this:
Add test for superfulous witness record in deserialization
Add test for superfluous witness record in deserialization
on Apr 25, 2019 -
MarcoFalke commented at 7:13 pm on April 25, 2019: member
Tests are failing with
0AssertionError: [node 0] Expected message "bad-txns-vin-empty" does not partially match log: 1 - 2019-04-25T19:05:50.370758Z received: tx (119 bytes) peer=0 2 - 2019-04-25T19:05:50.370863Z 3 - 4 - ************************ 5 - EXCEPTION: NSt8ios_base7failureB5cxx11E 6 - Superfluous witness record: iostream error 7 - bitcoin in ProcessMessages()
-
DrahtBot added the label Tests on Apr 25, 2019
-
instagibbs commented at 7:38 pm on April 25, 2019: memberwait, what? I didn’t touch this test:
64/119 - p2p_invalid_tx.py failed, Duration: 1 s
-
MarcoFalke commented at 8:54 pm on April 25, 2019: member
Could you include the following diff:
0diff --git a/test/functional/data/invalid_txs.py b/test/functional/data/invalid_txs.py 1index 02deae92f3..80d8d66f24 100644 2--- a/test/functional/data/invalid_txs.py 3+++ b/test/functional/data/invalid_txs.py 4@@ -68,7 +68,7 @@ class OutputMissing(BadTxTemplate): 5 6 7 class InputMissing(BadTxTemplate): 8- reject_reason = "bad-txns-vin-empty" 9+ reject_reason = "Superfluous witness record" 10 expect_disconnect = False 11 12 def get_tx(self):
-
instagibbs force-pushed on Apr 25, 2019
-
instagibbs commented at 9:03 pm on April 25, 2019: member@MarcoFalke I tried a slightly different track by using the fact that 0-vin, 0-vout have input sizes checked first, and kept that test case, then also kept my new test for the actual test we’re checking for. It seemed weird to me to simply hope that that type of transaction would trigger this case.
-
Fix missing input template by making minimal tx 25b0786581
-
Add test for superfluous witness record in deserialization cc556e4a30
-
in test/functional/feature_block.py:154 in 59e81b1422 outdated
145@@ -146,20 +146,6 @@ def run_test(self): 146 badtx = template.get_tx() 147 if TxTemplate != invalid_txs.InputMissing: 148 self.sign_tx(badtx, attempt_spend_tx) 149- else: 150- # Segwit is active in regtest at this point, so to deserialize a 151- # transaction without any inputs correctly, we set the outputs 152- # to an empty list. This is a hack, as the serialization of an 153- # empty list of outputs is deserialized as flags==0 and thus 154- # deserialization of the outputs is skipped.
MarcoFalke commented at 9:16 pm on April 25, 2019:Please move this comment todata/invalid_txs.py
, as it is not clear why the tx there is completely “empty”
instagibbs commented at 1:04 am on April 26, 2019:I wrote something else in its place. I found the previous text a little baffling to be honest. Willing to take heavy edits on it :)instagibbs force-pushed on Apr 26, 2019MarcoFalke commented at 11:26 am on April 26, 2019: memberutACK cc556e4a30b4a32eab6722f590489d89b2875de3MarcoFalke referenced this in commit 653b2b4426 on Apr 26, 2019MarcoFalke merged this on Apr 26, 2019MarcoFalke closed this on Apr 26, 2019
MarcoFalke added the label Needs backport on Apr 26, 2019MarcoFalke added this to the milestone 0.18.1 on Apr 26, 2019sidhujag referenced this in commit 4a65581154 on Apr 27, 2019laanwj referenced this in commit bb291b50f2 on May 20, 2019MarcoFalke referenced this in commit 5a58ddb6d5 on May 20, 2019MarcoFalke referenced this in commit 86031083c7 on May 20, 2019MarcoFalke removed the label Needs backport on May 20, 2019sidhujag referenced this in commit 9f749c185f on May 20, 2019HashUnlimited referenced this in commit c48c0e26e6 on Aug 23, 2019HashUnlimited referenced this in commit 05f4d10f9f on Aug 23, 2019Bushstar referenced this in commit 73e34d2e08 on Aug 24, 2019Bushstar referenced this in commit a8369bb16f on Aug 24, 2019Munkybooty referenced this in commit 4df2763b77 on Oct 17, 2021Munkybooty referenced this in commit d6cefa9ce1 on Oct 22, 2021Munkybooty referenced this in commit c6c032be5f on Oct 22, 2021Munkybooty referenced this in commit ca421845a7 on Oct 23, 2021Munkybooty referenced this in commit c7e4472b83 on Oct 26, 2021Munkybooty referenced this in commit f63e287c06 on Oct 28, 2021Munkybooty referenced this in commit 211cf5bb25 on Oct 28, 2021Munkybooty referenced this in commit 740f21e8a1 on Nov 12, 2021Munkybooty referenced this in commit 466d006e5d on Nov 13, 2021Munkybooty referenced this in commit 6a652a4a27 on Nov 13, 2021Munkybooty referenced this in commit 1ab9ba86ef on Nov 14, 2021Munkybooty referenced this in commit 2749dbc651 on Nov 16, 2021Munkybooty referenced this in commit d21e550b0e on Nov 18, 2021MarcoFalke locked this on Dec 16, 2021
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-01-22 03:12 UTC
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-01-22 03:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me