fuzz: check that certain script TxoutType are nonstandard #20765

pull mjdietzx wants to merge 1 commits into bitcoin:master from mjdietzx:test-fuzz-is-nonstandard changing 1 files +9 −1
  1. mjdietzx commented at 8:16 pm on December 24, 2020: contributor
    • Every transaction of type NONSTANDARD must not be a standard script
    • The only know types of nonstandard scripts are NONSTANDARD and certain NULL_DATA and MULTISIG scripts

    When reviewing #20761 I figured this is very similar and might also be good to have

  2. DrahtBot added the label Tests on Dec 24, 2020
  3. DrahtBot commented at 0:09 am on December 25, 2020: member

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #20772 (fuzz: bolster ExtractDestination(s) checks by mjdietzx)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. DrahtBot added the label Needs rebase on Dec 25, 2020
  5. mjdietzx force-pushed on Dec 25, 2020
  6. mjdietzx force-pushed on Dec 25, 2020
  7. DrahtBot removed the label Needs rebase on Dec 25, 2020
  8. in src/test/fuzz/script.cpp:74 in 339790adbf outdated
    70@@ -71,7 +71,14 @@ FUZZ_TARGET_INIT(script, initialize_script)
    71     (void)IsSolvable(signing_provider, script);
    72 
    73     TxoutType which_type;
    74-    (void)IsStandard(script, which_type);
    75+    if (!IsStandard(script, which_type)) {
    


    sipa commented at 5:27 am on December 27, 2020:
    Similar to the other PR, no need to invoke IsStandard twice here.
  9. practicalswift commented at 10:38 pm on December 27, 2020: contributor

    Concept ACK

    Thanks for improving the fuzzing harnesses!

    Adding assertions to the harnesses allow us to catch logic errors in addition to the “crash conditions”/sanitizer failures we catch by simply trying to exercise as many code paths as possible (without assertions).

    Catching also logic bugs is obviously better, so if you have time/interest: consider checking the other harnesses for similar assertion opportunities :)

  10. fuzz: check that certain script TxoutType are nonstandard efaf80e9bb
  11. mjdietzx force-pushed on Dec 29, 2020
  12. luke-jr approved
  13. luke-jr commented at 2:36 am on January 3, 2021: member
    utACK
  14. MarcoFalke commented at 5:28 pm on January 3, 2021: member
    ACK efaf80e9bb0afeca2955720bfe6c225d7864036b
  15. MarcoFalke merged this on Jan 3, 2021
  16. MarcoFalke closed this on Jan 3, 2021

  17. sidhujag referenced this in commit 560045c438 on Jan 3, 2021
  18. DrahtBot locked this on Aug 16, 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-11-17 15:12 UTC

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