Skip to content

Commit 39c5997

Browse files
committed
update docs
1 parent 4d05ead commit 39c5997

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

zebra-chain/src/orchard/tree/legacy.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
//! Orchard serialization legacy code.
2+
//!
3+
//! We create a [`LegacyNoteCommitmentTree`] which is a copy of [`NoteCommitmentTree`] but where serialization and
4+
//! deserialization can be derived.
5+
//! To do this we create a [`LegacyFrontier`] which is a legacy `Frontier` structure that can be found in [1],
6+
//! In order to make [`LegacyFrontier`] serializable we also have our own versions of `NonEmptyFrontier` ([`LegacyNonEmptyFrontier`]),
7+
//! `Leaf`([`LegacyLeaf`]) and `Position`([`LegacyPosition`]) that can be found in [1] or [2].
8+
//!
9+
//! Conversions methods to/from [`LegacyNoteCommitmentTree`] to/from [`NoteCommitmentTree`] are defined also in this file.
10+
//!
11+
//! [1]: https://github.com/zcash/incrementalmerkletree/blob/incrementalmerkletree-v0.3.1/src/bridgetree.rs
12+
//! [2]: https://github.com/zcash/incrementalmerkletree/blob/incrementalmerkletree-v0.3.1/src/lib.rs
213
314
use incrementalmerkletree::{frontier::Frontier, Position};
415

516
use super::{Node, NoteCommitmentTree, Root, MERKLE_DEPTH};
617

18+
/// A legacy version of [`NoteCommitmentTree`].
719
#[derive(Debug, Serialize, Deserialize)]
820
#[serde(rename = "NoteCommitmentTree")]
921
#[allow(missing_docs)]

zebra-chain/src/sapling/tree/legacy.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
//! Sapling serialization legacy code.
2+
//!
3+
//! We create a [`LegacyNoteCommitmentTree`] which is a copy of [`NoteCommitmentTree`] but where serialization and
4+
//! deserialization can be derived.
5+
//! To do this we create a [`LegacyFrontier`] which is a legacy `Frontier` structure that can be found in [1],
6+
//! In order to make [`LegacyFrontier`] serializable we also have our own versions of `NonEmptyFrontier` ([`LegacyNonEmptyFrontier`]),
7+
//! `Leaf`([`LegacyLeaf`]) and `Position`([`LegacyPosition`]) that can be found in [1] or [2].
8+
//!
9+
//! Conversions methods to/from [`LegacyNoteCommitmentTree`] to/from [`NoteCommitmentTree`] are defined also in this file.
10+
//!
11+
//! [1]: https://github.com/zcash/incrementalmerkletree/blob/incrementalmerkletree-v0.3.1/src/bridgetree.rs
12+
//! [2]: https://github.com/zcash/incrementalmerkletree/blob/incrementalmerkletree-v0.3.1/src/lib.rs
213
314
use incrementalmerkletree::{frontier::Frontier, Position};
415

516
use super::{Node, NoteCommitmentTree, Root, MERKLE_DEPTH};
617

7-
///
18+
/// A legacy version of [`NoteCommitmentTree`].
819
#[derive(Debug, Serialize, Deserialize)]
920
#[serde(rename = "NoteCommitmentTree")]
1021
#[allow(missing_docs)]

zebra-chain/src/sprout/tree/legacy.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
//! Sprout serialization legacy code.
2+
//!
3+
//! We create a [`LegacyNoteCommitmentTree`] which is a copy of [`NoteCommitmentTree`] but where serialization and
4+
//! deserialization can be derived.
5+
//! To do this we create a [`LegacyFrontier`] which is a legacy `Frontier` structure that can be found in [1],
6+
//! In order to make [`LegacyFrontier`] serializable we also have our own versions of `NonEmptyFrontier` ([`LegacyNonEmptyFrontier`]),
7+
//! `Leaf`([`LegacyLeaf`]) and `Position`([`LegacyPosition`]) that can be found in [1] or [2].
8+
//!
9+
//! Conversions methods to/from [`LegacyNoteCommitmentTree`] to/from [`NoteCommitmentTree`] are defined also in this file.
10+
//!
11+
//! [1]: https://github.com/zcash/incrementalmerkletree/blob/incrementalmerkletree-v0.3.1/src/bridgetree.rs
12+
//! [2]: https://github.com/zcash/incrementalmerkletree/blob/incrementalmerkletree-v0.3.1/src/lib.rs
213
314
use incrementalmerkletree::{frontier::Frontier, Position};
415

516
use super::{Node, NoteCommitmentTree, Root, MERKLE_DEPTH};
617

7-
///
18+
/// A legacy version of [`NoteCommitmentTree`].
819
#[derive(Debug, Serialize, Deserialize)]
920
#[serde(rename = "NoteCommitmentTree")]
1021
pub struct LegacyNoteCommitmentTree {

0 commit comments

Comments
 (0)