Update incrementalmerkletree version and add SER_V2 serialization constant.
This commit is contained in:
parent
6c22d41a31
commit
8bb1962153
|
@ -19,6 +19,10 @@ panic = 'abort'
|
|||
codegen-units = 1
|
||||
|
||||
[patch.crates-io]
|
||||
halo2_gadgets = { git = "https://github.com/zcash/halo2.git", rev = "0c33fa4e6e41464884765c8fb4cefebafd300ca2" }
|
||||
halo2_proofs = { git = "https://github.com/zcash/halo2.git", rev = "0c33fa4e6e41464884765c8fb4cefebafd300ca2" }
|
||||
hdwallet = { git = "https://github.com/nuttycom/hdwallet", rev = "9b4c1bdbe0517e3a7a8f285d6048a37d472ba3bc" }
|
||||
incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "f23e3d89507849a24543121839eea6f40b141aff" }
|
||||
orchard = { git = "https://github.com/zcash/orchard", rev = "a30caec124aa6c6e7818b5100293204425c49de3" }
|
||||
zcash_encoding = { path = "components/zcash_encoding" }
|
||||
zcash_note_encryption = { path = "components/zcash_note_encryption" }
|
||||
|
|
|
@ -14,6 +14,7 @@ use zcash_encoding::{Optional, Vector};
|
|||
use super::{CommitmentTree, HashSer};
|
||||
|
||||
pub const SER_V1: u8 = 1;
|
||||
pub const SER_V2: u8 = 2;
|
||||
|
||||
impl HashSer for MerkleHashOrchard {
|
||||
fn read<R: Read>(mut reader: R) -> io::Result<Self>
|
||||
|
|
|
@ -5,11 +5,11 @@ use std::io::{self, Read, Write};
|
|||
use byteorder::{ReadBytesExt, WriteBytesExt};
|
||||
use nonempty::NonEmpty;
|
||||
use orchard::{
|
||||
bundle::{Action, Authorization, Authorized, Flags},
|
||||
bundle::{Authorization, Authorized, Flags},
|
||||
note::{ExtractedNoteCommitment, Nullifier, TransmittedNoteCiphertext},
|
||||
primitives::redpallas::{self, SigType, Signature, SpendAuth, VerificationKey},
|
||||
value::ValueCommitment,
|
||||
Anchor,
|
||||
Action, Anchor,
|
||||
};
|
||||
use zcash_encoding::{Array, CompactSize, Vector};
|
||||
|
||||
|
@ -156,7 +156,12 @@ pub fn read_action_without_auth<R: Read>(mut reader: R) -> io::Result<Action<()>
|
|||
pub fn read_flags<R: Read>(mut reader: R) -> io::Result<Flags> {
|
||||
let mut byte = [0u8; 1];
|
||||
reader.read_exact(&mut byte)?;
|
||||
Flags::from_byte(byte[0])
|
||||
Flags::from_byte(byte[0]).ok_or_else(|| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::InvalidInput,
|
||||
"invalid Orchard flags".to_owned(),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn read_anchor<R: Read>(mut reader: R) -> io::Result<Anchor> {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! Types and functions for building Sapling transaction components.
|
||||
|
||||
use std::fmt;
|
||||
use core::fmt;
|
||||
use std::sync::mpsc::Sender;
|
||||
|
||||
use ff::Field;
|
||||
|
|
|
@ -437,7 +437,7 @@ impl<A: Authorization> TransactionData<A> {
|
|||
sprout_bundle: self.sprout_bundle,
|
||||
sapling_bundle: self.sapling_bundle.map(|b| b.map_authorization(f_sapling)),
|
||||
orchard_bundle: self.orchard_bundle.map(|b| {
|
||||
b.authorize(
|
||||
b.map_authorization(
|
||||
&mut f_orchard,
|
||||
|f, _, s| f.map_spend_auth(s),
|
||||
|f, a| f.map_authorization(a),
|
||||
|
|
Loading…
Reference in New Issue