Skip to content

Commit

Permalink
Merge branch 'develop' into feat/issue-253
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia authored Jan 31, 2025
2 parents 77593b4 + 810f45d commit 584d575
Show file tree
Hide file tree
Showing 19 changed files with 822 additions and 578 deletions.
30 changes: 30 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# General settings
BOOST_LISTEN_ADDR=localhost:18550 # Listen address for mev-boost server

# Logging and debugging settings
LOG_JSON=false # Set to true to log in JSON format instead of text
DEBUG=false # Set to true to enable debug mode (shorthand for '--loglevel debug')
LOG_LEVEL=info # Log level: trace, debug, info, warn/warning, error, fatal, panic
LOG_SERVICE_TAG= # Optional: add a 'service=...' tag to all log messages
DISABLE_LOG_VERSION=false # Set to true to disable logging the version

# Genesis settings
GENESIS_FORK_VERSION= # Custom genesis fork version (optional)
GENESIS_TIMESTAMP=-1 # Custom genesis timestamp (in unix seconds)
MAINNET=true # Set to true to use Mainnet
SEPOLIA=false # Set to true to use Sepolia network
HOLESKY=false # Set to true to use Holesky network

# Relay settings
RELAYS= # Relay URLs: single entry or comma-separated list (scheme://pubkey@host)
RELAY_MONITORS= # Relay monitor URLs: single entry or comma-separated list (scheme://host)
MIN_BID_ETH=0 # Minimum bid to accept from a relay (in ETH)
RELAY_STARTUP_CHECK=false # Set to true to check relay status on startup and on status API call

# Relay timeout settings (in ms)
RELAY_TIMEOUT_MS_GETHEADER=950 # Timeout for getHeader requests to the relay (in ms)
RELAY_TIMEOUT_MS_GETPAYLOAD=4000 # Timeout for getPayload requests to the relay (in ms)
RELAY_TIMEOUT_MS_REGVAL=3000 # Timeout for registerValidator requests (in ms)

# Retry settings
REQUEST_MAX_RETRIES=5 # Maximum number of retries for a relay get payload request
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.22.0
go-version: ^1.23.0
id: go

- name: Ensure go mod tidy runs without changes
Expand All @@ -27,13 +27,13 @@ jobs:
git diff-index --quiet HEAD
- name: Install gofumpt
run: go install mvdan.cc/gofumpt@v0.6.0
run: go install mvdan.cc/gofumpt@v0.7.0

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@v0.4.7
run: go install honnef.co/go/tools/cmd/staticcheck@v0.5.1

- name: Install golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.1
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4

- name: Lint
run: make lint
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.22
go-version: ^1.23
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.22
go-version: ^1.23
- name: Make directories
run: |
mkdir -p ./build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.22
go-version: ^1.23
id: go

- name: Checkout sources
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@
.vscode/
/README.internal.md
/validator_data.json
/build/
/build/

# Environemnt variable files
.env*
!.env.example

29 changes: 16 additions & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
linters:
enable-all: true
disable:
- canonicalheader
- depguard
- dupl
- exhaustruct
- funlen
Expand All @@ -9,18 +11,16 @@ linters:
- gocritic
- godot
- godox
- gomnd
- lll
- mnd
- musttag
- nlreturn
- nonamedreturns
- nosnakecase
- paralleltest
- testpackage
- varnamelen
- wrapcheck
- wsl
- musttag
- depguard

#
# Maybe fix later:
Expand All @@ -40,20 +40,19 @@ linters:
- contextcheck
- rowserrcheck
- sqlclosecheck
- structcheck
- wastedassign

#
# Disabled because deprecated:
#
- deadcode
- exhaustivestruct
- golint
- ifshort
- interfacer
- maligned
- scopelint
- varcheck
- copyloopvar

#
# Disabled due to versioning:
#
- intrange
- exportloopref


linters-settings:
gofumpt:
Expand All @@ -63,6 +62,10 @@ linters-settings:
disable:
- fieldalignment
- shadow
gomoddirectives:
replace-allow-list:
- github.com/attestantio/go-builder-client
- github.com/attestantio/go-eth2-client

output:
print-issued-lines: true
Expand Down
6 changes: 6 additions & 0 deletions .goreleaser-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ builds:
goarch:
- amd64
- arm64
- riscv64
ignore:
- goos: darwin
goarch: riscv64
- goos: windows
goarch: riscv64
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test-cli is a utility to run through all the proposer requests against mev-boost

Mergemock is fully integrated: https://github.com/protolambda/mergemock

Make sure you've setup and built mergemock first, refer to its [README](https://github.com/flashbots/mergemock#quick-start) but here's a quick setup guide:
Make sure you've setup and built mergemock first, refer to its [README](https://github.com/protolambda/mergemock/blob/master/README.md) but here's a quick setup guide:

```bash
git clone https://github.com/protolambda/mergemock.git
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM golang:1.22 as builder
FROM golang:1.23 as builder
ARG VERSION
WORKDIR /build

Expand Down
4 changes: 2 additions & 2 deletions cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func Main() {
func start(_ context.Context, cmd *cli.Command) error {
// Only print the version if the flag is set
if cmd.IsSet(versionFlag.Name) {
log.Infof("mev-boost %s\n", config.Version)
fmt.Fprintf(cmd.Writer, "mev-boost %s\n", config.Version)
return nil
}

Expand Down Expand Up @@ -179,7 +179,7 @@ func setupGenesis(cmd *cli.Command) (string, uint64) {
)

switch {
case cmd.Bool(customGenesisForkFlag.Name):
case cmd.IsSet(customGenesisForkFlag.Name):
genesisForkVersion = cmd.String(customGenesisForkFlag.Name)
case cmd.Bool(sepoliaFlag.Name):
genesisForkVersion = genesisForkVersionSepolia
Expand Down
59 changes: 18 additions & 41 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,72 +1,50 @@
module github.com/flashbots/mev-boost

go 1.21
go 1.23

require (
github.com/ethereum/go-ethereum v1.14.7
github.com/flashbots/go-boost-utils v1.8.1
github.com/flashbots/go-utils v0.5.0
github.com/ethereum/go-ethereum v1.14.13
github.com/flashbots/go-boost-utils v1.8.2-0.20241014214143-c3fca3d69760
github.com/flashbots/go-utils v0.8.3
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
github.com/holiman/uint256 v1.3.1
github.com/prometheus/client_golang v1.16.0
github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e
github.com/holiman/uint256 v1.3.2
github.com/prometheus/client_golang v1.16.0
github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v3 v3.0.0-alpha9
github.com/stretchr/testify v1.10.0
github.com/urfave/cli/v3 v3.0.0-beta1
)

require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v1.1.1 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect
github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect
github.com/goccy/go-yaml v1.11.2 // indirect
github.com/go-playground/validator/v10 v10.11.1 // indirect
github.com/goccy/go-yaml v1.11.3 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
github.com/supranational/blst v0.3.13 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/protobuf v1.33.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)

require (
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/attestantio/go-builder-client v0.4.5
github.com/attestantio/go-eth2-client v0.21.7
github.com/btcsuite/btcd v0.22.0-beta // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/attestantio/go-builder-client v0.5.1-0.20241014215920-ba44f1de4249
github.com/attestantio/go-eth2-client v0.22.1-0.20250106164842-07b6ce39bb43
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/ferranbt/fastssz v0.1.3 // indirect
Expand All @@ -80,13 +58,12 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/sys v0.28.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 584d575

Please sign in to comment.