Skip to content

Commit f34ff22

Browse files
authored
Merge pull request #631 from ethpandaops/bbusa/das-guardian-ethpandaops-fork
Switch eth-das-guardian to ethpandaops fork for gloas support
2 parents 317ce28 + c286739 commit f34ff22

5 files changed

Lines changed: 28 additions & 12 deletions

File tree

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ require (
88
github.com/attestantio/go-eth2-client v0.28.0
99
github.com/cockroachdb/pebble v1.1.5
1010
github.com/ethereum/go-ethereum v1.17.2
11+
github.com/ethpandaops/eth-das-guardian v0.0.0-20260410123341-c9663e34164d
1112
github.com/ethpandaops/ethcore v0.0.0-20260320045412-9cdd5d70a29c
1213
github.com/ethpandaops/ethwallclock v0.4.0
1314
github.com/glebarez/go-sqlite v1.22.0
@@ -24,7 +25,6 @@ require (
2425
github.com/mitchellh/mapstructure v1.5.0
2526
github.com/pk910/dynamic-ssz v1.3.1-0.20260407212738-e97de623fd84
2627
github.com/pressly/goose/v3 v3.27.0
27-
github.com/probe-lab/eth-das-guardian v0.2.2
2828
github.com/protolambda/bls12-381-util v0.1.0
2929
github.com/protolambda/zrnt v0.34.1
3030
github.com/protolambda/ztyp v0.2.2
@@ -255,4 +255,4 @@ require (
255255
modernc.org/sqlite v1.46.1 // indirect
256256
)
257257

258-
replace github.com/attestantio/go-eth2-client => github.com/pk910/go-eth2-client v0.0.0-20260331085057-05aefaa5ce81
258+
replace github.com/attestantio/go-eth2-client => github.com/pk910/go-eth2-client v0.0.0-20260401105128-4544cf21b737

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab h1:rvv6MJ
114114
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab/go.mod h1:IuLm4IsPipXKF7CW5Lzf68PIbZ5yl7FFd74l/E0o9A8=
115115
github.com/ethereum/go-ethereum v1.17.2 h1:ag6geu0kn8Hv5FLKTpH+Hm2DHD+iuFtuqKxEuwUsDOI=
116116
github.com/ethereum/go-ethereum v1.17.2/go.mod h1:KHcRXfGOUfUmKg51IhQ0IowiqZ6PqZf08CMtk0g5K1o=
117+
github.com/ethpandaops/eth-das-guardian v0.0.0-20260410123341-c9663e34164d h1:qyBM/DoN7kTrELetvPE/zZbNyESai/Jp0NDtQIV6i24=
118+
github.com/ethpandaops/eth-das-guardian v0.0.0-20260410123341-c9663e34164d/go.mod h1:+1ZU+Z8YZXBp5jWcd1ATJ0xIJfHuj/sufIOL+qJbOLw=
117119
github.com/ethpandaops/ethcore v0.0.0-20260320045412-9cdd5d70a29c h1:uBRIitwcuCJlRGioqm0jQRIojiH8DSyLRFSTCCBxN6o=
118120
github.com/ethpandaops/ethcore v0.0.0-20260320045412-9cdd5d70a29c/go.mod h1:QsmYTdesob+vQ6pW4KtRVvxLZUNop3cdtd/DgD30hJU=
119121
github.com/ethpandaops/ethwallclock v0.4.0 h1:+sgnhf4pk6hLPukP076VxkiLloE4L0Yk1yat+ZyHh1g=
@@ -555,8 +557,8 @@ github.com/pion/webrtc/v4 v4.1.4 h1:/gK1ACGHXQmtyVVbJFQDxNoODg4eSRiFLB7t9r9pg8M=
555557
github.com/pion/webrtc/v4 v4.1.4/go.mod h1:Oab9npu1iZtQRMic3K3toYq5zFPvToe/QBw7dMI2ok4=
556558
github.com/pk910/dynamic-ssz v1.3.1-0.20260407212738-e97de623fd84 h1:J3H3PiaO4+ej5HTK/nG/wnAj0jx+Ek2+0s8o+zujI4I=
557559
github.com/pk910/dynamic-ssz v1.3.1-0.20260407212738-e97de623fd84/go.mod h1:NmeFF4jxzVwWC8cnEhUB7xMI++8hd/0OZvZHFrUvFfs=
558-
github.com/pk910/go-eth2-client v0.0.0-20260331085057-05aefaa5ce81 h1:mHgrerDiro/np9FCoJ19EYsCyl/CXMHFi34o+j3T+rE=
559-
github.com/pk910/go-eth2-client v0.0.0-20260331085057-05aefaa5ce81/go.mod h1:lwj0l8l51hIjqdQpODPea01JfE33nyM++1VGjBZau08=
560+
github.com/pk910/go-eth2-client v0.0.0-20260401105128-4544cf21b737 h1:+tHLCpEGiohePzGMb1QhDjNLLPH43/dEeslfS4ajpRc=
561+
github.com/pk910/go-eth2-client v0.0.0-20260401105128-4544cf21b737/go.mod h1:cmccJOSI3vYd1LKyU7jo8tR71vGaLmcWzK4xfefei0I=
560562
github.com/pk910/hashtree-bindings v0.1.0 h1:w7NyRWFi2OaYEFvo9ADcE/QU6PMuVLl3hBgx92KiH9c=
561563
github.com/pk910/hashtree-bindings v0.1.0/go.mod h1:zrWt88783JmhBfcgni6kkIMYRdXTZi/FL//OyI5T/l4=
562564
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
@@ -568,8 +570,6 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
568570
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
569571
github.com/pressly/goose/v3 v3.27.0 h1:/D30gVTuQhu0WsNZYbJi4DMOsx1lNq+6SkLe+Wp59BM=
570572
github.com/pressly/goose/v3 v3.27.0/go.mod h1:3ZBeCXqzkgIRvrEMDkYh1guvtoJTU5oMMuDdkutoM78=
571-
github.com/probe-lab/eth-das-guardian v0.2.2 h1:ygQjHt9jVD6yvujtBLuWPA3fYnPe6D5b2S7xOASYfm4=
572-
github.com/probe-lab/eth-das-guardian v0.2.2/go.mod h1:xkhVpnhL1y2tmQERuaJTUGFAMb4eKWSVEBr0rhAB6ZM=
573573
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
574574
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
575575
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=

handlers/api/api_das_guardian.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/ethpandaops/dora/dbtypes"
1313
"github.com/ethpandaops/dora/services"
1414
"github.com/ethpandaops/dora/utils"
15-
dasguardian "github.com/probe-lab/eth-das-guardian"
15+
dasguardian "github.com/ethpandaops/eth-das-guardian"
1616
"github.com/sirupsen/logrus"
1717
)
1818

handlers/api/api_das_guardian_mass.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/ethpandaops/dora/dbtypes"
1414
"github.com/ethpandaops/dora/services"
1515
"github.com/ethpandaops/dora/utils"
16-
dasguardian "github.com/probe-lab/eth-das-guardian"
16+
dasguardian "github.com/ethpandaops/eth-das-guardian"
1717
"github.com/sirupsen/logrus"
1818
)
1919

