From 9c2271cd2f50124c3b6c8b35fc9700cb5eccb03c Mon Sep 17 00:00:00 2001 From: gavin Date: Mon, 30 Sep 2024 10:23:08 +0800 Subject: [PATCH] fix --- .../taiko-client/prover/proof_producer/sgx_producer.go | 7 +++++++ .../taiko-client/prover/proof_producer/zkvm_producer.go | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/packages/taiko-client/prover/proof_producer/sgx_producer.go b/packages/taiko-client/prover/proof_producer/sgx_producer.go index ed2d3b544d..0198d2d0e3 100644 --- a/packages/taiko-client/prover/proof_producer/sgx_producer.go +++ b/packages/taiko-client/prover/proof_producer/sgx_producer.go @@ -308,6 +308,13 @@ func (s *SGXProofProducer) requestBatchProof( return nil, fmt.Errorf("failed to get batch proof, msg: %s", output.ErrorMessage) } + if output.Data.Status == ErrProofInProgress.Error() { + return nil, ErrProofInProgress + } + if output.Data.Status == StatusRegistered { + return nil, ErrRetry + } + if len(output.Data.Proof.Proof) == 0 { return nil, errEmptyProof } diff --git a/packages/taiko-client/prover/proof_producer/zkvm_producer.go b/packages/taiko-client/prover/proof_producer/zkvm_producer.go index c044d82dbb..3518e541f5 100644 --- a/packages/taiko-client/prover/proof_producer/zkvm_producer.go +++ b/packages/taiko-client/prover/proof_producer/zkvm_producer.go @@ -435,6 +435,12 @@ func (s *ZKvmProofProducer) requestBatchProof( if len(output.ErrorMessage) > 0 { return nil, fmt.Errorf("failed to get batch proof, msg: %s", output.ErrorMessage) } + if output.Data.Status == ErrProofInProgress.Error() { + return nil, ErrProofInProgress + } + if output.Data.Status == StatusRegistered { + return nil, ErrRetry + } if len(output.Data.Proof.Proof) == 0 { return nil, errEmptyProof