mmr: added partial mmr

This commit is contained in:
Augusto F. Hack
2023-10-17 17:38:18 +02:00
parent 78aa714b89
commit bde20f9752
13 changed files with 1130 additions and 136 deletions

16
src/merkle/mmr/delta.rs Normal file
View File

@@ -0,0 +1,16 @@
use super::super::{RpoDigest, Vec};
/// Container for the update data of a [PartialMmr]
#[derive(Debug)]
pub struct MmrDelta {
/// The new version of the [Mmr]
pub forest: usize,
/// Update data.
///
/// The data is packed as follows:
/// 1. All the elements needed to perform authentication path updates. These are the right
/// siblings required to perform tree merges on the [PartialMmr].
/// 2. The new peaks.
pub data: Vec<RpoDigest>,
}