Skip to content

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

Merged
maflcko merged 1 commit into
bitcoin:masterfrom
instagibbs:add_dust_limits
Feb 3, 2023
Merged

maflcko merged 1 commit into
bitcoin:masterfrom
instagibbs:add_dust_limits

Conversation

@instagibbs

Copy link
Copy Markdown
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.

@DrahtBot

DrahtBot commented Jan 11, 2023 •

Copy link
Copy Markdown
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.

@DrahtBot DrahtBot added the Tests label Jan 11, 2023

@theStack theStack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code-review ACK b093f56

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

2023-01-13T14:57:38.059000Z TestFramework (INFO): Test default dust limit setting (3000 sat/kvB)...
2023-01-13T14:57:38.064000Z TestFramework (INFO): -> Test P2PK (uncompressed) output (size 67, limit 672)
2023-01-13T14:57:38.100000Z TestFramework (INFO): -> Test P2PK (compressed) output (size 35, limit 576)
2023-01-13T14:57:38.119000Z TestFramework (INFO): -> Test P2PKH output (size 25, limit 546)
2023-01-13T14:57:38.133000Z TestFramework (INFO): -> Test P2SH output (size 23, limit 540)
2023-01-13T14:57:38.146000Z TestFramework (INFO): -> Test P2WPKH output (size 22, limit 294)
2023-01-13T14:57:38.159000Z TestFramework (INFO): -> Test P2WSH output (size 34, limit 330)
2023-01-13T14:57:38.173000Z TestFramework (INFO): -> Test P2TR output (size 34, limit 330)
2023-01-13T14:57:38.187000Z TestFramework (INFO): -> Test P2?? (future witness version 2) output (size 4, limit 240)
2023-01-13T14:57:38.201000Z TestFramework (INFO): -> Test P2?? (future witness version 16) output (size 42, limit 354)
2023-01-13T14:57:38.215000Z TestFramework (INFO): -> Test bare multisig (m-of-3) output (size 201, limit 1074)
2023-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)

@instagibbs

Copy link
Copy Markdown
Member Author

OpenSSL is a trip :)

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

@jamesob

jamesob commented Jan 13, 2023

Copy link
Copy Markdown
Contributor

Concept ACK

@maflcko maflcko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review ACK b093f56 🥉

Show signature

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

review ACK b093f5619f8f9b7d63ee60ff04de00b907b13d64  🥉
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUicAQwAme8hUdLpNPexYsRu2QXv5c+O0Omdfg5cwmLORnRckSquLFWxYDPcY6TZ
Q9AhWfbVyWltCzFEEkd1kfEBRTTHup868DR5VEPyjt6VPmA7O8MlqthgS9Q0DAep
4MHTTJ/n0Z6zDRybltWQS0btS/42SIH6Bk4WcrJI5DtW7IkXbekDVsdKg6uohULj
HxGzxpo4xQVHuZ84VFDktrwI+luxpaS3dm0qodl65N3kPm2fY62rSLGBFZVHRyK6
e994TMtglrLzta7MSTXFi/DJwfMjGLQXgCqKKidwsnGF9DPoEJxvMjc52A1ehJQ3
je8XzV+0QKWMSaU87/ColX6NT1cN+sb96jy8Xs2JgE7eeAOQvr+AqlXSEvuho++w
KM8bbHEHmd9mcFZ9InTJa4aVGjXxoi6J97Xv1YJWPFP8xJJvJlsqPCS6z1mttqGo
wieMmHUNOeKynoaB/SJEENX4NOoAnl2c8E1LnsgzbCRwgOZnMBe0GMBj7y2PJYcE
LeqTa6/B
=/7JM
-----END PGP SIGNATURE-----

@maflcko
maflcko merged commit aaa5597 into bitcoin:master Feb 3, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants