Skip to content

Commit b49021c

Browse files
Implement the Pollard
Pollard is a middle-grownd between full tree and Stump that allows holding only a subset of UTXOs, while still allowing proving those elements. This implementation only allows for full pollards, where all leaves are present. Allowing partial pollard will be accomplished later. The implementation uses interior mutability to work. A Pollard is different from a normal Binary Tree because nodes points to it's sibling, not their children. This makes recursive algoritms more evolved, specially during deletions. This implementation is all iteractive, and carefully uses interior mutability with Cell and RefCell. Those smart pointers allows runtime borrow checking, if some of the Borrowing Rules is broken, it panics. Here, we take care of not holding reference to the interior of a Cell or RefCell for too log, and not passing `mut ref` arround. Only a few functions with very limited scope can use `mut ref`s. A extensible collection of tests is also provided, to check for code correctness and soundness. .
1 parent ff46d1f commit b49021c

File tree

4 files changed

+830
-54
lines changed

4 files changed

+830
-54
lines changed

src/accumulator/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
#![allow(dead_code)]
2-
31
pub mod pollard;
42
pub mod proof;
53
pub mod stump;
64
pub mod types;
7-
pub mod util;
5+
pub mod util;

0 commit comments

Comments
 (0)