Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Electra #131

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
458ae24
Start to add support for Electra
jtraglia Apr 4, 2024
295bb10
Use electra fork of geth
jtraglia Apr 5, 2024
bd7cefd
Run make fmt
jtraglia Apr 5, 2024
112c61a
Add support for deposit receipts
jtraglia Apr 8, 2024
50d30d2
Replace Exits with WithdrawRequests
jtraglia Apr 10, 2024
688e091
Rename WithdrawRequest to WithdrawalRequest
jtraglia Apr 27, 2024
18bbcc1
Run go mod tidy
jtraglia Apr 29, 2024
ab03b64
Remove toolchain from go.mod
jtraglia Apr 29, 2024
ee28100
Use lightclient's fork of geth
jtraglia May 9, 2024
46547fb
Maybe fix linter issues
jtraglia May 9, 2024
1050f25
Remove space between // and nolint
jtraglia May 9, 2024
8dca70c
Update replace-allow-list
jtraglia May 9, 2024
8f90a5d
Remove fake electra-case0.json
jtraglia May 9, 2024
d09fb67
Add basic block hash test for deneb/electra
jtraglia May 13, 2024
996298b
Remove old execpayload tests
jtraglia May 14, 2024
f315449
Temporarily use jtraglia's go-eth2-client
jtraglia May 17, 2024
4e05fe7
Use new go-eth2-client
jtraglia May 17, 2024
6470253
update deps
avalonche Aug 6, 2024
e9a5319
Start to make changes for v1.5.0-alpha.6
jtraglia Sep 25, 2024
a9590f2
Remove go-ethereum replacement
jtraglia Sep 25, 2024
47f44b9
Fix some issues
jtraglia Sep 25, 2024
6209ed0
Remove toolchain line from go.mod
jtraglia Sep 25, 2024
01b0097
Update github actions
jtraglia Sep 25, 2024
9691511
Use latest for staticcheck & golangci-lint
jtraglia Sep 25, 2024
22f090f
Update .golangci.yaml
jtraglia Sep 25, 2024
5870912
Remove replacements
jtraglia Sep 25, 2024
6f018b0
Update go-eth2-client for alpha.7 support
jtraglia Oct 7, 2024
e6e6433
Run go mod tidy
jtraglia Oct 7, 2024
55b1584
Use replaced go-builder-client
jtraglia Oct 14, 2024
c3fca3d
Add replace for go-eth2-client
jtraglia Oct 14, 2024
0dbff0f
Update go-eth2-client
jtraglia Oct 14, 2024
85cd9c0
Update go-builder-client
jtraglia Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ^1.20
go-version: 'stable'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Run unit tests and generate the coverage report
run: make test
Expand All @@ -28,22 +28,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ^1.20
go-version: 'stable'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install gofumpt
run: go install mvdan.cc/gofumpt@latest

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

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

- name: Lint
run: make lint
Expand All @@ -56,13 +56,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ^1.20
go-version: 'stable'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Fuzz each test for one second
run: TERM=xterm FUZZTIME=1s make fuzz
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create release
id: create_release
Expand Down
27 changes: 13 additions & 14 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
linters:
enable-all: true
disable:
- depguard
- dupl
- exhaustruct
- funlen
Expand All @@ -10,12 +11,17 @@ linters:
- godot
- godox
- gomnd
- inamedparam
- intrange
- lll
- mnd
- musttag
- nlreturn
- nonamedreturns
- nosnakecase
- paralleltest
- perfsprint
- revive
- testifylint
- testpackage
- varnamelen
- wrapcheck
Expand All @@ -27,25 +33,18 @@ linters:
- contextcheck
- rowserrcheck
- sqlclosecheck
- structcheck
- wastedassign

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

linters-settings:
cyclop:
max-complexity: 20
tagliatelle:
case:
rules:
json: snake
gofumpt:
extra-rules: true
gomoddirectives:
replace-allow-list:
- github.com/attestantio/go-builder-client
- github.com/attestantio/go-eth2-client
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ lint:
staticcheck ./...
golangci-lint run

gofumpt:
gofumpt -l -w -extra .

fmt:
gofmt -s -w .
gofumpt -extra -w .
gci write .
go mod tidy

cover:
go test -coverprofile=/tmp/go-sim-lb.cover.tmp ./...
go tool cover -func /tmp/go-sim-lb.cover.tmp
Expand Down
57 changes: 29 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,47 +1,48 @@
module github.com/flashbots/go-boost-utils

go 1.20
go 1.22

require (
github.com/attestantio/go-builder-client v0.4.2
github.com/attestantio/go-eth2-client v0.19.8
github.com/attestantio/go-builder-client v0.5.1-0.20241014215920-ba44f1de4249
github.com/attestantio/go-eth2-client v0.21.12-0.20241014214053-759b0ace2e43
github.com/consensys/gnark-crypto v0.12.1
github.com/ethereum/go-ethereum v1.13.14
github.com/stretchr/testify v1.8.4
github.com/ethereum/go-ethereum v1.14.9
github.com/stretchr/testify v1.9.0
github.com/trailofbits/go-fuzz-utils v0.0.0-20210901195358-9657fcfd256c
)

require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.9.1 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
github.com/cespare/xxhash/v2 v2.3.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 v0.0.0-20230928194634-aa077af62593 // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/cockroachdb/pebble v1.1.2 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // 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/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/ferranbt/fastssz v0.1.3 // indirect
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/goccy/go-yaml v1.11.2 // 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.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/holiman/uint256 v1.3.1 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // 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
Expand All @@ -58,21 +59,21 @@ require (
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/prysmaticlabs/go-bitfield v0.0.0-20210809151128-385d8c5e3fb7 // indirect
github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/supranational/blst v0.3.11 // 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
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.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.30.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
Expand Down
Loading
Loading