|
@@ -120,7 +120,6 @@ impl ConsensusUnstakeCallBuilder {
|
|
|
let value_blind = pallas::Scalar::random(&mut OsRng);
|
|
let value_blind = pallas::Scalar::random(&mut OsRng);
|
|
|
let token_blind = pallas::Scalar::random(&mut OsRng);
|
|
let token_blind = pallas::Scalar::random(&mut OsRng);
|
|
|
let signature_secret = SecretKey::random(&mut OsRng);
|
|
let signature_secret = SecretKey::random(&mut OsRng);
|
|
|
- let spend_hook = DARK_TOKEN_ID.inner();
|
|
|
|
|
let user_data_blind = pallas::Base::random(&mut OsRng);
|
|
let user_data_blind = pallas::Base::random(&mut OsRng);
|
|
|
info!("Creating unstake burn proof for input");
|
|
info!("Creating unstake burn proof for input");
|
|
|
let (proof, public_inputs) = create_unstake_burn_proof(
|
|
let (proof, public_inputs) = create_unstake_burn_proof(
|
|
@@ -129,7 +128,6 @@ impl ConsensusUnstakeCallBuilder {
|
|
|
&input,
|
|
&input,
|
|
|
value_blind,
|
|
value_blind,
|
|
|
token_blind,
|
|
token_blind,
|
|
|
- spend_hook,
|
|
|
|
|
user_data_blind,
|
|
user_data_blind,
|
|
|
signature_secret,
|
|
signature_secret,
|
|
|
)?;
|
|
)?;
|
|
@@ -139,7 +137,7 @@ impl ConsensusUnstakeCallBuilder {
|
|
|
token_commit: public_inputs.token_commit,
|
|
token_commit: public_inputs.token_commit,
|
|
|
nullifier: public_inputs.nullifier,
|
|
nullifier: public_inputs.nullifier,
|
|
|
merkle_root: public_inputs.merkle_root,
|
|
merkle_root: public_inputs.merkle_root,
|
|
|
- spend_hook,
|
|
|
|
|
|
|
+ spend_hook: public_inputs.spend_hook,
|
|
|
user_data_enc: public_inputs.user_data_enc,
|
|
user_data_enc: public_inputs.user_data_enc,
|
|
|
signature_public: public_inputs.signature_public,
|
|
signature_public: public_inputs.signature_public,
|
|
|
};
|
|
};
|
|
@@ -161,7 +159,6 @@ pub fn create_unstake_burn_proof(
|
|
|
input: &TransactionBuilderInputInfo,
|
|
input: &TransactionBuilderInputInfo,
|
|
|
value_blind: pallas::Scalar,
|
|
value_blind: pallas::Scalar,
|
|
|
token_blind: pallas::Scalar,
|
|
token_blind: pallas::Scalar,
|
|
|
- spend_hook: pallas::Base,
|
|
|
|
|
user_data_blind: pallas::Base,
|
|
user_data_blind: pallas::Base,
|
|
|
signature_secret: SecretKey,
|
|
signature_secret: SecretKey,
|
|
|
) -> Result<(Proof, ConsensusUnstakeBurnRevealed)> {
|
|
) -> Result<(Proof, ConsensusUnstakeBurnRevealed)> {
|
|
@@ -177,7 +174,7 @@ pub fn create_unstake_burn_proof(
|
|
|
pallas::Base::from(input.note.value),
|
|
pallas::Base::from(input.note.value),
|
|
|
input.note.token_id.inner(),
|
|
input.note.token_id.inner(),
|
|
|
input.note.serial,
|
|
input.note.serial,
|
|
|
- spend_hook,
|
|
|
|
|
|
|
+ input.note.spend_hook,
|
|
|
input.note.user_data,
|
|
input.note.user_data,
|
|
|
input.note.coin_blind,
|
|
input.note.coin_blind,
|
|
|
]);
|
|
]);
|
|
@@ -205,7 +202,7 @@ pub fn create_unstake_burn_proof(
|
|
|
token_commit,
|
|
token_commit,
|
|
|
nullifier,
|
|
nullifier,
|
|
|
merkle_root,
|
|
merkle_root,
|
|
|
- spend_hook,
|
|
|
|
|
|
|
+ spend_hook: input.note.spend_hook,
|
|
|
user_data_enc,
|
|
user_data_enc,
|
|
|
signature_public,
|
|
signature_public,
|
|
|
};
|
|
};
|
|
@@ -216,7 +213,7 @@ pub fn create_unstake_burn_proof(
|
|
|
Witness::Scalar(Value::known(value_blind)),
|
|
Witness::Scalar(Value::known(value_blind)),
|
|
|
Witness::Scalar(Value::known(token_blind)),
|
|
Witness::Scalar(Value::known(token_blind)),
|
|
|
Witness::Base(Value::known(input.note.serial)),
|
|
Witness::Base(Value::known(input.note.serial)),
|
|
|
- Witness::Base(Value::known(spend_hook)),
|
|
|
|
|
|
|
+ Witness::Base(Value::known(input.note.spend_hook)),
|
|
|
Witness::Base(Value::known(input.note.user_data)),
|
|
Witness::Base(Value::known(input.note.user_data)),
|
|
|
Witness::Base(Value::known(user_data_blind)),
|
|
Witness::Base(Value::known(user_data_blind)),
|
|
|
Witness::Base(Value::known(input.note.coin_blind)),
|
|
Witness::Base(Value::known(input.note.coin_blind)),
|