Return-Path: Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8ED35C0012 for ; Wed, 24 Nov 2021 12:50:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7DF5B81A64 for ; Wed, 24 Nov 2021 12:50:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -1.552 X-Spam-Level: X-Spam-Status: No, score=-1.552 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_ABUSE_SURBL=1.25] autolearn=no autolearn_force=no Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=sprovoost.nl header.b="w0bFaKsk"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="lZNR30mP" Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BH0fMsANqpHg for ; Wed, 24 Nov 2021 12:50:55 +0000 (UTC) X-Greylist: delayed 00:06:06 by SQLgrey-1.8.0 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by smtp1.osuosl.org (Postfix) with ESMTPS id 6EBB881A5F for ; Wed, 24 Nov 2021 12:50:55 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id A230C3200953; Wed, 24 Nov 2021 07:44:48 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 24 Nov 2021 07:44:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sprovoost.nl; h= from:content-type:mime-version:subject:date:references:to :in-reply-to:message-id; s=fm1; bh=XM9iM/MFFcsE2J3dahnIpmQ3S9Me9 paEfOyG4o4QXSU=; b=w0bFaKskeeNG4ymuCZatY1O9gcAR4M2fyp48zgYc5l8ZC v7ttc2sy0Zy92ZQ/3HQ65cZ3YUMVg0XZ4fMkVayTGWJMu9iHF/URIwE1+BhpUp7E 5ZtgITiSSy1dQ0l+kTSoed4dWAegYnFzY6SCYo0dFmrlzCPG3AXyELpDLUUnqNV4 yfTIgKkAjnxKkKaOe5kQ+0ZZ57BsJBFiDVvs5Kytc6aYiBt8CBI3NQxVrcGX1Cfj aiFWSxEReSjvvGVyA9k+95fyysjeC97+MOzN22qxK8v2kwm9ryTS5YzkZCiTN9iG 26ZikaV+zSYj9mIJZQ/NXh84LijuGwIQsP1AWeS0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=XM9iM/ MFFcsE2J3dahnIpmQ3S9Me9paEfOyG4o4QXSU=; b=lZNR30mPxsF3OL70eqnlIQ QlAk7Yyx1mzgfhJoRdbs0Rt9R5mkI9VUk1ziV+1fRfOMmSAi0JX0QztljctZffsk imQTnWtXm6iqZyqN6mst36imr7ThFskdpRZspVNtnQuqLY7YRX28tNi8gurnXoYN CKs0GrEbfNpwCtMD5xNq3rDHn5AIKFmfTNedSgIyzLHH8/NBaiIu3PZ2UtWR3Vh5 0I+FRzwzdzbUgBgg+Qbj3ldmEO7Y/h+DLdEoXG0jrFJwHIqkHdiLJtoHv9nS1clm ATQXz9dGugz+/01DFjR+/tLXpGZjWlCG/TTNxJrOg48+41mzz7PfYLvjDVN5YoUA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrgeekgdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhtggguffffhfvjgfkofesghdtmherhhdtvdenucfhrhhomhepufhjohhrshcu rfhrohhvohhoshhtuceoshhjohhrshesshhprhhovhhoohhsthdrnhhlqeenucggtffrrg htthgvrhhnpeevvdfgjeetueetkeegjeetueeljeegieevhfelkeffffdvjeeuteevvedu hfffkeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepshhjohhrshesshhprhhovhhoohhsthdr nhhl X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Nov 2021 07:44:47 -0500 (EST) From: Sjors Provoost Content-Type: multipart/signed; boundary="Apple-Mail=_92A76D1B-DFD9-4E4C-94D5-EDD1B26C41D5"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Date: Wed, 24 Nov 2021 13:44:46 +0100 References: <795f917b-3883-1827-f39b-35123b500f36@achow101.com> To: Andrew Chow , Bitcoin Dev In-Reply-To: <795f917b-3883-1827-f39b-35123b500f36@achow101.com> Message-Id: X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Mailman-Approved-At: Wed, 24 Nov 2021 15:15:44 +0000 Subject: Re: [bitcoin-dev] Taproot Fields for PSBT X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 12:50:56 -0000 --Apple-Mail=_92A76D1B-DFD9-4E4C-94D5-EDD1B26C41D5 Content-Type: multipart/alternative; boundary="Apple-Mail=_0AB63C07-24DA-4227-92FC-4C04F2F8F6C7" --Apple-Mail=_0AB63C07-24DA-4227-92FC-4C04F2F8F6C7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Andrew, I'm confused why PSBT_IN_TAP_BIP32_DERIVATION and = PSBT_OUT_TAP_BIP32_DERIVATION contain not just the derivation path for the xonlypubkey, but also the = tapleaf merkle path. First I thought it was perhaps necessary in order for a signer to guess = which script leaves it can sign with its own keys. But you can't really know = that without actually seeing the script. When a signer looks at a script, it = presumably already knows the leaf path. - Sjors > Op 22 jun. 2021, om 23:22 heeft Andrew Chow via bitcoin-dev = het volgende geschreven: >=20 > Hi All, >=20 > I would like to propose a BIP which defines new fields for Taproot > support in PSBT. >=20 > The full text is below, and the rendered file can be found at Now at: https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki = > - > | Taproot Key BIP 32 Derivation Path > | PSBT_IN_TAP_BIP32_DERIVATION =3D 0x16 > | > | The 32 byte X-only public key > | * <32-bit uint> <32-bit uint>* > | A compact size unsigned integer representing the number of leaf > hashes, followed by a list of leaf hashes, followed by the master key > fingerprint concatenated with the derivation path of the public key. = The > derivation path is represented as 32-bit little endian unsigned = integer > indexes concatenated with each other. Public keys are those needed to > spend this output. The leaf hashes are of the leaves which involve = this > public key. > |- > | Taproot Key BIP 32 Derivation Path > | PSBT_OUT_TAP_BIP32_DERIVATION =3D 0x07 > | > | The 32 byte X-only public key > | * <32-bit uint> <32-bit uint>* >=20 --Apple-Mail=_0AB63C07-24DA-4227-92FC-4C04F2F8F6C7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Hi = Andrew,

