Skip to content

Commit 2cfeaa9

Browse files
authored
Merge branch 'main' into feature/more-prefunded-accounts
2 parents fa05da1 + 7ea4a6f commit 2cfeaa9

32 files changed

+1308
-829
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Default code owners for all files
2+
* @canercidam @ferranbt

.github/workflows/checks.yaml

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ on:
88
branches: [main]
99

1010
jobs:
11-
test:
11+
e2e-test:
1212
name: E2E test (${{ matrix.flags }})
13-
runs-on: ubuntu-latest
13+
runs-on: warp-ubuntu-latest-x64-8x
1414
strategy:
1515
matrix:
1616
flags:
@@ -49,3 +49,54 @@ jobs:
4949
name: playground-logs-${{ matrix.flags }}
5050
path: /tmp/playground-logs
5151
retention-days: 5
52+
53+
unit-test:
54+
name: Unit test
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Check out code
58+
uses: actions/checkout@v2
59+
60+
- name: Set up Go
61+
uses: actions/setup-go@v2
62+
with:
63+
go-version: 1.24
64+
65+
- name: Install docker compose
66+
run: ./scripts/ci-setup-docker-compose.sh
67+
68+
- name: Run unit tests
69+
run: go test -v ./playground/...
70+
71+
lint:
72+
name: Lint
73+
runs-on: warp-ubuntu-latest-x64-8x
74+
steps:
75+
- name: Check out code into the Go module directory
76+
uses: actions/checkout@v5
77+
78+
- name: Set up Go
79+
uses: actions/setup-go@v6
80+
with:
81+
go-version: ^1.24
82+
83+
- name: Download dependencies
84+
run: go mod download
85+
86+
- name: Install gofumpt
87+
run: go install mvdan.cc/gofumpt@v0.6.0
88+
89+
- name: Install staticcheck
90+
run: go install honnef.co/go/tools/cmd/staticcheck@2025.1.1
91+
92+
- name: Install golangci-lint
93+
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.2
94+
95+
- name: Lint
96+
run: make lint
97+
98+
- name: Ensure go mod tidy runs without changes
99+
run: |
100+
go mod tidy
101+
git update-index -q --really-refresh
102+
git diff-index HEAD

.github/workflows/docker-utils-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616

1717
jobs:
1818
docker:
19-
runs-on: ubuntu-latest
19+
runs-on: warp-ubuntu-latest-x64-8x
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v4

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
release:
12-
runs-on: ubuntu-latest
12+
runs-on: warp-ubuntu-latest-x64-8x
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ local-testnet
22
output
33
builder-playground
44
**/.DS_Store
5+
e2e-test/

.golangci.yaml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
version: "2"
2+
linters:
3+
enable-all: true
4+
disable:
5+
- cyclop
6+
- forbidigo
7+
- funlen
8+
- gochecknoglobals
9+
- gochecknoinits
10+
- gocritic
11+
- godot
12+
- godox
13+
- mnd
14+
- lll
15+
- nestif
16+
- nilnil
17+
- nlreturn
18+
- noctx
19+
- nonamedreturns
20+
- paralleltest
21+
- revive
22+
- testpackage
23+
- unparam
24+
- varnamelen
25+
- wrapcheck
26+
- wsl
27+
- exhaustruct
28+
- depguard
29+
- err113
30+
31+
#
32+
# Disabled because of generics:
33+
#
34+
- contextcheck
35+
- rowserrcheck
36+
- sqlclosecheck
37+
- wastedassign
38+
39+
#
40+
# Disabled because deprecated:
41+
#
42+
43+
linters-settings:
44+
#
45+
# The G108 rule throws a false positive. We're not actually vulnerable. If
46+
# you're not careful the profiling endpoint is automatically exposed on
47+
# /debug/pprof if you import net/http/pprof. See this link:
48+
#
49+
# https://mmcloughlin.com/posts/your-pprof-is-showing
50+
#
51+
gosec:
52+
excludes:
53+
- G108
54+
55+
tagliatelle:
56+
case:
57+
rules:
58+
json: snake
59+
60+
gofumpt:
61+
extra-rules: true
62+
63+
exhaustruct:
64+
exclude:
65+
#
66+
# Because it's easier to read without the other fields.
67+
#
68+
- 'GetPayloadsFilters'
69+
70+
#
71+
# Structures outside our control that have a ton of settings. It doesn't
72+
# make sense to specify all of the fields.
73+
#
74+
- 'cobra.Command'
75+
- 'database.*Entry'
76+
- 'http.Server'
77+
- 'logrus.*Formatter'
78+
- 'Options' # redis
79+
80+
#
81+
# Excluded because there are private fields (not capitalized) that are
82+
# not initialized. If possible, I think these should be altered.
83+
#
84+
- 'Datastore'
85+
- 'Housekeeper'
86+
- 'MockBeaconClient'
87+
- 'RelayAPI'
88+
- 'Webserver'
89+
90+
formatters:
91+
enable:
92+
- gci
93+
- gofmt
94+
- gofumpt
95+
- goimports
96+
settings:
97+
gofumpt:
98+
extra-rules: true
99+
exclusions:
100+
generated: lax
101+
paths:
102+
- third_party$
103+
- builtin$
104+
- examples$

Makefile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,56 @@
1+
# Heavily inspired by Lighthouse: https://github.com/sigp/lighthouse/blob/stable/Makefile
2+
# and Reth: https://github.com/paradigmxyz/reth/blob/main/Makefile
3+
.DEFAULT_GOAL := help
14

5+
VERSION := $(shell git describe --tags --always --dirty="-dev")
6+
7+
##@ Help
8+
9+
.PHONY: help
10+
help: ## Display this help.
11+
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
12+
13+
.PHONY: v
14+
v: ## Show the version
15+
@echo "Version: ${VERSION}"
16+
17+
##@ Build
18+
19+
.PHONY: build
20+
build: ## Build the CLI
21+
go build -ldflags "-X main.version=${VERSION}" -o ./builder-playground main.go
22+
@echo "Binary built: ./builder-playground (version: ${VERSION})"
23+
24+
##@ Test & Development
25+
26+
.PHONY: test
27+
test: ## Run tests
28+
go test -v -count=1 ./...
29+
30+
31+
.PHONY: lint
32+
lint: ## Run linters
33+
gofmt -d -s .
34+
gofumpt -d -extra .
35+
go vet ./...
36+
staticcheck ./... || true
37+
# golangci-lint run || true
38+
39+
.PHONY: fmt
40+
fmt: ## Format the code
41+
gofmt -s -w .
42+
gci write .
43+
gofumpt -w -extra .
44+
go mod tidy
45+
46+
.PHONY: gofumpt
47+
gofumpt: ## Run gofumpt
48+
gofumpt -l -w -extra .
49+
50+
.PHONY: lt
51+
lt: lint test ## Run linters and tests
52+
53+
.PHONY: ci-release
254
ci-release:
355
docker run \
456
--rm \

0 commit comments

Comments
 (0)