Skip to content

Commit

Permalink
consensus: ignore sighash-derived checks until #1377
Browse files Browse the repository at this point in the history
  • Loading branch information
hdevalence committed Nov 25, 2020
1 parent f798aef commit b9347e0
Showing 1 changed file with 10 additions and 6 deletions.
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

0 comments on commit b9347e0

Please sign in to comment.