Update to latest monero-rs

This commit is contained in:
Thomas Eizinger 2021-05-17 18:03:43 +10:00
parent 1af0116cac
commit 702e1767c7
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96
3 changed files with 3 additions and 11 deletions

2
Cargo.lock generated
View File

@ -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",

View File

@ -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" }

View File

@ -126,10 +126,7 @@ impl ConfidentialTransactionBuilder {
}
fn compute_pseudo_out(&mut self, commitments: Vec<EdwardsPoint>) -> EdwardsPoint {
let sum_commitments = commitments
.iter()
.map(|p| p * Scalar::from(8u8)) // TODO: Should this happen inside the bulletproof module? => yes
.sum::<EdwardsPoint>();
let sum_commitments = commitments.iter().sum::<EdwardsPoint>();
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 {