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
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

eth_defi.event_reader.timestamp_cache.BlockTimestampSlicer