1

I'm referring to a page of Taproot test vectors provided in BIP 341.

In the section called keyPathSpending and then inputSpending under that, there are 7 JSON objects that provide parameters to test tweaking keys and then signing and verifying data with Schnorr signatures. The first of these JSON objects contains "merkleRoot": null. However, all of the others include a merkle root.

For example, the second one provides the following data:

{
    "given": {
        "txinIndex": 1,
        "internalPrivkey": "1e4da49f6aaf4e5cd175fe08a32bb5cb4863d963921255f33d3bc31e1343907f",
        "merkleRoot": "5b75adecf53548f3ec6ad7d78383bf84cc57b55a3127c72b9a2481752dd88b21",
        "hashType": 131
    },
    "intermediary": {
        "internalPubkey": "187791b6f712a8ea41c8ecdd0ee77fab3e85263b37e1ec18a3651926b3a6cf27",
        "tweak": "cbd8679ba636c1110ea247542cfbd964131a6be84f873f7f3b62a777528ed001",
        "tweakedPrivkey": "ea260c3b10e60f6de018455cd0278f2f5b7e454be1999572789e6a9565d26080",
        "sigMsg": "0083020000000065cd1d00d7b7cab57b1393ace2d064f4d4a2cb8af6def61273e127517d44759b6dafdd9900000000808f891b00000000225120147c9c57132f6e7ecddba9800bb0c4449251c92a1e60371ee77557b6620f3ea3ffffffffffcef8fb4ca7efc5433f591ecfc57391811ce1e186a3793024def5c884cba51d",
        "precomputedUsed": [],
        "sigHash": "325a644af47e8a5a2591cda0ab0723978537318f10e6a63d4eed783b96a71a4d"
    },
    "expected": {
        "witness": [
            "052aedffc554b41f52b521071793a6b88d6dbca9dba94cf34c83696de0c1ec35ca9c5ed4ab28059bd606a4f3a657eec0bb96661d42921b5f50a95ad33675b54f83"
        ]
    }
},

For key path spending, why is there a merkle root? What leaf nodes were used to derive these merkle roots from inputs that contain no control blocks?

1 Answer 1

1

For key path spending, why is there a merkle root?

In the "given" section, only the internal private key is given. In key path spending, one signs with the tweaked private key. The tweaked private key is computed from the internal private key and the Merkle root.

What leaf nodes were used to derive these merkle roots from inputs that contain no control blocks?

That shouldn't matter for testing your key-path signing logic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.