Subject: Re: [bitcoin-dev] Taproot Fields for PSBT

From: Salvatore Ingala <[email-masked]>
Date: Mon, 28 Jun 2021 12:03:42 +0200

Hi Andrew,

I just have a small suggestion on this proposal.

On Tue, 22 Jun 2021 at 23:29, Andrew Chow via bitcoin-dev <
[email-masked]> wrote:

> | Taproot Leaf Script
> | <tt>PSBT_IN_TAP_LEAF_SCRIPT = 0x15</tt>
> | <tt><control block></tt>
> | The control block for this leaf as specified in BIP 341. The control
> block contains the merkle tree path to this leaf.
> | <tt><script> <8-bit uint></tt>
> | The script for this leaf as would be provided in the witness stack
> followed by the single byte leaf version.
>

So far, all the defined PSBT types had a relatively short keydata (not much
bigger than a couple of pubkeys).
I think that is a desirable property to keep, as it is often a reasonable
assumption that dictionary keys are not very large.
The control block as per BIP 341 can be up to 33 + 32*128 = 4129 bytes long.

Perhaps it would be better to split this into PSBT_IN_TAP_LEAF_SCRIPT
and PSBT_IN_TAP_LEAF_CONTROL_BLOCK (both with no keydata)?

Best,
Salvatore Ingala