[!IMPORTANT] Bolt is an implementation of permissionless proposer commitments through PBS. In its essence, it consists in a light fork of the current MEV-Boost stack that allows users to request preconfirmations from proposers, and then adds a way for proposers to commit to transaction inclusion in a way that is easily verifiable.
The flow of Bolt can be summarized in the following steps:
The following diagram illustrates the flow:
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 all the necessary components to illustrate the flow described above. It can be thought of a reference implementation. In particular, the core components are:
Additionally, this repository contains the necessary scripts to spin up a Kurtosis devnet with all the components running, and a simple web demo to showcase the preconfirmation flow.
We are using a full 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:
[!WARNING] 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 git@github.com:chainbound/bolt.git && cd bolt
Running the devnet and demo 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-images
# spin up the kurtosis devnet on your machine
just up
# run the web demo servers.
just demo
The web demo will be available on your browser at http://localhost:3000
.
The demo app will remain open until you press Ctrl+C
in the terminal where
you ran the just demo
command.
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
[!WARNING] Remember to shut down the devnet environment when you are done with it, as it consumes significant resources (CPU & RAM) on your machine.
The Bolt sidecar offers an optional set of metrics that can be scraped by a Prometheus server, and shown in Grafana dashboards. They show various informations such as the number of constraints received, the number of blocks proposed, etc.
These metrics are enabled by default but can be disabled by setting running the sidecar with the --metrics
flag set to false
.
MIT. Forked repositories have their own licenses.