Skip to content

BuilderHub service for provisioning and permissioning BuilderNet instances

License

Notifications You must be signed in to change notification settings

flashbots/builder-hub

Repository files navigation

BuilderHub

Goreport status Test status

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

Docs here: https://buildernet.org


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/gofumpt@v0.4.0
go install honnef.co/go/tools/cmd/staticcheck@v0.4.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.3
go install go.uber.org/nilaway/cmd/nilaway@v0.0.0-20240821220108-c91e71c080b7
go install github.com/daixiang0/gci@v0.11.2

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

About

BuilderHub service for provisioning and permissioning BuilderNet instances

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •