diff --git a/Cargo.lock b/Cargo.lock index 48546906..97f3dfee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2265,7 +2265,7 @@ dependencies = [ [[package]] name = "monero" version = "0.12.0" -source = "git+https://github.com/comit-network/monero-rs?branch=open-outputs#9f93483d9b648cdbe4a4e0db2c5b0b306473b424" +source = "git+https://github.com/comit-network/monero-rs?branch=fix-bulletproofs#fae784dabbbc7c759334a031a2802813fffec792" dependencies = [ "base58-monero", "clear_on_drop", diff --git a/Cargo.toml b/Cargo.toml index 27832bef..12a3b81c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,4 +3,4 @@ members = ["monero-adaptor", "monero-harness", "monero-rpc", "swap", "monero-wal [patch.crates-io] torut = { git = "https://github.com/bonomat/torut/", branch = "feature-flag-tor-secret-keys", default-features = false, features = [ "v3", "control" ] } -monero = { git = "https://github.com/comit-network/monero-rs", branch = "open-outputs" } +monero = { git = "https://github.com/comit-network/monero-rs", branch = "fix-bulletproofs" } diff --git a/monero-wallet/src/lib.rs b/monero-wallet/src/lib.rs index 8fb4eecf..547bf83b 100644 --- a/monero-wallet/src/lib.rs +++ b/monero-wallet/src/lib.rs @@ -126,10 +126,7 @@ impl ConfidentialTransactionBuilder { } fn compute_pseudo_out(&mut self, commitments: Vec) -> EdwardsPoint { - let sum_commitments = commitments - .iter() - .map(|p| p * Scalar::from(8u8)) // TODO: Should this happen inside the bulletproof module? => yes - .sum::(); + let sum_commitments = commitments.iter().sum::(); let fee = self.compute_fee(); @@ -137,7 +134,6 @@ impl ConfidentialTransactionBuilder { self.base.txn_fee = VarInt(fee); self.base.out_pk = commitments .iter() - .map(|p| p * Scalar::from(8u8)) .map(|p| CtKey { mask: Key { key: p.compress().0, @@ -220,10 +216,6 @@ impl ConfidentialTransactionBuilder { }, }]; - let output_commitments = output_commitments - .into_iter() - .map(|p| p.decompress().unwrap()) - .collect(); // TODO: Return EdwardsPoints from bulletproof lib let pseudo_out = self.compute_pseudo_out(output_commitments); // TODO: either mutate or return let mut transaction = Transaction {