The P2WPKH inputs in BIP-375's test vectors cannot be spent by the keys they carry, and none of the 42 signatures in the vectors verifies. Each P2WPKH program is SHA256(pubkey)[:20] instead of HASH160(pubkey), and the reference validator does not check signatures, so no test catches it.
This PR repairs the file in place. Each P2WPKH program becomes HASH160(pubkey). The signatures are re-made with RFC 6979 and low S, under BIP 143 for P2WPKH and P2SH-P2WPKH and under the legacy sighash for P2PKH and the bare input. The SIGHASH_NONE vector now has a SIGHASH_NONE signature, as BIP 174 requires. The two signatures with no defined sighash, on the segwit v2 input and in the vector missing PSBT_OUT_SCRIPT, are removed; both vectors still fail for the same reason. The other 40 signatures now verify, and the runner's -vv output is unchanged: 43 passed. I did not regenerate the file, because that would also change unrelated values such as the prevout txids.
#2317, which depends on this PR, makes the test runner check these signatures: on master's vectors it reports 39 of 43 failing, on this PR's none. #2256 and #2207 edit some of the same vectors, and their P2WPKH inputs have the same defect. Whichever of this PR and #2256 lands second needs a rebase and the same repair.
Made with my usual tools: a computer, the Internet and an LLM. The mistakes, as usual, are all mine.