|
@@ -406,7 +406,6 @@ impl Drk {
|
|
|
let user_coin_blind = pallas::Base::random(&mut OsRng);
|
|
let user_coin_blind = pallas::Base::random(&mut OsRng);
|
|
|
let dao_serial = pallas::Base::random(&mut OsRng);
|
|
let dao_serial = pallas::Base::random(&mut OsRng);
|
|
|
let dao_coin_blind = pallas::Base::random(&mut OsRng);
|
|
let dao_coin_blind = pallas::Base::random(&mut OsRng);
|
|
|
- let input_value_blind = pallas::Scalar::random(&mut OsRng);
|
|
|
|
|
|
|
|
|
|
// TODO: FIXME: Clean this up and create an API
|
|
// TODO: FIXME: Clean this up and create an API
|
|
|
let exec_signature_secret = SecretKey::random(&mut OsRng);
|
|
let exec_signature_secret = SecretKey::random(&mut OsRng);
|
|
@@ -414,7 +413,6 @@ impl Drk {
|
|
|
let mut xfer_inputs = vec![];
|
|
let mut xfer_inputs = vec![];
|
|
|
|
|
|
|
|
let mut input_coins = vec![];
|
|
let mut input_coins = vec![];
|
|
|
- let mut input_value_blinds = vec![];
|
|
|
|
|
let mut input_amount = 0;
|
|
let mut input_amount = 0;
|
|
|
for coin in coins {
|
|
for coin in coins {
|
|
|
input_amount += coin.note.value;
|
|
input_amount += coin.note.value;
|
|
@@ -427,6 +425,7 @@ impl Drk {
|
|
|
let money_merkle_tree = self.get_money_tree().await?;
|
|
let money_merkle_tree = self.get_money_tree().await?;
|
|
|
let money_merkle_root = money_merkle_tree.root(0).unwrap();
|
|
let money_merkle_root = money_merkle_tree.root(0).unwrap();
|
|
|
|
|
|
|
|
|
|
+ let mut input_value_blind = pallas::Scalar::from(0);
|
|
|
for coin in &input_coins {
|
|
for coin in &input_coins {
|
|
|
let value_blind = pallas::Scalar::random(&mut OsRng);
|
|
let value_blind = pallas::Scalar::random(&mut OsRng);
|
|
|
let sig_secret = SecretKey::random(&mut OsRng);
|
|
let sig_secret = SecretKey::random(&mut OsRng);
|
|
@@ -444,7 +443,7 @@ impl Drk {
|
|
|
signature_secret: sig_secret,
|
|
signature_secret: sig_secret,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- input_value_blinds.push(value_blind);
|
|
|
|
|
|
|
+ input_value_blind += value_blind;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
let input_sum = input_coins.iter().map(|x| x.note.value).sum::<u64>();
|
|
let input_sum = input_coins.iter().map(|x| x.note.value).sum::<u64>();
|