Skip to content

builder

base-builder produces flashblocks every 200 milliseconds and assembles the sealed canonical blocks for Base. It orchestrates the build pipeline through FlashblocksServiceBuilder.

  • Crate name: base-builder-bin
  • Binary name: base-builder
  • Source: bin/builder
  • Dockerfile: etc/docker/Dockerfile.builder

The builder binary bootstraps using FlashblocksServiceBuilder, which wires together:

  1. Block building — Assembles transactions from the pool into execution payloads
  2. Flashblock production — Produces 200ms sub-block preconfirmations streamed to subscribers
  3. Metering — Tracks gas usage and resource consumption via MeteringStoreExtension
  4. Transaction pool RPC — Exposes custom pool methods via TxPoolRpcExtension

The builder uses jemalloc as its global allocator for improved memory allocation performance.

ExtensionPurpose
FlashblocksServiceBuilderOrchestrates the full flashblocks pipeline
MeteringStoreExtensionResource metering data store
TxPoolRpcExtensionTransaction pool RPC methods
  • base-cli-utils — CLI utilities (logging, metrics)
  • base-builder-core — Core block building logic
  • base-builder-metering — Resource metering
  • base-builder-publish — Block publishing and streaming
  • reth-optimism-node — Reth node builder
  • jemalloc — Memory allocator
Terminal window
# Build the builder binary
cargo build --bin base-builder --release
Terminal window
# Build the image
docker build -t base-builder -f etc/docker/Dockerfile.builder .
# Run
docker run -it --rm base-builder [OPTIONS]
Terminal window
./target/release/base-builder [OPTIONS]