Disallow extended encoding for non-witness transactions #14039

pull sipa wants to merge 1 commits into bitcoin:master from sipa:201808_no_superfluous_witness changing 1 files +4 −0
  1. sipa commented at 0:08 am on August 24, 2018: member

    BIP144 specifies that transactions without witness should use the legacy encoding, which is currently not enforced.

    This rule was present in the original SegWit implementation (https://github.com/bitcoin/bitcoin/pull/8149), but was subsequently dropped (https://github.com/bitcoin/bitcoin/pull/8589).

    As all hashes, txids, and weights are always computed over a reserialized version of a transaction, it is mostly harmless to permit extended encoding for non-segwit transactions, but I’d rather strictly follow the BIP.

  2. Disallow extended encoding for non-witness transactions bb530efa18
  3. sipa force-pushed on Aug 24, 2018
  4. practicalswift commented at 9:16 am on August 24, 2018: contributor

    Concept ACK

    Stricter is better (in this case)!

  5. instagibbs commented at 12:50 pm on August 24, 2018: member
    concept ACK, I discovered this a few months ago, reported it, then forgot to follow up.
  6. instagibbs commented at 4:28 pm on August 24, 2018: member
  7. MarcoFalke commented at 6:06 pm on August 24, 2018: member

    To fix the test failure you could try rebasing on fae040010deda9404b15b214cec2a099fb831253

    I have no opinion on this change itself. Is there any evidence of other software using this on the p2p or rpc interface? Also note that Bitcoin Core will already normalize the transaction encoding when relaying txs.

  8. laanwj commented at 12:21 pm on August 29, 2018: member
    concept ACK
  9. laanwj added the label RPC/REST/ZMQ on Aug 31, 2018
  10. Sjors commented at 6:22 pm on September 7, 2018: member
    Maybe add a test?
  11. gmaxwell commented at 8:59 pm on February 14, 2019: contributor
    utACK
  12. instagibbs commented at 5:48 pm on March 21, 2019: member

    upgrading to tACK, please @sipa take this test:

    https://github.com/instagibbs/bitcoin/commit/7c1ad7c0367e94748e724d6a39d056b20ecc3975

    Fails for me on master, passes with your commit.

  13. stevenroose commented at 5:19 pm on March 22, 2019: contributor
    utACK bb530efa1872ec963417f61da9a95185c7a7a7d6 We backported this to Elements already as well: https://github.com/ElementsProject/elements/pull/525
  14. instagibbs referenced this in commit aaee9dde6f on Mar 25, 2019
  15. sdaftuar commented at 3:53 pm on April 25, 2019: member
    utACK, I think this is ready for merge?
  16. instagibbs commented at 3:57 pm on April 25, 2019: member
    I can PR my test right after merge
  17. MarcoFalke merged this on Apr 25, 2019
  18. MarcoFalke closed this on Apr 25, 2019

  19. MarcoFalke referenced this in commit c65c77c721 on Apr 25, 2019
  20. MarcoFalke referenced this in commit 653b2b4426 on Apr 26, 2019
  21. MarcoFalke added the label Needs backport on Apr 26, 2019
  22. MarcoFalke removed the label Needs backport on Apr 26, 2019
  23. MarcoFalke added the label Needs backport on Apr 26, 2019
  24. MarcoFalke added this to the milestone 0.18.1 on Apr 26, 2019
  25. sidhujag referenced this in commit fd6ff32bc6 on Apr 27, 2019
  26. sidhujag referenced this in commit 4a65581154 on Apr 27, 2019
  27. moneyball commented at 8:24 pm on April 29, 2019: contributor
    Out of curiosity do we have any sense for whether such misformatted transactions occur and if so with what frequency?
  28. sipa commented at 8:37 pm on April 29, 2019: member
    @moneyball This is just about the encoding; it’s not a properry of the transaction at all. Before this PR, If someone were to use the invalid encoding on a particular P2P link, it would still be propagated in the correct form on further links.
  29. MarcoFalke commented at 8:50 pm on April 29, 2019: member
    Though, it wouldn’t be propagated on p2p after this pull. And also rejected by any RPC call.
  30. laanwj referenced this in commit bb291b50f2 on May 20, 2019
  31. MarcoFalke referenced this in commit 206f5ee875 on May 20, 2019
  32. MarcoFalke removed the label Needs backport on May 20, 2019
  33. sidhujag referenced this in commit 9f749c185f on May 20, 2019
  34. HashUnlimited referenced this in commit e30fa22d54 on Aug 23, 2019
  35. Bushstar referenced this in commit 6de72e5d3a on Aug 24, 2019
  36. Munkybooty referenced this in commit 4df2763b77 on Oct 17, 2021
  37. Munkybooty referenced this in commit d6cefa9ce1 on Oct 22, 2021
  38. Munkybooty referenced this in commit c6c032be5f on Oct 22, 2021
  39. Munkybooty referenced this in commit ca421845a7 on Oct 23, 2021
  40. Munkybooty referenced this in commit c7e4472b83 on Oct 26, 2021
  41. Munkybooty referenced this in commit f63e287c06 on Oct 28, 2021
  42. Munkybooty referenced this in commit 211cf5bb25 on Oct 28, 2021
  43. Munkybooty referenced this in commit 740f21e8a1 on Nov 12, 2021
  44. Munkybooty referenced this in commit 466d006e5d on Nov 13, 2021
  45. Munkybooty referenced this in commit 6a652a4a27 on Nov 13, 2021
  46. Munkybooty referenced this in commit 1ab9ba86ef on Nov 14, 2021
  47. Munkybooty referenced this in commit 2749dbc651 on Nov 16, 2021
  48. Munkybooty referenced this in commit d21e550b0e on Nov 18, 2021
  49. DrahtBot locked this on Aug 18, 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: 2024-12-19 06:12 UTC

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