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

No new finalized Heads Implementation #13907

Merged
merged 12 commits into from
Jul 30, 2024
Merged
5 changes: 5 additions & 0 deletions .changeset/wild-seals-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Added new health check that ensures RPC provides new finalized heads at least every `NoNewFinalizedHeadsThreshold` #added
194 changes: 136 additions & 58 deletions common/client/mock_node_client_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

138 changes: 136 additions & 2 deletions common/client/mock_rpc_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions common/client/mocks/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package mocks
import "time"

type ChainConfig struct {
IsFinalityTagEnabled bool
FinalityDepthVal uint32
NoNewHeadsThresholdVal time.Duration
FinalizedBlockOffsetVal uint32
IsFinalityTagEnabled bool
FinalityDepthVal uint32
NoNewHeadsThresholdVal time.Duration
FinalizedBlockOffsetVal uint32
NoNewFinalizedHeadsThresholdVal time.Duration
}

func (t ChainConfig) NodeNoNewHeadsThreshold() time.Duration {
Expand All @@ -24,3 +25,7 @@ func (t ChainConfig) FinalityTagEnabled() bool {
func (t ChainConfig) FinalizedBlockOffset() uint32 {
return t.FinalizedBlockOffsetVal
}

func (t ChainConfig) NoNewFinalizedHeadsThreshold() time.Duration {
return t.NoNewFinalizedHeadsThresholdVal
}
Loading
Loading