Skip to content

Commit

Permalink
fix(celestia): use fixed delay in repeat attempts (#753)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
danwt and github-actions authored May 2, 2024
1 parent 43e2d96 commit 53002b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [](https://github.com/dymensionxyz/dymint/compare/v1.1.0-rc02...v) (2024-05-01)
# [](https://github.com/dymensionxyz/dymint/compare/v1.1.0-rc02...v) (2024-05-02)


Check failure on line 3 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / markdownlint

Multiple consecutive blank lines [Expected: 1; Actual: 2]
### Bug Fixes

Check failure on line 4 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / markdownlint

Heading levels should only increment by one level at a time [Expected: h2; Actual: h3]
Expand All @@ -12,6 +12,7 @@
* **p2p:** validate block before applying and not before caching in p2p gossiping ([#723](https://github.com/dymensionxyz/dymint/issues/723)) ([98371b5](https://github.com/dymensionxyz/dymint/commit/98371b5220613e70f3274fab5593e02ba532f7db))
* **produce loop:** handle unauthenticated error in settlement layer ([#726](https://github.com/dymensionxyz/dymint/issues/726)) ([33e78d1](https://github.com/dymensionxyz/dymint/commit/33e78d116b5f14b91b8b3bda2b6cbfee9040e2d3))
* **rpc:** nil panic in rpc/json/handler.go WriteError ([#750](https://github.com/dymensionxyz/dymint/issues/750)) ([e09709b](https://github.com/dymensionxyz/dymint/commit/e09709b428a33da002defb9f13178fa19b81a69b))
* **sync:** make sure we use a latest state index as a start point ([#760](https://github.com/dymensionxyz/dymint/issues/760)) ([43e2d96](https://github.com/dymensionxyz/dymint/commit/43e2d965f2b505751f8e5260549e909c976141ee))


Check failure on line 17 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / markdownlint

Multiple consecutive blank lines [Expected: 1; Actual: 2]

Check failure on line 18 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / markdownlint

Multiple consecutive blank lines [Expected: 1; Actual: 3]
Expand Down
5 changes: 2 additions & 3 deletions da/celestia/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ const (
)

var defaultSubmitBackoff = uretry.NewBackoffConfig(
uretry.WithInitialDelay(time.Second*4),
uretry.WithMaxDelay(time.Second*30),
uretry.WithGrowthFactor(1.6),
uretry.WithInitialDelay(time.Second*6),
uretry.WithMaxDelay(time.Second*6),
)

// Config stores Celestia DALC configuration parameters.
Expand Down
7 changes: 7 additions & 0 deletions utils/retry/backoff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,11 @@ func TestBackoff(t *testing.T) {
last = d
}
})
t.Run("maximum", func(t *testing.T) {
d := time.Second
b := NewBackoffConfig(WithInitialDelay(time.Second), WithMaxDelay(d)).Backoff()
for range 10 {
require.Equal(t, time.Second, b.Delay())
}
})
}

0 comments on commit 53002b0

Please sign in to comment.