keep-starknet-strange / raito

Bitcoin ZK client written in Cairo.
https://raito.wtf
MIT License
40 stars 34 forks source link

[feat] Add script that extends program arguments with Utreexo state and inclusion proofs #211

Closed m-kus closed 1 month ago

m-kus commented 1 month ago

Context

Currently we have several scripts for preparing program arguments:

Currently UTXOs are not constrained, so we want to leverage Utreexo accumulator to fix that.
It would require a fully-fledged backend that handles the large Utreexo forest containing millions of nodes.
But until then we still want to test the integration at least on a small subset of blocks.

Task

Create a new script that:

For every block in the source file the script has to:

The output would look like:

{
  "state": {
     "chain_state": {},
     "utreexo_state": {},
  },
  "updates": [{
     "block": {},
     "utreexo_proofs": [{}]
  }],
  "expected": {
    "chain_state": {},
    "utreexo_state": {},
  }
}

Implementation hints

Since Utreexo accumulator operates on hashes (leaves) you'll have to reimplement Outpoint hashing. Some hints:

Materials

Jeanmichel7 commented 1 month ago

Interested

onlydustapp[bot] commented 1 month ago

Hey @Jeanmichel7! Thanks for showing interest. We've created an application for you to contribute to Raito - Bitcoin ZK Client. Go check it out on OnlyDust!