Skip to content

Commit

Permalink
Add a metric for binding sig errors
Browse files Browse the repository at this point in the history
But keep ignoring those errors until we fix binding sigs in #1939
  • Loading branch information
teor2345 authored and dconnolly committed Mar 25, 2021
1 parent 0bad6bc commit 83bdc1a
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions zebra-consensus/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,28 @@ where
}

let bvk = shielded_data.binding_verification_key(*value_balance);

// TODO: enable async verification and remove this block - #1939
{
let item: zebra_chain::primitives::redjubjub::batch::Item = (bvk, shielded_data.binding_sig, &shielded_sighash).into();
item.verify_single().unwrap_or_else(|binding_sig_error| {
let binding_sig_error = binding_sig_error.to_string();
tracing::warn!(%binding_sig_error, "ignoring");
metrics::counter!("zebra.error.sapling.binding",
1,
"kind" => binding_sig_error);
});
// Ignore errors until binding signatures are fixed
//.map_err(|e| BoxError::from(Box::new(e)))?;
}

let _rsp = redjubjub_verifier
.ready_and()
.await?
.call((bvk, shielded_data.binding_sig, &sighash).into())
.call((bvk, shielded_data.binding_sig, &shielded_sighash).into())
.boxed();

// Disable pending sighash check #1377
// TODO: stop ignoring binding signature errors - #1939
// async_checks.push(rsp);
}

Expand Down

0 comments on commit 83bdc1a

Please sign in to comment.