Return-Path: Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 66EBBC002D for ; Wed, 19 Oct 2022 02:40:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3907883F2B for ; Wed, 19 Oct 2022 02:40:31 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3907883F2B Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=F8l2HEMu X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -1.848 X-Spam-Level: X-Spam-Status: No, score=-1.848 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no 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 zIbC5qR7MiBK for ; Wed, 19 Oct 2022 02:40:28 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 0DC4E83F21 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by smtp1.osuosl.org (Postfix) with ESMTPS id 0DC4E83F21 for ; Wed, 19 Oct 2022 02:40:27 +0000 (UTC) Received: by mail-wr1-x42f.google.com with SMTP id u10so26822005wrq.2 for ; Tue, 18 Oct 2022 19:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=41kbP99uaxh7/QRkIoPWTu9GGl38ASzw+MCf8g79Rts=; b=F8l2HEMuKWia2uJ+dBIKB3BvEXvQtIO4wG35FzMCqht2s1s1X/cAv9NG9eZ4IsRX4R CNelXokGqTj20xp6uDVAHRE8E5pK9dieP2MowHepiF4ZD+bBLm8DTNpiOC0tPlr/t1U1 q0s0irQ8pKzGxaiOE4W8X+V/01NU9yt8z970wXrV6Rh7wgM3ru0SI+sG4pkOBU7X59FF ePCmQb2AL+LqnJAk+DBDMqG+mCDr8/KaBL/L1JNxD99rGmomn57XhASU0nivpumjxkIn FkJPK2qeJIYd+FMYdZcaOXlzfXtFCF++Dk/BNkX7CnTnkYLRfT7AE5NO0CwvPZM039zc iQUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=41kbP99uaxh7/QRkIoPWTu9GGl38ASzw+MCf8g79Rts=; b=zl2RfJz5YayWxwnQpazbN9s2AarG01TJc2HRrxTewaZtv1e0gbNmrv+uxL5HCI9DjU yQ4QwSw28NZFXyPntK4gjvqQV1hGkGzaNRRusLAIYaXhPpor92bnFh0bYKcAsB3zKyuW vRWGPVXrM4nbh6YSuTJgxuhxtxtKBdGWc8tfHr6Hd5dEmjlaOVXBt3nPaWq3PpzF5wiu Cs1MUMxLcEVvbat0yXTWeYQzbKquoJ86NhyIDXEUjTJJulSGJrfzMrXs8rdA18/vbHWZ stbElsDNxKyR3VY0M6C4XggCD4YdhyFHIEFKp9cg5E4ou+sKxTHY1GBGtz1mJTJeKwZv QC/Q== X-Gm-Message-State: ACrzQf3VK3JZAQf5OBsC7AO6cCcwqVfkrd0KVbF8wJ+9N/Ww6X6BPx+8 W8GNudeqyM7aTQBoUZTL/vJLOGvDg/jPd/D2VlYup3SSeSKDYR9L X-Google-Smtp-Source: AMsMyM4DZclFpAkU0Eqw43F4EWZrWS5h83xTDm8sgQ0y/M518ANXAEuZ42igaiURXIonjSol8L9OglggntmK3peyxiE= X-Received: by 2002:a5d:6c6f:0:b0:22e:46ad:c3d6 with SMTP id r15-20020a5d6c6f000000b0022e46adc3d6mr3409712wrz.677.1666147225760; Tue, 18 Oct 2022 19:40:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Olaoluwa Osuntokun Date: Tue, 18 Oct 2022 19:40:13 -0700 Message-ID: To: Hiroki Gondo Content-Type: multipart/alternative; boundary="00000000000088f96f05eb5a21eb" Cc: Arnoud Kouwenhoven - Pukaki Corp via bitcoin-dev Subject: Re: [bitcoin-dev] [Lightning-dev] Taro: A Taproot Asset Representation Overlay 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, 19 Oct 2022 02:40:31 -0000 --00000000000088f96f05eb5a21eb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Hiroki, (inserting the bitcoin-dev mailing list as this question is mainly concerning on-chain interaction) Thanks for taking the time to really dig into things! > When trying to verify the provenance of a given UTXO, it is necessary to > verify the state transitions of all transaction graphs without gaps from > the genesis transaction of the asset to the current location > It is necessary to prove and verify that =E2=80=9Cthe UTXO has not change= d=E2=80=9D at > that point. Correct! > As far as I can see, the specs don't mention it. You're correct that today the main BIP draft focuses mainly on transfers [1= ] to specify how exactly an asset moves from one output to another. The requirement that a "no-op" state transition also be created/verified is an implicit assumption in the current spec that we aim to remedy. The current alpha code [2] is a bit ahead of the spec, but we aim to start to catch up the spec, and also begin to add test vectors now that we have a working implementation. > The proofs for directly proving that a UTXO has not changed are its > inclusion proof in the input asset tree and its inclusion and > non-inclusion proofs in each of the output asset trees Correct, the set of inclusion and non-inclusion proofs necessary for a vali= d state transition are currently documented in `bip-taro-proof-file.md` [3]. We've also made a few updates to the proof file format to properly include = a field for the inclusion proof of a split asset's _root_ asset. This allows verifiers to properly verify the authenticity of the split (root is in the transaction, uniquely, which commits to the split, which has a proof anchored in that spit root). > Instead, it's better to set a constraint that no part of the asset tree > except the explicitly changed UTXOs should change, and verify that. Interesting, so rather than present/maintain a distinct state transition fo= r each asset unaffected, you propose that instead we present a _single_ proof for all non-modified assets that shows that a sub-tree/branch is unchanged? That's a very cool idea. Generally we have a lot of low hanging fruits re optimizing the proof file format itself. As an example, all assets in a tree will share the same Bitcoin-level proof prefix (merkle proof and block header of the anchor transaction), but the spec/implementation will currently duplicate those values several times over for each asset. If we go down another level, then the main inclusion proof for an asset ID tree is also duplicated for each asset sharing that asset ID. Restating things a bit: right now proofs are oriented from the PoV of an asset leaf in question. Instead, if we zoom out a bit and orient them at th= e _taproot output_ level, then we can remove a lot of redundant data in the current proof format, then sort of "prune" the output level proof to generate a proof for a single leaf. -- Laolu [1]: https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro.mediawiki#asset-tra= nsfers [2]: https://github.com/lightninglabs/taro [3]: https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-proof-file.mediawik= i#specification On Fri, Oct 7, 2022 at 2:33 AM Hiroki Gondo wrote: > Hi Laolu, > > I've read Taro's specs, but I'm afraid there's not enough verification of > the provenance of the asset UTXOs. > > When trying to verify the provenance of a given UTXO, it is necessary to > verify the state transitions of all transaction graphs without gaps from > the genesis transaction of the asset to the current location. At some poi= nt > in the transaction, the target UTXO itself may not change (only changes t= o > other assets or other UTXOs in the asset tree). It is necessary to prove > and verify that =E2=80=9Cthe UTXO has not changed=E2=80=9D at that point.= As far as I can > see, the specs don't mention it. > > Without this validation, asset inflation (double spending) is possible. I= n > a transaction, there is a UTXO in the input asset tree. If this UTXO does > not change in this transaction, it will remain in the output asset tree. > However, if a full copy of this UTXO is illicitly created in the asset tr= ee > of another output, the asset will be inflated (even duplicating the lowes= t > MS-SMT entirely). Both UTXOs will arbitrarily claim to be the same as the > input UTXO. > > The proofs for directly proving that a UTXO has not changed are its > inclusion proof in the input asset tree and its inclusion and non-inclusi= on > proofs in each of the output asset trees. However, generating these proof= s > for every unchanging UTXO present in the input asset tree when a > transaction occurs may not be very practical. Instead, it's better to set= a > constraint that no part of the asset tree except the explicitly changed > UTXOs should change, and verify that. > > Please let me know if I'm wrong or have overlooked any specs. Also, let m= e > know if there's anything about this that hasn't been mentioned in the spe= cs > yet. > > =E2=80=93 > Hiroki Gondo > > > 2022=E5=B9=B44=E6=9C=886=E6=97=A5(=E6=B0=B4) 0:06 Olaoluwa Osuntokun : > >> Hi y'all, >> >> I'm excited to publicly publish a new protocol I've been working on over >> the >> past few months: Taro. Taro is a Taproot Asset Representation Overlay >> which >> allows the issuance of normal and also collectible assets on the main >> Bitcoin >> chain. Taro uses the Taproot script tree to commit extra asset structure= d >> meta >> data based on a hybrid merkle tree I call a Merkle Sum Sparse Merkle Tre= e >> or >> MS-SMT. An MS-SMT combined the properties of a merkle sum tree, with a >> sparse >> merkle tree, enabling things like easily verifiable asset supply proofs >> and >> also efficient proofs of non existence (eg: you prove to me you're no >> longer >> committing to the 1-of-1 holographic beefzard card during our swap). Tar= o >> asset >> transfers are then embedded in a virtual/overlay transaction graph which >> uses a >> chain of asset witnesses to provably track the transfer of assets across >> taproot outputs. Taro also has a scripting system, which allows for >> programmatic unlocking/transfer of assets. In the first version, the >> scripting >> system is actually a recursive instance of the Bitcoin Script Taproot VM= , >> meaning anything that can be expressed in the latest version of Script >> can be >> expressed in the Taro scripting system. Future versions of the scripting >> system >> can introduce new functionality on the Taro layer, like covenants or oth= er >> updates. >> >> The Taro design also supports integration with the Lightning Network >> (BOLTs) as >> the scripting system can be used to emulate the existing HTLC structure, >> which >> allows for multi-hop transfers of Taro assets. Rather than modify the >> internal >> network, the protocol proposes to instead only recognize "assets at the >> edges", >> which means that only the sender+receiver actually need to know about an= d >> validate the assets. This deployment route means that we don't need to >> build up >> an entirely new network and liquidity for each asset. Instead, all asset >> transfers will utilize the Bitcoin backbone of the Lightning Network, >> which >> means that the internal routers just see Bitcoin transfers as normal, an= d >> don't >> even know about assets at the edges. As a result, increased demand for >> transfers of these assets as the edges (say like a USD stablecoin), whic= h >> in >> will turn generate increased demand of LN capacity, result in more >> transfers, and >> also more routing revenue for the Bitcoin backbone nodes. >> >> The set of BIPs are a multi-part suite, with the following breakdown: >> * The main Taro protocol: >> https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro.mediawiki >> * The MS-SMT structure: >> https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-ms-smt.mediawiki >> * The Taro VM: >> https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-vm.mediawiki >> * The Taro address format: >> https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-addr.mediawiki >> * The Taro Universe concept: >> https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-universe.mediawi= ki >> * The Taro flat file proof format: >> https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-proof-file.media= wiki >> >> Rather than post them all in line (as the text wouldn't fit in the >> allowed size >> limit), all the BIPs can be found above. >> >> -- Laolu >> _______________________________________________ >> Lightning-dev mailing list >> Lightning-dev@lists.linuxfoundation.org >> https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev >> > --00000000000088f96f05eb5a21eb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hiroki,

(inserting the bitcoin-dev mailing list = as this question is mainly
concerning on-chain interaction)

Thank= s for taking the time to really dig into things!

> When trying to= verify the provenance of a given UTXO, it is necessary to
> verify t= he state transitions of all transaction graphs without gaps from
> th= e genesis transaction of the asset to the current location

> It i= s necessary to prove and verify that =E2=80=9Cthe UTXO has not changed=E2= =80=9D at
> that point.

Correct!

> As far as I can s= ee, the specs don't mention it.

You're correct that today th= e main BIP draft focuses mainly on transfers [1]
to specify how exactly = an asset moves from one output to another. The
requirement that a "= no-op" state transition also be created/verified is an
implicit ass= umption in the current spec that we aim to remedy. The current
alpha cod= e [2] is a bit ahead of the spec, but we aim to start to catch up
the sp= ec, and also begin to add test vectors now that we have a working
implem= entation.

> The proofs for directly proving that a UTXO has not c= hanged are its
> inclusion proof in the input asset tree and its incl= usion and
> non-inclusion proofs in each of the output asset trees
Correct, the set of inclusion and non-inclusion proofs necessary for a= valid
state transition are currently documented in `bip-taro-proof-file= .md` [3].
We've also made a few updates to the proof file format to = properly include a
field for the inclusion proof of a split asset's = _root_ asset. This allows
verifiers to properly verify the authenticity = of the split (root is in the
transaction, uniquely, which commits to the= split, which has a proof
anchored in that spit root).

