Giter Club home page Giter Club logo

mev-boost-relay's Introduction

mev-boost Relay

Goreport status Test status standard-readme compliant

Flashbots mev-boost relay for proposer/builder separation in Ethereum.

Provides the builder-specs API for Ethereum proof-of-stake validators, an API for block builders to submit blocks, as well as a data API, as running for Goerli and the other test networks.

The relay consists of several components that are designed to run and scale independently and to be as simple as possible:

  1. Housekeeper: update known validators, proposer duties. Soon: save metrics, etc.
  2. API: for proposer, block builder, data
  3. Website: handles the root website requests (information is pulled from Redis and database)

This software is currently in alpha state, and there'll be significant changes in the following weeks. In particular major database schema changes, decoupling of block submissions from the proposer API and proper expiy of Redis entries.

See also:


Table of contents

Background

MEV is a centralizing force on Ethereum. Unattended, the competition for MEV opportunities leads to consensus security instability and permissioned communication infrastructure between traders and block producers. This erodes neutrality, transparency, decentralization, and permissionlessness.

Flashbots is a research and development organization working on mitigating the negative externalities of MEV. Flashbots started as a builder specializing in MEV extraction in proof-of-work Ethereum to democratize access to MEV and make the most profitable blocks available to all miners. >90% of miners are outsourcing some of their block construction to Flashbots today.

The mev-boost relay is a trusted mediator between block producers and block builders. It enables all Ethereum proof-of-stake validators to offer their blockspace to not just Flashbots but other builders as well. This opens up the market to more builders and creates competition between them, leading to more revenue and choice for validators, and better censorship-resistance for Ethereum.

In the future, proposer/builder separation will be enshrined in the Ethereum protocol itself to further harden its trust model.

Read more in Why run mev-boost? and in the Frequently Asked Questions.

Usage

Redis (v6+) and PostgreSQL is used.

# Start PostgreSQL & Redis in Docker
docker-compose up

(you can now visit adminer on http://localhost:8093/?username=postgres)

The services need access to a beacon node for event subscriptions and the beacon API (by default using localhost:3500 which is the Prysm default beacon-API port). You can proxy the port from a server like this:

ssh -L 3500:localhost:3500 your_server

Now start the services:

# The housekeeper sets up the validators, and does various housekeeping
go run . housekeeper --network kiln --db postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable

# Run APIs for Kiln (using a dummy BLS secret key)
go run . api --network kiln --secret-key 0x607a11b45a7219cc61a3d9c5fd08c7eebd602a6a19a977f8d3771d5711a550f2 --db postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable

# Run Website for Kiln
go run . website --network kiln --db postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable

# Query status
curl localhost:9062/eth/v1/builder/status

# Send test validator registrations
curl -X POST localhost:9062/eth/v1/builder/validators -d @testdata/valreg2.json

# Delete previous registrations
redis-cli DEL boost-relay/kiln:validators-registration boost-relay/kiln:validators-registration-timestamp

Env vars:

  • DB_TABLE_PREFIX - prefix to use for db tables (default uses dev)
  • ENABLE_ZERO_VALUE_BLOCKS - allow blocks with 0 value
  • SYNC_VALIDATOR_REGISTRATIONS - handle validator registrations synchronously instead of in a background worker pool
  • BLOCKSIM_MAX_CONCURRENT - maximum number of concurrent block-sim requests
  • ALLOW_BLOCK_VERIFICATION_FAIL - accept block even if block simulation & verification fails
  • DISABLE_BID_MEMORY_CACHE - force bids to go through redis/db

Maintainers

Contributing

Flashbots is a research and development collective working on mitigating the negative externalities of decentralized economies. We contribute with the larger free software community to illuminate the dark forest.

You are welcome here <3.

  • If you have a question, feedback or a bug report for this project, please open a new Issue.
  • If you would like to contribute with code, check the CONTRIBUTING file for further info about the development environment.
  • We just ask you to be nice. Read our code of conduct.

Security

If you find a security vulnerability on this project or any other initiative related to Flashbots, please let us know sending an email to [email protected].

License

The code in this project is free software under the AGPL License version 3 or later.


Made with ☀️ by the ⚡🤖 collective.

mev-boost-relay's People

Contributors

metachris avatar jtraglia avatar avalonche avatar ruteri avatar bertmiller avatar come-maiz avatar 0xpanoramix avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.