relayscan

command module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

README

relayscan

Test status

Disclaimer: This code is work-in-progress and quick'n dirty in a lot of places. Use at your own risk.

Running on https://relayscan.io


Monitoring of Ethereum mev-boost relays:

  • PostgreSQL database with delivered payloads of all relays
  • Ensure payments are correct (according to claim in bid)
  • Call getHeader on every relay on every slot and save to DB


Overview

  • Uses PostgreSQL as data store
  • Relays are configured in /common/relays.go
  • Some environment variables are required, see .env.example
  • Saving and checking payloads is split into phases/commands:
    • data-api-backfill -- queries the data API of all relays and puts that data into the database
    • check-payload-value -- checks all new database entries for payment validity
$ go run . --help
https://github.com/flashbots/relayscan

Usage:
  relay [flags]
  relay [command]

Available Commands:
  backfill-extradata  Backfill extra_data
  check-payload-value Check payload value for delivered payloads
  collect-live-bids   On every slot, ask for live bids
  completion          Generate the autocompletion script for the specified shell
  data-api-backfill   Backfill all relays data API
  help                Help about any command
  inspect-block       Inspect a block
  version             Print the version number the relay application
  website             Start the website server

Flags:
  -h, --help   help for relay

Use "relay [command] --help" for more information about a command.

Getting started

Run
# Query relay data APIs for delivered payloads
go run . data-api-backfill

# Check new entries for valid payments
go run . check-payload-value

# Start the website (--dev reloads the template on every page load, for easier iteration)
go run . website --dev

# Start service to query every relay for bids
go run . collect-live-bids
Test & dev
# Install dependencies
go install mvdan.cc/gofumpt@latest
go install honnef.co/go/tools/cmd/staticcheck@v0.3.3
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.49.0

# Lint, test and build
make lint
make test
make test-race
make build

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cmd contains the cobra command line setup
Package cmd contains the cobra command line setup
Package common includes common utilities
Package common includes common utilities
Package database exposes the postgres database
Package database exposes the postgres database
services
collector
Package collector collects data from the relays
Package collector collects data from the relays
website
Package website contains the service delivering the website
Package website contains the service delivering the website

Jump to

Keyboard shortcuts

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