Skip to main content

Module l1

Module l1 

Source

EnumsΒ§

RefreshKind πŸ”’
Which of L1State’s independent refresh throttles throttle_refresh bounds.
ResponseOutcome πŸ”’
alloy returns a non-2xx response with a parseable JSON-RPC body as Ok, so the payload, not the Result arm, decides whether a provider is healthy.

ConstantsΒ§

MAX_CONSECUTIVE_RATE_LIMITS πŸ”’
How many rate limits, each outliving the backoff the previous one imposed, before a provider is treated as failed.
MAX_RATE_LIMIT_BACKOFF πŸ”’
Cap on a server-requested Retry-After, which alloy parses verbatim. Honoring a daily-quota delay of hours would stall wait_for_l1 for its whole duration.

FunctionsΒ§

apply_finalized πŸ”’
Applies finalized to state if it advances the snapshot, updating the metric and broadcasting NewFinalized. Never lowers the finalized block.
apply_head πŸ”’
Applies head to state if it advances the snapshot, updating the metric and broadcasting NewHead. Never lowers the head.
error_payload πŸ”’
The JSON-RPC error a response carries, if any.
fetch_finalized_block_from_rpc πŸ”’
Bounded by timeout, so a provider that never answers can’t park a caller indefinitely.
is_request_rejection πŸ”’
Whether the response rejects the request itself: the result set it asks for is over the provider’s cap.
rate_limit_backoff πŸ”’
The configured delay is operator-set and used as-is; a server-provided one is capped.