Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle context deadline exceeded error #2229

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion node/pkg/chain/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func (t *ChainHelper) SubmitDelegatedFallbackDirect(ctx context.Context, contrac
if err != nil {
if utils.ShouldRetryWithSwitchedJsonRPC(err) {
clientIndex = (clientIndex + 1) % len(t.clients)
} else if errors.Is(err, errorSentinel.ErrChainTransactionFail) || utils.IsNonceError(err) {
} else if errors.Is(err, errorSentinel.ErrChainTransactionFail) || utils.IsNonceError(err) || err == context.DeadlineExceeded {
nonce, err = noncemanager.GetAndIncrementNonce(t.wallet)
if err != nil {
return err
Expand Down
3 changes: 0 additions & 3 deletions node/pkg/reporter/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func (r *Reporter) regularReporterJob(ctx context.Context) error {

err = r.report(ctx, pairsMap)
if err != nil {
log.Error().Str("Player", "Reporter").Err(err).Msg("Reporter")
return err
}
return nil
Expand All @@ -102,7 +101,6 @@ func (r *Reporter) deviationJob(ctx context.Context) error {

err := r.report(ctx, deviatingAggregates)
if err != nil {
log.Error().Str("Player", "Reporter").Err(err).Msg("DeviationReport")
return err
}
return nil
Expand Down Expand Up @@ -139,7 +137,6 @@ func (r *Reporter) report(ctx context.Context, pairs map[string]SubmissionData)
defer wg.Done()
err := r.KaiaHelper.SubmitDelegatedFallbackDirect(ctx, r.contractAddress, SUBMIT_WITH_PROOFS, batchFeedHashes, batchValues, batchTimestamps, batchProofs)
if err != nil {
log.Error().Str("Player", "Reporter").Err(err).Msg("splitReport")
errorsChan <- err
}
}()
Expand Down