Skip to main content

Module p2p_proxy

Module p2p_proxy 

Source

Structsยง

BlockCache ๐Ÿ”’
A cached block: header + body, indexed by number and hash.
CachedBlock ๐Ÿ”’
NetConfig ๐Ÿ”’
Resolved network configuration passed to run_p2p_network.
P2pProxyArgs ๐Ÿ”’
RequestStats ๐Ÿ”’
Shared request counters for periodic stats logging.

Enumsยง

FetchRequest ๐Ÿ”’
Messages from the request handler to the single block-fetcher service.

Constantsยง

CACHE_CAPACITY ๐Ÿ”’
3 hrs of blocks at 500ms block time.
HEADER_BATCH_SIZE ๐Ÿ”’

Functionsยง

fetch_and_cache_header_batch ๐Ÿ”’
fetch_and_cache_header_by_hash ๐Ÿ”’
fetch_and_cache_header_by_number ๐Ÿ”’
fetch_and_cache_headers ๐Ÿ”’
fetch_body_by_hash ๐Ÿ”’
requested_header_numbers ๐Ÿ”’
resolve_bodies ๐Ÿ”’
Resolve a GetBlockBodies request from cache, fetching missing blocks from RPC as needed.
resolve_headers ๐Ÿ”’
Resolve a GetBlockHeaders request from cache, fetching missing blocks from RPC as needed.
resolve_start_block_number ๐Ÿ”’
run_fetcher_service ๐Ÿ”’
Single block-fetcher service that owns the cache and handles all fetch requests.
run_p2p_network ๐Ÿ”’
Launch the P2P network and handle incoming eth requests.

Type Aliasesยง

TempoNetPrimitives ๐Ÿ”’
Tempo-specific network primitives for the proxy node.
TempoRpcBlock ๐Ÿ”’