Skip to content

Commit

Permalink
move masp validation from SDK into shielded_token crate
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Jun 17, 2024
1 parent 879a326 commit d056b13
Show file tree
Hide file tree
Showing 13 changed files with 404 additions and 358 deletions.
5 changes: 4 additions & 1 deletion Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ bimap = {version = "0.6.2", features = ["serde"]}
bit-set = "0.5.2"
bitflags = { version = "2.5.0", features = ["serde"] }
blake2b-rs = "0.2.0"
bls12_381 = "0.8"
byte-unit = "4.0.13"
byteorder = "1.4.2"
borsh = {version = "1.2.0", features = ["unstable__schema", "derive"]}
Expand Down
1 change: 1 addition & 0 deletions crates/namada/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ testing = [
"namada_proof_of_stake/testing",
"namada_sdk/testing",
"namada_state/testing",
"namada_token/testing",
"async-client",
"proptest",
"tempfile",
Expand Down
2 changes: 1 addition & 1 deletion crates/namada/src/ledger/native_vp/masp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ use namada_core::masp::{encode_asset_type, MaspEpoch};
use namada_core::storage::Key;
use namada_gas::GasMetering;
use namada_governance::storage::is_proposal_accepted;
use namada_sdk::masp::verify_shielded_tx;
use namada_state::{ConversionState, OptionExt, ResultExt, StateRead};
use namada_token::read_denom;
use namada_token::validation::verify_shielded_tx;
use namada_tx::BatchedTxRef;
use namada_vp_env::VpEnv;
use ripemd::Digest as RipemdDigest;
Expand Down
2 changes: 1 addition & 1 deletion crates/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ async fn run_aux(
};

tracing::info!("Loading MASP verifying keys.");
let _ = namada_sdk::masp::preload_verifying_keys();
let _ = namada::token::validation::preload_verifying_keys();
tracing::info!("Done loading MASP verifying keys.");

// Start ABCI server and broadcaster (the latter only if we are a validator
Expand Down
6 changes: 1 addition & 5 deletions crates/sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ testing = [
"async-client",
"proptest",
"jubjub",
"bls12_381",
]

# Download MASP params if they're not present
download-params = ["masp_proofs/download-params"]
download-params = ["namada_token/download-params"]
migrations = [
"namada_migrations",
"namada_account/migrations",
Expand Down Expand Up @@ -92,7 +90,6 @@ namada_vote_ext = { path = "../vote_ext" }

async-trait = { workspace = true, optional = true }
bimap.workspace = true
bls12_381 = { workspace = true, optional = true }
borsh.workspace = true
borsh-ext.workspace = true
circular-queue.workspace = true
Expand Down Expand Up @@ -166,7 +163,6 @@ namada_vote_ext = {path = "../vote_ext"}

assert_matches.workspace = true
base58.workspace = true
bls12_381.workspace = true
jubjub.workspace = true
masp_primitives = { workspace = true, features = ["test-dependencies"] }
proptest.workspace = true
Expand Down
Loading

0 comments on commit d056b13

Please sign in to comment.