Skip to content

Commit

Permalink
Now clear randomness buffers before attempting new parameter generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
murisi committed Sep 20, 2024
1 parent 5a3b3c7 commit cd0decd
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 14 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,15 @@ konst = { version = "0.3.8", default-features = false }
lazy_static = "1.4.0"
# TODO: upstreamed in https://github.com/ledger-community/rust-ledger/pull/9
ledger-lib = { git = "https://github.com/heliaxdev/rust-ledger", rev = "f96f4559b3237d09218f7583df01acf36034ea79", default-features = false, features = ["transport_tcp"] }
ledger-namada-rs = { git = "https://github.com/heliaxdev/ledger-namada", rev = "96e71198665fcc35929d1be1f1f8347bf12ad166" }
ledger-namada-rs = { git = "https://github.com/heliaxdev/ledger-namada", rev = "f54b76adcc1430db0496e894ad72cd74cfb6eb88" }
ledger-transport = "0.10.0"
ledger-transport-hid = "0.10.0"
libc = "0.2.97"
libloading = "0.7.2"
linkme = "0.3.24"
# branch = "tomas/arbitrary"
masp_primitives = { git = "https://github.com/anoma/masp", rev = "f2b0cae3e495e4f7d482e587432ec4e5f2793528" }
masp_proofs = { git = "https://github.com/anoma/masp", rev = "f2b0cae3e495e4f7d482e587432ec4e5f2793528", default-features = false, features = ["local-prover"] }
masp_primitives = { git = "https://github.com/anoma/masp", rev = "a35f73be69b21ee62cd4940f37855161cbed2a56" }
masp_proofs = { git = "https://github.com/anoma/masp", rev = "a35f73be69b21ee62cd4940f37855161cbed2a56", default-features = false, features = ["local-prover"] }
num256 = "0.3.5"
num_cpus = "1.13.0"
num-derive = "0.4"
Expand Down
6 changes: 6 additions & 0 deletions crates/apps_lib/src/client/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,12 @@ pub async fn submit_shielded_transfer(
let mut bparams: Box<dyn BuildParams> = if args.tx.use_device {
let transport = WalletTransport::from_arg(args.tx.device_transport);
let app = NamadaApp::new(transport);
// Clear hardware wallet randomness buffers
app.clean_randomness_buffers().await.map_err(|err| {
error::Error::Other(format!(
"Unable to clear randomness buffer. Error: {}", err,
))
})?;
let wallet = namada.wallet().await;
// Augment the pseudo spending key with a proof authorization key
for data in &mut args.data {
Expand Down
4 changes: 3 additions & 1 deletion crates/sdk/src/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ where

for public_key in &signing_data.public_keys {
if !used_pubkeys.contains(public_key) {
let secret_key = find_key_by_pk(&mut wallet, args, public_key)?;
let Ok(secret_key) = find_key_by_pk(&mut wallet, args, public_key) else {
continue;
};
used_pubkeys.insert(public_key.clone());
signing_tx_keypairs.push(secret_key);
}
Expand Down
6 changes: 3 additions & 3 deletions wasm/Cargo.lock

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

6 changes: 3 additions & 3 deletions wasm_for_tests/Cargo.lock

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

0 comments on commit cd0decd

Please sign in to comment.