Tests: Fill out dust limit unit test for known types except bare multisig #26875

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:add_dust_limits changing 1 files +40 −5
  1. instagibbs commented at 9:02 pm on January 11, 2023: member

    Having the constants checked explicitly in a single spot helps with possible regressions and also useful for documentation.

    In addition, add a check for undefined v1 witness programs.

  2. DrahtBot commented at 9:02 pm on January 11, 2023: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK theStack, MarcoFalke
    Concept ACK jamesob

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

  3. DrahtBot added the label Tests on Jan 11, 2023
  4. Fill out dust limit unit test for known types except bare multisig b093f5619f
  5. instagibbs force-pushed on Jan 12, 2023
  6. theStack approved
  7. theStack commented at 3:07 pm on January 13, 2023: contributor

    Code-review ACK b093f5619f8f9b7d63ee60ff04de00b907b13d64

    Cross-checked the dust limit values by comparing to the output of the functional dust limit test that #26631 introduces:

     02023-01-13T14:57:38.059000Z TestFramework (INFO): Test default dust limit setting (3000 sat/kvB)...
     12023-01-13T14:57:38.064000Z TestFramework (INFO): -> Test P2PK (uncompressed) output (size 67, limit 672)
     22023-01-13T14:57:38.100000Z TestFramework (INFO): -> Test P2PK (compressed) output (size 35, limit 576)
     32023-01-13T14:57:38.119000Z TestFramework (INFO): -> Test P2PKH output (size 25, limit 546)
     42023-01-13T14:57:38.133000Z TestFramework (INFO): -> Test P2SH output (size 23, limit 540)
     52023-01-13T14:57:38.146000Z TestFramework (INFO): -> Test P2WPKH output (size 22, limit 294)
     62023-01-13T14:57:38.159000Z TestFramework (INFO): -> Test P2WSH output (size 34, limit 330)
     72023-01-13T14:57:38.173000Z TestFramework (INFO): -> Test P2TR output (size 34, limit 330)
     82023-01-13T14:57:38.187000Z TestFramework (INFO): -> Test P2?? (future witness version 2) output (size 4, limit 240)
     92023-01-13T14:57:38.201000Z TestFramework (INFO): -> Test P2?? (future witness version 16) output (size 42, limit 354)
    102023-01-13T14:57:38.215000Z TestFramework (INFO): -> Test bare multisig (m-of-3) output (size 201, limit 1074)
    112023-01-13T14:57:38.231000Z TestFramework (INFO): -> Test null data (OP_RETURN) output (size 20, limit 0)
    

    (somehow unrelated side-note: through the comment for uncompressed P2PK, TIL about the existence of “hybrid” pubkeys, prefixed with 0x06 or 0x07 instead of 0x04 👀 : https://bitcoin.stackexchange.com/questions/57855/c-secp256k1-what-do-prefixes-0x06-and-0x07-in-an-uncompressed-public-key-signif)

  8. instagibbs commented at 3:10 pm on January 13, 2023: member

    OpenSSL is a trip :)

    I didn’t know about that PR, sorry! Will take a look there as well.

  9. fanquake requested review from sipa on Jan 13, 2023
  10. jamesob commented at 3:51 pm on January 13, 2023: member
    Concept ACK
  11. maflcko approved
  12. maflcko commented at 12:56 pm on February 3, 2023: member

    review ACK b093f5619f8f9b7d63ee60ff04de00b907b13d64 🥉

    Signature:

     0-----BEGIN PGP SIGNED MESSAGE-----
     1Hash: SHA512
     2
     3review ACK b093f5619f8f9b7d63ee60ff04de00b907b13d64  🥉
     4-----BEGIN PGP SIGNATURE-----
     5
     6iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
     7pUicAQwAme8hUdLpNPexYsRu2QXv5c+O0Omdfg5cwmLORnRckSquLFWxYDPcY6TZ
     8Q9AhWfbVyWltCzFEEkd1kfEBRTTHup868DR5VEPyjt6VPmA7O8MlqthgS9Q0DAep
     94MHTTJ/n0Z6zDRybltWQS0btS/42SIH6Bk4WcrJI5DtW7IkXbekDVsdKg6uohULj
    10HxGzxpo4xQVHuZ84VFDktrwI+luxpaS3dm0qodl65N3kPm2fY62rSLGBFZVHRyK6
    11e994TMtglrLzta7MSTXFi/DJwfMjGLQXgCqKKidwsnGF9DPoEJxvMjc52A1ehJQ3
    12je8XzV+0QKWMSaU87/ColX6NT1cN+sb96jy8Xs2JgE7eeAOQvr+AqlXSEvuho++w
    13KM8bbHEHmd9mcFZ9InTJa4aVGjXxoi6J97Xv1YJWPFP8xJJvJlsqPCS6z1mttqGo
    14wieMmHUNOeKynoaB/SJEENX4NOoAnl2c8E1LnsgzbCRwgOZnMBe0GMBj7y2PJYcE
    15LeqTa6/B
    16=/7JM
    17-----END PGP SIGNATURE-----
    
  13. maflcko merged this on Feb 3, 2023
  14. maflcko closed this on Feb 3, 2023

  15. sidhujag referenced this in commit 20c067f7d8 on Feb 3, 2023
  16. bitcoin locked this on Jun 27, 2024

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-10-30 00:12 UTC

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