File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 1
1
//! 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
2
13
3
14
use incrementalmerkletree:: { frontier:: Frontier , Position } ;
4
15
5
16
use super :: { Node , NoteCommitmentTree , Root , MERKLE_DEPTH } ;
6
17
18
+ /// A legacy version of [`NoteCommitmentTree`].
7
19
#[ derive( Debug , Serialize , Deserialize ) ]
8
20
#[ serde( rename = "NoteCommitmentTree" ) ]
9
21
#[ allow( missing_docs) ]
Original file line number Diff line number Diff line change 1
1
//! 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
2
13
3
14
use incrementalmerkletree:: { frontier:: Frontier , Position } ;
4
15
5
16
use super :: { Node , NoteCommitmentTree , Root , MERKLE_DEPTH } ;
6
17
7
- ///
18
+ /// A legacy version of [`NoteCommitmentTree`].
8
19
#[ derive( Debug , Serialize , Deserialize ) ]
9
20
#[ serde( rename = "NoteCommitmentTree" ) ]
10
21
#[ allow( missing_docs) ]
Original file line number Diff line number Diff line change 1
1
//! 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
2
13
3
14
use incrementalmerkletree:: { frontier:: Frontier , Position } ;
4
15
5
16
use super :: { Node , NoteCommitmentTree , Root , MERKLE_DEPTH } ;
6
17
7
- ///
18
+ /// A legacy version of [`NoteCommitmentTree`].
8
19
#[ derive( Debug , Serialize , Deserialize ) ]
9
20
#[ serde( rename = "NoteCommitmentTree" ) ]
10
21
pub struct LegacyNoteCommitmentTree {
You can’t perform that action at this time.
0 commit comments