Skip to content

Commit

Permalink
add pollard
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidson-Souza committed Aug 26, 2024
1 parent 2ca359f commit ccee378
Show file tree
Hide file tree
Showing 4 changed files with 898 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/full-accumulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use std::str::FromStr;

use rustreexo::accumulator::node_hash::NodeHash;
use rustreexo::accumulator::mem_forest::MemForest;
use rustreexo::accumulator::node_hash::NodeHash;
use rustreexo::accumulator::proof::Proof;
use rustreexo::accumulator::stump::Stump;

Expand Down
8 changes: 4 additions & 4 deletions src/accumulator/mem_forest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
//!
//! # Example
//! ```
//! use rustreexo::accumulator::node_hash::NodeHash;
//! use rustreexo::accumulator::mem_forest::MemForest;
//! use rustreexo::accumulator::node_hash::NodeHash;
//! let values = vec![0, 1, 2, 3, 4, 5, 6, 7];
//! let hashes: Vec<NodeHash> = values
//! .into_iter()
Expand Down Expand Up @@ -266,8 +266,8 @@ impl MemForest {
/// and the hashes that we what to prove, but sorted by position in the tree.
/// # Example
/// ```
/// use rustreexo::accumulator::node_hash::NodeHash;
/// use rustreexo::accumulator::mem_forest::MemForest;
/// use rustreexo::accumulator::node_hash::NodeHash;
/// let mut mem_forest = MemForest::new();
/// let hashes = vec![0, 1, 2, 3, 4, 5, 6, 7]
/// .iter()
Expand Down Expand Up @@ -308,8 +308,8 @@ impl MemForest {
/// use bitcoin_hashes::sha256::Hash as Data;
/// use bitcoin_hashes::Hash;
/// use bitcoin_hashes::HashEngine;
/// use rustreexo::accumulator::node_hash::NodeHash;
/// use rustreexo::accumulator::mem_forest::MemForest;
/// use rustreexo::accumulator::node_hash::NodeHash;
/// let values = vec![0, 1, 2, 3, 4, 5, 6, 7];
/// let hashes = values
/// .into_iter()
Expand Down Expand Up @@ -633,8 +633,8 @@ mod test {
use serde::Deserialize;

use super::MemForest;
use crate::accumulator::node_hash::NodeHash;
use crate::accumulator::mem_forest::Node;
use crate::accumulator::node_hash::NodeHash;
use crate::accumulator::proof::Proof;

fn hash_from_u8(value: u8) -> NodeHash {
Expand Down
3 changes: 2 additions & 1 deletion src/accumulator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
//! a lightweight implementation of utreexo that only stores roots. Although the [stump::Stump]
//! only keeps the accumulator's roots, it still trustlessly update this state, not requiring
//! a trusted third party to learn about the current state.
pub mod node_hash;
pub mod mem_forest;
pub mod node_hash;
pub mod pollard;
pub mod proof;
pub mod stump;
pub(super) mod util;
Loading

0 comments on commit ccee378

Please sign in to comment.