GithubHelp home page GithubHelp logo

onlyhyde / mev-share-node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flashbots/mev-share-node

0.0 0.0 0.0 157 KB

License: GNU Affero General Public License v3.0

Go 99.17% Makefile 0.53% Dockerfile 0.30%

mev-share-node's Introduction

mev-share-node

⚠️ DISCLAIMER: The Flashbots mev-share node is under active development. This code is in beta and may have performance issues or other vulnerabilities. While we welcome input in the form of pull requests or issues, Flashbots does not commit to particular SLAs around responding or maintaining this repository.

Test status

This repo is an implementation of the MEV-Share API. It handles tasks such as bundle simulation, matching, and hint extraction.

Live Deployments

Mainnet

Goerli

Supported Methods

More detailed documentation can be found in the Flashbots documentation and the mev-share repository.

mev_sendBundle

This method is utilized for submitting bundles to the relay. It takes in a bundle and provides a bundle hash as a return value.

The detailed structure of bundles is explained in the Flashbots documentation.

Node processes the bundle in the following manner:

  1. Validates the structure of the bundle.
  2. If the bundle is unmatched, i.e., if a hash element exists in the body, the node searches for a corresponding bundle with the same hash in the database. If a match is found and the target bundle can be matched, the hash is replaced with the bundle body. If not, the bundle is rejected.
  3. Adds the bundle to the simulation queue.
  4. Simulates the bundle when the block preceding its target block is reached.
  5. If the privacy.hint of the bundle is set, relevant hints are extracted and added to the Redis channel. A separate service will then stream it over the SEE endpoint.
  6. Sends the bundle to the builders specified in the privacy.builders field of the bundle. By default, the Flashbots builder is assumed.

mev_simBundle

This method has similar arguments to mev_sendBundle, but instead of submitting a bundle to the relay, it returns a simulation result. Only fully matched bundles can be simulated.

Running the service

Dependencies

  • Redis: Used for hint streaming and priority queue.
  • Postgres: Used for storing bundles and historical hints.

Configuration

The full list of configuration options can be found in cmd/node/main.go.

Running Locally

docker-compose up # start services: redis and postgres

# apply migration
for file in sql/*.sql; do psql "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" -f $file; done

# get flashbots/builder, see /local-builder/devnet/README.md
cd ..
git clone https://github.com/flashbots/builder
cd builder
make
./local-builder/devnet/devnet run

# run node
make && ./build/node

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-share-node's People

Contributors

dvush avatar tymkh avatar sukoneck avatar wazzymandias avatar avalonche 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.