Subject: [bitcoin-dev] BIP341 test vectors for wallet implementations

From: Pieter Wuille <[email-masked]>
Date: Mon, 01 Nov 2021 18:48:49 +0000

Hi all,

I wanted to bring some attention to a set of test vectors I'm proposing to add to BIP341 in https://github.com/bitcoin/bips/pull/1225.

These are focused on wallet implementations, covering Merkle root / tweak / scriptPubKey computation from key/scripts, sigmsg/sighash/signature computation for key path spending, and control block computation for script path spending.

Given the short time that remains before BIP341's activation, I think this may be helpful to people working on implementations, even before it's merged. All values in it are automatically generated from an actual scenario tested against Bitcoin Core (which involves constructing and mining transactions with specified data).

The tests are mostly focused on features that are likely useful/testable in implementations right now, and e.g. excludes sighashes that involve annexes for that reason. It's also specific to BIP341, and doesn't cover BIP342 script semantics. Still, if anyone relies on features that are useful, but aren't covered, I'm happy to add more scenarios.

Cheers,

--
Pieter