Skip to content

Update client libraries,deps & electra blocks #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.19.x]
go-version: [1.24.x]
#macos-latest, windows-latest
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine AS build
FROM golang:1.24-alpine AS build
ARG BUILD_VERSION

WORKDIR /app
Expand All @@ -9,7 +9,7 @@ RUN apk add --update gcc g++
RUN go mod download
RUN go build -o /mev-sp-oracle -ldflags "-X github.com/dappnode/mev-sp-oracle/config.ReleaseVersion=$BUILD_VERSION" .

FROM golang:1.19-alpine
FROM golang:1.24-alpine

WORKDIR /

Expand Down
10 changes: 5 additions & 5 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,13 @@ func (m *ApiService) handleMemoryStatistics(w http.ResponseWriter, req *http.Req
totalDonationsWei := big.NewInt(0)

// Prevent underflow
if uint64(m.oracle.State().LatestProcessedSlot) < SlotsInOneMonth {
m.respondError(w, http.StatusInternalServerError, "head slot is lower than slots in a month, this should not happen")
if uint64(m.oracle.State().LatestProcessedSlot) < 1 {
m.respondError(w, http.StatusInternalServerError, "head slot is lower than 1, this should not happen")
return
}

if uint64(m.oracle.State().LatestProcessedBlock) < SlotsInOneMonth {
m.respondError(w, http.StatusInternalServerError, "head block is lower than slots in a month, this should not happen")
if uint64(m.oracle.State().LatestProcessedBlock) < 1 {
m.respondError(w, http.StatusInternalServerError, "head block is lower than 1, this should not happen")
return
}

Expand Down Expand Up @@ -657,7 +657,7 @@ func (m *ApiService) handleMemoryValidatorsByWithdrawal(w http.ResponseWriter, r

// Check if the withdrawal address matches the requested one
credStr := hex.EncodeToString(validator.Validator.WithdrawalCredentials)
eth1Add, err := utils.GetEth1Address(credStr) // TODO: Use the new function
eth1Add, err := utils.GetCompatibleAddress(credStr) // TODO: Use the new function

// Skip validators without non eth withdrawal address (bls address)
if err != nil {
Expand Down
59 changes: 32 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/dappnode/mev-sp-oracle

go 1.19
go 1.23.0

toolchain go1.24.2

require (
github.com/attestantio/go-builder-client v0.4.3
Expand All @@ -10,75 +12,78 @@ require (
github.com/miguelmota/go-solidity-sha3 v0.1.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.17.0
github.com/prysmaticlabs/go-bitfield v0.0.0-20210809151128-385d8c5e3fb7
github.com/rs/zerolog v1.31.0
github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15
github.com/rs/zerolog v1.32.0
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.10.0
github.com/txaty/go-merkletree v0.1.15
golang.org/x/crypto v0.18.0
golang.org/x/crypto v0.35.0
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
)

require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/bits-and-blooms/bitset v1.17.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/consensys/bavard v0.1.22 // indirect
github.com/consensys/gnark-crypto v0.14.0 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set/v2 v2.3.1 // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/emicklei/dot v1.6.4 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/ethereum/go-verkle v0.2.2 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/ferranbt/fastssz v0.1.3 // indirect
github.com/ferranbt/fastssz v0.1.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-playground/validator/v10 v10.11.1 // indirect
github.com/goccy/go-yaml v1.11.2 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/holiman/uint256 v1.3.2 // indirect
github.com/huandu/go-clone v1.6.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/pk910/dynamic-ssz v0.0.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/r3labs/sse/v2 v2.10.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/supranational/blst v0.3.14 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/txaty/gool v0.1.5 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/tools v0.15.0 // indirect
golang.org/x/net v0.36.0 // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/Knetic/govaluate.v3 v3.0.0 // indirect
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)

require (
github.com/attestantio/go-eth2-client v0.19.10
github.com/ethereum/go-ethereum v1.13.14
golang.org/x/sys v0.16.0 // indirect
github.com/attestantio/go-eth2-client v0.24.2
github.com/ethereum/go-ethereum v1.15.7
golang.org/x/sys v0.30.0 // indirect
)
Loading