Skip to main content

Module prewarm

Module prewarm 

Source
Expand description

Caching and prewarming related functionality.

Prewarming executes transactions in parallel before the actual block execution to populate the execution cache with state that will likely be accessed during block processing.

§How Prewarming Works

  1. Incoming transactions are split into two streams: one for prewarming (executed in parallel) and one for actual execution (executed sequentially)
  2. Prewarming tasks execute transactions in parallel using shared caches
  3. When actual block execution happens, it benefits from the warmed cache

Structs§

PrewarmCacheTask
A task that is responsible for caching and prewarming the cache by executing transactions individually in parallel.
PrewarmContext
Context required by tx execution tasks.
PrewarmMetrics
Metrics for transactions prewarming.

Enums§

PrewarmMode
Determines the prewarming mode: transaction-based, BAL-based, or skipped.
PrewarmTaskEvent
The events the pre-warm task can handle.