Important
Bolt is an implementation of permissionless proposer commitments that is fully compatible with PBS. In its essence, it consists in a fork of the MEV-Boost stack that allows users to request commitments like preconfirmations from proposers, and then adds a way for proposers to commit to transaction inclusion in a way that is verifiable on-chain.
The technical flow of Bolt can be summarized in the following steps:
- Users submit transactions to an RPC endpoint that will forward them to the proposer opted-in to Bolt in the beacon chain lookahead window.
- The proposer can accept this request and turn it into a commitment relative to the block that it is going to propose. This commitment acts as guarantee of inclusion of the transaction in the block, also known as a preconfirmation.
- Near the time of block proposal, the proposer will share the list of committed transactions with the relays that are connected to block builders. This list is called a constraint.
- Builders subscribe to proposer constraints in real time through a new relay streaming endpoint to keep informed about the outstanding preconfirmations.
- Builders build valid blocks that adhere to all constraints, and append inclusion proofs together with the bids to the relay for trustless verification.
- When it's time to propose a block, the proposer will fetch the best valid bid from the relay, and verify its inclusion proofs locally before signing the header.
- If the constraints are respected, the proposer can propose the payload as usual by sending the signed header back to the relay. If not, the proposer can self-build a payload and propose it directly instead.
Here is a diagram illustrating the flow explained above:
sequenceDiagram
participant Beacon Node as beacon node
participant Bolt Sidecar as bolt-sidecar
participant MEV-Boost as mev-boost
participant PBS Relay as pbs relay
Beacon Node->>Bolt Sidecar: /eth/v1/builder/header
Note over Beacon Node, Bolt Sidecar: when it's time, the proposer's beacon node will ask for an externally built payload
Bolt Sidecar->>MEV-Boost: /eth/v1/builder/header
MEV-Boost->>PBS Relay: /eth/v1/builder/header_with_proofs
PBS Relay->>MEV-Boost: ExecutionPayloadHeader + InclusionProofs
MEV-Boost->>Bolt Sidecar: ExecutionPayloadHeader + InclusionProofs
alt Inclusion proofs sent by the relay are VALID
Bolt Sidecar->>Beacon Node: ExecutionPayloadHeader
Bolt Sidecar->>MEV-Boost: /eth/v1/builder/blinded-blocks
MEV-Boost->>PBS Relay: /eth/v1/builder/blinded-blocks
Note over MEV-Boost, PBS Relay: the relay can now broadcast the full payload.
else Inclusion proofs sent by the relay are INVALID
PBS Relay->>MEV-Boost: nil response
Bolt Sidecar->>Beacon Node: bolt-sidecar will generate a fallback ExecutionPayload that follows all constraints committed to by the proposer.
Bolt Sidecar->>MEV-Boost: /eth/v1/builder/blinded-blocks
MEV-Boost->>PBS Relay: /eth/v1/builder/blinded-blocks
PBS Relay->>Beacon Node: ExecutionPayload
Note over Beacon Node, Bolt Sidecar: after receiving the payload, the beacon node will broadcast it to the beacon chain p2p network.
end
This repository contains most of the necessary components of the Bolt protocol stack. In particular, the core components are:
- Bolt Sidecar: New validator software (akin to mev-boost) that handles the receipt of preconfirmation requests from users, translates them into constraints, and forwards them to relays. Additionally, it handles the fallback logic to produce a block locally when relays send invalid inclusion proofs.
- Bolt Contracts: A set of smart contracts for peripheral functionality such as proposer registration and permissionless dispute resolution for attributable faults.
- Bolt Boost: A Commit-Boost module that implements the Constraints-API.
- Bolt CLI: A CLI tool to interact with Bolt components in a safe and easy way.
- Boltup: Script to install the
bolt
CLI tool on any machine with a single command. - Testnets: A set of guides and scripts to deploy the Bolt contracts on testnets.
- Scripts: A collection of scripts to build and run the Kurtosis devnet locally.
Bolt also relies on a few external components that are not part of this repository:
- Ethereum Package: A fork of the Kurtosis Ethereum package with custom components for Bolt.
- Helix Relay: A fork of the Gattaca Helix relay that implements the Constraints API to proxy requests from the Bolt Sidecar to the connected builders.
- Bolt Builder: A fork of the Flashbots builder that subscribes to new constraints from relays, builds blocks that respect them, and includes the necessary proofs of inclusion in the bids submitted to relays.
- Bolt MEV-Boost: A fork of the Flashbots MEV-Boost sidecar that includes new API endpoints to proxy requests from the Bolt Sidecar to the connected relays.
List of legacy components that are not updated to the latest version of Bolt:
- Web demo: A simple web interface to interact with the Bolt Sidecar and submit preconfirmation requests to proposers for inclusion in blocks.
- MEV-Boost-Relay: A fork of the Flashbots MEV-Boost relay that includes new API endpoints to proxy requests from the Bolt Sidecar to the connected builders.
We are using a forked Kurtosis devnet stack, with custom Docker images for the core components outlined above. The exact version of the Ethereum-package used in our devnet can be seen here.
8GB of RAM and a modern laptop CPU are recommended to run the devnet efficiently, but it should work on most machines. Please Open an issue if you encounter any problems.
Make sure you have the following requirements on your machine:
- Docker engine installed and running
- Just installed
- Kurtosis CLI installed
- Foundry installed
- Rust & Cargo installed
cargo nextest
Note
The Kurtosis CLI version tested is 0.88.16
. Some issues may arise if you are
using a different version.
Then, clone this repository and navigate to the root directory of the project:
git clone [email protected]:chainbound/bolt.git && cd bolt
Running the devnet is straightforward once you have the requirements installed. Just run the following commands in your terminal:
# build all necessary docker images locally first
just build-local-images
# spin up the kurtosis devnet on your machine
just up
Commit-Boost support
The devnet by default will run using a fork of MEV-Boost which supports
the Constraints-API. Bolt also
supports Commit-Boost by providing a compatible MEV-Boost module
called Bolt-Boost that implements the Constraints-API. To use it in the devnet
add the appropriate bolt_boost_image
in the kurtosis_config.yaml
file:
# ... the rest of the file
mev_params:
# Bolt-specific images:
# Adding the `bolt_boost_image` will start the devnet with Bolt-Boost
# instead of MEV-Boost
bolt_boost_image: ghcr.io/chainbound/bolt-boost:0.1.0
# ... the rest of the `mev_params`
To stop the devnet, run the following command:
# if you want to simply stop all running containers
just down
# if you want to remove all the data and stop the Kurtosis engine
just clean
Note
Remember to shut down the devnet environment when you are done with it, as it consumes significant resources (CPU & RAM) on your machine.
MIT. Forked repositories have their own licenses.