dreamboat

module
v0.5.0-alpha.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2023 License: AGPL-3.0

README

🛳️ Dreamboat

GoDoc Go Report Card Discord

An Ethereum 2.0 Relay for proposer-builder separation (PBS) with MEV-boost. Commissioned, built, and put to sea by Blocknative.

blocknative-dreamboat

Quickstart

Installation

Install with go get, or download the latest release here.

$ go install github.com/blocknative/dreamboat
Usage
$ dreamboat --help

Documentation can be found here.

What is Dreamboat?

Dreamboat is a relay for Ethereum 2.0, it ships blocks from builders to validators. Dreamboat is for anyone who wants to strengthen the Eth network by running their own relay. Dreamboat's all-in-one design, modular code base and stunning performance will dazzle beginners and seasoned hackers alike. All aboard!

More precisely, Dreamboat is a spec-compliant builder and relay that allows block-builders and validators to interface with each other through MEV-boost.

Eventually Dreamboat will vanish, as if a dream, once in-protocol PBS is live. Until then, it sails the ephemeral seas of block space, delivering its trusted cargo of blocks to validators, guided simply by a lighthouse.

Design Goals

This is a from-scratch implementation of a PBS relay–aimed at strengthening #RelayDiversity–with the following design goals:

  1. Extensibility. Dreamboat provides well-factored interfaces that make it easy to change its behavior. We use Go Datastore for its persistence layer, so you can swap out the default BadgerDB store with your favorite database, and provide a clean separation between core relay logic, the beacon-chain client, and the HTTP server.
  2. Reliability. Work is ongoing implement a supervision-tree architecture in Dreamboat, so that you never miss a block.
  3. Performance. We have put significant engineering effort into tuning Dreamboat's performance, and have much, much more in store. The HTTP server's hot paths are 100% lock-free, concurrency is carefully tuned, and there are ongoing efforts to optimize the garbage collector and speed up signature validation. The result is a ship that doesn't just sail... it glides.
  4. Transparency. Dreamboat implements the Relay Data API, so you can audit past proposals. But we take a much broader view of transparency, which includes code transparency. A major cleanup effort is underway to make–and keep–Dreamboat's code legible. We believe this is an essential part of ensuring transparency and reliability.

We are continuously improving Dreamoat's runtime performance, standards compliance, reliability and transparency. We would also like to thank the Flashbots team for their open-source tooling, which helped us get Dreamboat up and running in short order, and for their thoughtful comments on implementation.

Planned Features & Enhancements

The following features and enhancements are in-progress.

  • Support for multiple storage backends (Redis, Postgres, BadgerDB, Filesystem, etc.)
  • Runtime profiling & tracing endpoint
  • Parallel validator-signature verification
  • Contention-free execution along hot paths
  • Support for multiple beacon clients
  • Support for multiple external block builders

Extend the blockchain networks

Do you need to make your relay work with a different blockchain that is not:

  • Mainnet
  • Kiln
  • Ropsten
  • Sepolia
  • Goerli

Then you need to extend the relay by creating a json file called networks.json, and put it inside datadir (datadir is a parameter you set when running the relay).

Inside the network.json file, you need to specify the network name and three other information:

  • GenesisForkVersion
  • GenesisValidatorsRoot
  • BellatrixForkVersion

Here is an example of how you should format the networks:

{
    "blocknative":{
        "GenesisForkVersion": "",
        "GenesisValidatorsRoot":"",
        "BellatrixForkVersion": ""
    },
    "myNetwork":{
        "GenesisForkVersion": "",
        "GenesisValidatorsRoot":"",
        "BellatrixForkVersion": ""
    },
}

Support

Stuck? Don't despair! Drop by our discord to ask for help, or just to say hello. We're friendly! 👋

Developing

Building Locally
$ go run cmd/dreamboat
Architecture

Proposer Builder Separation is a solution to shield validators from the centralizing force the black hole of MEV has released. The next chapter in this saga is to protect builders from too extreme of centralizing forces.

PBS Context Diagram

API Compatibility

Dreamboat follows semantic versioning. Changes to the REST API are governed by the Flashbots specifications.

The main branch is NOT guaranteed to be stable. Use the latest git tag in production!

Directories

Path Synopsis
api
inner
Would have been internal if only it wasnt reserved keyword
Would have been internal if only it wasnt reserved keyword
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
client/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
cmd
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
test
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL