Skip to content

Add configurable historical balance health check for finalized block#420

Open
Krish-vemula wants to merge 2 commits intodevelopfrom
cre/PLEX-2476-v2
Open

Add configurable historical balance health check for finalized block#420
Krish-vemula wants to merge 2 commits intodevelopfrom
cre/PLEX-2476-v2

Conversation

@Krish-vemula
Copy link
Copy Markdown
Contributor

@Krish-vemula Krish-vemula commented Apr 13, 2026

Re-implement the finalized state availability check (originally PR #352) on top of the updated chainlink-framework that uses optional interfaces instead of modifying core NodeConfig/RPCClient interfaces. This avoids forcing unrelated chains (e.g. Solana) to implement boilerplate methods.

Summary

Implements the EVM finalized-state availability check used by multinode.

The check verifies that an RPC can serve historical state at the latest finalized block by calling BalanceAt for a configurable probe address. The check is disabled by default and only runs when FinalizedStateCheckFailureThreshold > 0.

Changes

  • Added EVM config:
    • HistoricalBalanceCheckAddress
    • FinalizedStateCheckFailureThreshold
    • Errors.FinalizedStateUnavailable
  • Default probe address is:
    • 0x0000000000000000000000000000000000000000
  • Implements CheckFinalizedStateAvailability on the EVM RPC client.
  • Finalized block selection:
    • uses finalized tag when FinalityTagEnabled = true
    • uses latest - FinalityDepth when FinalityTagEnabled = false
  • Calls BalanceAt at the selected finalized block.
  • Maps configured historical-state errors to multinode.ErrFinalizedStateUnavailable.
  • Adds config docs/defaults/test fixtures.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 13, 2026

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

⚠️ Breaking Changes (3)

pkg/config.ClientErrors (1)
  • FinalizedStateUnavailable — ➕ Added
pkg/config.NodePool (2)
  • FinalizedStateCheckFailureThreshold — ➕ Added

  • HistoricalBalanceCheckAddress — ➕ Added

✅ Compatible Changes (6)

pkg/client.(*RPCClient) (1)
  • CheckFinalizedStateAvailability — ➕ Added
pkg/config.(*NodePoolConfig) (2)
  • FinalizedStateCheckFailureThreshold — ➕ Added

  • HistoricalBalanceCheckAddress — ➕ Added

pkg/config/toml.ClientErrors (1)
  • FinalizedStateUnavailable — ➕ Added
pkg/config/toml.NodePool (2)
  • FinalizedStateCheckFailureThreshold — ➕ Added

  • HistoricalBalanceCheckAddress — ➕ Added


📄 View full apidiff report

@Krish-vemula Krish-vemula marked this pull request as ready for review April 30, 2026 23:34
@Krish-vemula Krish-vemula requested review from a team as code owners April 30, 2026 23:34
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.

1 participant