> Inste= ad, it's better to set a constraint that no part of the asset tree
&= gt; except the explicitly changed UTXOs should change, and verify that.
=
Interesting, so rather than present/maintain a distinct state transitio= n for
each asset unaffected, you propose that instead we present a _sing= le_ proof
for all non-modified assets that shows that a sub-tree/branch = is unchanged?
That's a very cool idea.

Generally we have a l= ot of low hanging fruits re optimizing the proof file
format itself. As = an example, all assets in a tree will share the same
Bitcoin-level proof= prefix (merkle proof and block header of the anchor
transaction), but t= he spec/implementation will currently duplicate those
values several tim= es over for each asset. If we go down another level, then
the main inclu= sion proof for an asset ID tree is also duplicated for each
asset sharin= g that asset ID.

Restating things a bit: right now proofs are orient= ed from the PoV of an
asset leaf in question. Instead, if we zoom out a = bit and orient them at the
_taproot output_ level, then we can remove a = lot of redundant data in the
current proof format, then sort of "pr= une" the output level proof to
generate a proof for a single leaf.<= br>
-- Laolu

[1]: https://github.com/Roasbeef/= bips/blob/bip-taro/bip-taro.mediawiki#asset-transfers
[2]: https://github.com/lightninglabs= /taro
[3]: https://github.com/Roasbeef/b= ips/blob/bip-taro/bip-taro-proof-file.mediawiki#specification
=
On Fri= , Oct 7, 2022 at 2:33 AM Hiroki Gondo <hiroki.gondo@nayuta.co> wrote:
Hi Laolu= ,

