# Proving UTXO set inclusion in zero-knowledge

**URL:** <https://delvingbitcoin.org/t/proving-utxo-set-inclusion-in-zero-knowledge/1142>\
**Category:** Implementation\
**Tags:** announcement, lightning\
**Created:** [September 16, 2024, 12:55pm UTC](https://delvingbitcoin.org/t/proving-utxo-set-inclusion-in-zero-knowledge/1142 "2024-09-16T12:55:40Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![AdamISZ](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/adamisz/32/418_2.png) [@AdamISZ](https://delvingbitcoin.org/u/AdamISZ)\
**Post date:** [September 18, 2024, 7:18pm UTC](https://delvingbitcoin.org/t/proving-utxo-set-inclusion-in-zero-knowledge/1142/10 "2024-09-18T19:18:58Z")

</div>

> [@ariard](#):
>
> So no guarantee that the utxo set inclusion proof cannot be double-spend, and as such a `channel_announcement` being unboundedly replay to dos lightning nodes.

> [@ajtowns](#):
>
> Also, can’t you use the same utxo multiple times with different blinding factors to advertise multiple lightning channels? If you make the “verifier’s public key” (`P'` in `P' = P+bG`) be the channel’s advertised public key (`musig(A,B)`?) that might be good enough to prevent selling utxos.

This is already addressed in the aut-ct construction with key images; the application stores a flat file database of those key images. The same could also be done here afaik. You attach a trivial sigma-protocol type proof of DLEQ between a key image I and the non-blinded part of the blinded commitment to P, i.e. proof that C = xG + bH AND I = xJ.

> [@ajtowns](#):
>
> I think in comparison to [taproot ring signatures](https://github.com/jonasnick/taproot-ringsig) this doesn’t require that the verifier have the full utxo set, just the corresponding “utreexo” root, which seems like a win.

Yes; also in Curve Trees the verifier can verify just against the root, it’s the same principle.

But (maybe stating the obvious?) basic AOS style ring signatures never really felt viable for these tasks, since they scale linearly in the anonymity set, so you can only get quite trivially small anonymity sets, which are probably too fragile to claim any real anonymity. Moreover, in some kind of flat network structure of interaction (like Lightning) you need verification of others’ proofs to be fast, so that you can’t get DOS just with _claims_ of ownership etc. That’s why I gravitated towards the Curve Tree structure. This alternative STARK direction could well be viable too.

> [@ajtowns](#):
>
> I don’t see how this really works for lightning channel announcements – can’t you just give a proof for a utxo as at block X, then spend it in block X+1? ie, at best, isn’t this just proof-of-use-of-blockspace?

This feels like the most important question. Currently announcements are made publically of channel utxos. Assuming the key image (no double spend) thing mentioned above, how much worse is it to announce privately a utxo of the same size, for DOS resistance?

My (slightly woolly) thinking on this was always, while simply announcing money owned, not having to spend it, is obviously a vastly smaller cost, you can filter and control this to some extent: filters by age and by value can be included in your merkle/curve tree setup to make it that only “higher quality” utxos are allowed (e.g. amount =T^aV^b for age T, size V, perhaps). But … how is this defence really worse than the advertisement of “real” channels (which after all is not a meaningful distinction, in taproot/musig land, right?).

---

_[View the full topic](https://delvingbitcoin.org/t/proving-utxo-set-inclusion-in-zero-knowledge/1142)._
