Implement BIP 118 validation (SIGHASH_ANYPREVOUT) #30018

pull ajtowns wants to merge 44 commits into bitcoin:27.x from ajtowns:202404-inq27-apo changing 72 files +5266 −1674
  1. ajtowns commented at 0:57 am on May 2, 2024: contributor
    Forward port of #34
  2. signet/miner: drop get_reward_address function 28ba573e6b
  3. signet/miner: drop do_createpsbt function 8d90250e91
  4. signet/miner: drop create_coinbase function c5f9e01fd8
  5. signet/miner: rename do_decode_psbt to decode_psbt abe831a84f
  6. signet/miner: move next_block_* functions into new Generator class 0514f853fe
  7. signet/miner: add Generate.next_block_time function af2d653c80
  8. signet/miner: add Generate.gbt function bc09fd5ce9
  9. signet/miner: add Generate.mine function 8b073385e2
  10. signet/miner: add support for a poolnum/poolid tag in mined blocks 3c904883ea
  11. tests: Provide more helpful assert_equal errors
    In the functional tests, we often compare dicts with assert_equal, but the
    output makes it very hard to tell exactly which entry in the dicts don't
    match when there are a lot of entries and only minor differences. Change
    the output to make it clearer.
    c862a3350d
  12. Move mapFlagNames and FormatScriptFlags logic to deploymentinfo.h
    Moves FormatScriptFlags logic into GetScriptFlagNames which returns a
    vector of strings. For completeness, also has GetScriptFlagNames report
    on any bits that do not match a known script flag.
    61ba59ba02
  13. validation: export GetBlockScriptFlags() c46f1f66fa
  14. rpc: have getdeploymentinfo report script verify flags 4e19c3c9dc
  15. Bitcoin Inquisition branding
    Now defaults to adding "inquisition" as a uacomment, unless the user
    specifies their own uacomment. Use -nouacomment to disable.
    7ef668d035
  16. Disable mainnet/testnet operation
    To avoid the risk of bugs in new consensus code causing potential
    chain splits or loss of funds, we disable use of this branch on mainnet
    or testnet.  Use with either regtest or signet remains supported.
    94d508a61a
  17. Bury taproot deployment
    Co-Author: MarcoFalke <falke.marco@gmail.com>
    4dc76c1f72
  18. tests: drop versionbits specific tests
    After we replace versionbits with heretical deployments, these will not
    make sense.
    3508985ae1
  19. validation: drop "Unknown new rules activated" warning 23e538ece5
  20. Replace versionbits for heretical deployments 3dcb013a85
  21. tests: add heretical activation fuzz tester fdf3a3e529
  22. deploymentinfo: report signalling 7b51b8ad04
  23. chainparams: Add support for renouncing an HereticalDeployment d74f1ae1f0
  24. Add StandardTemplateHash definition b64a1b0b45
  25. Add SignatureChecker method for checking DefaultCheckTemplateVerifyHash. 78c51ede95
  26. Add OP_CHECKTEMPLATEVERIFY Opcode as OP_NOP4
    [TESTS] modify script_tests.json to enable OP_NOP4 as OP_CHECKTEMPLATEVERIFY
    7c7d382992
  27. Change printing of NOP4 to CheckTemplateVerify (separate commit for ease of bisecting should downstream software expect to parse NOP4 this now fails) a9a1501687
  28. [Anti-DoS Caching] Precompute the DefaultCheckTemplateVerifyHash ec26f2d697
  29. [Refactor] Document and pack the fields in the PrecomputedData a6cc19794f
  30. [Anti-DoS Caching] No longer Cache CTV Hash at input index 0 7d1456c20d
  31. OP_CHECKTEMPLATEVERIFY Deployment parameters 6b2c4c1c26
  32. Make Bare OP_CHECKTEMPLATEVERIFY basic transactions standard c2ff5b7042
  33. [TESTS] Add OP_CHECKTEMPLATEVERIFY functional tests 45b49532bc
  34. [TESTS] add tx_valid.json tests for BIP-119 CheckTemplateVerify b0dc2532fa
  35. [TESTS] Add tx_invalid.json examples for BIP-119 CheckTemplateVerify 9c924f1f16
  36. [TESTS] Add CTV Hash Computation Unit Test & Mutation Tester 4ad8ea9bf2
  37. OP_CHECKTEMPLATEVERIFY Deployment parameters for signet/inquisition cba32d2d4a
  38. script/interpreter: Add KeyVersion
    Introduce `KeyVersion` in preparation for defining new behaviours via
    BIP 342's "unknown public key type" upgrade mechanism.
    a715aa8591
  39. Implement BIP 118 (SIGHASH_ANYPREVOUT) 1aa5918dfb
  40. tests: Add unit tests for ANYPREVOUT 976a249c4f
  41. Add ANYPREVOUT deployment 116f70f49c
  42. Make ANYPREVOUT transactions standard after activation b2e6f665f0
  43. tests: Update test framework for ANYPREVOUT 5325d52092
  44. tests: Add ANYPREVOUT testing to feature_taproot 0c2ceb4e67
  45. qa: add a fuzz target ensuring the sighash behaviour for non APO keys was conserved
    This fuzz targets copied the SignatureHashSchnorr function for Bitcoin
    Core 23.0 and checks the output of the APO-ready SignatureHashSchnorr
    from this branch against it.
    
    This is to make sure the behaviour of the function was not changed for
    non ANYPREVOUT keys, which would make some previously valid signatures
    invalid and, even worse, some previously invalid signatures valid.
    2bf47f19ae
  46. DrahtBot commented at 0:58 am on May 2, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  47. DrahtBot added the label Backport on May 2, 2024
  48. ajtowns commented at 0:59 am on May 2, 2024: contributor
    Grr :(
  49. ajtowns closed this on May 2, 2024

  50. bitcoin locked this on May 2, 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-12-21 15:12 UTC

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