Skip to content

Commit 1a35eb3

Browse files
authored
Add support for Glaos (#122)
* Upgrade go-eth2-client to v0.30.2 go-eth2-client now uses github.com/OffchainLabs/go-bitfield, and requires go 1.25. * Keep canonical information when refetching blocks Refetched blocks and attestations do not carry canonical information, so keep the existing values rather than overwriting them with NULL. Also run the bulk attestation copy in a savepoint, so that a failure leaves the transaction usable for the fallback of setting attestations individually. * Store execution payload bids Adds t_block_execution_payload_bids to hold the execution payload bid carried by blocks from Gloas onwards. * Handle Gloas blocks Stores the execution payload bid with the block, and the execution payload from the envelope once a child block confirms that the payload was delivered. * Exclude builder payments from epoch withdrawals * Update version * Bump goid for Go 1.25+ The previous version of goid returns 0 for all goroutines on Go 1.25+, causing go-deadlock to report false recursive locking in the scheduler tests. * Build with Go 1.26 Builds golangci-lint from source, as the v1 release binaries are built with Go 1.24 and refuse to lint newer Go versions. * Fetch Gloas blob sidecars with the execution payload Blobs for a Gloas block are published with its execution payload envelope, after the block itself, so fetch them when a child block confirms the payload rather than when the block is first seen. * Check for errors reading execution payload bids A failure part way through reading the rows would otherwise be reported as blocks without bids, causing their execution payloads to be skipped. * Fetch execution payload bids in a single query Avoids a query per block when obtaining multiple blocks. * Keep the copy error if rolling back attestations fails
1 parent 77bef5c commit 1a35eb3

19 files changed

Lines changed: 964 additions & 68 deletions

File tree

‎.github/workflows/golangci-lint.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ jobs:
1818
- uses: 'actions/setup-go@v5'
1919
with:
2020
cache: false
21-
go-version: '1.22'
21+
go-version: '1.26'
2222
- uses: 'actions/checkout@v4'
2323
- name: 'golangci-lint'
2424
uses: 'golangci/golangci-lint-action@v6'
2525
with:
26-
version: 'latest'
26+
version: 'v1.64.8'
27+
install-mode: 'goinstall'
2728
args: '--timeout=60m'
2829
only-new-issues: true
2930
skip-cache: true

‎.github/workflows/test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/setup-go@v5
1212
with:
1313
cache: false
14-
go-version: '1.22'
14+
go-version: '1.26'
1515
- uses: actions/checkout@v4
1616
- uses: n8maninger/action-golang-test@v2
1717
with:

‎CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
0.11.0:
2+
- support gloas: store execution payload bids, and execution payloads from envelopes once a child block confirms them
3+
14
0.10.2:
25
- added `blocks.blobs.enable` configuration flag (default: true) to control whether blobs for blocks should be fetched and saved
36

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.22-bookworm as builder
1+
FROM golang:1.26-bookworm as builder
22

33
WORKDIR /app
44

‎go.mod‎

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
module github.com/wealdtech/chaind
22

3-
go 1.22.7
4-
5-
toolchain go1.23.2
3+
go 1.26.0
64

75
require (
8-
github.com/attestantio/go-eth2-client v0.27.1
6+
github.com/OffchainLabs/go-bitfield v0.0.0-20251031151322-f427d04d8506
7+
github.com/attestantio/go-eth2-client v0.30.2
98
github.com/aws/aws-sdk-go v1.55.6
9+
github.com/holiman/uint256 v1.3.2
1010
github.com/jackc/pgx-shopspring-decimal v0.0.0-20220624020537-1d36b5a1853e
1111
github.com/jackc/pgx-zerolog v0.0.0-20230315001418-f978528409eb
1212
github.com/jackc/pgx/v5 v5.7.2
1313
github.com/mitchellh/go-homedir v1.1.0
1414
github.com/pkg/errors v0.9.1
1515
github.com/prometheus/client_golang v1.20.5
16-
github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15
1716
github.com/rs/zerolog v1.33.0
1817
github.com/sasha-s/go-deadlock v0.3.5
1918
github.com/shopspring/decimal v1.4.0
2019
github.com/spf13/pflag v1.0.6
2120
github.com/spf13/viper v1.19.0
22-
github.com/stretchr/testify v1.10.0
21+
github.com/stretchr/testify v1.11.1
2322
github.com/wealdtech/go-majordomo v1.1.1
2423
go.opentelemetry.io/otel v1.34.0
2524
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0
2625
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0
2726
go.opentelemetry.io/otel/sdk v1.34.0
2827
go.opentelemetry.io/otel/trace v1.34.0
2928
go.uber.org/atomic v1.11.0
30-
golang.org/x/sync v0.11.0
29+
golang.org/x/sync v0.17.0
3130
google.golang.org/grpc v1.70.0
3231
)
3332

@@ -41,10 +40,8 @@ require (
4140
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
4241
github.com/cespare/xxhash/v2 v2.3.0 // indirect
4342
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
44-
github.com/emicklei/dot v1.6.4 // indirect
4543
github.com/fatih/color v1.18.0 // indirect
4644
github.com/felixge/httpsnoop v1.0.4 // indirect
47-
github.com/ferranbt/fastssz v0.1.4 // indirect
4845
github.com/fsnotify/fsnotify v1.8.0 // indirect
4946
github.com/go-logr/logr v1.4.2 // indirect
5047
github.com/go-logr/stdr v1.2.2 // indirect
@@ -56,23 +53,22 @@ require (
5653
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
5754
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.0 // indirect
5855
github.com/hashicorp/hcl v1.0.0 // indirect
59-
github.com/holiman/uint256 v1.3.2 // indirect
6056
github.com/huandu/go-clone v1.7.2 // indirect
6157
github.com/jackc/pgpassfile v1.0.0 // indirect
6258
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
6359
github.com/jackc/puddle/v2 v2.2.2 // indirect
6460
github.com/jmespath/go-jmespath v0.4.0 // indirect
6561
github.com/klauspost/compress v1.17.11 // indirect
66-
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
62+
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
6763
github.com/magiconair/properties v1.8.9 // indirect
6864
github.com/mattn/go-colorable v0.1.14 // indirect
6965
github.com/mattn/go-isatty v0.0.20 // indirect
70-
github.com/minio/sha256-simd v1.0.1 // indirect
7166
github.com/mitchellh/mapstructure v1.5.0 // indirect
7267
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
7368
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
74-
github.com/petermattis/goid v0.0.0-20250121172306-05bcfb9a85dc // indirect
75-
github.com/pk910/dynamic-ssz v0.0.5 // indirect
69+
github.com/petermattis/goid v0.0.0-20260918085751-abfca077860b // indirect
70+
github.com/pk910/dynamic-ssz v1.4.0 // indirect
71+
github.com/pk910/hashtree-bindings v0.2.6 // indirect
7672
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
7773
github.com/prometheus/client_model v0.6.1 // indirect
7874
github.com/prometheus/common v0.62.0 // indirect
@@ -90,22 +86,20 @@ require (
9086
go.opentelemetry.io/otel/metric v1.34.0 // indirect
9187
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
9288
go.uber.org/multierr v1.11.0 // indirect
93-
golang.org/x/crypto v0.33.0 // indirect
89+
golang.org/x/crypto v0.42.0 // indirect
9490
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect
95-
golang.org/x/net v0.34.0 // indirect
91+
golang.org/x/net v0.43.0 // indirect
9692
golang.org/x/oauth2 v0.26.0 // indirect
97-
golang.org/x/sys v0.30.0 // indirect
98-
golang.org/x/text v0.22.0 // indirect
93+
golang.org/x/sys v0.36.0 // indirect
94+
golang.org/x/text v0.29.0 // indirect
9995
golang.org/x/time v0.10.0 // indirect
10096
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
10197
google.golang.org/api v0.220.0 // indirect
10298
google.golang.org/genproto v0.0.0-20250204164813-702378808489 // indirect
10399
google.golang.org/genproto/googleapis/api v0.0.0-20250204164813-702378808489 // indirect
104100
google.golang.org/genproto/googleapis/rpc v0.0.0-20250204164813-702378808489 // indirect
105101
google.golang.org/protobuf v1.36.4 // indirect
106-
gopkg.in/Knetic/govaluate.v3 v3.0.0 // indirect
107102
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
108103
gopkg.in/ini.v1 v1.67.0 // indirect
109-
gopkg.in/yaml.v2 v2.4.0 // indirect
110104
gopkg.in/yaml.v3 v3.0.1 // indirect
111105
)

0 commit comments

Comments
 (0)