verify_archive_node

Documentation for eth_defi.provider.broken_provider.verify_archive_node function.

verify_archive_node(rpc_url, chain_name)

Verify configured RPC providers and filter out broken ones.

Parses the space-separated multi-RPC configuration line and tests each endpoint individually. On archive-capable chains, checks that each provider can serve state at both block 1 and the latest block. Monad has no archive-complete historical state, so it checks only current-state availability and leaves the retained historical-state boundary to the vault price scanner. Broken providers are logged at ERROR level and filtered out; the scan continues with working providers only.

Parameters
  • rpc_url (str) – RPC URL configuration line (may contain space-separated fallbacks, mev+ prefixed endpoints are skipped)

  • chain_name (str) – Chain name for logging and Monad-specific verification

Returns

Tuple of (filtered RPC URL with only working providers, latest block number)

Raises

RuntimeError – If all providers fail verification

Return type

tuple[str, int]