generated from flashbots/flashbots-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 222
Home
Chris Hager edited this page Jun 30, 2022
·
54 revisions
Welcome to the mev-boost wiki ❤️
This page contains implementation resources, and the sidebar on the right links to various subpages 👉
Relevant repositories:
- Specs: Builder Specs (live), Beacon APIs (live), Consensus Specs
- https://github.com/flashbots/mev-boost (Docker image)
- https://github.com/ralexstokes/mev-rs
- https://github.com/protolambda/mergemock
- https://github.com/flashbots/go-boost-utils
- https://github.com/flashbots/boost-geth-builder
Diagrams:
Relays:
- https://builder-relay-kiln.flashbots.net
- https://builder-relay-ropsten.flashbots.net
- https://builder-relay-sepolia.flashbots.net
These are the required parts to implement:
- https://github.com/ethereum/builder-specs/blob/main/specs/validator.md
- implement
register_validator
API call (on startup, change infee_recipient
/gas_limit
and periodically as outlined ☝️)
- implement
register_validator
forwarding to mev-boost / the builder network - implement the APIs defined in github.com/ethereum/builder-spec (see live version) to communicate with external block builders
- ask EL client and external block builders for a block
- provide the highest paying block to the proposer
- need to provide the APIs defined in github.com/ethereum/builder-spec (see live version) to the beacon nodes
Project | Status |
---|---|
Teku | Completed, ready for testing (#156) |
Lighthouse | Advanced (#160) |
Prysm | Advanced (#158) |
Lodestar | Advanced (#157) |
Nimbus | In progress (#159) |
You can use our Kiln relay+builder at https://builder-relay-kiln.flashbots.net
./mev-boost -kiln -relays https://0xb5246e299aeb782fbc7c91b41b3284245b1ed5206134b0028b81dfb974e5900616c67847c2354479934fc4bb75519ee1@builder-relay-kiln.flashbots.net
Use our Ropsten relay+builder at https://builder-relay-ropsten.flashbots.net
./mev-boost -ropsten -relays https://0xb124d80a00b80815397b4e7f1f05377ccc83aeeceb6be87963ba3649f1e6efa32ca870a88845917ec3f26a8e2aa25c77@builder-relay-ropsten.flashbots.net
Use our Sepolia builder+relay at https://builder-relay-sepolia.flashbots.net:
./mev-boost -sepolia -relays https://0x845bd072b7cd566f02faeb0a4033ce9399e42839ced64e8b2adcfc859ed1e8e1a5a293336a49feac6d9a5edb779be53a@builder-relay-sepolia.flashbots.net
You can spin up a local testnet (aka. privnet) to control all the validators. Here's a quick, rough guide: https://github.com/flashbots/mev-boost/blob/main/docs/geth-pos-privnet.md
You can test the builder API with the mergemock relay.
git clone https://github.com/protolambda/mergemock.git
cd mergemock
go run . relay
# Call eth_getBlockByNumber to get current blockHash
curl --header 'Content-Type: application/json' --request POST 'http://127.0.0.1:8551' --data-raw '{
"jsonrpc":"2.0",
"method":"eth_getBlockByNumber",
"params":["latest", false],
"id":1
}'
# Next produce a new block with FCU, using the hash from 👆
curl --header 'Content-Type: application/json' --request POST 'http://127.0.0.1:8551' --data-raw '{
"jsonrpc":"2.0",
"method":"engine_forkchoiceUpdatedV1",
"params":[
{
"headBlockHash": "PREVIOUS_BLOCKHASH",
"safeBlockHash": "PREVIOUS_BLOCKHASH",
"finalizedBlockHash": "PREVIOUS_BLOCKHASH"
},
{
"timestamp": "0x1234",
"prevRandao": "0xc2fa210081542a87f334b7b14a2da3275e4b281dd77b007bcfcb10e34c42052e",
"suggestedFeeRecipient": "0xdfb434922631787e43725c6b926e989875125751"
}
],
"id":1
}'
# Then you can use the builder REST API at 127.0.0.1:28545
-> registerValidator
-> getHeader
-> getPayload
# getHeader
curl 127.0.0.1:28545/eth/v1/builder/header/1/PREVIOUS_BLOCKHASH/0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000