Chapter 17
Builder

Warning: 

this component has no documented requirements. A new requirements page should be created and linked to this component.


Contents



17.1 Overview
17.2 Core Flow
17.3 View Lifecycle
17.4 Block Building
17.5 Builder State Refactor



17.1 # Overview

17.2 # Core Flow

The builder consumes consensus events emitted by the HotShot Event Stream and also handles HTTP requests from external clients.

HotShot Events

These are emitted by the HotShot consensus protocol. Each event is associated with a view number, for which the builder maintains a centralized record (called the ”global state”) that tracks what has been received.

Client Requests

Clients interact with the builder through HTTP APIs. The endpoints allow clients to submit transactions, query metadata, and fetch blocks constructed by the builder.

17.3 # View Lifecycle

Each view has a lifecycle tracked by the builder. Internally, builder states are indexed by view number and VID commitment. There are also storages for in-progress DA and quorum proposals, indexed by view number and builder commitment. Multiple proposals for the same view is allowed, as long as they correspond to different VID and builder commitments. See Builder State Refactor for additional consideration about builder states.

Note that the view number itself advances according to HotShot consensus. Each new proposal or finalized leaf refers to a specific view, and the builder does not advance views independently–it only reacts to what HotShot emits.

PIC

Figure 17.1: Block Building

17.4 # Block Building

When both quorum and DA proposals exist for a view, the builder enters the block building process.

PIC

Figure 17.2: Block Building

17.5 # Builder State Refactor

Currently, each builder state handles its own decision-making and spawns new builder states based on received quorum and DA proposals. This approach may introduce redundancy and complexity.

To avoid the potential issues above and improve consistency and scalability, we implemented a refactor to handle the builder state spawning in a clearer and less error-prone way by a centralized state coordinator. It indexes both proposals and builder states by view number and builder commitment, and is responsible for tracking the active builder states and deciding which state should be extended to spawn a new state.

Note that this refactor has not been integrated into the codebase.