fetch_monad_historical_state_start_block
Documentation for eth_defi.vault.historical.fetch_monad_historical_state_start_block function.
- fetch_monad_historical_state_start_block(web3, start_block, end_block)
Find the earliest block whose Monad state the connected provider can read.
Monad retains all historical transactional data, but its RPC providers retain historical state only while their state tries fit on disk. The window is provider-specific and may move forward over time. Probe the same Multicall3 contract used by the historical price reader and binary-search the boundary between unavailable and available state before creating any output file. See Monad historical data documentation.
- Parameters
web3 (web3.main.Web3) – Monad JSON-RPC connection to probe.
start_block (int) – Earliest block otherwise requested by the caller.
end_block (int) – Latest block otherwise requested by the caller. It must be readable, because an unavailable end block indicates a provider failure rather than ordinary historical-state eviction.
- Returns
The earliest readable block within
start_blockandend_block.- Raises
RuntimeError – If the provider cannot read state at
end_block.- Return type