I'm confused = why PSBT_IN_TAP_BIP32_DERIVATION and = PSBT_OUT_TAP_BIP32_DERIVATION
contain not just the = derivation path for the xonlypubkey, but also the tapleaf merkle = path.

First I = thought it was perhaps necessary in order for a signer to guess = which
script leaves it can sign with its own keys. = But you can't really know that without
actually = seeing the script. When a signer looks at a script, it presumably = already
knows the leaf path.
= --Apple-Mail=_0AB63C07-24DA-4227-92FC-4C04F2F8F6C7-- --Apple-Mail=_92A76D1B-DFD9-4E4C-94D5-EDD1B26C41D5 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE7ZvfetalXiMuhFJCV/+b28wwEAkFAmGeM74ACgkQV/+b28ww EAkSfg//VXmdV7Xnl+tpKm7KDfStDM5GX/UEaLBfmI8vPSt7tERY3DCiZ/1adDcm Ph1ue3fIa6PiQy1sby8jMic4JGePNsXNX3GQErD7i2sTSSXF/SWQhCPrC87i7lR2 R23SHQK33Znw77wbFleNb8pAIousHrEuj5BJf87gHi4LgqbnJA///U5VD8aCHz2y uuWZTvQYAA6C+ko8UTmdf5wQ/vEAbiJpeKN/c9Dj2qIgYcUG663JxNAfLOq2gmmo 5dbFXv7q7aK4PbhNH8/Ryb/zZxdaAFzT0vWwFmm+G4aZQsdry0DFsgIwR2zNbI0J C7j0MDYAY7rzoDuF20mjCiwzQlcZR0245qmhNQqq6U4XfVhy/Xb4+yRA5owpYpFN 9OKWV9tNMCAnlq4opwNP08wO6iuDDANyC4PY2j9iBElT/VnDuWQu6T4RJTLRKdPP pvFzYKB0eoFhWs8UuOqbo/v3AaEhyYAcNY/VoaMumPM8BOtSeDK5+ALKcL/5C3Gt GkUOtyn6O7zBy1j8D4gAj3/AmNwLBDYHWML02EnR1TqKXHfDB8PB+BsAjgf4lypp 0NyO6W0nbHvB4xjBESnbhHzA7VdaIhE9M5stOrz+ubKMzvwg8k/8kzdo0WurEvk7 ClEdWjYYBrxQPC27qkHshIV+7GFMPAkqEla/x0aL8vmvmVbRqw4= =1aTo -----END PGP SIGNATURE----- --Apple-Mail=_92A76D1B-DFD9-4E4C-94D5-EDD1B26C41D5--