I've read Taro's specs, but I'm afraid there's not= enough verification of the provenance of the asset UTXOs.

When tryi= ng to verify the provenance of a given UTXO, it is necessary to verify the = state transitions of all transaction graphs without gaps from the genesis t= ransaction of the asset to the current location. At some point in the trans= action, the target UTXO itself may not change (only changes to other assets= or other UTXOs in the asset tree). It is necessary to prove and verify tha= t =E2=80=9Cthe UTXO has not changed=E2=80=9D at that point. As far as I can= see, the specs don't mention it.

Without this validation, asset= inflation (double spending) is possible. In a transaction, there is a UTXO= in the input asset tree. If this UTXO does not change in this transaction,= it will remain in the output asset tree. However, if a full copy of this U= TXO is illicitly created in the asset tree of another output, the asset wil= l be inflated (even duplicating the lowest MS-SMT entirely). Both UTXOs wil= l arbitrarily claim to be the same as the input UTXO.

The proofs for= directly proving that a UTXO has not changed are its inclusion proof in th= e input asset tree and its inclusion and non-inclusion proofs in each of th= e output asset trees. However, generating these proofs for every unchanging= UTXO present in the input asset tree when a transaction occurs may not be = very practical. Instead, it's better to set a constraint that no part o= f the asset tree except the explicitly changed UTXOs should change, and ver= ify that.

Please let me know if I'm wrong or have overlooked any= specs. Also, let me know if there's anything about this that hasn'= t been mentioned in the specs yet.

=E2=80=93
Hiroki Gondo


2022=E5=B9=B44=E6=9C=886=E6=97=A5(=E6=B0=B4) 0:06 Ol= aoluwa Osuntokun <laolu32@gmail.com>:
Hi y'all,

I'm excited to publi= cly publish a new protocol I've been working on over the
past few mo= nths: Taro. Taro is a Taproot Asset Representation Overlay which
allows = the issuance of normal and also collectible assets on the main Bitcoin
c= hain. Taro uses the Taproot script tree to commit extra asset structured me= ta
data based on a hybrid merkle tree I call a Merkle Sum Sparse Merkle = Tree or
MS-SMT. An MS-SMT combined the properties of a merkle sum tree, = with a sparse
merkle tree, enabling things like easily verifiable asset = supply proofs and
also efficient proofs of non existence (eg: you prove = to me you're no longer
committing to the 1-of-1 holographic beefzard= card during our swap). Taro asset
transfers are then embedded in a virt= ual/overlay transaction graph which uses a
chain of asset witnesses to p= rovably track the transfer of assets across
taproot outputs. Taro also h= as a scripting system, which allows for
programmatic unlocking/transfer = of assets. In the first version, the scripting
system is actually a recu= rsive instance of the Bitcoin Script Taproot VM,
meaning anything that c= an be expressed in the latest version of Script can be
expressed in the = Taro scripting system. Future versions of the scripting system
can intro= duce new functionality on the Taro layer, like covenants or other
update= s.

The Taro design also supports integration with the Lightning Netw= ork (BOLTs) as
the scripting system can be used to emulate the existing = HTLC structure, which
allows for multi-hop transfers of Taro assets. Rat= her than modify the internal
network, the protocol proposes to instead o= nly recognize "assets at the edges",
which means that only the= sender+receiver actually need to know about and
validate the assets. Th= is deployment route means that we don't need to build up
an entirely= new network and liquidity for each asset. Instead, all asset
transfers = will utilize the Bitcoin backbone of the Lightning Network, which
means = that the internal routers just see Bitcoin transfers as normal, and don'= ;t
even know about assets at the edges. As a result, increased demand fo= r
transfers of these assets as the edges (say like a USD stablecoin), wh= ich in
will turn generate increased demand of LN capacity, result in mor= e transfers, and
also more routing revenue for the Bitcoin backbone node= s.

The set of BIPs are a multi-part suite, with the following breakd= own:
=C2=A0* The main Taro protocol: https://github= .com/Roasbeef/bips/blob/bip-taro/bip-taro.mediawiki
=C2=A0* The MS-S= MT structure: https://github.com/Roasbeef/bips/= blob/bip-taro/bip-taro-ms-smt.mediawiki
=C2=A0* The Taro VM: https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-vm= .mediawiki
=C2=A0* The Taro address format: https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-addr.mediawiki
=C2=A0* The Taro Universe concept:
https= ://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-universe.mediawiki=C2=A0* The Taro flat file proof format: =C2=A0https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-proof-file.me= diawiki

Rather than post them all in line (as the text wouldn= 9;t fit in the allowed size
limit), all the BIPs can be found above.
=
-- Laolu
_______________________________________________
Lightning-dev mailing list
Lightning-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/ma= ilman/listinfo/lightning-dev
--00000000000088f96f05eb5a21eb--