Skip to content

Commit

Permalink
Merge branch 'develop' into feat/split_coordinator_cron
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp authored Oct 19, 2023
2 parents c4591fa + c2ab4bf commit aa70a82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion common/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime/debug"
)

var tag = "v4.3.36"
var tag = "v4.3.37"

var commit = func() string {
if info, ok := debug.ReadBuildInfo(); ok {
Expand Down
11 changes: 5 additions & 6 deletions prover/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"crypto/ecdsa"
"fmt"
"net/http"
"sync"
"time"

Expand Down Expand Up @@ -35,13 +34,13 @@ func NewCoordinatorClient(cfg *config.CoordinatorConfig, proverName string, priv
SetRetryCount(cfg.RetryCount).
SetRetryWaitTime(time.Duration(cfg.RetryWaitTimeSec) * time.Second).
SetBaseURL(cfg.BaseURL).
AddRetryCondition(func(r *resty.Response, _ error) bool {
// Check for HTTP 5xx errors, e.g., coordinator is restarting.
if r.StatusCode() >= http.StatusInternalServerError {
log.Warn("Received unexpected HTTP response. Retrying...", "status code", r.StatusCode())
AddRetryAfterErrorCondition().
AddRetryCondition(func(response *resty.Response, err error) bool {
if err != nil {
log.Warn("Encountered an error while sending the request. Retrying...", "error", err)
return true
}
return false
return response.IsError()
})

log.Info("successfully initialized prover client",
Expand Down

0 comments on commit aa70a82

Please sign in to comment.