Skip to content

Commit

Permalink
feat(verifier): don't retry verifying permanently ignored batches
Browse files Browse the repository at this point in the history
Currently, the [TEE verifier][1] – the tool for continuous SGX
attestation and batch signature verification – is [stuck][2] on batches
that failed to be proven and are marked as `permanently_ignored`. The
tool should be able to distinguish between batches that are permanently
ignored (and should be skipped) and batches that have failed but will be
retried. This PR enables that distinction.

This commit goes hand in hand with the following PR:
matter-labs/zksync-era#3321

[1]: https://github.com/matter-labs/teepot/blob/main/bin/verify-era-proof-attestation/src/main.rs
[2]: https://grafana.matterlabs.dev/goto/unFqf57Hg?orgId=1
  • Loading branch information
pbeza committed Nov 26, 2024
1 parent 1a8a9f1 commit 5a1a7b9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/verify-era-proof-attestation/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ pub async fn get_proofs(
.send(stop_receiver, http_client, rpc_url)
.await?;

if !proofs.is_empty() {
if !proofs.is_empty()
&& proofs.iter().all(|proof| {
!proof.status.eq_ignore_ascii_case("failed")
&& !proof.status.eq_ignore_ascii_case("picked_by_prover")
})
{
return Ok(proofs);
}

Expand Down Expand Up @@ -160,6 +165,7 @@ pub struct Proof {
#[serde_as(as = "Hex")]
pub proof: Vec<u8>,
pub proved_at: String,
pub status: String,
#[serde_as(as = "Hex")]
pub attestation: Vec<u8>,
}

0 comments on commit 5a1a7b9

Please sign in to comment.