From 5d23cfb669da7f6962cc166699b9decd3f5f30cd Mon Sep 17 00:00:00 2001 From: Kaloyan Tanev Date: Mon, 15 Dec 2025 17:54:52 +0100 Subject: [PATCH 1/2] PrysmaticLabs to OffchainLabs --- mock/beaconblockattestations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mock/beaconblockattestations.go b/mock/beaconblockattestations.go index 6e530657..1fdef7f0 100644 --- a/mock/beaconblockattestations.go +++ b/mock/beaconblockattestations.go @@ -16,11 +16,11 @@ package mock import ( "context" + "github.com/OffchainLabs/go-bitfield" "github.com/attestantio/go-eth2-client/api" "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/electra" "github.com/attestantio/go-eth2-client/spec/phase0" - "github.com/prysmaticlabs/go-bitfield" ) // BeaconBlockAttestations fetches a block's attestations given a block ID. From a140c605b7ac9f6dddbcc3fa598afd5e5631a897 Mon Sep 17 00:00:00 2001 From: Kaloyan Tanev Date: Mon, 15 Dec 2025 17:58:37 +0100 Subject: [PATCH 2/2] Fix linter --- http/proxy.go | 2 ++ mock/beaconblockattestations.go | 2 +- spec/bellatrix/executionpayload.go | 3 ++- spec/bellatrix/executionpayloadheader.go | 3 ++- spec/capella/executionpayload.go | 3 ++- spec/capella/executionpayloadheader.go | 3 ++- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/http/proxy.go b/http/proxy.go index 203f54d1..8de56bbc 100644 --- a/http/proxy.go +++ b/http/proxy.go @@ -27,6 +27,8 @@ func (s *Service) Proxy(ctx context.Context, req *http.Request) (*http.Response, } // proxy performs an HTTP proxy request using a reverse proxy and returns the response. +// +//nolint:revive func (s *Service) proxy(ctx context.Context, req *http.Request) (*http.Response, error) { endpoint := req.URL.Path query := req.URL.Query().Encode() diff --git a/mock/beaconblockattestations.go b/mock/beaconblockattestations.go index 1fdef7f0..f0f1bb2c 100644 --- a/mock/beaconblockattestations.go +++ b/mock/beaconblockattestations.go @@ -35,7 +35,7 @@ func (s *Service) BeaconBlockAttestations(ctx context.Context, } attestations := make([]*spec.VersionedAttestation, 4) - for i := uint64(0); i < 4; i++ { + for i := range uint64(4) { aggregationBits := bitfield.NewBitlist(128) aggregationBits.SetBitAt(i, true) attestations[i] = &spec.VersionedAttestation{ diff --git a/spec/bellatrix/executionpayload.go b/spec/bellatrix/executionpayload.go index 29eab102..e4d9988b 100644 --- a/spec/bellatrix/executionpayload.go +++ b/spec/bellatrix/executionpayload.go @@ -289,7 +289,8 @@ func (e *ExecutionPayload) unpack(data *executionPayloadJSON) error { baseFeePerGasBEBytes := baseFeePerGas.Bytes() var baseFeePerGasLEBytes [32]byte baseFeeLen := len(baseFeePerGasBEBytes) - for i := 0; i < baseFeeLen; i++ { + for i := range baseFeeLen { + //nolint:gosec baseFeePerGasLEBytes[i] = baseFeePerGasBEBytes[baseFeeLen-1-i] } copy(e.BaseFeePerGas[:], baseFeePerGasLEBytes[:]) diff --git a/spec/bellatrix/executionpayloadheader.go b/spec/bellatrix/executionpayloadheader.go index 92d7139f..0a4bd901 100644 --- a/spec/bellatrix/executionpayloadheader.go +++ b/spec/bellatrix/executionpayloadheader.go @@ -284,7 +284,8 @@ func (e *ExecutionPayloadHeader) unpack(data *executionPayloadHeaderJSON) error baseFeePerGasBEBytes := baseFeePerGas.Bytes() var baseFeePerGasLEBytes [32]byte baseFeeLen := len(baseFeePerGasBEBytes) - for i := 0; i < baseFeeLen; i++ { + for i := range baseFeeLen { + //nolint:gosec baseFeePerGasLEBytes[i] = baseFeePerGasBEBytes[baseFeeLen-1-i] } copy(e.BaseFeePerGas[:], baseFeePerGasLEBytes[:]) diff --git a/spec/capella/executionpayload.go b/spec/capella/executionpayload.go index f563711a..664006a6 100644 --- a/spec/capella/executionpayload.go +++ b/spec/capella/executionpayload.go @@ -296,7 +296,8 @@ func (e *ExecutionPayload) unpack(data *executionPayloadJSON) error { baseFeePerGasBEBytes := baseFeePerGas.Bytes() var baseFeePerGasLEBytes [32]byte baseFeeLen := len(baseFeePerGasBEBytes) - for i := 0; i < baseFeeLen; i++ { + for i := range baseFeeLen { + //nolint:gosec baseFeePerGasLEBytes[i] = baseFeePerGasBEBytes[baseFeeLen-1-i] } copy(e.BaseFeePerGas[:], baseFeePerGasLEBytes[:]) diff --git a/spec/capella/executionpayloadheader.go b/spec/capella/executionpayloadheader.go index 61cff023..3b119a49 100644 --- a/spec/capella/executionpayloadheader.go +++ b/spec/capella/executionpayloadheader.go @@ -289,7 +289,8 @@ func (e *ExecutionPayloadHeader) unpack(data *executionPayloadHeaderJSON) error baseFeePerGasBEBytes := baseFeePerGas.Bytes() var baseFeePerGasLEBytes [32]byte baseFeeLen := len(baseFeePerGasBEBytes) - for i := 0; i < baseFeeLen; i++ { + for i := range baseFeeLen { + //nolint:gosec baseFeePerGasLEBytes[i] = baseFeePerGasBEBytes[baseFeeLen-1-i] } copy(e.BaseFeePerGas[:], baseFeePerGasLEBytes[:])