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

chore: retry more when submitting headers #155

Merged
merged 4 commits into from
Jan 7, 2025
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

* [#154](https://github.com/babylonlabs-io/vigilante/pull/154) fix: panic in maybeResendSecondTxOfCheckpointToBTC

### Improvements

* [#155](https://github.com/babylonlabs-io/vigilante/pull/155) chore: increase retry attempts for header reporter

## v0.19.0

### Bug Fixes
Expand Down
3 changes: 2 additions & 1 deletion reporter/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ func (r *Reporter) submitHeaderMsgs(msg *btclctypes.MsgInsertHeaders) error {
err := retrywrap.Do(func() error {
res, err := r.babylonClient.InsertHeaders(context.Background(), msg)
if err != nil {
return err
return fmt.Errorf("could not submit headers: %w", err)
}
r.logger.Infof("Successfully submitted %d headers to Babylon with response code %v", len(msg.Headers), res.Code)

return nil
},
retry.Delay(r.retrySleepTime),
retry.MaxDelay(r.maxRetrySleepTime),
bootstrapAttemptsAtt,
)
if err != nil {
r.metrics.FailedHeadersCounter.Add(float64(len(msg.Headers)))
Expand Down
Loading