Skip to content

Commit

Permalink
Fix utreexo roots matching (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus authored Oct 29, 2024
1 parent 08f5be7 commit 45b5957
Show file tree
Hide file tree
Showing 22 changed files with 1,499 additions and 1,523 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Try to run script validation with external Cairo crate.

Tasks:

* [ ] Integrate Shinigami-script
* [x] Integrate Shinigami-script

### Milestone 4 - UTXO set verification

Expand All @@ -92,7 +92,7 @@ Tasks:
* [x] implement Utreexo single output removal
* [x] implement Utreexo bridge node that generates individual inclusion proofs
* [x] implement script that runs the program e2e for a span of blocks
* [ ] implement Utreexo accumulator version compatible with [rustreexo](https://github.com/mit-dci/rustreexo)
* [x] implement Utreexo accumulator version compatible with [rustreexo](https://github.com/mit-dci/rustreexo)

### Milestone 5 - Full consensus validation

Expand Down
25 changes: 3 additions & 22 deletions docs/img/utreexo_delete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 3 additions & 22 deletions docs/img/utreexo_proof.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/utreexo.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ Batch inclusion proofs were introduced in the Utreexo paper (see Appendix) and t
<img src="./img/utreexo_proof.svg" alt=""/>
</p>

As can be seen from the illustration, the batch proof can be much more compact because more intermediate nodes can be calculated rather than be provided.

Implementation wise there are several things you should note:
- Proof nodes are in the exact order you need them to verify proof/delete leaves
- Leaf nodes might edge in (since they are not necessarily in the bottom most row), so on every step you should pick one of {leaf, proof, computed} nodes
Expand Down
4 changes: 4 additions & 0 deletions packages/utreexo/src/lib.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ pub mod vanilla {
pub mod state;
pub mod proof;
pub mod accumulator;
#[cfg(test)]
mod accumulator_tests;
}
pub mod stump {
pub mod state;
pub mod proof;
pub mod accumulator;
#[cfg(test)]
mod accumulator_tests;
}
pub mod test;

Expand Down
Loading

0 comments on commit 45b5957

Please sign in to comment.