Skip to content
Chris Hager edited this page Jun 10, 2022 · 54 revisions

Welcome to the mev-boost wiki ❤️

This page contains implementation resources, and the sidebar on the right links to various subpages 👉


Implementation Resources

Relevant repositories:

Diagrams:

Relays:


For Implementers

These are the required parts to implement:

Validator clients

  • call register_validator on the beacon node (on startup and on change in fee_recipient/gas_limit)

Beacon nodes

Relays


Implementation status

Consensus clients

Project Integration Testable Guide
Teku advanced yes link
Lighthouse advanced yes ?
Lodestar advanced ? ?
Nimbus halfway ? ?
Prysm halfway no -

Testing

Kiln

You can use our Kiln relay+builder at https://builder-relay-kiln.flashbots.net

curl https://builder-relay-kiln.flashbots.net/eth/v1/builder/status

Ropsten

Use our Ropsten relay+builder at https://builder-relay-ropsten.flashbots.net

curl https://builder-relay-ropsten.flashbots.net/eth/v1/builder/status

Using mergemock

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
Clone this wiki locally