fetch_block_timestamps_multiprocess_auto_backend
Documentation for eth_defi.event_reader.multicall_timestamp.fetch_block_timestamps_multiprocess_auto_backend function.
- fetch_block_timestamps_multiprocess_auto_backend(chain_id, web3factory, start_block, end_block, step, display_progress=True, max_workers=8, timeout=120, cache_path=PosixPath('/home/runner/.tradingstrategy/block-timestamp'), checkpoint_freq=20000, hypersync_client=None, rpc_request_stats=None)
Fetch block timestamps, choose backend.
If Hypersync is available, use the optimised code path
For arguments see
fetch_block_timestamps_multiprocess().- Parameters
step (int) – Sampling interval. Wide intervals use a sparse, cache-aware Hypersync path instead of downloading every intervening block header.
chain_id (int) –
web3factory (eth_defi.event_reader.web3factory.Web3Factory) –
start_block (int) –
end_block (int) –
cache_path (Optional[pathlib.Path]) –
checkpoint_freq (int) –
hypersync_client (hypersync.HypersyncClient | None) –
rpc_request_stats (Optional[eth_defi.provider.rpcdb.RPCRequestStats]) –
- Returns
Pandas series block number (int) -> block timestamp (datetime)
The mapping is deliberately keyed by block number. Modern chains such as Monad can produce multiple blocks in one second, while block-header timestamps retain one-second precision. Do not reverse this mapping or treat timestamp values as unique; retaining the same timestamp for multiple blocks is correct for the scanner’s intended precision.
- Return type