Add test vectors in BIP143 into tx_valid.json / sighash.json #14308

issue Christewart opened this issue on September 24, 2018
  1. Christewart commented at 3:21 PM on September 24, 2018: contributor

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    <!--- What behavior did you expect? -->

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

    AFAICT these test vectors aren't actually run bitcoin core, and other library developers use tx_valid.json/tx_invalid.json / sighash.json to test their implementations.

    It looks like sighash.json hasn't been updated in 4 years (!)

    https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#example

  2. Christewart renamed this:
    Add test vectors in BIP143 into tx_valid.json
    Add test vectors in BIP143 into tx_valid.json / sighash.json
    on Sep 24, 2018
  3. fanquake added the label Tests on Sep 25, 2018
  4. pinheadmz commented at 4:00 PM on April 13, 2023: member

    This isn't a bad idea, and we could include the witnessV0 test vectors in the JSON file, but since sighash_tests.cpp only executes SignatureHash() and not SignatureHashSchnorr(), I don't think those test/data files should be considered complete anymore.

    To test taproot validation on bcoin for example I created a fork of bitcoin that generated a taproot test vectors json file similar to the original files you are looking at (from #3975)

  5. pinheadmz commented at 2:55 PM on June 2, 2023: member

    I think it's safe to close this as won't-fix for the reasons stated above. Pull requests are always welcome!

  6. pinheadmz closed this on Jun 2, 2023

  7. bitcoin locked this on Jun 1, 2024
Labels

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: 2026-04-21 06:15 UTC

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