Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ path = "src/graphql-cli.rs"
required-features = ["graphql"]

[dependencies]
zcash-trees = {git = "https://github.com/hhanh00/zcash-trees.git", rev = "59aed0867b4923437b725a9ded365e458a823d8a"}
zcash-trees = {git = "https://github.com/hhanh00/zcash-trees.git", rev = "83bd1e4f03e2afacc54cd0f16f365194dccf09b5"}
flutter_rust_bridge = {version = "=2.11.1", optional = true}

anyhow = "1.0.97"
Expand Down Expand Up @@ -122,7 +122,7 @@ ledger-transport-zemu = {version = "0.10.0", optional = true}
#path = "../../zcv/zcvlib"
git = "https://github.com/hhanh00/zcv"
version = "0.6.0"
rev = "57edfb2d23d029954194f0941c63be5e6d06b218"
rev = "aaa248edb5ff04c5ddb7ed2d733923c5e1d97129"
optional = true

[target.'cfg(target_os = "macos")'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion rust/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ async fn handle_message(
msg: WarpSyncMessage,
tx_progress: &Sender<SyncProgress>,
) -> Result<()> {
tracing::info!(target: "warp", "Warp Message: {msg}");
tracing::info!(target: "warp", "Warp Message: {msg:?}");
match msg {
WarpSyncMessage::Transaction(tx) => {
// ignore duplicate transactions because they could have been created
Expand Down
18 changes: 14 additions & 4 deletions rust/src/warp/decrypter.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::lwd::{CompactOrchardAction, CompactSaplingOutput};
use zcash_protocol::consensus::ZIP212_GRACE_PERIOD;
use zcash_trees::network::Network;
use zcash_trees::types::Note;

Expand All @@ -19,7 +20,9 @@ use orchard::{
note_encryption::{CompactAction, OrchardDomain},
};
use sapling_crypto::{
note_encryption::{plaintext_version_is_valid, SaplingDomain, Zip212Enforcement, KDF_SAPLING_PERSONALIZATION},
note_encryption::{
plaintext_version_is_valid, SaplingDomain, Zip212Enforcement, KDF_SAPLING_PERSONALIZATION,
},
SaplingIvk,
};
use zcash_note_encryption::EphemeralKeyBytes;
Expand All @@ -30,9 +33,16 @@ fn zip212(network: &Network, height: u32) -> Zip212Enforcement {
use zcash_protocol::consensus::{BlockHeight, NetworkUpgrade, Parameters};
let height = BlockHeight::from_u32(height);
match network.activation_height(NetworkUpgrade::Canopy) {
Some(h) if height >= h => Zip212Enforcement::On,
None => Zip212Enforcement::On,
_ => Zip212Enforcement::GracePeriod,
Some(h) => {
if height >= h + ZIP212_GRACE_PERIOD {
Zip212Enforcement::On
} else if height >= h {
Zip212Enforcement::GracePeriod
} else {
Zip212Enforcement::Off
}
}
_ => Zip212Enforcement::On, // this doesn't apply for Zcash
}
}

Expand Down
Loading