Skip to content

add pollHealthChecker interface for optional RPC health checks - #83

Merged
dhaidashenko merged 17 commits into
mainfrom
cre/PLEX-2476
Apr 1, 2026
Merged

dhaidashenko merged 17 commits into
mainfrom
cre/PLEX-2476

Conversation

@Krish-vemula

@Krish-vemula Krish-vemula commented Feb 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a CheckFinalizedStateAvailability method to the RPCClient interface, enabling chain-specific RPC clients to detect non-archive nodes that cannot serve historical state at the finalized block.

When enabled via FinalizedStateCheckFailureThreshold, consecutive failures transition the node to a new FinalizedStateNotAvailable state, removing it from the live pool. The node periodically re-dials and re-verifies availability, transitioning back to Alive once the check passes.

Key details:

  • CheckFinalizedStateAvailability is optional - RPCClientBase provides a no-op default, so chains that don't need it are unaffected
  • Setting FinalizedStateCheckFailureThreshold = 0 (default) disables the check entirely with no polling overhead
  • Non-ErrFinalizedStateUnavailable errors are treated as RPC reachability errors and count toward PollFailureThreshold
  • New FSM state nodeStateFinalizedStateNotAvailable with full lifecycle loop and transitions

Supports: #352

@Krish-vemula
Krish-vemula marked this pull request as ready for review February 18, 2026 23:02
@Krish-vemula
Krish-vemula requested a review from a team as a code owner February 18, 2026 23:02
Comment thread multinode/node_lifecycle.go Resolved
Comment thread multinode/config/config.go Resolved
Comment thread multinode/node_lifecycle.go Resolved
Comment thread multinode/node_lifecycle.go Resolved
Comment thread multinode/node_lifecycle.go Resolved
Comment thread multinode/node_lifecycle.go Resolved
Comment thread multinode/node_lifecycle.go Resolved
Comment thread multinode/node_lifecycle_test.go Resolved
Add optional interface for chain-specific RPC clients to run extra health
checks during alive-loop polling. Failures count toward poll failure threshold.

Enables chain integrations to detect issues like missing historical state.
…r finalized state availability with configurable threshold and regex-based error classification.
@Krish-vemula
Krish-vemula marked this pull request as draft March 10, 2026 18:11
@Krish-vemula
Krish-vemula marked this pull request as ready for review March 10, 2026 20:24
Comment thread multinode/node_lifecycle.go Resolved
Comment thread multinode/node_lifecycle.go Resolved
Comment thread multinode/node_lifecycle.go Resolved
Comment thread multinode/node_lifecycle.go Resolved
Comment thread multinode/node_lifecycle_test.go Resolved
@Krish-vemula
Krish-vemula marked this pull request as draft March 11, 2026 16:56
@Krish-vemula
Krish-vemula marked this pull request as ready for review March 11, 2026 18:08
Comment thread multinode/node_lifecycle.go Resolved
dhaidashenko
dhaidashenko previously approved these changes Mar 18, 2026
Comment thread multinode/node_lifecycle.go Resolved
amit-momin
amit-momin previously approved these changes Mar 25, 2026
Comment thread multinode/node_lifecycle.go Resolved
@Krish-vemula
Krish-vemula enabled auto-merge (squash) April 1, 2026 14:40
@Krish-vemula
Krish-vemula disabled auto-merge April 1, 2026 14:40
@Krish-vemula
Krish-vemula dismissed stale reviews from dhaidashenko and amit-momin via 49df6c4 April 1, 2026 14:57
@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-framework/multinode

⚠️ Breaking Changes (4)

NodeConfig (1)
  • FinalizedStateCheckFailureThreshold — ➕ Added
RPCClient[CHAIN_ID ID, HEAD Head] (1)
  • CheckFinalizedStateAvailability — ➕ Added
nodeMetrics (2)
  • IncrementFinalizedStateFailed — ➕ Added

  • IncrementNodeTransitionsToFinalizedStateNotAvailable — ➕ Added

✅ Compatible Changes (6)

./ (1)
  • ErrFinalizedStateUnavailable — ➕ Added
(*RPCClientBase[HEAD]) (2)
  • CheckFinalizedStateAvailability — ➕ Added

  • CheckFinalizedStateAvailability — ➕ Added

config.(*MultiNodeConfig) (1)
  • FinalizedStateCheckFailureThreshold — ➕ Added
config.MultiNode (1)
  • FinalizedStateCheckFailureThreshold — ➕ Added
config.MultiNodeConfig (1)
  • FinalizedStateCheckFailureThreshold — ➕ Added

📄 View full apidiff report

@dhaidashenko
dhaidashenko merged commit be2bc6b into main Apr 1, 2026
25 checks passed
@dhaidashenko
dhaidashenko deleted the cre/PLEX-2476 branch April 1, 2026 16:29
Krish-vemula added a commit that referenced this pull request Apr 9, 2026
Krish-vemula added a commit that referenced this pull request Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants