Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consensus: ignore sighash-derived checks until #1377 #1379

Merged
merged 1 commit into from
Nov 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions zebra-consensus/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ where

check::has_inputs_and_outputs(&tx)?;

// TODO: rework this code
// TODO: rework this code #1377
let sighash = tx.sighash(
upgrade,
HashType::ALL, // TODO: check these
Expand All @@ -179,7 +179,8 @@ where

// Then, pass those items to self.joinsplit to verify them.

check::validate_joinsplit_sig(joinsplit_data, sighash.as_bytes())?;
// Ignore pending sighash check #1377
let _ = check::validate_joinsplit_sig(joinsplit_data, sighash.as_bytes());
}

if let Some(shielded_data) = shielded_data {
Expand All @@ -194,12 +195,13 @@ where
// description while adding the resulting future to
// our collection of async checks that (at a
// minimum) must pass for the transaction to verify.
let rsp = redjubjub_verifier
let _rsp = redjubjub_verifier
.ready_and()
.await?
.call((spend.rk, spend.spend_auth_sig, &sighash).into());

async_checks.push(rsp.boxed());
// Disable pending sighash check #1377
//async_checks.push(rsp.boxed());

// TODO: prepare public inputs for spends, then create
// a groth16::Item and pass to self.spend
Expand Down Expand Up @@ -227,12 +229,14 @@ where
});

let bvk = shielded_data.binding_verification_key(*value_balance);
let rsp = redjubjub_verifier
let _rsp = redjubjub_verifier
.ready_and()
.await?
.call((bvk, shielded_data.binding_sig, &sighash).into())
.boxed();
async_checks.push(rsp);

// Disable pending sighash check #1377
//async_checks.push(rsp);
}

// Finally, wait for all asynchronous checks to complete
Expand Down