services/dasguardian.go

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"github.com/attestantio/go-eth2-client/spec"
1111
"github.com/attestantio/go-eth2-client/spec/phase0"
1212
"github.com/ethereum/go-ethereum/common/hexutil"
13-
dasguardian "github.com/probe-lab/eth-das-guardian"
14-
"github.com/probe-lab/eth-das-guardian/api"
13+
dasguardian "github.com/ethpandaops/eth-das-guardian"
14+
"github.com/ethpandaops/eth-das-guardian/api"
1515
"github.com/sirupsen/logrus"
1616
)
1717

@@ -131,10 +131,13 @@ func (d *dasGuardianAPI) Init(ctx context.Context) error {
131131
}
132132

133133
func (d *dasGuardianAPI) GetStateVersion() string {
134-
fuluForkEpoch := d.GetFuluForkEpoch()
135134
currentEpoch := GlobalBeaconService.GetChainState().CurrentEpoch()
136135

137-
if currentEpoch >= phase0.Epoch(fuluForkEpoch) {
136+
if currentEpoch >= phase0.Epoch(d.GetGloasForkEpoch()) {
137+
return "gloas"
138+
}
139+
140+
if currentEpoch >= phase0.Epoch(d.GetFuluForkEpoch()) {
138141
return "fulu"
139142
}
140143

@@ -174,6 +177,19 @@ func (d *dasGuardianAPI) GetFuluForkEpoch() uint64 {
174177
return *specs.FuluForkEpoch
175178
}
176179

180+
func (d *dasGuardianAPI) GetGloasForkEpoch() uint64 {
181+
specs := GlobalBeaconService.GetChainState().GetSpecs()
182+
if specs == nil {
183+
return 0
184+
}
185+
186+
if specs.GloasForkEpoch == nil {
187+
return math.MaxInt64
188+
}
189+
190+
return *specs.GloasForkEpoch
191+
}
192+
177193
func (d *dasGuardianAPI) GetNodeIdentity(ctx context.Context) (*api.NodeIdentity, error) {
178194
// Get the first available consensus client
179195
consensusClients := GlobalBeaconService.GetConsensusClients()

0 commit comments

Comments
 (0)