From 225b752044a1e51f770b59a26587a8172ac621f1 Mon Sep 17 00:00:00 2001 From: kalo <24719519+KaloyanTanev@users.noreply.github.com> Date: Mon, 15 Dec 2025 18:55:34 +0100 Subject: [PATCH] *: update prysm repo and bump go-eth2-clinet (#4181) As per the title. category: misc ticket: none --- core/fetcher/fetcher_test.go | 6 +++--- core/signeddata.go | 2 +- core/tracker/inclusion.go | 2 +- core/tracker/inclusion_internal_test.go | 2 +- core/validatorapi/router.go | 2 +- core/validatorapi/validatorapi_test.go | 2 +- docs/goguidelines.md | 2 +- eth2util/eth2exp/attagg_test.go | 10 +++++----- go.mod | 4 ++-- go.sum | 8 ++++---- testutil/beaconmock/options.go | 2 +- testutil/fuzz.go | 2 +- testutil/random.go | 2 +- testutil/validatormock/attest.go | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/core/fetcher/fetcher_test.go b/core/fetcher/fetcher_test.go index 17b9e6be40..c8161aa664 100644 --- a/core/fetcher/fetcher_test.go +++ b/core/fetcher/fetcher_test.go @@ -9,12 +9,12 @@ import ( "math" "testing" + "github.com/OffchainLabs/go-bitfield" eth2api "github.com/attestantio/go-eth2-client/api" eth2v1 "github.com/attestantio/go-eth2-client/api/v1" eth2spec "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/altair" eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0" - "github.com/prysmaticlabs/go-bitfield" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -379,7 +379,7 @@ func TestFetchSyncContribution(t *testing.T) { } var ( - // Signatures corresponding to aggregators. Refer https://github.com/prysmaticlabs/prysm/blob/39a7988e9edbed5b517229b4d66c2a8aab7c7b4d/beacon-chain/sync/validate_sync_contribution_proof_test.go#L460. + // Signatures corresponding to aggregators. Refer https://github.com/OffchainLabs/prysm/blob/39a7988e9edbed5b517229b4d66c2a8aab7c7b4d/beacon-chain/sync/validate_sync_contribution_proof_test.go#L460. sigA = "a9dbd88a49a7269e91b8ef1296f1e07f87fed919d51a446b67122bfdfd61d23f3f929fc1cd5209bd6862fd60f739b27213fb0a8d339f7f081fc84281f554b190bb49cc97a6b3364e622af9e7ca96a97fe2b766f9e746dead0b33b58473d91562" sigB = "99e60f20dde4d4872b048d703f1943071c20213d504012e7e520c229da87661803b9f139b9a0c5be31de3cef6821c080125aed38ebaf51ba9a2e9d21d7fbf2903577983109d097a8599610a92c0305408d97c1fd4b0b2d1743fb4eedf5443f99" ) @@ -518,7 +518,7 @@ func TestFetchSyncContribution(t *testing.T) { if duty.Type == core.DutyPrepareSyncContribution { require.Equal(t, core.NewPrepareSyncContributionDuty(slot), duty) - // Signature corresponding to a non-aggregator. Refer https://github.com/prysmaticlabs/prysm/blob/39a7988e9edbed5b517229b4d66c2a8aab7c7b4d/beacon-chain/sync/validate_sync_contribution_proof_test.go#L336 + // Signature corresponding to a non-aggregator. Refer https://github.com/OffchainLabs/prysm/blob/39a7988e9edbed5b517229b4d66c2a8aab7c7b4d/beacon-chain/sync/validate_sync_contribution_proof_test.go#L336 sig := "b9251a82040d4620b8c5665f328ee6c2eaa02d31d71d153f4abba31a7922a981e541e85283f0ced387d26e86aef9386d18c6982b9b5f8759882fe7f25a328180d86e146994ef19d28bc1432baf29751dec12b5f3d65dbbe224d72cf900c6831a" resp := blsSigFromHex(t, sig) selection := ð2v1.SyncCommitteeSelection{ diff --git a/core/signeddata.go b/core/signeddata.go index d8e9c248da..af2c176c9e 100644 --- a/core/signeddata.go +++ b/core/signeddata.go @@ -6,6 +6,7 @@ import ( "context" "encoding/json" + "github.com/OffchainLabs/go-bitfield" eth2api "github.com/attestantio/go-eth2-client/api" eth2v1 "github.com/attestantio/go-eth2-client/api/v1" eth2bellatrix "github.com/attestantio/go-eth2-client/api/v1/bellatrix" @@ -20,7 +21,6 @@ import ( eth2e "github.com/attestantio/go-eth2-client/spec/electra" eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0" ssz "github.com/ferranbt/fastssz" - "github.com/prysmaticlabs/go-bitfield" "github.com/obolnetwork/charon/app/errors" "github.com/obolnetwork/charon/app/eth2wrap" diff --git a/core/tracker/inclusion.go b/core/tracker/inclusion.go index ed965ffe8a..85d54b7720 100644 --- a/core/tracker/inclusion.go +++ b/core/tracker/inclusion.go @@ -12,11 +12,11 @@ import ( "sync" "time" + "github.com/OffchainLabs/go-bitfield" eth2api "github.com/attestantio/go-eth2-client/api" eth2v1 "github.com/attestantio/go-eth2-client/api/v1" eth2spec "github.com/attestantio/go-eth2-client/spec" eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0" - "github.com/prysmaticlabs/go-bitfield" "github.com/obolnetwork/charon/app/errors" "github.com/obolnetwork/charon/app/eth2wrap" diff --git a/core/tracker/inclusion_internal_test.go b/core/tracker/inclusion_internal_test.go index 2037b229d4..9742b56a0f 100644 --- a/core/tracker/inclusion_internal_test.go +++ b/core/tracker/inclusion_internal_test.go @@ -8,12 +8,12 @@ import ( "slices" "testing" + "github.com/OffchainLabs/go-bitfield" eth2api "github.com/attestantio/go-eth2-client/api" eth2v1 "github.com/attestantio/go-eth2-client/api/v1" eth2spec "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/electra" eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0" - "github.com/prysmaticlabs/go-bitfield" "github.com/stretchr/testify/require" "github.com/obolnetwork/charon/app/eth2wrap" diff --git a/core/validatorapi/router.go b/core/validatorapi/router.go index f16506717b..f9782885fa 100644 --- a/core/validatorapi/router.go +++ b/core/validatorapi/router.go @@ -22,6 +22,7 @@ import ( "strings" "time" + "github.com/OffchainLabs/go-bitfield" eth2client "github.com/attestantio/go-eth2-client" eth2api "github.com/attestantio/go-eth2-client/api" eth2v1 "github.com/attestantio/go-eth2-client/api/v1" @@ -38,7 +39,6 @@ import ( eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0" ssz "github.com/ferranbt/fastssz" "github.com/gorilla/mux" - "github.com/prysmaticlabs/go-bitfield" "github.com/obolnetwork/charon/app/errors" "github.com/obolnetwork/charon/app/log" diff --git a/core/validatorapi/validatorapi_test.go b/core/validatorapi/validatorapi_test.go index 5137d5aa4c..29a1a52834 100644 --- a/core/validatorapi/validatorapi_test.go +++ b/core/validatorapi/validatorapi_test.go @@ -11,6 +11,7 @@ import ( "testing" "time" + "github.com/OffchainLabs/go-bitfield" eth2api "github.com/attestantio/go-eth2-client/api" eth2v1 "github.com/attestantio/go-eth2-client/api/v1" eth2bellatrix "github.com/attestantio/go-eth2-client/api/v1/bellatrix" @@ -25,7 +26,6 @@ import ( "github.com/attestantio/go-eth2-client/spec/deneb" "github.com/attestantio/go-eth2-client/spec/electra" eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0" - "github.com/prysmaticlabs/go-bitfield" "github.com/stretchr/testify/require" "github.com/obolnetwork/charon/app/errors" diff --git a/docs/goguidelines.md b/docs/goguidelines.md index ac88fc807e..2115eb60e7 100644 --- a/docs/goguidelines.md +++ b/docs/goguidelines.md @@ -16,7 +16,7 @@ These resources define opinions and practices that are highly recommended. We take inspiration and guidance from these top-quality go projects. - [Vouch](https://github.com/attestantio/vouch) -- [Prysm](https://github.com/prysmaticlabs/prysm) +- [Prysm](https://github.com/OffchainLabs/prysm) - [Go-ethereum](https://github.com/ethereum/go-ethereum) - [Avalanchego](https://github.com/ava-labs/avalanchego) - [LND](https://github.com/lightningnetwork/lnd) diff --git a/eth2util/eth2exp/attagg_test.go b/eth2util/eth2exp/attagg_test.go index 748c16863d..4b2a952015 100644 --- a/eth2util/eth2exp/attagg_test.go +++ b/eth2util/eth2exp/attagg_test.go @@ -21,14 +21,14 @@ func TestIsAttAggregator(t *testing.T) { bmock, err := beaconmock.New(t.Context()) require.NoError(t, err) - // https://github.com/prysmaticlabs/prysm/blob/8627fe72e80009ae162430140bcfff6f209d7a32/beacon-chain/core/helpers/attestation_test.go#L28 + // https://github.com/OffchainLabs/prysm/blob/8627fe72e80009ae162430140bcfff6f209d7a32/beacon-chain/core/helpers/attestation_test.go#L28 sig, err := hex.DecodeString("8776a37d6802c4797d113169c5fcfda50e68a32058eb6356a6f00d06d7da64c841a00c7c38b9b94a204751eca53707bd03523ce4797827d9bacff116a6e776a20bbccff4b683bf5201b610797ed0502557a58a65c8395f8a1649b976c3112d15") require.NoError(t, err) blsSig, err := tblsconv.SignatureFromBytes(sig) require.NoError(t, err) t.Run("aggregator", func(t *testing.T) { - // https://github.com/prysmaticlabs/prysm/blob/8627fe72e80009ae162430140bcfff6f209d7a32/beacon-chain/core/helpers/attestation_test.go#L26 + // https://github.com/OffchainLabs/prysm/blob/8627fe72e80009ae162430140bcfff6f209d7a32/beacon-chain/core/helpers/attestation_test.go#L26 commLen := uint64(3) isAgg, err := eth2exp.IsAttAggregator(ctx, bmock, commLen, eth2p0.BLSSignature(blsSig)) require.NoError(t, err) @@ -36,7 +36,7 @@ func TestIsAttAggregator(t *testing.T) { }) t.Run("not an aggregator", func(t *testing.T) { - // https://github.com/prysmaticlabs/prysm/blob/fc509cc220a82efd555704d41aa362903a06ab9e/beacon-chain/core/helpers/attestation_test.go#L39 + // https://github.com/OffchainLabs/prysm/blob/fc509cc220a82efd555704d41aa362903a06ab9e/beacon-chain/core/helpers/attestation_test.go#L39 commLen := uint64(64) isAgg, err := eth2exp.IsAttAggregator(ctx, bmock, commLen, eth2p0.BLSSignature(blsSig)) require.NoError(t, err) @@ -50,8 +50,8 @@ func TestIsSyncCommAggregator(t *testing.T) { bmock, err := beaconmock.New(t.Context()) require.NoError(t, err) - // The non-aggregator tests (isAgg: false) are taken from https://github.com/prysmaticlabs/prysm/blob/39a7988e9edbed5b517229b4d66c2a8aab7c7b4d/beacon-chain/sync/validate_sync_contribution_proof_test.go#L336. - // The aggregator tests (isAgg: true) are taken from https://github.com/prysmaticlabs/prysm/blob/39a7988e9edbed5b517229b4d66c2a8aab7c7b4d/beacon-chain/sync/validate_sync_contribution_proof_test.go#L460. + // The non-aggregator tests (isAgg: false) are taken from https://github.com/OffchainLabs/prysm/blob/39a7988e9edbed5b517229b4d66c2a8aab7c7b4d/beacon-chain/sync/validate_sync_contribution_proof_test.go#L336. + // The aggregator tests (isAgg: true) are taken from https://github.com/OffchainLabs/prysm/blob/39a7988e9edbed5b517229b4d66c2a8aab7c7b4d/beacon-chain/sync/validate_sync_contribution_proof_test.go#L460. tests := []struct { sig string // Sync committee contribution selection proof in hex. isAgg bool // True if the sync committee member is a sync committee aggregator. diff --git a/go.mod b/go.mod index cbe54474ef..4ba6e466a1 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/obolnetwork/charon go 1.25 require ( + github.com/OffchainLabs/go-bitfield v0.0.0-20251031151322-f427d04d8506 github.com/attestantio/go-builder-client v0.7.2 github.com/attestantio/go-eth2-client v0.27.1 github.com/coinbase/kryptology v1.5.6-0.20220316191335-269410e1b06b @@ -26,7 +27,6 @@ require ( github.com/prometheus/client_golang v1.23.2 github.com/prometheus/client_model v0.6.2 github.com/protolambda/eth2-shuffle v1.1.0 - github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 github.com/r3labs/sse/v2 v2.10.0 github.com/rs/zerolog v1.34.0 github.com/showwin/speedtest-go v1.7.10 @@ -288,7 +288,7 @@ require ( replace github.com/coinbase/kryptology => github.com/ObolNetwork/kryptology v0.1.0 // We're replacing go-eth2-client with a branch off our fork. The branch is kept up to date with the latest attestantio versions. -replace github.com/attestantio/go-eth2-client => github.com/ObolNetwork/go-eth2-client v0.27.1-obol.2 //nolint +replace github.com/attestantio/go-eth2-client => github.com/ObolNetwork/go-eth2-client v0.28.0-obol //nolint tool ( github.com/bufbuild/buf/cmd/buf diff --git a/go.sum b/go.sum index 04bd3e0d5e..e5129f8bf6 100644 --- a/go.sum +++ b/go.sum @@ -44,10 +44,12 @@ github.com/DataDog/zstd v1.5.7 h1:ybO8RBeh29qrxIhCA9E8gKY6xfONU9T6G6aP9DTKfLE= github.com/DataDog/zstd v1.5.7/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/ObolNetwork/go-eth2-client v0.27.1-obol.2 h1:wU3Ks9wbLKFaJCy+eqFLmdHJMaY02kbTSiDuwDCK2HY= -github.com/ObolNetwork/go-eth2-client v0.27.1-obol.2/go.mod h1:fvULSL9WtNskkOB4i+Yyr6BKpNHXvmpGZj9969fCrfY= +github.com/ObolNetwork/go-eth2-client v0.28.0-obol h1:3lFBuNmaxBI9fLDf+oza1p7VOmsECKaT6sx0EoFeAOk= +github.com/ObolNetwork/go-eth2-client v0.28.0-obol/go.mod h1:PO9sHFCq+1RiG+Eh3eOR2GYvYV64Qzg7idM3kLgCs5k= github.com/ObolNetwork/kryptology v0.1.0 h1:AhoG4My70+xMhEJSpVaJay/t+T/vIUNHQYLjsDJHulI= github.com/ObolNetwork/kryptology v0.1.0/go.mod h1:/Wl7Js2f676GyXZDTaojf/O+l0fxFPWudbyjdFhkpSA= +github.com/OffchainLabs/go-bitfield v0.0.0-20251031151322-f427d04d8506 h1:d/SJkN8/9Ca+1YmuDiUJxAiV4w/a9S8NcsG7GMQSrVI= +github.com/OffchainLabs/go-bitfield v0.0.0-20251031151322-f427d04d8506/go.mod h1:6TZI4FU6zT8x6ZfWa1J8YQ2NgW0wLV/W3fHRca8ISBo= github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6 h1:1zYrtlhrZ6/b6SAjLSfKzWtdgqK0U+HtH/VcBWh1BaU= github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6/go.mod h1:ioLG6R+5bUSO1oeGSDxOV3FADARuMoytZCSX6MEMQkI= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= @@ -541,8 +543,6 @@ github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzM github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/protolambda/eth2-shuffle v1.1.0 h1:gixIBI84IeugTwwHXm8vej1bSSEhueBCSryA4lAKRLU= github.com/protolambda/eth2-shuffle v1.1.0/go.mod h1:FhA2c0tN15LTC+4T9DNVm+55S7uXTTjQ8TQnBuXlkF8= -github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 h1:lC8kiphgdOBTcbTvo8MwkvpKjO0SlAgjv4xIK5FGJ94= -github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15/go.mod h1:8svFBIKKu31YriBG/pNizo9N0Jr9i5PQ+dFkxWg3x5k= github.com/prysmaticlabs/gohashtree v0.0.4-beta h1:H/EbCuXPeTV3lpKeXGPpEV9gsUpkqOOVnWapUyeWro4= github.com/prysmaticlabs/gohashtree v0.0.4-beta/go.mod h1:BFdtALS+Ffhg3lGQIHv9HDWuHS8cTvHZzrHWxwOtGOs= github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= diff --git a/testutil/beaconmock/options.go b/testutil/beaconmock/options.go index 314b457d37..2d90bd232e 100644 --- a/testutil/beaconmock/options.go +++ b/testutil/beaconmock/options.go @@ -19,6 +19,7 @@ import ( "strings" "time" + "github.com/OffchainLabs/go-bitfield" eth2api "github.com/attestantio/go-eth2-client/api" eth2v1 "github.com/attestantio/go-eth2-client/api/v1" eth2spec "github.com/attestantio/go-eth2-client/spec" @@ -26,7 +27,6 @@ import ( "github.com/attestantio/go-eth2-client/spec/electra" eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/jonboulle/clockwork" - "github.com/prysmaticlabs/go-bitfield" "github.com/obolnetwork/charon/app/errors" "github.com/obolnetwork/charon/app/eth2wrap" diff --git a/testutil/fuzz.go b/testutil/fuzz.go index 4fd8ca3b5c..5443ba43f5 100644 --- a/testutil/fuzz.go +++ b/testutil/fuzz.go @@ -7,13 +7,13 @@ import ( "testing" "time" + "github.com/OffchainLabs/go-bitfield" eth2spec "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/altair" "github.com/attestantio/go-eth2-client/spec/deneb" "github.com/attestantio/go-eth2-client/spec/electra" eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0" fuzz "github.com/google/gofuzz" - "github.com/prysmaticlabs/go-bitfield" "github.com/stretchr/testify/require" "github.com/obolnetwork/charon/core" diff --git a/testutil/random.go b/testutil/random.go index 401e7b3c1d..5cb49bd1a9 100644 --- a/testutil/random.go +++ b/testutil/random.go @@ -14,6 +14,7 @@ import ( "testing" "time" + "github.com/OffchainLabs/go-bitfield" eth2api "github.com/attestantio/go-eth2-client/api" eth2v1 "github.com/attestantio/go-eth2-client/api/v1" eth2bellatrix "github.com/attestantio/go-eth2-client/api/v1/bellatrix" @@ -36,7 +37,6 @@ import ( quic "github.com/libp2p/go-libp2p/p2p/transport/quic" //nolint:revive // Must be imported with alias "github.com/libp2p/go-libp2p/p2p/transport/tcp" "github.com/multiformats/go-multiaddr" - "github.com/prysmaticlabs/go-bitfield" "github.com/stretchr/testify/require" "github.com/obolnetwork/charon/core" diff --git a/testutil/validatormock/attest.go b/testutil/validatormock/attest.go index e5e77b9617..af7f49e67b 100644 --- a/testutil/validatormock/attest.go +++ b/testutil/validatormock/attest.go @@ -6,12 +6,12 @@ import ( "context" "sync" + "github.com/OffchainLabs/go-bitfield" eth2api "github.com/attestantio/go-eth2-client/api" eth2v1 "github.com/attestantio/go-eth2-client/api/v1" eth2spec "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/electra" eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0" - "github.com/prysmaticlabs/go-bitfield" "github.com/obolnetwork/charon/app/errors" "github.com/obolnetwork/charon/app/eth2wrap"