Categorygithub.com/flashbots/builder-hub
module
0.1.0
Repository: https://github.com/flashbots/builder-hub.git
Documentation: pkg.go.dev

# README

BuilderHub

Test status

Contains code for the builder hub service that acts as a data source for builders registration and configuration.

Docs here: https://buildernet.github.io/docs/


Getting started

# start the server
go run cmd/httpserver/main.go

# public endpoints
curl localhost:8080/api/l1-builder/v1/measurements

# client-aTLS secured endpoints
curl localhost:8080/api/l1-builder/v1/builders
curl localhost:8080/api/l1-builder/v1/configuration
curl -X POST localhost:8080/api/l1-builder/v1/register_credentials/rbuilder

Development

Install dev dependencies

go install mvdan.cc/[email protected]
go install honnef.co/go/tools/cmd/[email protected]
go install github.com/golangci/golangci-lint/cmd/[email protected]
go install go.uber.org/nilaway/cmd/[email protected]
go install github.com/daixiang0/[email protected]

Lint, test, format

make lint
make test
make fmt

Database tests

# start the database
docker run -d --name postgres-test -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=postgres postgres

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

# run the tests
RUN_DB_TESTS=1 make test

# stop the database
docker rm -f postgres-test

# Packages

No description provided by the author
Package application contains application logic for the builder-hub.
No description provided by the author
Package common contains common utilities and functions used by the service.
Package domain contains domain area types/functions for builder hub.
Package httpserver implements the core HTTP server.
Package metrics contains all application-logic metrics.
Package ports contains entry-point related logic for builder-hub.