Closed m-kus closed 1 month ago
@bloomingpeach wanna give it a try?
@m-kus can I take this on ?
Hey @ShantelPeters! Thanks for showing interest. We've created an application for you to contribute to Raito - Bitcoin ZK Client. Go check it out on OnlyDust!
Hey @b-j-roberts want to take this up
yes @m-kus I'd like to work on this issue.
Hey @bloomingpeach! Thanks for showing interest. We've created an application for you to contribute to Raito - Bitcoin ZK Client. Go check it out on OnlyDust!
Context
How can we check that the outpoints we attach to the transaction inputs are legit? They are not part of the encoded transaction hence do not contribute to the merkle root. Currently all validations that use data from the outpoints are underconstrained.
The most straightforward way to address that is to maintain the so-called UTXO set:
But UTXO set can be pretty large and it is very expensive to do that in a Cairo program. Instead we can do the following:
So the workflow would look like the following:
We will use the Utreexo accumulator to implement this scheme.
Task
In this task we are going to implement another primitive required for Utreexo integration: verifying inclusion proof for a particular UTXO.
Implementation hints
You'd need to implement
UtreexoAccumulator::verify
forUtreexoState
.Utreexo leaves are Poseidon hashes of outpoints.
There will likely to be some common Merkle hashing utils shared with #167
References