From ef62b06a8a025b0e66938c43967a92c4c79bf0cf Mon Sep 17 00:00:00 2001 From: Ratan Kaliani Date: Sun, 1 Dec 2024 09:22:11 -0800 Subject: [PATCH] feat: remove network proof timeout (#250) --- proposer/op/proposer/flags/flags.go | 1 + proposer/op/proposer/prove.go | 13 +++---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/proposer/op/proposer/flags/flags.go b/proposer/op/proposer/flags/flags.go index c0569a2f..8e3d26f9 100644 --- a/proposer/op/proposer/flags/flags.go +++ b/proposer/op/proposer/flags/flags.go @@ -94,6 +94,7 @@ var ( ProofTimeoutFlag = &cli.Uint64Flag{ Name: "proof-timeout", Usage: "Maximum time in seconds to spend generating a proof before giving up", + // If a proof takes more than 4 hours, assume the cluster failed to set it to failed state. Value: 14400, EnvVars: prefixEnvVars("MAX_PROOF_TIME"), } diff --git a/proposer/op/proposer/prove.go b/proposer/op/proposer/prove.go index 66407e38..2b2f58b7 100644 --- a/proposer/op/proposer/prove.go +++ b/proposer/op/proposer/prove.go @@ -50,17 +50,10 @@ func (l *L2OutputSubmitter) ProcessPendingProofs() error { continue } - // TODO: Is this proof timeout logic necessary? Users should be able to count on the proof being fulfilled or unclaimed. - timeout := uint64(time.Now().Unix()) > req.ProofRequestTime+l.DriverSetup.Cfg.ProofTimeout - if timeout || proofStatus.Status == SP1ProofStatusUnclaimed { + if proofStatus.Status == SP1ProofStatusUnclaimed { // Record the failure reason. - if timeout { - l.Log.Info("Proof timed out", "id", req.ProverRequestID) - l.Metr.RecordProveFailure("Timeout") - } else { - l.Log.Info("Proof unclaimed", "id", req.ProverRequestID, "reason", proofStatus.UnclaimDescription.String()) - l.Metr.RecordProveFailure(proofStatus.UnclaimDescription.String()) - } + l.Log.Info("Proof unclaimed", "id", req.ProverRequestID, "reason", proofStatus.UnclaimDescription.String()) + l.Metr.RecordProveFailure(proofStatus.UnclaimDescription.String()) err = l.RetryRequest(req, proofStatus) if err != nil {