Skip to content

Commit

Permalink
added old version of eth2 api to support pre fork version. new tests …
Browse files Browse the repository at this point in the history
…are broken now
  • Loading branch information
AKorpusenko committed Jul 16, 2024
1 parent 7cc510b commit 724545a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ require (
github.com/go-chi/render v1.0.2
github.com/golang/gddo v0.0.0-20200528160355-8d077c1d8f4c
github.com/golang/mock v1.6.0
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.0
github.com/gorilla/websocket v1.5.0
Expand Down Expand Up @@ -229,7 +228,7 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/attestantio/go-eth2-client => github.com/moshe-blox/go-eth2-client v0.0.0-20240529101804-84ddfd928b95
replace github.com/attestantio/go-eth2-client => github.com/ssvlabs/go-eth2-client v0.0.0-20240702122821-2c345f4fc90f

replace github.com/google/flatbuffers => github.com/google/flatbuffers v1.11.0

Expand Down
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,6 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/moshe-blox/go-eth2-client v0.0.0-20240529101804-84ddfd928b95 h1:/CBNyui4oUKb4wbLiMh3kGzZSWHkoBJgw23EszgUQJ8=
github.com/moshe-blox/go-eth2-client v0.0.0-20240529101804-84ddfd928b95/go.mod h1:vhb0ZoQ6bz0kkoyxVbHDRrZTOJbwlY6udFkwfwrJZTE=
github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
Expand Down Expand Up @@ -759,12 +757,10 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/ssvlabs/go-eth2-client v0.0.0-20240702122821-2c345f4fc90f h1:ZaokUqygFE81zqNd8mQmdrX2B8AkhYmt0i6gs9RDXi0=
github.com/ssvlabs/go-eth2-client v0.0.0-20240702122821-2c345f4fc90f/go.mod h1:TTz7YF6w4z6ahvxKiHuGPn6DbQn7gH6HPuWm/DEQeGE=
github.com/ssvlabs/ssv-spec v0.3.10-0.20240624121006-7adef2ac3ea6 h1:MDbz5Ia++c1yScP6UjccBfPYh3oZdbSQWE1muYxgf+4=
github.com/ssvlabs/ssv-spec v0.3.10-0.20240624121006-7adef2ac3ea6/go.mod h1:woZFNQHwfkY2fVvIRK6uPZGsUm8hCubZ6VWRbXRzCkM=
github.com/ssvlabs/ssv-spec-pre-cc v0.0.0-20240502072846-bba633c4ed61 h1:NkbXQyLsgZeedMXKAj0EKQJ2LyizPefZ5K99rK3Yyl8=
github.com/ssvlabs/ssv-spec-pre-cc v0.0.0-20240502072846-bba633c4ed61/go.mod h1:a7ROAIWAtDOV1VdIYBu4dFtD8TGpKCmC1KMOQKpnM7U=
github.com/ssvlabs/ssv-spec v0.3.10-0.20240519064657-54fad5befec4 h1:YWhB9RWnWtZHvH0nI4Wz6Qrw/CFS1dRJw+6S+RtT2Jo=
github.com/ssvlabs/ssv-spec v0.3.10-0.20240519064657-54fad5befec4/go.mod h1:GRCpcoYwYQYGmW8Ox3yQojJk4/7vhAzIiezxJxDyUDQ=
github.com/ssvlabs/ssv-spec-pre-cc v0.0.0-20240628184706-f15056ffda04 h1:GF+9Jc42SahPwDIJ0gsSlvyVtnZdthYlsUA4J89YAYM=
github.com/ssvlabs/ssv-spec-pre-cc v0.0.0-20240628184706-f15056ffda04/go.mod h1:a7ROAIWAtDOV1VdIYBu4dFtD8TGpKCmC1KMOQKpnM7U=
github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA=
Expand Down
8 changes: 4 additions & 4 deletions protocol/genesis/ssv/runner/proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,13 +424,13 @@ func summarizeBlock(block any) (summary blockSummary, err error) {
return summary, fmt.Errorf("block is nil")
}
switch b := block.(type) {
case *api.VersionedProposal:
if b.Blinded {
case *api.VersionedV3Proposal:
if b.ExecutionPayloadBlinded {
switch b.Version {
case spec.DataVersionCapella:
return summarizeBlock(b.CapellaBlinded)
return summarizeBlock(b.BlindedCapella)
case spec.DataVersionDeneb:
return summarizeBlock(b.DenebBlinded)
return summarizeBlock(b.BlindedDeneb)
default:
return summary, fmt.Errorf("unsupported blinded block version %d", b.Version)
}
Expand Down
4 changes: 0 additions & 4 deletions protocol/genesis/ssv/spectest/ssv_mapping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ func TestSSVMapping(t *testing.T) {
}

for name, test := range untypedTests {
// TODO remove
if !strings.Contains(name, "full happy flow") {
continue
}
name, test := name, test
r := prepareTest(t, logger, name, test)
if r != nil {
Expand Down

0 comments on commit 724545a

Please sign in to comment.