diff --git a/go.mod b/go.mod index 91b44660..41fa7cbc 100644 --- a/go.mod +++ b/go.mod @@ -1,28 +1,28 @@ module github.com/attestantio/vouch -go 1.22.1 +go 1.22.7 -toolchain go1.22.4 +toolchain go1.23.2 require ( github.com/attestantio/go-block-relay v0.4.1 github.com/attestantio/go-builder-client v0.5.1-0.20241014215920-ba44f1de4249 - github.com/attestantio/go-eth2-client v0.22.1-0.20250103153306-faf577a7ba06 + github.com/attestantio/go-eth2-client v0.22.1-0.20250109144653-ab4175b0b581 github.com/aws/aws-sdk-go v1.55.5 github.com/holiman/uint256 v1.3.1 github.com/mitchellh/go-homedir v1.1.0 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.19.1 + github.com/prometheus/client_golang v1.20.5 github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 github.com/rs/zerolog v1.33.0 - github.com/sasha-s/go-deadlock v0.3.1 + github.com/sasha-s/go-deadlock v0.3.5 github.com/shopspring/decimal v1.4.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.19.0 - github.com/stretchr/testify v1.10.0 + github.com/stretchr/testify v1.9.0 github.com/wealdtech/go-eth2-types/v2 v2.8.2 - github.com/wealdtech/go-eth2-wallet v1.16.0 - github.com/wealdtech/go-eth2-wallet-dirk v1.5.0 + github.com/wealdtech/go-eth2-wallet v1.17.0 + github.com/wealdtech/go-eth2-wallet-dirk v1.5.1 github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.4.1 github.com/wealdtech/go-eth2-wallet-hd/v2 v2.7.0 github.com/wealdtech/go-eth2-wallet-nd/v2 v2.5.0 @@ -30,26 +30,26 @@ require ( github.com/wealdtech/go-eth2-wallet-store-scratch v1.7.2 github.com/wealdtech/go-eth2-wallet-types/v2 v2.12.0 github.com/wealdtech/go-majordomo v1.1.1 - go.opentelemetry.io/otel v1.29.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 - go.opentelemetry.io/otel/sdk v1.28.0 - go.opentelemetry.io/otel/trace v1.29.0 + go.opentelemetry.io/otel v1.32.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.32.0 + go.opentelemetry.io/otel/sdk v1.32.0 + go.opentelemetry.io/otel/trace v1.32.0 go.uber.org/atomic v1.11.0 golang.org/x/sync v0.9.0 - google.golang.org/grpc v1.65.0 + google.golang.org/grpc v1.68.0 gotest.tools v2.2.0+incompatible ) require ( - cloud.google.com/go/auth v0.8.0 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect - cloud.google.com/go/compute/metadata v0.5.0 // indirect - cloud.google.com/go/iam v1.1.13 // indirect - cloud.google.com/go/secretmanager v1.13.6 // indirect + cloud.google.com/go/auth v0.10.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.5 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect + cloud.google.com/go/iam v1.2.2 // indirect + cloud.google.com/go/secretmanager v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bytedance/sonic v1.12.1 // indirect - github.com/bytedance/sonic/loader v0.2.0 // indirect + github.com/bytedance/sonic v1.12.4 // indirect + github.com/bytedance/sonic/loader v0.2.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cloudwego/base64x v0.1.4 // indirect @@ -59,32 +59,33 @@ require ( github.com/fatih/color v1.18.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/ferranbt/fastssz v0.1.4 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.5 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.6 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/gin-gonic/gin v1.10.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.22.0 // indirect + github.com/go-playground/validator/v10 v10.22.1 // indirect github.com/goccy/go-json v0.10.3 // indirect - github.com/goccy/go-yaml v1.9.2 // indirect + github.com/goccy/go-yaml v1.13.6 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/s2a-go v0.1.8 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/gorilla/mux v1.8.1 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/herumi/bls-eth-go-binary v1.35.0 // indirect + github.com/herumi/bls-eth-go-binary v1.36.1 // indirect github.com/huandu/go-clone v1.7.2 // indirect - github.com/jackc/puddle/v2 v2.2.1 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/cpuid/v2 v2.2.8 // indirect + github.com/klauspost/compress v1.17.11 // indirect + github.com/klauspost/cpuid/v2 v2.2.9 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -95,11 +96,11 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pelletier/go-toml/v2 v2.2.3 // indirect - github.com/petermattis/goid v0.0.0-20240716203034-badd1c0974d6 // indirect + github.com/petermattis/goid v0.0.0-20241025130422-66cb2e6d7274 // indirect github.com/pk910/dynamic-ssz v0.0.5 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/r3labs/sse/v2 v2.10.0 // indirect github.com/sagikazarmark/locafero v0.6.0 // indirect @@ -116,28 +117,28 @@ require ( github.com/wealdtech/go-ecodec v1.1.4 // indirect github.com/wealdtech/go-eth2-util v1.8.2 // indirect github.com/wealdtech/go-eth2-wallet-distributed v1.2.1 // indirect + github.com/wealdtech/go-eth2-wallet-keystore v1.0.0 // indirect github.com/wealdtech/go-eth2-wallet-store-s3 v1.12.0 // indirect github.com/wealdtech/go-indexer v1.1.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect - go.opentelemetry.io/otel/metric v1.29.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/arch v0.9.0 // indirect + golang.org/x/arch v0.12.0 // indirect golang.org/x/crypto v0.29.0 // indirect - golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect golang.org/x/net v0.31.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect golang.org/x/sys v0.27.0 // indirect golang.org/x/text v0.20.0 // indirect - golang.org/x/time v0.6.0 // indirect - golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect - google.golang.org/api v0.191.0 // indirect - google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240808171019-573a1156607a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240808171019-573a1156607a // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/time v0.8.0 // indirect + google.golang.org/api v0.205.0 // indirect + google.golang.org/genproto v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/Knetic/govaluate.v3 v3.0.0 // indirect gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index 8418842f..56d8963f 100644 --- a/go.sum +++ b/go.sum @@ -30,12 +30,12 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.103.0/go.mod h1:vwLx1nqLrzLX/fpwSMOXmFIqBOyHsvHbnAdbGSJ+mKk= -cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= -cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= -cloud.google.com/go/auth v0.8.0 h1:y8jUJLl/Fg+qNBWxP/Hox2ezJvjkrPb952PC1p0G6A4= -cloud.google.com/go/auth v0.8.0/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc= -cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= -cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= +cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= +cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= +cloud.google.com/go/auth v0.10.1 h1:TnK46qldSfHWt2a0b/hciaiVJsmDXWy9FqyUan0uYiI= +cloud.google.com/go/auth v0.10.1/go.mod h1:xxA5AqpDrvS+Gkmo9RqrGGRh6WSNKKOXhY3zNOr38tI= +cloud.google.com/go/auth/oauth2adapt v0.2.5 h1:2p29+dePqsCHPP1bqDJcKj4qxRyYCcbzKpFyKGt3MTk= +cloud.google.com/go/auth/oauth2adapt v0.2.5/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -48,20 +48,20 @@ cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6m cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= -cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v1.1.13 h1:7zWBXG9ERbMLrzQBRhFliAV+kjcRToDTgQT3CTwYyv4= -cloud.google.com/go/iam v1.1.13/go.mod h1:K8mY0uSXwEXS30KrnVb+j54LB/ntfZu1dr+4zFMNbus= +cloud.google.com/go/iam v1.2.2 h1:ozUSofHUGf/F4tCNy/mu9tHLTaxZFLOUiKzjcgWHGIA= +cloud.google.com/go/iam v1.2.2/go.mod h1:0Ys8ccaZHdI1dEUilwzqng/6ps2YB6vRsjIe00/+6JY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/secretmanager v1.5.0/go.mod h1:5C9kM+RwSpkURNovKySkNvGQLUaOgyoR5W0RUx2SyHQ= -cloud.google.com/go/secretmanager v1.13.6 h1:0ZEl/LuoB4xQsjVfQt3Gi/dZfOv36n4JmdPrMargzYs= -cloud.google.com/go/secretmanager v1.13.6/go.mod h1:x2ySyOrqv3WGFRFn2Xk10iHmNmvmcEVSSqc30eb1bhw= +cloud.google.com/go/secretmanager v1.14.2 h1:2XscWCfy//l/qF96YE18/oUaNJynAx749Jg3u0CjQr8= +cloud.google.com/go/secretmanager v1.14.2/go.mod h1:Q18wAPMM6RXLC/zVpWTlqq2IBSbbm7pKBlM3lCKsmjw= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -80,16 +80,18 @@ github.com/attestantio/go-builder-client v0.5.1-0.20241014215920-ba44f1de4249 h1 github.com/attestantio/go-builder-client v0.5.1-0.20241014215920-ba44f1de4249/go.mod h1:X31JAUL4q6cY/OGClpBQcwFN7FBixt6Wjrqy7RrlhEc= github.com/attestantio/go-eth2-client v0.22.1-0.20250103153306-faf577a7ba06 h1:uiEKrBKi2AllI9H+2I5zQ++T6Kv0z/XAzbSe/jTi+Aw= github.com/attestantio/go-eth2-client v0.22.1-0.20250103153306-faf577a7ba06/go.mod h1:vy5jU/uDZ2+RcVzq5BfnG+bQ3/6uu9DGwCrGsPtjJ1A= +github.com/attestantio/go-eth2-client v0.22.1-0.20250109144653-ab4175b0b581 h1:vqhf8lmWW6vTT/17S6HVf8reUu9R1ewY1tc9TLTkdO4= +github.com/attestantio/go-eth2-client v0.22.1-0.20250109144653-ab4175b0b581/go.mod h1:vy5jU/uDZ2+RcVzq5BfnG+bQ3/6uu9DGwCrGsPtjJ1A= github.com/aws/aws-sdk-go v1.44.81/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bytedance/sonic v1.12.1 h1:jWl5Qz1fy7X1ioY74WqO0KjAMtAGQs4sYnjiEBiyX24= -github.com/bytedance/sonic v1.12.1/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= +github.com/bytedance/sonic v1.12.4 h1:9Csb3c9ZJhfUWeMtpCDCq6BUoH5ogfDFLUgQ/jG+R0k= +github.com/bytedance/sonic v1.12.4/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= -github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.1 h1:1GgorWTqf12TA8mma4DDSbaQigE2wOgQo7iCjjJv3+E= +github.com/bytedance/sonic/loader v0.2.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -132,7 +134,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -141,10 +142,10 @@ github.com/ferranbt/fastssz v0.1.4 h1:OCDB+dYDEQDvAgtAGnTSidK1Pe2tW3nFV40XyMkTeD github.com/ferranbt/fastssz v0.1.4/go.mod h1:Ea3+oeoRGGLGm5shYAeDgu6PGUlcvQhE2fILyD9+tGg= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/gabriel-vasile/mimetype v1.4.5 h1:J7wGKdGu33ocBOhGy0z653k/lFKLFDPJMG8Gql0kxn4= -github.com/gabriel-vasile/mimetype v1.4.5/go.mod h1:ibHel+/kbxn9x2407k1izTA1S81ku1z/DlgOW2QE0M4= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/gabriel-vasile/mimetype v1.4.6 h1:3+PzJTKLkvgjeTbts6msPJt4DixhT4YtFNf1gtGe3zc= +github.com/gabriel-vasile/mimetype v1.4.6/go.mod h1:JX1qVKqZd40hUPpAfiNTe0Sne7hdfKSbOqqmkq8GCXc= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -158,22 +159,18 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao= -github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= +github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA= +github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/goccy/go-yaml v1.9.2 h1:2Njwzw+0+pjU2gb805ZC1B/uBuAs2VcZ3K+ZgHwDs7w= -github.com/goccy/go-yaml v1.9.2/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= +github.com/goccy/go-yaml v1.13.6 h1:pa3JkBPBseTtfqpG9DiSFhyxNPSpJ0BFa39BlMZE16E= +github.com/goccy/go-yaml v1.13.6/go.mod h1:IjYwxUiJDoqpx2RmbdjMUceGHZwYLon3sfOGl5Hi9lc= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -258,8 +255,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= -github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw= +github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -273,14 +270,14 @@ github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 h1:CWyXh/jylQWp2dtiV33mY4iSSp6yf4lmn+c7/tN+ObI= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0/go.mod h1:nCLIt0w3Ept2NwF8ThLmrppXsfT07oC8k0XNDxd8sVU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/herumi/bls-eth-go-binary v1.35.0 h1:4CgrKurBK4g0ZMKBdHq5CwK9slYe7Ei+HF+/n6RSkOI= -github.com/herumi/bls-eth-go-binary v1.35.0/go.mod h1:luAnRm3OsMQeokhGzpYmc0ZKwawY7o87PUEP11Z7r7U= +github.com/herumi/bls-eth-go-binary v1.36.1 h1:SfLjxbO1fWkKtKS7J3Ezd1/5QXrcaTZgWynxdSe10hQ= +github.com/herumi/bls-eth-go-binary v1.36.1/go.mod h1:luAnRm3OsMQeokhGzpYmc0ZKwawY7o87PUEP11Z7r7U= github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= @@ -291,8 +288,8 @@ github.com/huandu/go-clone/generic v1.6.0 h1:Wgmt/fUZ28r16F2Y3APotFD59sHk1p78K0X github.com/huandu/go-clone/generic v1.6.0/go.mod h1:xgd9ZebcMsBWWcBx5mVMCoqMX24gLWr5lQicr+nVXNs= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= -github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -302,9 +299,11 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= -github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= +github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -313,16 +312,15 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= @@ -343,9 +341,9 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20240716203034-badd1c0974d6 h1:DUDJI8T/9NcGbbL+AWk6vIYlmQ8ZBS8LZqVre6zbkPQ= -github.com/petermattis/goid v0.0.0-20240716203034-badd1c0974d6/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20241025130422-66cb2e6d7274 h1:qli3BGQK0tYDkSEvZ/FzZTi9ZrOX86Q6CIhKLGc489A= +github.com/petermattis/goid v0.0.0-20241025130422-66cb2e6d7274/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pk910/dynamic-ssz v0.0.5 h1:VP9heGYUwzlpyhk28P2nCAzhvGsePJOOOO5vQMDh2qQ= github.com/pk910/dynamic-ssz v0.0.5/go.mod h1:b6CrLaB2X7pYA+OSEEbkgXDEcRnjLOZIxZTsMuO/Y9c= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -353,13 +351,13 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= +github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 h1:lC8kiphgdOBTcbTvo8MwkvpKjO0SlAgjv4xIK5FGJ94= @@ -370,8 +368,8 @@ github.com/r3labs/sse/v2 v2.10.0 h1:hFEkLLFY4LDifoHdiCN/LlGBAdVJYsANaLqNYa1l/v0= github.com/r3labs/sse/v2 v2.10.0/go.mod h1:Igau6Whc+F17QUgML1fYe1VPZzTV6EMCnYktEmkNJ7I= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= @@ -381,8 +379,8 @@ github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3 github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= -github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= +github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0 h1:Xuk8ma/ibJ1fOy4Ee11vHhUFHQNpHhrBneOCNHVXS5w= github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0/go.mod h1:7AwjWCpdPhkSmNAgUv5C7EJ4AbmjEB3r047r3DXWu3Y= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= @@ -409,8 +407,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= @@ -427,10 +425,10 @@ github.com/wealdtech/go-eth2-types/v2 v2.8.2 h1:b5aXlNBLKgjAg/Fft9VvGlqAUCQMP5Lz github.com/wealdtech/go-eth2-types/v2 v2.8.2/go.mod h1:IAz9Lz1NVTaHabQa+4zjk2QDKMv8LVYo0n46M9o/TXw= github.com/wealdtech/go-eth2-util v1.8.2 h1:gq+JMrnadifyKadUr75wmfP7+usiqMu9t3VVoob5Dvo= github.com/wealdtech/go-eth2-util v1.8.2/go.mod h1:/80GAK0K/3+PqUBZHvaOPd3b1sjHeimxQh1nrJzgaPk= -github.com/wealdtech/go-eth2-wallet v1.16.0 h1:syD1xDYB7emk4x+6bTYm5VZp9nx5FLab5Fgm09Eq1Kg= -github.com/wealdtech/go-eth2-wallet v1.16.0/go.mod h1:JFA2P7PpPR8quQ/T6Gsr/4VLj5sQVnyzKgfPA+eqmYE= -github.com/wealdtech/go-eth2-wallet-dirk v1.5.0 h1:T4uRKYr8l1MnSuTHZAuRCXiScCC07wt8XMBCOY5z5XU= -github.com/wealdtech/go-eth2-wallet-dirk v1.5.0/go.mod h1:vUtapWW1i7/hJJZA1YdR8UBYaEbRrzOeT/g6K8mmWNU= +github.com/wealdtech/go-eth2-wallet v1.17.0 h1:hMjGRjvpk95gguW6UXFDkRHWjYqE0cdrO7cOClF9Ubo= +github.com/wealdtech/go-eth2-wallet v1.17.0/go.mod h1:qMmDrx//GrdZ3q+0Jf9SNwCaLsFOxOmXgr1yptpSMIE= +github.com/wealdtech/go-eth2-wallet-dirk v1.5.1 h1:h1wZK31yonLkwddajg+Prhhd2rrvIIxQ3HxwZ3udnaY= +github.com/wealdtech/go-eth2-wallet-dirk v1.5.1/go.mod h1:Yz1Mc+HfbG1CODeBpAQ++/Us76OdXzI5kVs1qGvUiBM= github.com/wealdtech/go-eth2-wallet-distributed v1.2.1 h1:+pbG9i9b5TrWd7GDRX8yq4FKA+D7k7aI6uySEvAZ+Kk= github.com/wealdtech/go-eth2-wallet-distributed v1.2.1/go.mod h1:jYkDax2VhUNKIct6TVlgxAagvR56/eg7y7J+JFq+gDo= github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.4.1 h1:9j7bpwjT9wmwBb54ZkBhTm1uNIlFFcCJXefd/YskZPw= @@ -439,6 +437,8 @@ github.com/wealdtech/go-eth2-wallet-encryptor-unencrypted v1.0.2 h1:IMIyl70hbJlx github.com/wealdtech/go-eth2-wallet-encryptor-unencrypted v1.0.2/go.mod h1:T8nyAscWIWNcNa6EG/19PwH/OCt2Ly7Orn5okmiuSP4= github.com/wealdtech/go-eth2-wallet-hd/v2 v2.7.0 h1:5g4emFacTf+sX6zx6SbZIZGR7Jx5Xr/Xdb7sXnEXlWk= github.com/wealdtech/go-eth2-wallet-hd/v2 v2.7.0/go.mod h1:aWgnEi07w1L9wMBRB69sYvoEONppAUly6FDQRWQGqH8= +github.com/wealdtech/go-eth2-wallet-keystore v1.0.0 h1:DYR6TAyi7RxXoAanLSPdiufGxCX617BQwWOdCxHqHX4= +github.com/wealdtech/go-eth2-wallet-keystore v1.0.0/go.mod h1:6DGINunnasS9y9F7KH3ya2h74fHWgSCfP3dAJWe4A6U= github.com/wealdtech/go-eth2-wallet-nd/v2 v2.5.0 h1:vphAFklkYMRJVo9f5rVWly7PECHrLS4yarjemBa7fRM= github.com/wealdtech/go-eth2-wallet-nd/v2 v2.5.0/go.mod h1:kBZUZogqwvvxulEvXi5l6OjZyd7EBmCKxce5Q+lW7fs= github.com/wealdtech/go-eth2-wallet-store-filesystem v1.18.1 h1:Ceq74WL57jdBQnrZJFJyGRBKOOFI5wwq9VoxeAbjoEk= @@ -467,22 +467,22 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= -go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= -go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= -go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= -go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= -go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0 h1:qtFISDHKolvIxzSs0gIaiPUPR0Cucb0F2coHC7ZLdps= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0/go.mod h1:Y+Pop1Q6hCOnETWTW4NROK/q1hv50hM7yDaUTjG8lp8= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 h1:DheMAlT6POBP+gh8RUH19EOTnQIor5QE0uSRPtzCpSw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0/go.mod h1:wZcGmeVO9nzP67aYSLDqXNWK87EZWhi7JWj1v7ZXf94= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 h1:IJFEoHiytixx8cMiVAO+GmHR6Frwu+u5Ur8njpFO6Ac= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0/go.mod h1:3rHrKNtLIoS0oZwkY2vxi+oJcwFRWdtUyRII+so45p8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.32.0 h1:9kV11HXBHZAvuPUZxmMWrH8hZn/6UnHX4K0mu36vNsU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.32.0/go.mod h1:JyA0FHXe22E1NeNiHmVp7kFHglnexDQ7uRWDiiJ1hKQ= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= @@ -492,8 +492,8 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -golang.org/x/arch v0.9.0 h1:ub9TgUInamJ8mrZIGlBG6/4TqWeMszd4N8lNorbrr6k= -golang.org/x/arch v0.9.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/arch v0.12.0 h1:UsYJhbzPYGsT0HbEdmYcqtCv8UNGvnaL561NnIUvaKg= +golang.org/x/arch v0.12.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -511,8 +511,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f h1:XdNn9LlyWAhLVp6P/i8QYBW+hlyhrhei9uErw2B5GJo= +golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:D5SMRVC3C2/4+F/DB1wZsLRnSNimn2Sp/NPsCrsv8ak= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -605,8 +605,8 @@ golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -634,7 +634,6 @@ golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -685,7 +684,6 @@ golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220818161305-2296e01440c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= @@ -706,8 +704,8 @@ golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -766,8 +764,6 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 h1:LLhsEBxRTBLuKlQxFBYUOU8xyFgXv6cOTp2HASDlsDk= -golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -810,8 +806,8 @@ google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3p google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.191.0 h1:cJcF09Z+4HAB2t5qTQM1ZtfL/PemsLFkcFG67qq2afk= -google.golang.org/api v0.191.0/go.mod h1:tD5dsFGxFza0hnQveGfVk9QQYKcfp+VzgRqyXFxE0+E= +google.golang.org/api v0.205.0 h1:LFaxkAIpDb/GsrWV20dMMo5MR0h8UARTbn24LmD+0Pg= +google.golang.org/api v0.205.0/go.mod h1:NrK1EMqO8Xk6l6QwRAmrXXg2v6dzukhlOyvkYtnvUuc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -901,12 +897,12 @@ google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220819174105-e9f053255caa/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf h1:OqdXDEakZCVtDiZTjcxfwbHPCT11ycCEsTKesBVKvyY= -google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:mCr1K1c8kX+1iSBREvU3Juo11CB+QOEWxbRS01wWl5M= -google.golang.org/genproto/googleapis/api v0.0.0-20240808171019-573a1156607a h1:KyUe15n7B1YCu+kMmPtlXxgkLQbp+Dw0tCRZf9Sd+CE= -google.golang.org/genproto/googleapis/api v0.0.0-20240808171019-573a1156607a/go.mod h1:4+X6GvPs+25wZKbQq9qyAXrwIRExv7w0Ea6MgZLZiDM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240808171019-573a1156607a h1:EKiZZXueP9/T68B8Nl0GAx9cjbQnCId0yP3qPMgaaHs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240808171019-573a1156607a/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto v0.0.0-20241104194629-dd2ea8efbc28 h1:KJjNNclfpIkVqrZlTWcgOOaVQ00LdBnoEaRfkUx760s= +google.golang.org/genproto v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:mt9/MofW7AWQ+Gy179ChOnvmJatV8YHUmrcedo9CIFI= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -939,8 +935,8 @@ google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -957,8 +953,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/Knetic/govaluate.v3 v3.0.0 h1:18mUyIt4ZlRlFZAAfVetz4/rzlJs9yhN+U02F4u1AOc= gopkg.in/Knetic/govaluate.v3 v3.0.0/go.mod h1:csKLBORsPbafmSCGTEh3U7Ozmsuq8ZSIlKk1bcqph0E= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= diff --git a/main.go b/main.go index 75b3c076..e178f9e8 100644 --- a/main.go +++ b/main.go @@ -762,7 +762,6 @@ func startSigningServices(ctx context.Context, standardattester.WithSpecProvider(eth2Client.(eth2client.SpecProvider)), standardattester.WithAttestationDataProvider(attestationDataProvider), standardattester.WithAttestationsSubmitter(submitterStrategy.(submitter.AttestationsSubmitter)), - standardattester.WithVersionedAttestationsSubmitter(submitterStrategy.(submitter.VersionedAttestationsSubmitter)), standardattester.WithMonitor(monitor), standardattester.WithValidatingAccountsProvider(accountManager.(accountmanager.ValidatingAccountsProvider)), standardattester.WithBeaconAttestationsSigner(signerSvc.(signer.BeaconAttestationsSigner)), @@ -1458,7 +1457,6 @@ func selectSubmitterStrategy(ctx context.Context, monitor metrics.Service, eth2C immediatesubmitter.WithClientMonitor(monitor.(metrics.ClientMonitor)), immediatesubmitter.WithProposalSubmitter(eth2Client.(eth2client.ProposalSubmitter)), immediatesubmitter.WithAttestationsSubmitter(eth2Client.(eth2client.AttestationsSubmitter)), - immediatesubmitter.WithVersionedAttestationsSubmitter(eth2Client.(eth2client.VersionedAttestationsSubmitter)), immediatesubmitter.WithSyncCommitteeMessagesSubmitter(eth2Client.(eth2client.SyncCommitteeMessagesSubmitter)), immediatesubmitter.WithSyncCommitteeContributionsSubmitter(eth2Client.(eth2client.SyncCommitteeContributionsSubmitter)), immediatesubmitter.WithSyncCommitteeSubscriptionsSubmitter(eth2Client.(eth2client.SyncCommitteeSubscriptionsSubmitter)), @@ -1509,13 +1507,6 @@ func startMultinodeSubmitter(ctx context.Context, return nil, err } - versionedAttestationsSubmitters, err := genericAddressToClientMapper[eth2client.VersionedAttestationsSubmitter](ctx, monitor, - "submitter.versionedattestation.multinode", - "versioned attestation submitter strategy") - if err != nil { - return nil, err - } - proposalSubmitters, err := genericAddressToClientMapper[eth2client.ProposalSubmitter](ctx, monitor, "submitter.proposal.multinode", "proposal submitter strategy") @@ -1565,7 +1556,6 @@ func startMultinodeSubmitter(ctx context.Context, multinodesubmitter.WithTimeout(util.Timeout("submitter.multinode")), multinodesubmitter.WithProposalSubmitters(proposalSubmitters), multinodesubmitter.WithAttestationsSubmitters(attestationsSubmitters), - multinodesubmitter.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), multinodesubmitter.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinodesubmitter.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), multinodesubmitter.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), diff --git a/mock/eth2client.go b/mock/eth2client.go index 6c6bb1b1..55242679 100644 --- a/mock/eth2client.go +++ b/mock/eth2client.go @@ -307,7 +307,7 @@ func NewAttestationsSubmitter() eth2client.AttestationsSubmitter { } // SubmitAttestations is a mock. -func (*AttestationsSubmitter) SubmitAttestations(_ context.Context, _ []*phase0.Attestation) error { +func (*AttestationsSubmitter) SubmitAttestations(_ context.Context, _ *api.SubmitAttestationsOpts) error { return nil } @@ -320,7 +320,7 @@ func NewErroringAttestationsSubmitter() eth2client.AttestationsSubmitter { } // SubmitAttestations is a mock. -func (*ErroringAttestationsSubmitter) SubmitAttestations(_ context.Context, _ []*phase0.Attestation) error { +func (*ErroringAttestationsSubmitter) SubmitAttestations(_ context.Context, _ *api.SubmitAttestationsOpts) error { return errors.New("error") } @@ -339,55 +339,9 @@ func NewSleepyAttestationsSubmitter(wait time.Duration, next eth2client.Attestat } // SubmitAttestations is a mock. -func (m *SleepyAttestationsSubmitter) SubmitAttestations(ctx context.Context, attestations []*phase0.Attestation) error { +func (m *SleepyAttestationsSubmitter) SubmitAttestations(ctx context.Context, opts *api.SubmitAttestationsOpts) error { time.Sleep(m.wait) - return m.next.SubmitAttestations(ctx, attestations) -} - -// VersionedAttestationsSubmitter is a mock for eth2client.VersionedAttestationsSubmitter. -type VersionedAttestationsSubmitter struct{} - -// NewVersionedAttestationsSubmitter returns a mock attestations submitter. -func NewVersionedAttestationsSubmitter() eth2client.VersionedAttestationsSubmitter { - return &VersionedAttestationsSubmitter{} -} - -// SubmitVersionedAttestations is a mock. -func (*VersionedAttestationsSubmitter) SubmitVersionedAttestations(_ context.Context, _ *api.SubmitAttestationsOpts) error { - return nil -} - -// ErroringVersionedAttestationsSubmitter is a mock for eth2client.VersionedAttestationsSubmitter that returns errors. -type ErroringVersionedAttestationsSubmitter struct{} - -// NewErroringVersionedAttestationsSubmitter returns a mock attestation submitter. -func NewErroringVersionedAttestationsSubmitter() eth2client.VersionedAttestationsSubmitter { - return &ErroringVersionedAttestationsSubmitter{} -} - -// SubmitVersionedAttestations is a mock. -func (*ErroringVersionedAttestationsSubmitter) SubmitVersionedAttestations(_ context.Context, _ *api.SubmitAttestationsOpts) error { - return errors.New("error") -} - -// SleepyVersionedAttestationsSubmitter is a mock for eth2client.VersionedAttestationsSubmitter. -type SleepyVersionedAttestationsSubmitter struct { - wait time.Duration - next eth2client.VersionedAttestationsSubmitter -} - -// NewSleepyVersionedAttestationsSubmitter returns a mock attestations submitter. -func NewSleepyVersionedAttestationsSubmitter(wait time.Duration, next eth2client.VersionedAttestationsSubmitter) eth2client.VersionedAttestationsSubmitter { - return &SleepyVersionedAttestationsSubmitter{ - wait: wait, - next: next, - } -} - -// SubmitVersionedAttestations is a mock. -func (m *SleepyVersionedAttestationsSubmitter) SubmitVersionedAttestations(ctx context.Context, opts *api.SubmitAttestationsOpts) error { - time.Sleep(m.wait) - return m.next.SubmitVersionedAttestations(ctx, opts) + return m.next.SubmitAttestations(ctx, opts) } // ProposalSubmitter is a mock for eth2client.ProposalSubmitter. diff --git a/services/attester/mock/service.go b/services/attester/mock/service.go index 274bec26..078e790a 100644 --- a/services/attester/mock/service.go +++ b/services/attester/mock/service.go @@ -17,7 +17,6 @@ import ( "context" "github.com/attestantio/go-eth2-client/spec" - "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/attestantio/vouch/services/attester" ) @@ -30,11 +29,6 @@ func New() *Service { } // Attest carries out attestations for a slot. -func (*Service) Attest(_ context.Context, _ *attester.Duty) ([]*phase0.Attestation, error) { - return make([]*phase0.Attestation, 0), nil -} - -// AttestVersioned carries out versioned attestations for a slot. -func (*Service) AttestVersioned(_ context.Context, _ *attester.Duty) ([]*spec.VersionedAttestation, error) { +func (*Service) Attest(_ context.Context, _ *attester.Duty) ([]*spec.VersionedAttestation, error) { return make([]*spec.VersionedAttestation, 0), nil } diff --git a/services/attester/service.go b/services/attester/service.go index 66813baa..022b3536 100644 --- a/services/attester/service.go +++ b/services/attester/service.go @@ -109,9 +109,5 @@ func (d *Duty) Tuples() []string { type Service interface { // Attest carries out attestations for a slot. // It returns a list of attestations made. - Attest(ctx context.Context, duty *Duty) ([]*phase0.Attestation, error) - - // AttestVersioned carries out the attestations for a slot. - // It returns a list of versioned attestations made. - AttestVersioned(ctx context.Context, duty *Duty) ([]*spec.VersionedAttestation, error) + Attest(ctx context.Context, duty *Duty) ([]*spec.VersionedAttestation, error) } diff --git a/services/attester/standard/attest.go b/services/attester/standard/attest.go index 6bab9684..90f2c7e8 100644 --- a/services/attester/standard/attest.go +++ b/services/attester/standard/attest.go @@ -20,6 +20,8 @@ import ( "time" "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/attestantio/vouch/services/attester" "github.com/attestantio/vouch/util" @@ -32,7 +34,7 @@ import ( // Attest carries out attestations for a slot. // It returns a map of attestations made, keyed on the validator index. -func (s *Service) Attest(ctx context.Context, duty *attester.Duty) ([]*phase0.Attestation, error) { +func (s *Service) Attest(ctx context.Context, duty *attester.Duty) ([]*spec.VersionedAttestation, error) { ctx, span := otel.Tracer("attestantio.vouch.services.attester.standard").Start(ctx, "Attest") defer span.End() started := time.Now() @@ -124,12 +126,23 @@ func (s *Service) attest( committeeSizes []uint64, data *phase0.AttestationData, started time.Time, -) ([]*phase0.Attestation, error) { +) ([]*spec.VersionedAttestation, error) { + // Set the signing committee indices to use. + signingCommitteeIndices := make([]phase0.CommitteeIndex, len(committeeIndices)) + copy(signingCommitteeIndices, committeeIndices) + epoch := s.chainTime.SlotToEpoch(duty.Slot()) + if epoch >= s.electraForkEpoch { + for i := range signingCommitteeIndices { + // Hardcode the committee indices to be 0 in Electra. + signingCommitteeIndices[i] = 0 + } + } + // Sign the attestation for all validating accounts. sigs, err := s.beaconAttestationsSigner.SignBeaconAttestations(ctx, accounts, duty.Slot(), - committeeIndices, + signingCommitteeIndices, data.BeaconBlockRoot, data.Source.Epoch, data.Source.Root, @@ -140,19 +153,28 @@ func (s *Service) attest( return nil, errors.Wrap(err, "failed to sign beacon attestations") } s.log.Trace().Dur("elapsed", time.Since(started)).Msg("Signed") + var attestations []*spec.VersionedAttestation - attestations := s.createAttestations(ctx, duty, accounts, committeeIndices, validatorCommitteeIndices, committeeSizes, data, sigs) - if len(attestations) == 0 { - s.log.Info().Msg("No signed attestations; not submitting") - return attestations, nil + if epoch < s.electraForkEpoch { + attestations = s.createAttestations(ctx, duty, accounts, committeeIndices, validatorCommitteeIndices, committeeSizes, data, sigs) + if len(attestations) == 0 { + s.log.Info().Msg("No signed attestations; not submitting") + return attestations, nil + } + } else { + attestations = s.createElectraAttestations(ctx, duty, accounts, committeeIndices, validatorCommitteeIndices, committeeSizes, data, sigs) + if len(attestations) == 0 { + s.log.Info().Msg("No signed attestations; not submitting") + return attestations, nil + } } - - // Submit the attestations. + // Submit the versioned attestations. submissionStarted := time.Now() - if err := s.attestationsSubmitter.SubmitAttestations(ctx, attestations); err != nil { - return nil, errors.Wrap(err, "failed to submit attestations") + opts := &api.SubmitAttestationsOpts{Attestations: attestations} + if err := s.attestationsSubmitter.SubmitAttestations(ctx, opts); err != nil { + return nil, errors.Wrap(err, "failed to submit versioned attestations") } - s.log.Trace().Dur("elapsed", time.Since(started)).Dur("submission_elapsed", time.Since(submissionStarted)).Msg("Submitted attestations") + s.log.Trace().Dur("elapsed", time.Since(started)).Dur("submission_elapsed", time.Since(submissionStarted)).Msg("Submitted versioned attestations") return attestations, nil } @@ -165,9 +187,9 @@ func (s *Service) createAttestations(_ context.Context, committeeSizes []uint64, data *phase0.AttestationData, sigs []phase0.BLSSignature, -) []*phase0.Attestation { +) []*spec.VersionedAttestation { // Create the attestations. - attestations := make([]*phase0.Attestation, 0, len(sigs)) + attestations := make([]*spec.VersionedAttestation, 0, len(sigs)) for i := range sigs { if sigs[i].IsZero() { s.log.Warn(). @@ -194,7 +216,57 @@ func (s *Service) createAttestations(_ context.Context, }, } copy(attestation.Signature[:], sigs[i][:]) - attestations = append(attestations, attestation) + versionedAttestation := &spec.VersionedAttestation{Version: spec.DataVersionPhase0, Phase0: attestation} + attestations = append(attestations, versionedAttestation) + } + + return attestations +} + +// createElectraAttestations returns versioned attestations specifically for electra (index set to 0). +func (s *Service) createElectraAttestations(_ context.Context, + duty *attester.Duty, + accounts []e2wtypes.Account, + committeeIndices []phase0.CommitteeIndex, + validatorCommitteeIndices []phase0.ValidatorIndex, + committeeSizes []uint64, + data *phase0.AttestationData, + sigs []phase0.BLSSignature, +) []*spec.VersionedAttestation { + attestations := make([]*spec.VersionedAttestation, 0, len(sigs)) + for i := range sigs { + if sigs[i].IsZero() { + s.log.Warn(). + Str("validator_pubkey", fmt.Sprintf("%#x", accounts[i].PublicKey().Marshal())). + Msg("No signature for validator; not creating attestation") + continue + } + aggregationBits := bitfield.NewBitlist(committeeSizes[i]) + aggregationBits.SetBitAt(uint64(validatorCommitteeIndices[i]), true) + + committeeBits := bitfield.NewBitvector64() + committeeBits.SetBitAt(uint64(committeeIndices[i]), true) + + attestation := &electra.Attestation{ + AggregationBits: aggregationBits, + Data: &phase0.AttestationData{ + Slot: duty.Slot(), + Index: 0, // Deprecated in electra so fixed to 0. + BeaconBlockRoot: data.BeaconBlockRoot, + Source: &phase0.Checkpoint{ + Epoch: data.Source.Epoch, + Root: data.Source.Root, + }, + Target: &phase0.Checkpoint{ + Epoch: data.Target.Epoch, + Root: data.Target.Root, + }, + }, + CommitteeBits: committeeBits, + } + copy(attestation.Signature[:], sigs[i][:]) + versionedAttestation := &spec.VersionedAttestation{Version: spec.DataVersionElectra, Electra: attestation} + attestations = append(attestations, versionedAttestation) } return attestations diff --git a/services/attester/standard/attest_internal_test.go b/services/attester/standard/attest_internal_test.go index 0f4163ec..ae2b12ad 100644 --- a/services/attester/standard/attest_internal_test.go +++ b/services/attester/standard/attest_internal_test.go @@ -15,6 +15,7 @@ package standard import ( "context" + "github.com/attestantio/go-eth2-client/spec" "testing" "time" @@ -44,7 +45,6 @@ func TestCreateAttestations(t *testing.T) { specProvider := mock.NewSpecProvider() attestationDataProvider := mock.NewAttestationDataProvider() attestationsSubmitter := mock.NewAttestationsSubmitter() - versionedAttestationsSubmitter := mock.NewVersionedAttestationsSubmitter() beaconAttestationsSigner := mocksigner.New() chainTime, err := standardchaintime.New(ctx, standardchaintime.WithLogLevel(zerolog.Disabled), @@ -71,7 +71,6 @@ func TestCreateAttestations(t *testing.T) { WithAttestationsSubmitter(attestationsSubmitter), WithValidatingAccountsProvider(validatingAccountsProvider), WithBeaconAttestationsSigner(beaconAttestationsSigner), - WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), ) require.NoError(t, err) @@ -108,7 +107,7 @@ func TestCreateAttestations(t *testing.T) { committeeSizes []uint64 data *phase0.AttestationData sigs []phase0.BLSSignature - expected []*phase0.Attestation + expected []*spec.VersionedAttestation err string logEntries []string }{ @@ -116,7 +115,7 @@ func TestCreateAttestations(t *testing.T) { name: "NoAttestations", duty: duty, accounts: []e2wtypes.Account{account}, - expected: []*phase0.Attestation{}, + expected: []*spec.VersionedAttestation{}, }, { name: "ZeroSig", @@ -125,7 +124,7 @@ func TestCreateAttestations(t *testing.T) { sigs: []phase0.BLSSignature{ {}, }, - expected: []*phase0.Attestation{}, + expected: []*spec.VersionedAttestation{}, logEntries: []string{"No signature for validator; not creating attestation"}, }, { @@ -151,23 +150,26 @@ func TestCreateAttestations(t *testing.T) { sigs: []phase0.BLSSignature{ {0x01}, }, - expected: []*phase0.Attestation{ + expected: []*spec.VersionedAttestation{ { - AggregationBits: bitlist1, - Data: &phase0.AttestationData{ - Slot: 100, - Index: 1, - BeaconBlockRoot: phase0.Root{0x02}, - Source: &phase0.Checkpoint{ - Epoch: 3, - Root: phase0.Root{0x03}, - }, - Target: &phase0.Checkpoint{ - Epoch: 4, - Root: phase0.Root{0x04}, + Version: spec.DataVersionPhase0, + Phase0: &phase0.Attestation{ + AggregationBits: bitlist1, + Data: &phase0.AttestationData{ + Slot: 100, + Index: 1, + BeaconBlockRoot: phase0.Root{0x02}, + Source: &phase0.Checkpoint{ + Epoch: 3, + Root: phase0.Root{0x03}, + }, + Target: &phase0.Checkpoint{ + Epoch: 4, + Root: phase0.Root{0x04}, + }, }, + Signature: phase0.BLSSignature{0x01}, }, - Signature: phase0.BLSSignature{0x01}, }, }, }, @@ -193,7 +195,6 @@ func TestValidateAttestationData(t *testing.T) { specProvider := mock.NewSpecProvider() attestationDataProvider := mock.NewAttestationDataProvider() attestationsSubmitter := mock.NewAttestationsSubmitter() - versionedAttestationsSubmitter := mock.NewVersionedAttestationsSubmitter() beaconAttestationsSigner := mocksigner.New() chainTime, err := standardchaintime.New(ctx, standardchaintime.WithLogLevel(zerolog.Disabled), @@ -220,7 +221,6 @@ func TestValidateAttestationData(t *testing.T) { WithAttestationsSubmitter(attestationsSubmitter), WithValidatingAccountsProvider(validatingAccountsProvider), WithBeaconAttestationsSigner(beaconAttestationsSigner), - WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), ) require.NoError(t, err) @@ -326,7 +326,6 @@ func TestHousekeepAttestedMap(t *testing.T) { specProvider := mock.NewSpecProvider() attestationDataProvider := mock.NewAttestationDataProvider() attestationsSubmitter := mock.NewAttestationsSubmitter() - versionedAttestationsSubmitter := mock.NewVersionedAttestationsSubmitter() beaconAttestationsSigner := mocksigner.New() chainTime, err := standardchaintime.New(ctx, standardchaintime.WithLogLevel(zerolog.Disabled), @@ -352,7 +351,6 @@ func TestHousekeepAttestedMap(t *testing.T) { WithAttestationsSubmitter(attestationsSubmitter), WithValidatingAccountsProvider(validatingAccountsProvider), WithBeaconAttestationsSigner(beaconAttestationsSigner), - WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), ) require.NoError(t, err) @@ -399,7 +397,6 @@ func TestObtainAttestationData(t *testing.T) { specProvider := mock.NewSpecProvider() attestationDataProvider := mock.NewAttestationDataProvider() attestationsSubmitter := mock.NewAttestationsSubmitter() - versionedAttestationsSubmitter := mock.NewVersionedAttestationsSubmitter() beaconAttestationsSigner := mocksigner.New() chainTime, err := standardchaintime.New(ctx, standardchaintime.WithLogLevel(zerolog.Disabled), @@ -443,7 +440,6 @@ func TestObtainAttestationData(t *testing.T) { WithAttestationsSubmitter(attestationsSubmitter), WithValidatingAccountsProvider(validatingAccountsProvider), WithBeaconAttestationsSigner(beaconAttestationsSigner), - WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), }, err: "failed to obtain attestation data: mock error", }, @@ -459,7 +455,6 @@ func TestObtainAttestationData(t *testing.T) { WithAttestationsSubmitter(attestationsSubmitter), WithValidatingAccountsProvider(validatingAccountsProvider), WithBeaconAttestationsSigner(beaconAttestationsSigner), - WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), }, logEntries: []map[string]any{ { @@ -496,7 +491,6 @@ func TestFetchValidatorIndices(t *testing.T) { specProvider := mock.NewSpecProvider() attestationDataProvider := mock.NewAttestationDataProvider() attestationsSubmitter := mock.NewAttestationsSubmitter() - versionedAttestationsSubmitter := mock.NewVersionedAttestationsSubmitter() beaconAttestationsSigner := mocksigner.New() chainTime, err := standardchaintime.New(ctx, standardchaintime.WithLogLevel(zerolog.Disabled), @@ -572,7 +566,6 @@ func TestFetchValidatorIndices(t *testing.T) { WithAttestationsSubmitter(attestationsSubmitter), WithValidatingAccountsProvider(validatingAccountsProvider), WithBeaconAttestationsSigner(beaconAttestationsSigner), - WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), ) require.NoError(t, err) diff --git a/services/attester/standard/attestversioned.go b/services/attester/standard/attestversioned.go deleted file mode 100644 index f1186c4f..00000000 --- a/services/attester/standard/attestversioned.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright © 2025 Attestant Limited. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package standard - -import ( - "bytes" - "context" - "time" - - "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/attestantio/vouch/services/attester" - "github.com/attestantio/vouch/util" - "github.com/pkg/errors" - "github.com/prysmaticlabs/go-bitfield" - e2wtypes "github.com/wealdtech/go-eth2-wallet-types/v2" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" -) - -// AttestVersioned carries out attestations for a slot. -// It returns a map of versioned attestations made, keyed on the validator index. -func (s *Service) AttestVersioned(ctx context.Context, duty *attester.Duty) ([]*spec.VersionedAttestation, error) { - ctx, span := otel.Tracer("attestantio.vouch.services.attester.standard").Start(ctx, "Attest") - defer span.End() - started := time.Now() - - span.SetAttributes(attribute.Int64("slot", util.SlotToInt64(duty.Slot()))) - - validatorIndices := s.fetchValidatorIndices(ctx, duty) - - // Fetch the attestation data. - startOfSlot := s.chainTime.StartOfSlot(duty.Slot()) - attestationData, err := s.obtainAttestationData(ctx, duty) - if err != nil { - monitorAttestationsCompleted(started, duty.Slot(), len(validatorIndices), "failed", startOfSlot) - return nil, err - } - - if err := s.validateAttestationData(ctx, duty, attestationData); err != nil { - monitorAttestationsCompleted(started, duty.Slot(), len(validatorIndices), "failed", startOfSlot) - return nil, err - } - - // Fetch the validating accounts. - validatingAccounts, err := s.validatingAccountsProvider.ValidatingAccountsForEpochByIndex(ctx, phase0.Epoch(uint64(duty.Slot())/s.slotsPerEpoch), validatorIndices) - if err != nil { - monitorAttestationsCompleted(started, duty.Slot(), len(validatorIndices), "failed", startOfSlot) - return nil, errors.Wrap(err, "failed to obtain attesting validator accounts") - } - s.log.Trace().Dur("elapsed", time.Since(started)).Int("validating_accounts", len(validatingAccounts)).Msg("Obtained validating accounts") - - // Break the map into two arrays. - accountValidatorIndices := make([]phase0.ValidatorIndex, 0, len(validatingAccounts)) - accountsArray := make([]e2wtypes.Account, 0, len(validatingAccounts)) - for index, account := range validatingAccounts { - accountValidatorIndices = append(accountValidatorIndices, index) - accountsArray = append(accountsArray, account) - } - - // Set the per-validator information. - validatorIndexToArrayIndexMap := make(map[phase0.ValidatorIndex]int) - for i, index := range validatorIndices { - validatorIndexToArrayIndexMap[index] = i - } - committeeIndices := make([]phase0.CommitteeIndex, len(validatingAccounts)) - validatorCommitteeIndices := make([]phase0.ValidatorIndex, len(validatingAccounts)) - committeeSizes := make([]uint64, len(validatingAccounts)) - for i := range accountsArray { - committeeIndices[i] = duty.CommitteeIndices()[validatorIndexToArrayIndexMap[accountValidatorIndices[i]]] - validatorCommitteeIndices[i] = phase0.ValidatorIndex(duty.ValidatorCommitteeIndices()[validatorIndexToArrayIndexMap[accountValidatorIndices[i]]]) - committeeSizes[i] = duty.CommitteeSize(committeeIndices[i]) - } - - attestations, err := s.attestVersioned(ctx, - duty, - accountsArray, - committeeIndices, - validatorCommitteeIndices, - committeeSizes, - attestationData, - started, - ) - if err != nil { - monitorAttestationsCompleted(started, duty.Slot(), len(validatorIndices), "failed", startOfSlot) - return nil, err - } - - if len(attestations) < len(validatorIndices) { - s.log.Error().Stringer("duty", duty).Int("total_attestations", len(validatorIndices)).Int("failed_attestations", len(validatorIndices)-len(attestations)).Msg("Some attestations failed") - monitorAttestationsCompleted(started, duty.Slot(), len(validatorIndices)-len(attestations), "failed", startOfSlot) - } else { - monitorAttestationsCompleted(started, duty.Slot(), len(attestations), "succeeded", startOfSlot) - } - - s.housekeepAttestedMap(ctx, duty) - - return attestations, nil -} - -// attestVersioned carries out the internal work of attesting for versioned attestations. -func (s *Service) attestVersioned( - ctx context.Context, - duty *attester.Duty, - accounts []e2wtypes.Account, - committeeIndices []phase0.CommitteeIndex, - validatorCommitteeIndices []phase0.ValidatorIndex, - committeeSizes []uint64, - data *phase0.AttestationData, - started time.Time, -) ([]*spec.VersionedAttestation, error) { - // Set the signing committee indices to use. - signingCommitteeIndices := make([]phase0.CommitteeIndex, len(committeeIndices)) - for i := range signingCommitteeIndices { - // Hardcode the committee indices to be 0 in Electra. - signingCommitteeIndices[i] = 0 - } - - // Sign the attestation for all validating accounts. - sigs, err := s.beaconAttestationsSigner.SignBeaconAttestations(ctx, - accounts, - duty.Slot(), - signingCommitteeIndices, - data.BeaconBlockRoot, - data.Source.Epoch, - data.Source.Root, - data.Target.Epoch, - data.Target.Root, - ) - if err != nil { - return nil, errors.Wrap(err, "failed to sign beacon attestations") - } - s.log.Trace().Dur("elapsed", time.Since(started)).Msg("Signed") - - // Create the versioned electra attestations. - attestations := s.createVersionedAttestations(ctx, duty, validatorCommitteeIndices, committeeSizes, data, sigs) - if len(attestations) == 0 { - s.log.Info().Msg("No signed versioned attestations; not submitting") - return attestations, nil - } - - // Submit the versioned attestations. - submissionStarted := time.Now() - opts := &api.SubmitAttestationsOpts{Attestations: attestations} - if err := s.versionedAttestationsSubmitter.SubmitVersionedAttestations(ctx, opts); err != nil { - return nil, errors.Wrap(err, "failed to submit versioned attestations") - } - s.log.Trace().Dur("elapsed", time.Since(started)).Dur("submission_elapsed", time.Since(submissionStarted)).Msg("Submitted versioned attestations") - - return attestations, nil -} - -// createVersionedAttestations returns versioned attestations specifically for electra (index set to 0). -func (s *Service) createVersionedAttestations(_ context.Context, - duty *attester.Duty, - validatorCommitteeIndices []phase0.ValidatorIndex, - committeeSizes []uint64, - data *phase0.AttestationData, - sigs []phase0.BLSSignature, -) []*spec.VersionedAttestation { - zeroSig := phase0.BLSSignature{} - attestations := make([]*spec.VersionedAttestation, 0, len(sigs)) - for i := range sigs { - if bytes.Equal(sigs[i][:], zeroSig[:]) { - s.log.Warn().Msg("No signature for validator; not creating attestation") - continue - } - aggregationBits := bitfield.NewBitlist(committeeSizes[i]) - aggregationBits.SetBitAt(uint64(validatorCommitteeIndices[i]), true) - - committeeBits := bitfield.NewBitvector64() - committeeBits.SetBitAt(uint64(validatorCommitteeIndices[i]), true) - - attestation := &electra.Attestation{ - AggregationBits: aggregationBits, - Data: &phase0.AttestationData{ - Slot: duty.Slot(), - Index: 0, // Deprecated for now so fixed to 0. - BeaconBlockRoot: data.BeaconBlockRoot, - Source: &phase0.Checkpoint{ - Epoch: data.Source.Epoch, - Root: data.Source.Root, - }, - Target: &phase0.Checkpoint{ - Epoch: data.Target.Epoch, - Root: data.Target.Root, - }, - }, - CommitteeBits: committeeBits, - } - copy(attestation.Signature[:], sigs[i][:]) - versionedAttestation := &spec.VersionedAttestation{Version: spec.DataVersionElectra, Electra: attestation} - attestations = append(attestations, versionedAttestation) - } - - return attestations -} diff --git a/services/attester/standard/parameters.go b/services/attester/standard/parameters.go index 92f7f9c4..7f4c2d43 100644 --- a/services/attester/standard/parameters.go +++ b/services/attester/standard/parameters.go @@ -25,16 +25,15 @@ import ( ) type parameters struct { - logLevel zerolog.Level - processConcurrency int64 - monitor metrics.Service - chainTime chaintime.Service - specProvider eth2client.SpecProvider - attestationDataProvider eth2client.AttestationDataProvider - attestationsSubmitter submitter.AttestationsSubmitter - versionedAttestationsSubmitter submitter.VersionedAttestationsSubmitter - validatingAccountsProvider accountmanager.ValidatingAccountsProvider - beaconAttestationsSigner signer.BeaconAttestationsSigner + logLevel zerolog.Level + processConcurrency int64 + monitor metrics.Service + chainTime chaintime.Service + specProvider eth2client.SpecProvider + attestationDataProvider eth2client.AttestationDataProvider + attestationsSubmitter submitter.AttestationsSubmitter + validatingAccountsProvider accountmanager.ValidatingAccountsProvider + beaconAttestationsSigner signer.BeaconAttestationsSigner } // Parameter is the interface for service parameters. @@ -90,13 +89,6 @@ func WithAttestationsSubmitter(submitter submitter.AttestationsSubmitter) Parame }) } -// WithVersionedAttestationsSubmitter sets the attestations submitter. -func WithVersionedAttestationsSubmitter(submitter submitter.VersionedAttestationsSubmitter) Parameter { - return parameterFunc(func(p *parameters) { - p.versionedAttestationsSubmitter = submitter - }) -} - // WithMonitor sets the monitor for this module. func WithMonitor(monitor metrics.Service) Parameter { return parameterFunc(func(p *parameters) { @@ -144,9 +136,6 @@ func parseAndCheckParameters(params ...Parameter) (*parameters, error) { if parameters.attestationsSubmitter == nil { return nil, errors.New("no attestations submitter specified") } - if parameters.versionedAttestationsSubmitter == nil { - return nil, errors.New("no versioned attestations submitter specified") - } if parameters.monitor == nil { return nil, errors.New("no monitor specified") } diff --git a/services/attester/standard/service.go b/services/attester/standard/service.go index 91a4bd66..7b058c40 100644 --- a/services/attester/standard/service.go +++ b/services/attester/standard/service.go @@ -32,18 +32,18 @@ import ( // Service is a beacon block attester. type Service struct { - log zerolog.Logger - monitor metrics.Service - processConcurrency int64 - slotsPerEpoch uint64 - chainTime chaintime.Service - validatingAccountsProvider accountmanager.ValidatingAccountsProvider - attestationDataProvider eth2client.AttestationDataProvider - attestationsSubmitter submitter.AttestationsSubmitter - versionedAttestationsSubmitter submitter.VersionedAttestationsSubmitter - beaconAttestationsSigner signer.BeaconAttestationsSigner - attested map[phase0.Epoch]map[phase0.ValidatorIndex]struct{} - attestedMu sync.Mutex + log zerolog.Logger + monitor metrics.Service + processConcurrency int64 + slotsPerEpoch uint64 + chainTime chaintime.Service + validatingAccountsProvider accountmanager.ValidatingAccountsProvider + attestationDataProvider eth2client.AttestationDataProvider + attestationsSubmitter submitter.AttestationsSubmitter + beaconAttestationsSigner signer.BeaconAttestationsSigner + attested map[phase0.Epoch]map[phase0.ValidatorIndex]struct{} + attestedMu sync.Mutex + electraForkEpoch phase0.Epoch } // New creates a new beacon block attester. @@ -78,20 +78,67 @@ func New(ctx context.Context, params ...Parameter) (*Service, error) { return nil, errors.New("SLOTS_PER_EPOCH of unexpected type") } + _, electraForkEpoch := electraDetails(ctx, log, parameters.specProvider) + s := &Service{ - log: log, - monitor: parameters.monitor, - processConcurrency: parameters.processConcurrency, - slotsPerEpoch: slotsPerEpoch, - chainTime: parameters.chainTime, - validatingAccountsProvider: parameters.validatingAccountsProvider, - attestationDataProvider: parameters.attestationDataProvider, - versionedAttestationsSubmitter: parameters.versionedAttestationsSubmitter, - attestationsSubmitter: parameters.attestationsSubmitter, - beaconAttestationsSigner: parameters.beaconAttestationsSigner, - attested: make(map[phase0.Epoch]map[phase0.ValidatorIndex]struct{}), + log: log, + monitor: parameters.monitor, + processConcurrency: parameters.processConcurrency, + slotsPerEpoch: slotsPerEpoch, + chainTime: parameters.chainTime, + validatingAccountsProvider: parameters.validatingAccountsProvider, + attestationDataProvider: parameters.attestationDataProvider, + attestationsSubmitter: parameters.attestationsSubmitter, + beaconAttestationsSigner: parameters.beaconAttestationsSigner, + attested: make(map[phase0.Epoch]map[phase0.ValidatorIndex]struct{}), + electraForkEpoch: electraForkEpoch, } log.Trace().Int64("process_concurrency", s.processConcurrency).Msg("Set process concurrency") return s, nil } + +func electraDetails(ctx context.Context, log zerolog.Logger, specProvider eth2client.SpecProvider) (bool, phase0.Epoch) { + // Fetch the electra fork epoch from the fork schedule. + handlingElectra := true + var electraForkEpoch phase0.Epoch + electraForkEpoch, err := fetchElectraForkEpoch(ctx, specProvider) + if err != nil { + // Not handling electra after all. + handlingElectra = false + electraForkEpoch = 0xffffffffffffffff + } else { + log.Trace().Uint64("epoch", uint64(electraForkEpoch)).Msg("Obtained Electra fork epoch") + } + if !handlingElectra { + log.Debug().Msg("Not handling Electra") + } + return handlingElectra, electraForkEpoch +} + +// fetchElectraForkEpoch fetches the epoch for the electra hard fork. +func fetchElectraForkEpoch(ctx context.Context, + specProvider eth2client.SpecProvider, +) ( + phase0.Epoch, + error, +) { + // Fetch the fork version. + specResponse, err := specProvider.Spec(ctx, &api.SpecOpts{}) + if err != nil { + return 0, errors.Wrap(err, "failed to obtain spec") + } + spec := specResponse.Data + + tmp, exists := spec["ELECTRA_FORK_EPOCH"] + if !exists { + return 0, errors.New("electra fork version not known by chain") + } + epoch, isEpoch := tmp.(uint64) + if !isEpoch { + //nolint:revive + return 0, errors.New("ELECTRA_FORK_EPOCH is not a uint64!") + } + + return phase0.Epoch(epoch), nil +} diff --git a/services/attester/standard/service_test.go b/services/attester/standard/service_test.go index 12f9b905..b10bd4f1 100644 --- a/services/attester/standard/service_test.go +++ b/services/attester/standard/service_test.go @@ -42,7 +42,6 @@ func TestService(t *testing.T) { attestationDataProvider := mock.NewAttestationDataProvider() attestationsSubmitter := mock.NewAttestationsSubmitter() beaconAttestationsSigner := mocksigner.New() - versionedAttestationsSubmitter := mock.NewVersionedAttestationsSubmitter() chainTime, err := standardchaintime.New(ctx, standardchaintime.WithLogLevel(zerolog.Disabled), standardchaintime.WithGenesisProvider(genesisProvider), @@ -82,7 +81,6 @@ func TestService(t *testing.T) { standard.WithAttestationsSubmitter(attestationsSubmitter), standard.WithValidatingAccountsProvider(validatingAccountsProvider), standard.WithBeaconAttestationsSigner(beaconAttestationsSigner), - standard.WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), }, err: "problem with parameters: no monitor specified", }, @@ -98,7 +96,6 @@ func TestService(t *testing.T) { standard.WithAttestationsSubmitter(attestationsSubmitter), standard.WithValidatingAccountsProvider(validatingAccountsProvider), standard.WithBeaconAttestationsSigner(beaconAttestationsSigner), - standard.WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), }, err: "problem with parameters: no process concurrency specified", }, @@ -114,7 +111,6 @@ func TestService(t *testing.T) { standard.WithAttestationsSubmitter(attestationsSubmitter), standard.WithValidatingAccountsProvider(validatingAccountsProvider), standard.WithBeaconAttestationsSigner(beaconAttestationsSigner), - standard.WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), }, err: "problem with parameters: no chain time service specified", }, @@ -130,7 +126,6 @@ func TestService(t *testing.T) { standard.WithAttestationsSubmitter(attestationsSubmitter), standard.WithValidatingAccountsProvider(validatingAccountsProvider), standard.WithBeaconAttestationsSigner(beaconAttestationsSigner), - standard.WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), }, err: "problem with parameters: no spec provider specified", }, @@ -146,7 +141,6 @@ func TestService(t *testing.T) { standard.WithAttestationsSubmitter(attestationsSubmitter), standard.WithValidatingAccountsProvider(validatingAccountsProvider), standard.WithBeaconAttestationsSigner(beaconAttestationsSigner), - standard.WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), }, err: "problem with parameters: no attestation data provider specified", }, @@ -162,26 +156,9 @@ func TestService(t *testing.T) { standard.WithAttestationsSubmitter(nil), standard.WithValidatingAccountsProvider(validatingAccountsProvider), standard.WithBeaconAttestationsSigner(beaconAttestationsSigner), - standard.WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), }, err: "problem with parameters: no attestations submitter specified", }, - { - name: "VersionedAttestationsSubmitterMissing", - params: []standard.Parameter{ - standard.WithLogLevel(zerolog.Disabled), - standard.WithMonitor(prometheusMetrics), - standard.WithProcessConcurrency(1), - standard.WithChainTime(chainTime), - standard.WithSpecProvider(specProvider), - standard.WithAttestationDataProvider(attestationDataProvider), - standard.WithAttestationsSubmitter(attestationsSubmitter), - standard.WithValidatingAccountsProvider(validatingAccountsProvider), - standard.WithBeaconAttestationsSigner(beaconAttestationsSigner), - standard.WithVersionedAttestationsSubmitter(nil), - }, - err: "problem with parameters: no versioned attestations submitter specified", - }, { name: "ValidatingAccountsProviderMissing", params: []standard.Parameter{ @@ -194,7 +171,6 @@ func TestService(t *testing.T) { standard.WithAttestationsSubmitter(attestationsSubmitter), standard.WithValidatingAccountsProvider(nil), standard.WithBeaconAttestationsSigner(beaconAttestationsSigner), - standard.WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), }, err: "problem with parameters: no validating accounts provider specified", }, @@ -210,7 +186,6 @@ func TestService(t *testing.T) { standard.WithAttestationsSubmitter(attestationsSubmitter), standard.WithValidatingAccountsProvider(validatingAccountsProvider), standard.WithBeaconAttestationsSigner(nil), - standard.WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), }, err: "problem with parameters: no beacon attestations signer specified", }, @@ -226,7 +201,6 @@ func TestService(t *testing.T) { standard.WithAttestationsSubmitter(attestationsSubmitter), standard.WithValidatingAccountsProvider(validatingAccountsProvider), standard.WithBeaconAttestationsSigner(beaconAttestationsSigner), - standard.WithVersionedAttestationsSubmitter(versionedAttestationsSubmitter), }, }, } diff --git a/services/controller/standard/attester.go b/services/controller/standard/attester.go index 7b649280..3bc34ff7 100644 --- a/services/controller/standard/attester.go +++ b/services/controller/standard/attester.go @@ -106,33 +106,18 @@ func (s *Service) scheduleAttestations(ctx context.Context, s.pendingAttestations[duty.Slot()] = true s.pendingAttestationsMutex.Unlock() - if s.handlingElectra && epoch < s.electraForkEpoch { - go func(duty *attester.Duty) { - jobTime := s.chainTimeService.StartOfSlot(duty.Slot()).Add(s.maxAttestationDelay) - if err := s.scheduler.ScheduleJob(ctx, - "Attest", - fmt.Sprintf("Attestations for slot %d", duty.Slot()), - jobTime, - func(ctx context.Context) { s.AttestAndScheduleAggregate(ctx, duty) }, - ); err != nil { - // Don't return here; we want to try to set up as many attester jobs as possible. - s.log.Error().Err(err).Msg("Failed to schedule attestation") - } - }(duty) - } else { - go func(duty *attester.Duty) { - jobTime := s.chainTimeService.StartOfSlot(duty.Slot()).Add(s.maxAttestationDelay) - if err := s.scheduler.ScheduleJob(ctx, - "Attest", - fmt.Sprintf("Versioned attestations for slot %d", duty.Slot()), - jobTime, - func(ctx context.Context) { s.AttestVersionedAndScheduleAggregate(ctx, duty) }, - ); err != nil { - // Don't return here; we want to try to set up as many attester jobs as possible. - s.log.Error().Err(err).Msg("Failed to schedule versioned attestation") - } - }(duty) - } + go func(duty *attester.Duty) { + jobTime := s.chainTimeService.StartOfSlot(duty.Slot()).Add(s.maxAttestationDelay) + if err := s.scheduler.ScheduleJob(ctx, + "Attest", + fmt.Sprintf("Attestations for slot %d", duty.Slot()), + jobTime, + func(ctx context.Context) { s.AttestAndScheduleAggregate(ctx, duty) }, + ); err != nil { + // Don't return here; we want to try to set up as many attester jobs as possible. + s.log.Error().Err(err).Msg("Failed to schedule attestation") + } + }(duty) } s.log.Trace().Dur("elapsed", time.Since(started)).Msg("Scheduled attestations") } @@ -158,103 +143,6 @@ func (s *Service) AttestAndScheduleAggregate(ctx context.Context, duty *attester } log.Trace().Dur("elapsed", time.Since(started)).Msg("Attested") - if len(attestations) == 0 || attestations[0].Data == nil { - log.Debug().Msg("No attestations; nothing to aggregate") - return - } - - epoch := s.chainTimeService.SlotToEpoch(duty.Slot()) - s.subscriptionInfosMutex.Lock() - subscriptionInfoMap, exists := s.subscriptionInfos[epoch] - s.subscriptionInfosMutex.Unlock() - if !exists { - log.Debug(). - Uint64("epoch", uint64(epoch)). - Msg("No subscription info for this epoch; not aggregating") - return - } - - for _, attestation := range attestations { - log := log.With().Uint64("attestation_slot", uint64(attestation.Data.Slot)).Uint64("committee_index", uint64(attestation.Data.Index)).Logger() - slotInfoMap, exists := subscriptionInfoMap[attestation.Data.Slot] - if !exists { - log.Debug().Msg("No slot info; not aggregating") - continue - } - // Do not schedule aggregations for past slots. - currentSlot := s.chainTimeService.CurrentSlot() - if attestation.Data.Slot < currentSlot { - log.Debug().Uint64("current_slot", uint64(currentSlot)).Msg("Aggregation in the past; not scheduling") - continue - } - info, exists := slotInfoMap[attestation.Data.Index] - if !exists { - log.Debug().Uint64("committee_index", uint64(attestation.Data.Index)).Msg("No committee info; not aggregating") - continue - } - log = log.With().Uint64("validator_index", uint64(info.Duty.ValidatorIndex)).Logger() - if info.IsAggregator { - accounts, err := s.validatingAccountsProvider.ValidatingAccountsForEpochByIndex(ctx, epoch, []phase0.ValidatorIndex{info.Duty.ValidatorIndex}) - if err != nil { - // Don't return here; we want to try to set up as many aggregator jobs as possible. - log.Error().Err(err).Msg("Failed to obtain accounts") - continue - } - if len(accounts) == 0 { - // Don't return here; we want to try to set up as many aggregator jobs as possible. - log.Error().Msg("Failed to obtain account of attester") - continue - } - attestationDataRoot, err := attestation.Data.HashTreeRoot() - if err != nil { - // Don't return here; we want to try to set up as many aggregator jobs as possible. - log.Error().Err(err).Msg("Failed to obtain hash tree root of attestation") - continue - } - aggregatorDuty := &attestationaggregator.Duty{ - Slot: info.Duty.Slot, - AttestationDataRoot: attestationDataRoot, - ValidatorIndex: info.Duty.ValidatorIndex, - SlotSignature: info.Signature, - } - if err := s.scheduler.ScheduleJob(ctx, - "Aggregate attestations", - fmt.Sprintf("Beacon block attestation aggregation for slot %d committee %d", attestation.Data.Slot, attestation.Data.Index), - s.chainTimeService.StartOfSlot(attestation.Data.Slot).Add(s.attestationAggregationDelay), - func(ctx context.Context) { s.attestationAggregator.Aggregate(ctx, aggregatorDuty) }, - ); err != nil { - // Don't return here; we want to try to set up as many aggregator jobs as possible. - log.Error().Err(err).Msg("Failed to schedule beacon block attestation aggregation job") - continue - } - // We are set up as an aggregator for this slot and committee. It is possible that another validator has also been - // assigned as an aggregator, but we're already carrying out the task so do not need to go any further. - return - } - } -} - -// AttestVersionedAndScheduleAggregate attests, then schedules aggregation jobs as required. -func (s *Service) AttestVersionedAndScheduleAggregate(ctx context.Context, duty *attester.Duty) { - started := time.Now() - log := s.log.With().Uint64("slot", uint64(duty.Slot())).Logger() - - // At the end of this function note that we have carried out the attestation process - // for this slot, regardless of result. This allows the main codebase to shut down - // only after attestations have completed for the given slot. - defer func() { - s.pendingAttestationsMutex.Lock() - delete(s.pendingAttestations, duty.Slot()) - s.pendingAttestationsMutex.Unlock() - }() - - attestations, err := s.attester.AttestVersioned(ctx, duty) - if err != nil { - log.Error().Err(err).Msg("Failed to attest") - return - } - log.Trace().Dur("elapsed", time.Since(started)).Msg("Attested") - firstAttestationData, err := attestations[0].Data() if len(attestations) == 0 || err != nil || firstAttestationData == nil { log.Debug().Msg("No attestations; nothing to aggregate") diff --git a/services/submitter/immediate/parameters.go b/services/submitter/immediate/parameters.go index c19398f2..51781898 100644 --- a/services/submitter/immediate/parameters.go +++ b/services/submitter/immediate/parameters.go @@ -27,7 +27,6 @@ type parameters struct { clientMonitor metrics.ClientMonitor proposalSubmitter eth2client.ProposalSubmitter attestationsSubmitter eth2client.AttestationsSubmitter - versionedAttestationsSubmitter eth2client.VersionedAttestationsSubmitter beaconCommitteeSubscriptionsSubmitter eth2client.BeaconCommitteeSubscriptionsSubmitter aggregateAttestationsSubmitter eth2client.AggregateAttestationsSubmitter proposalPreparationsSubmitter eth2client.ProposalPreparationsSubmitter @@ -75,13 +74,6 @@ func WithAttestationsSubmitter(submitter eth2client.AttestationsSubmitter) Param }) } -// WithVersionedAttestationsSubmitter sets the versioned attestation submitter. -func WithVersionedAttestationsSubmitter(submitter eth2client.VersionedAttestationsSubmitter) Parameter { - return parameterFunc(func(p *parameters) { - p.versionedAttestationsSubmitter = submitter - }) -} - // WithSyncCommitteeMessagesSubmitter sets the sync committee messages submitter. func WithSyncCommitteeMessagesSubmitter(submitter eth2client.SyncCommitteeMessagesSubmitter) Parameter { return parameterFunc(func(p *parameters) { diff --git a/services/submitter/immediate/service.go b/services/submitter/immediate/service.go index b61737df..20e26cca 100644 --- a/services/submitter/immediate/service.go +++ b/services/submitter/immediate/service.go @@ -35,7 +35,6 @@ type Service struct { log zerolog.Logger clientMonitor metrics.ClientMonitor attestationsSubmitter eth2client.AttestationsSubmitter - versionedAttestationsSubmitter eth2client.VersionedAttestationsSubmitter proposalSubmitter eth2client.ProposalSubmitter beaconCommitteeSubscriptionsSubmitter eth2client.BeaconCommitteeSubscriptionsSubmitter aggregateAttestationsSubmitter eth2client.AggregateAttestationsSubmitter @@ -62,7 +61,6 @@ func New(_ context.Context, params ...Parameter) (*Service, error) { log: log, clientMonitor: parameters.clientMonitor, attestationsSubmitter: parameters.attestationsSubmitter, - versionedAttestationsSubmitter: parameters.versionedAttestationsSubmitter, proposalSubmitter: parameters.proposalSubmitter, beaconCommitteeSubscriptionsSubmitter: parameters.beaconCommitteeSubscriptionsSubmitter, aggregateAttestationsSubmitter: parameters.aggregateAttestationsSubmitter, @@ -108,16 +106,16 @@ func (s *Service) SubmitProposal(ctx context.Context, proposal *api.VersionedSig } // SubmitAttestations submits multiple attestations. -func (s *Service) SubmitAttestations(ctx context.Context, attestations []*phase0.Attestation) error { +func (s *Service) SubmitAttestations(ctx context.Context, opts *api.SubmitAttestationsOpts) error { ctx, span := otel.Tracer("attestantio.vouch.services.submitter.immediate").Start(ctx, "SubmitAttestations") defer span.End() - if len(attestations) == 0 { + if len(opts.Attestations) == 0 { return errors.New("no attestations supplied") } started := time.Now() - err := s.attestationsSubmitter.SubmitAttestations(ctx, attestations) + err := s.attestationsSubmitter.SubmitAttestations(ctx, opts) if service, isService := s.attestationsSubmitter.(eth2client.Service); isService { s.clientMonitor.ClientOperation(service.Address(), "submit attestations", err == nil, time.Since(started)) } else { @@ -128,7 +126,7 @@ func (s *Service) SubmitAttestations(ctx context.Context, attestations []*phase0 } if e := s.log.Trace(); e.Enabled() { - data, err := json.Marshal(attestations) + data, err := json.Marshal(opts.Attestations) if err == nil { e.Str("attestations", string(data)).Msg("Submitted attestations") } @@ -137,39 +135,6 @@ func (s *Service) SubmitAttestations(ctx context.Context, attestations []*phase0 return nil } -// SubmitVersionedAttestations submits a batch of attestations. -func (s *Service) SubmitVersionedAttestations(ctx context.Context, opts *api.SubmitAttestationsOpts) error { - ctx, span := otel.Tracer("attestantio.vouch.services.submitter.immediate").Start(ctx, "SubmitVersionedAttestations") - defer span.End() - - attestations := opts.Attestations - if len(attestations) == 0 { - return errors.New("no attestations supplied") - } - - started := time.Now() - err := s.versionedAttestationsSubmitter.SubmitVersionedAttestations(ctx, &api.SubmitAttestationsOpts{ - Attestations: attestations, - }) - if service, isService := s.versionedAttestationsSubmitter.(eth2client.Service); isService { - s.clientMonitor.ClientOperation(service.Address(), "submit versioned attestations", err == nil, time.Since(started)) - } else { - s.clientMonitor.ClientOperation("", "submit versioned attestations", err == nil, time.Since(started)) - } - if err != nil { - return errors.Wrap(err, "failed to submit versioned attestations") - } - - if e := s.log.Trace(); e.Enabled() { - data, err := json.Marshal(attestations) - if err == nil { - e.Str("attestations", string(data)).Msg("Submitted versioned attestations") - } - } - - return nil -} - // SubmitBeaconCommitteeSubscriptions submits a batch of beacon committee subscriptions. func (s *Service) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.BeaconCommitteeSubscription) error { ctx, span := otel.Tracer("attestantio.vouch.services.submitter.immediate").Start(ctx, "SubmitBeaconCommitteeSubscriptions") diff --git a/services/submitter/immediate/service_test.go b/services/submitter/immediate/service_test.go index 0ba3096e..8c42c88f 100644 --- a/services/submitter/immediate/service_test.go +++ b/services/submitter/immediate/service_test.go @@ -15,6 +15,7 @@ package immediate_test import ( "context" + "github.com/attestantio/go-eth2-client/spec" "testing" "github.com/attestantio/go-eth2-client/api" @@ -311,7 +312,7 @@ func TestSubmitAttestations(t *testing.T) { tests := []struct { name string params []immediate.Parameter - attestations []*phase0.Attestation + attestations []*spec.VersionedAttestation err string }{ { @@ -342,7 +343,7 @@ func TestSubmitAttestations(t *testing.T) { immediate.WithSyncCommitteeMessagesSubmitter(mock.NewSyncCommitteeMessagesSubmitter()), immediate.WithSyncCommitteeContributionsSubmitter(mock.NewSyncCommitteeContributionsSubmitter()), }, - attestations: []*phase0.Attestation{}, + attestations: []*spec.VersionedAttestation{}, err: "no attestations supplied", }, { @@ -358,7 +359,7 @@ func TestSubmitAttestations(t *testing.T) { immediate.WithSyncCommitteeMessagesSubmitter(mock.NewSyncCommitteeMessagesSubmitter()), immediate.WithSyncCommitteeContributionsSubmitter(mock.NewSyncCommitteeContributionsSubmitter()), }, - attestations: []*phase0.Attestation{{}}, + attestations: []*spec.VersionedAttestation{{}}, err: "failed to submit attestations: error", }, { @@ -374,7 +375,7 @@ func TestSubmitAttestations(t *testing.T) { immediate.WithSyncCommitteeMessagesSubmitter(mock.NewSyncCommitteeMessagesSubmitter()), immediate.WithSyncCommitteeContributionsSubmitter(mock.NewSyncCommitteeContributionsSubmitter()), }, - attestations: []*phase0.Attestation{{}}, + attestations: []*spec.VersionedAttestation{{}}, }, } @@ -383,7 +384,10 @@ func TestSubmitAttestations(t *testing.T) { require.NoError(t, err) t.Run(test.name, func(t *testing.T) { - err := s.SubmitAttestations(context.Background(), test.attestations) + opts := &api.SubmitAttestationsOpts{ + Attestations: test.attestations, + } + err := s.SubmitAttestations(context.Background(), opts) if test.err != "" { require.EqualError(t, err, test.err) } else { diff --git a/services/submitter/multinode/parameters.go b/services/submitter/multinode/parameters.go index 9108e9af..9b0f5252 100644 --- a/services/submitter/multinode/parameters.go +++ b/services/submitter/multinode/parameters.go @@ -32,7 +32,6 @@ type parameters struct { processConcurrency int64 proposalSubmitters map[string]eth2client.ProposalSubmitter attestationsSubmitters map[string]eth2client.AttestationsSubmitter - versionedAttestationsSubmitters map[string]eth2client.VersionedAttestationsSubmitter aggregateAttestationsSubmitters map[string]eth2client.AggregateAttestationsSubmitter proposalPreparationsSubmitters map[string]eth2client.ProposalPreparationsSubmitter beaconCommitteeSubscriptionsSubmitters map[string]eth2client.BeaconCommitteeSubscriptionsSubmitter @@ -94,13 +93,6 @@ func WithAttestationsSubmitters(submitters map[string]eth2client.AttestationsSub }) } -// WithVersionedAttestationsSubmitters sets the versioned attestation submitters. -func WithVersionedAttestationsSubmitters(submitters map[string]eth2client.VersionedAttestationsSubmitter) Parameter { - return parameterFunc(func(p *parameters) { - p.versionedAttestationsSubmitters = submitters - }) -} - // WithAggregateAttestationsSubmitters sets the aggregate attestation submitters. func WithAggregateAttestationsSubmitters(submitters map[string]eth2client.AggregateAttestationsSubmitter) Parameter { return parameterFunc(func(p *parameters) { @@ -170,9 +162,6 @@ func parseAndCheckParameters(params ...Parameter) (*parameters, error) { if len(parameters.attestationsSubmitters) == 0 { return nil, errors.New("no attestations submitters specified") } - if len(parameters.versionedAttestationsSubmitters) == 0 { - return nil, errors.New("no versioned attestations submitters specified") - } if len(parameters.aggregateAttestationsSubmitters) == 0 { return nil, errors.New("no aggregate attestations submitters specified") } diff --git a/services/submitter/multinode/service.go b/services/submitter/multinode/service.go index 251b8b65..f546bb87 100644 --- a/services/submitter/multinode/service.go +++ b/services/submitter/multinode/service.go @@ -32,7 +32,6 @@ type Service struct { processConcurrency int64 proposalSubmitters map[string]eth2client.ProposalSubmitter attestationsSubmitters map[string]eth2client.AttestationsSubmitter - versionedAttestationsSubmitters map[string]eth2client.VersionedAttestationsSubmitter aggregateAttestationsSubmitters map[string]eth2client.AggregateAttestationsSubmitter proposalPreparationsSubmitters map[string]eth2client.ProposalPreparationsSubmitter beaconCommitteeSubscriptionSubmitters map[string]eth2client.BeaconCommitteeSubscriptionsSubmitter @@ -61,7 +60,6 @@ func New(_ context.Context, params ...Parameter) (*Service, error) { processConcurrency: parameters.processConcurrency, proposalSubmitters: parameters.proposalSubmitters, attestationsSubmitters: parameters.attestationsSubmitters, - versionedAttestationsSubmitters: parameters.versionedAttestationsSubmitters, aggregateAttestationsSubmitters: parameters.aggregateAttestationsSubmitters, proposalPreparationsSubmitters: parameters.proposalPreparationsSubmitters, beaconCommitteeSubscriptionSubmitters: parameters.beaconCommitteeSubscriptionsSubmitters, diff --git a/services/submitter/multinode/service_test.go b/services/submitter/multinode/service_test.go index d1323152..8a37e43e 100644 --- a/services/submitter/multinode/service_test.go +++ b/services/submitter/multinode/service_test.go @@ -51,9 +51,6 @@ func TestService(t *testing.T) { syncCommitteeContributionsSubmitters := map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), } - versionedAttestationsSubmitters := map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - } tests := []struct { name string params []multinode.Parameter @@ -74,7 +71,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no client monitor specified", }, @@ -92,7 +88,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no timeout specified", }, @@ -110,7 +105,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no process concurrency specified", }, @@ -127,7 +121,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no proposal submitters specified", }, @@ -145,7 +138,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no proposal submitters specified", }, @@ -162,7 +154,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no attestations submitters specified", }, @@ -180,45 +171,9 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no attestations submitters specified", }, - { - name: "VersionedAttestationsSubmittersMissing", - params: []multinode.Parameter{ - multinode.WithLogLevel(zerolog.Disabled), - multinode.WithTimeout(2 * time.Second), - multinode.WithProcessConcurrency(2), - multinode.WithProposalSubmitters(beaconBlockSubmitters), - multinode.WithAttestationsSubmitters(attestationsSubmitters), - multinode.WithBeaconCommitteeSubscriptionsSubmitters(beaconCommitteeSubscriptionsSubmitters), - multinode.WithAggregateAttestationsSubmitters(aggregateAttestationsSubmitters), - multinode.WithProposalPreparationsSubmitters(proposalPrepartionsSubmitters), - multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), - multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), - multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - }, - err: "problem with parameters: no versioned attestations submitters specified", - }, - { - name: "VersionedAttestationsSubmittersEmpty", - params: []multinode.Parameter{ - multinode.WithLogLevel(zerolog.Disabled), - multinode.WithTimeout(2 * time.Second), - multinode.WithProcessConcurrency(2), - multinode.WithProposalSubmitters(beaconBlockSubmitters), - multinode.WithAttestationsSubmitters(attestationsSubmitters), - multinode.WithBeaconCommitteeSubscriptionsSubmitters(beaconCommitteeSubscriptionsSubmitters), - multinode.WithAggregateAttestationsSubmitters(aggregateAttestationsSubmitters), - multinode.WithProposalPreparationsSubmitters(proposalPrepartionsSubmitters), - multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), - multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), - multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{}), - }, - err: "problem with parameters: no versioned attestations submitters specified", - }, { name: "BeaconCommitteeSubscriptionsSubmittersMissing", params: []multinode.Parameter{ @@ -232,7 +187,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no beacon committee subscription submitters specified", }, @@ -250,7 +204,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no beacon committee subscription submitters specified", }, @@ -267,7 +220,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no aggregate attestations submitters specified", }, @@ -285,7 +237,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no aggregate attestations submitters specified", }, @@ -302,7 +253,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no proposal preparations submitters specified", }, @@ -320,7 +270,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no proposal preparations submitters specified", }, @@ -337,7 +286,6 @@ func TestService(t *testing.T) { multinode.WithProposalPreparationsSubmitters(proposalPrepartionsSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no sync committee messages submitters specified", }, @@ -355,7 +303,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(map[string]eth2client.SyncCommitteeMessagesSubmitter{}), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no sync committee messages submitters specified", }, @@ -372,7 +319,6 @@ func TestService(t *testing.T) { multinode.WithProposalPreparationsSubmitters(proposalPrepartionsSubmitters), multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no sync committee subscriptions submitters specified", }, @@ -390,7 +336,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(map[string]eth2client.SyncCommitteeSubscriptionsSubmitter{}), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no sync committee subscriptions submitters specified", }, @@ -407,7 +352,6 @@ func TestService(t *testing.T) { multinode.WithProposalPreparationsSubmitters(proposalPrepartionsSubmitters), multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no sync committee contributions submitters specified", }, @@ -425,7 +369,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{}), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, err: "problem with parameters: no sync committee contributions submitters specified", }, @@ -443,7 +386,6 @@ func TestService(t *testing.T) { multinode.WithSyncCommitteeMessagesSubmitters(syncCommitteeMessagesSubmitters), multinode.WithSyncCommitteeSubscriptionsSubmitters(syncCommitteeSubscriptionsSubmitters), multinode.WithSyncCommitteeContributionsSubmitters(syncCommitteeContributionsSubmitters), - multinode.WithVersionedAttestationsSubmitters(versionedAttestationsSubmitters), }, }, } @@ -489,9 +431,6 @@ func TestInterfaces(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) require.Implements(t, (*submitter.ProposalSubmitter)(nil), s) @@ -502,5 +441,4 @@ func TestInterfaces(t *testing.T) { require.Implements(t, (*submitter.SyncCommitteeMessagesSubmitter)(nil), s) require.Implements(t, (*submitter.SyncCommitteeSubscriptionsSubmitter)(nil), s) require.Implements(t, (*submitter.SyncCommitteeContributionsSubmitter)(nil), s) - require.Implements(t, (*submitter.VersionedAttestationsSubmitter)(nil), s) } diff --git a/services/submitter/multinode/submitaggregateattestations_test.go b/services/submitter/multinode/submitaggregateattestations_test.go index 431c3d9b..6a0c97eb 100644 --- a/services/submitter/multinode/submitaggregateattestations_test.go +++ b/services/submitter/multinode/submitaggregateattestations_test.go @@ -59,9 +59,6 @@ func TestSubmitAggregateAttestationsEmpty(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -102,9 +99,6 @@ func TestSubmitAggregateAttestations(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -166,9 +160,6 @@ func TestSubmitAggregateAttestationsErroring(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -226,9 +217,6 @@ func TestSubmitAggregateAttestationsSleepy(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -286,9 +274,6 @@ func TestSubmitAggregateAttestationsSleepySuccess(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) diff --git a/services/submitter/multinode/submitattestations.go b/services/submitter/multinode/submitattestations.go index 0802b14c..5f5175f3 100644 --- a/services/submitter/multinode/submitattestations.go +++ b/services/submitter/multinode/submitattestations.go @@ -21,7 +21,8 @@ import ( "time" eth2client "github.com/attestantio/go-eth2-client" - "github.com/attestantio/go-eth2-client/spec/phase0" + "github.com/attestantio/go-eth2-client/api" + "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/vouch/util" "github.com/pkg/errors" "go.opentelemetry.io/otel" @@ -31,13 +32,13 @@ import ( ) // SubmitAttestations submits a batch of attestations. -func (s *Service) SubmitAttestations(ctx context.Context, attestations []*phase0.Attestation) error { +func (s *Service) SubmitAttestations(ctx context.Context, opts *api.SubmitAttestationsOpts) error { ctx, span := otel.Tracer("attestantio.vouch.service.submitter.multinode").Start(ctx, "SubmitAttestations", trace.WithAttributes( attribute.String("strategy", "multinode"), )) defer span.End() - if len(attestations) == 0 { + if len(opts.Attestations) == 0 { return errors.New("no attestations supplied") } @@ -46,7 +47,7 @@ func (s *Service) SubmitAttestations(ctx context.Context, attestations []*phase0 w := sync.NewCond(&sync.Mutex{}) w.L.Lock() for name, submitter := range s.attestationsSubmitters { - go s.submitAttestations(ctx, sem, w, submissionCompleted, name, attestations, submitter) + go s.submitAttestations(ctx, sem, w, submissionCompleted, name, opts.Attestations, submitter) } // Also set a timeout condition, in case no submitters return. go func(s *Service, w *sync.Cond) { @@ -71,7 +72,7 @@ func (s *Service) submitAttestations(ctx context.Context, w *sync.Cond, submissionCompleted *atomic.Bool, name string, - attestations []*phase0.Attestation, + attestations []*spec.VersionedAttestation, submitter eth2client.AttestationsSubmitter, ) { ctx, span := otel.Tracer("attestantio.vouch.service.submitter.multinode").Start(ctx, "submitAttestations", trace.WithAttributes( @@ -79,7 +80,13 @@ func (s *Service) submitAttestations(ctx context.Context, )) defer span.End() - log := s.log.With().Str("beacon_node_address", name).Uint64("slot", uint64(attestations[0].Data.Slot)).Logger() + data, err := attestations[0].Data() + if err != nil { + s.log.Error().Err(err).Msg("Failed to acquire data from first attestation") + return + } + slot := uint64(data.Slot) + log := s.log.With().Str("beacon_node_address", name).Uint64("slot", slot).Logger() if err := sem.Acquire(ctx, 1); err != nil { log.Error().Err(err).Msg("Failed to acquire semaphore") return @@ -88,8 +95,10 @@ func (s *Service) submitAttestations(ctx context.Context, _, address := s.serviceInfo(ctx, submitter) started := time.Now() - _, err := util.Scatter(len(attestations), int(s.processConcurrency), func(offset int, entries int, _ *sync.RWMutex) (interface{}, error) { - return nil, submitter.SubmitAttestations(ctx, attestations[offset:offset+entries]) + _, err = util.Scatter(len(attestations), int(s.processConcurrency), func(offset int, entries int, _ *sync.RWMutex) (interface{}, error) { + return nil, submitter.SubmitAttestations(ctx, &api.SubmitAttestationsOpts{ + Attestations: attestations[offset : offset+entries], + }) }) if err != nil { err = s.handleAttestationsError(ctx, submitter, err) diff --git a/services/submitter/multinode/submitattestations_test.go b/services/submitter/multinode/submitattestations_test.go index e6624779..8b73dec0 100644 --- a/services/submitter/multinode/submitattestations_test.go +++ b/services/submitter/multinode/submitattestations_test.go @@ -15,6 +15,8 @@ package multinode_test import ( "context" + "github.com/attestantio/go-eth2-client/api" + "github.com/attestantio/go-eth2-client/spec" "testing" "time" @@ -59,13 +61,12 @@ func TestSubmitAttestationsEmpty(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) - err = s.SubmitAttestations(ctx, []*phase0.Attestation{}) + err = s.SubmitAttestations(ctx, &api.SubmitAttestationsOpts{ + Attestations: []*spec.VersionedAttestation{}, + }) require.EqualError(t, err, "no attestations supplied") } @@ -102,26 +103,28 @@ func TestSubmitAttestations(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) - err = s.SubmitAttestations(ctx, []*phase0.Attestation{ - { - Data: &phase0.AttestationData{ - BeaconBlockRoot: testutil.HexToRoot("0x0101010101010101010101010101010101010101010101010101010101010101"), - Source: &phase0.Checkpoint{ - Epoch: 5, - Root: testutil.HexToRoot("0x0202020202020202020202020202020202020202020202020202020202020202"), - }, - Target: &phase0.Checkpoint{ - Epoch: 6, - Root: testutil.HexToRoot("0x0303030303030303030303030303030303030303030303030303030303030303"), + err = s.SubmitAttestations(ctx, &api.SubmitAttestationsOpts{ + Attestations: []*spec.VersionedAttestation{ + { + Version: spec.DataVersionPhase0, + Phase0: &phase0.Attestation{ + Data: &phase0.AttestationData{ + BeaconBlockRoot: testutil.HexToRoot("0x0101010101010101010101010101010101010101010101010101010101010101"), + Source: &phase0.Checkpoint{ + Epoch: 5, + Root: testutil.HexToRoot("0x0202020202020202020202020202020202020202020202020202020202020202"), + }, + Target: &phase0.Checkpoint{ + Epoch: 6, + Root: testutil.HexToRoot("0x0303030303030303030303030303030303030303030303030303030303030303"), + }, + }, + Signature: testutil.HexToSignature("0x040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404"), }, }, - Signature: testutil.HexToSignature("0x040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404"), }, }) require.NoError(t, err) @@ -162,26 +165,28 @@ func TestSubmitAttestationsErroring(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) - err = s.SubmitAttestations(ctx, []*phase0.Attestation{ - { - Data: &phase0.AttestationData{ - BeaconBlockRoot: testutil.HexToRoot("0x0101010101010101010101010101010101010101010101010101010101010101"), - Source: &phase0.Checkpoint{ - Epoch: 5, - Root: testutil.HexToRoot("0x0202020202020202020202020202020202020202020202020202020202020202"), - }, - Target: &phase0.Checkpoint{ - Epoch: 6, - Root: testutil.HexToRoot("0x0303030303030303030303030303030303030303030303030303030303030303"), + err = s.SubmitAttestations(ctx, &api.SubmitAttestationsOpts{ + Attestations: []*spec.VersionedAttestation{ + { + Version: spec.DataVersionPhase0, + Phase0: &phase0.Attestation{ + Data: &phase0.AttestationData{ + BeaconBlockRoot: testutil.HexToRoot("0x0101010101010101010101010101010101010101010101010101010101010101"), + Source: &phase0.Checkpoint{ + Epoch: 5, + Root: testutil.HexToRoot("0x0202020202020202020202020202020202020202020202020202020202020202"), + }, + Target: &phase0.Checkpoint{ + Epoch: 6, + Root: testutil.HexToRoot("0x0303030303030303030303030303030303030303030303030303030303030303"), + }, + }, + Signature: testutil.HexToSignature("0x040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404"), }, }, - Signature: testutil.HexToSignature("0x040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404"), }, }) require.EqualError(t, err, "no successful submissions before timeout") @@ -218,26 +223,27 @@ func TestSubmitAttestationsSleepy(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) - err = s.SubmitAttestations(ctx, []*phase0.Attestation{ - { - Data: &phase0.AttestationData{ - BeaconBlockRoot: testutil.HexToRoot("0x0101010101010101010101010101010101010101010101010101010101010101"), - Source: &phase0.Checkpoint{ - Epoch: 5, - Root: testutil.HexToRoot("0x0202020202020202020202020202020202020202020202020202020202020202"), - }, - Target: &phase0.Checkpoint{ - Epoch: 6, - Root: testutil.HexToRoot("0x0303030303030303030303030303030303030303030303030303030303030303"), - }, - }, - Signature: testutil.HexToSignature("0x040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404"), + err = s.SubmitAttestations(ctx, &api.SubmitAttestationsOpts{ + Attestations: []*spec.VersionedAttestation{ + { + Version: spec.DataVersionPhase0, + Phase0: &phase0.Attestation{ + Data: &phase0.AttestationData{ + BeaconBlockRoot: testutil.HexToRoot("0x0101010101010101010101010101010101010101010101010101010101010101"), + Source: &phase0.Checkpoint{ + Epoch: 5, + Root: testutil.HexToRoot("0x0202020202020202020202020202020202020202020202020202020202020202"), + }, + Target: &phase0.Checkpoint{ + Epoch: 6, + Root: testutil.HexToRoot("0x0303030303030303030303030303030303030303030303030303030303030303"), + }, + }, + Signature: testutil.HexToSignature("0x040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404"), + }}, }, }) require.EqualError(t, err, "no successful submissions before timeout") @@ -274,26 +280,28 @@ func TestSubmitAttestationsSleepySuccess(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) - err = s.SubmitAttestations(ctx, []*phase0.Attestation{ - { - Data: &phase0.AttestationData{ - BeaconBlockRoot: testutil.HexToRoot("0x0101010101010101010101010101010101010101010101010101010101010101"), - Source: &phase0.Checkpoint{ - Epoch: 5, - Root: testutil.HexToRoot("0x0202020202020202020202020202020202020202020202020202020202020202"), - }, - Target: &phase0.Checkpoint{ - Epoch: 6, - Root: testutil.HexToRoot("0x0303030303030303030303030303030303030303030303030303030303030303"), + err = s.SubmitAttestations(ctx, &api.SubmitAttestationsOpts{ + Attestations: []*spec.VersionedAttestation{ + { + Version: spec.DataVersionPhase0, + Phase0: &phase0.Attestation{ + Data: &phase0.AttestationData{ + BeaconBlockRoot: testutil.HexToRoot("0x0101010101010101010101010101010101010101010101010101010101010101"), + Source: &phase0.Checkpoint{ + Epoch: 5, + Root: testutil.HexToRoot("0x0202020202020202020202020202020202020202020202020202020202020202"), + }, + Target: &phase0.Checkpoint{ + Epoch: 6, + Root: testutil.HexToRoot("0x0303030303030303030303030303030303030303030303030303030303030303"), + }, + }, + Signature: testutil.HexToSignature("0x040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404"), }, }, - Signature: testutil.HexToSignature("0x040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404"), }, }) require.NoError(t, err) diff --git a/services/submitter/multinode/submitbeaconcommitteesubscriptions_test.go b/services/submitter/multinode/submitbeaconcommitteesubscriptions_test.go index 1ebb4822..4e8c1d0d 100644 --- a/services/submitter/multinode/submitbeaconcommitteesubscriptions_test.go +++ b/services/submitter/multinode/submitbeaconcommitteesubscriptions_test.go @@ -58,9 +58,6 @@ func TestSubmitBeaconCommitteeSubscriptionsEmpty(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -101,9 +98,6 @@ func TestSubmitBeaconCommitteeSubscriptions(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -148,9 +142,6 @@ func TestSubmitBeaconCommitteeSubscriptionsErroring(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -191,9 +182,6 @@ func TestSubmitBeaconCommitteeSubscriptionsSleepy(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -234,9 +222,6 @@ func TestSubmitBeaconCommitteeSubscriptionsSleepySuccess(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) diff --git a/services/submitter/multinode/submitproposal_test.go b/services/submitter/multinode/submitproposal_test.go index 8a5625f5..c14b8043 100644 --- a/services/submitter/multinode/submitproposal_test.go +++ b/services/submitter/multinode/submitproposal_test.go @@ -61,9 +61,6 @@ func TestSubmitProposalEmpty(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -104,9 +101,6 @@ func TestSubmitProposal(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -158,9 +152,6 @@ func TestSubmitProposalErroring(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -208,9 +199,6 @@ func TestSubmitProposalSleepy(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -258,9 +246,6 @@ func TestSubmitProposalSleepySuccess(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) diff --git a/services/submitter/multinode/submitproposalpreparations_test.go b/services/submitter/multinode/submitproposalpreparations_test.go index 44889bd0..0900ac4b 100644 --- a/services/submitter/multinode/submitproposalpreparations_test.go +++ b/services/submitter/multinode/submitproposalpreparations_test.go @@ -59,9 +59,6 @@ func TestSubmitProposalPreparationsEmpty(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -102,9 +99,6 @@ func TestSubmitProposalPreparations(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -152,9 +146,6 @@ func TestSubmitProposalPreparationsErroring(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -198,9 +189,6 @@ func TestSubmitProposalPreparationsSleepy(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -244,9 +232,6 @@ func TestSubmitProposalPreparationsSleepySuccess(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) diff --git a/services/submitter/multinode/submitsynccommitteecontributions_test.go b/services/submitter/multinode/submitsynccommitteecontributions_test.go index bc4f0272..b9bbd149 100644 --- a/services/submitter/multinode/submitsynccommitteecontributions_test.go +++ b/services/submitter/multinode/submitsynccommitteecontributions_test.go @@ -58,9 +58,6 @@ func TestSubmitSyncCommitteeContributionsEmpty(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -101,9 +98,6 @@ func TestSubmitSyncCommitteeContributions(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -154,9 +148,6 @@ func TestSubmitSyncCommitteeContributionsErroring(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewErroringSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -203,9 +194,6 @@ func TestSubmitSyncCommitteeContributionsSleepy(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSleepySyncCommitteeContributionsSubmitter(200*time.Millisecond, mock.NewSyncCommitteeContributionsSubmitter()), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -252,9 +240,6 @@ func TestSubmitSyncCommitteeContributionsSleepySuccess(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSleepySyncCommitteeContributionsSubmitter(100*time.Millisecond, mock.NewSyncCommitteeContributionsSubmitter()), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) diff --git a/services/submitter/multinode/submitsynccommitteemessages_test.go b/services/submitter/multinode/submitsynccommitteemessages_test.go index 490773e5..d2984bda 100644 --- a/services/submitter/multinode/submitsynccommitteemessages_test.go +++ b/services/submitter/multinode/submitsynccommitteemessages_test.go @@ -58,9 +58,6 @@ func TestSubmitSyncCommitteeMessagesEmpty(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -101,9 +98,6 @@ func TestSubmitSyncCommitteeMessages(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -148,9 +142,6 @@ func TestSubmitSyncCommitteeMessagesErroring(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -191,9 +182,6 @@ func TestSubmitSyncCommitteeMessagesSleepy(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -234,9 +222,6 @@ func TestSubmitSyncCommitteeMessagesSleepySuccess(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) diff --git a/services/submitter/multinode/submitsynccommitteesubscriptions_test.go b/services/submitter/multinode/submitsynccommitteesubscriptions_test.go index f2d8d0bb..721b1e42 100644 --- a/services/submitter/multinode/submitsynccommitteesubscriptions_test.go +++ b/services/submitter/multinode/submitsynccommitteesubscriptions_test.go @@ -58,9 +58,6 @@ func TestSubmitSyncCommitteeSubscriptionsEmpty(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -101,9 +98,6 @@ func TestSubmitSyncCommitteeSubscriptions(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -148,9 +142,6 @@ func TestSubmitSyncCommitteeSubscriptionsErroring(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -191,9 +182,6 @@ func TestSubmitSyncCommitteeSubscriptionsSleepy(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) @@ -234,9 +222,6 @@ func TestSubmitSyncCommitteeSubscriptionsSleepySuccess(t *testing.T) { multinode.WithSyncCommitteeContributionsSubmitters(map[string]eth2client.SyncCommitteeContributionsSubmitter{ "1": mock.NewSyncCommitteeContributionsSubmitter(), }), - multinode.WithVersionedAttestationsSubmitters(map[string]eth2client.VersionedAttestationsSubmitter{ - "1": mock.NewVersionedAttestationsSubmitter(), - }), ) require.NoError(t, err) diff --git a/services/submitter/multinode/submitversionedattestations.go b/services/submitter/multinode/submitversionedattestations.go deleted file mode 100644 index 301c4bd3..00000000 --- a/services/submitter/multinode/submitversionedattestations.go +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright © 2025 Attestant Limited. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package multinode - -import ( - "context" - "strings" - "sync" - "sync/atomic" - "time" - - eth2client "github.com/attestantio/go-eth2-client" - "github.com/attestantio/go-eth2-client/api" - "github.com/attestantio/go-eth2-client/spec" - "github.com/attestantio/vouch/util" - "github.com/pkg/errors" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/trace" - "golang.org/x/sync/semaphore" -) - -// SubmitVersionedAttestations submits a batch of attestations. -func (s *Service) SubmitVersionedAttestations(ctx context.Context, opts *api.SubmitAttestationsOpts) error { - ctx, span := otel.Tracer("attestantio.vouch.service.submitter.multinode").Start(ctx, "SubmitVersionedAttestations", trace.WithAttributes( - attribute.String("strategy", "multinode"), - )) - defer span.End() - - attestations := opts.Attestations - if len(attestations) == 0 { - return errors.New("no attestations supplied") - } - - sem := semaphore.NewWeighted(s.processConcurrency) - submissionCompleted := &atomic.Bool{} - w := sync.NewCond(&sync.Mutex{}) - w.L.Lock() - for name, submitter := range s.versionedAttestationsSubmitters { - go s.submitVersionedAttestations(ctx, sem, w, submissionCompleted, name, attestations, submitter) - } - // Also set a timeout condition, in case no submitters return. - go func(s *Service, w *sync.Cond) { - time.Sleep(s.timeout) - w.Signal() - }(s, w) - w.Wait() - w.L.Unlock() - - var err error - if !submissionCompleted.Load() { - err = errors.New("no successful submissions before timeout") - } - - return err -} - -// submitVersionedAttestations carries out the internal work of submitting attestations. -// skipcq: RVV-B0001 -func (s *Service) submitVersionedAttestations(ctx context.Context, - sem *semaphore.Weighted, - w *sync.Cond, - submissionCompleted *atomic.Bool, - name string, - attestations []*spec.VersionedAttestation, - submitter eth2client.VersionedAttestationsSubmitter, -) { - ctx, span := otel.Tracer("attestantio.vouch.service.submitter.multinode").Start(ctx, "submitVersionedAttestations", trace.WithAttributes( - attribute.String("server", name), - )) - defer span.End() - - data, err := attestations[0].Data() - if err != nil { - s.log.Error().Err(err).Msg("Failed to acquire data from first attestation") - return - } - slot := uint64(data.Slot) - log := s.log.With().Str("beacon_node_address", name).Uint64("slot", slot).Logger() - if err := sem.Acquire(ctx, 1); err != nil { - log.Error().Err(err).Msg("Failed to acquire semaphore") - return - } - defer sem.Release(1) - - _, address := s.serviceInfo(ctx, submitter) - started := time.Now() - _, err = util.Scatter(len(attestations), int(s.processConcurrency), func(offset int, entries int, _ *sync.RWMutex) (interface{}, error) { - return nil, submitter.SubmitVersionedAttestations(ctx, &api.SubmitAttestationsOpts{ - Attestations: attestations[offset : offset+entries], - }) - }) - if err != nil { - err = s.handleVersionedAttestationsError(ctx, submitter, err) - } - - s.clientMonitor.ClientOperation(address, "submit versioned attestations", err == nil, time.Since(started)) - if err != nil { - log.Warn().Err(err).Msg("Failed to submit versioned attestations") - return - } - - submissionCompleted.Store(true) - w.Signal() - log.Trace().Msg("Submitted versioned attestations") -} - -func (s *Service) handleVersionedAttestationsError(ctx context.Context, - submitter eth2client.VersionedAttestationsSubmitter, - err error, -) error { - serverType, _ := s.serviceInfo(ctx, submitter) - switch { - case serverType == "lighthouse" && strings.Contains(err.Error(), "PriorAttestationKnown"): - // Lighthouse rejects duplicate attestations. It is possible that an attestation we sent - // to another node already propagated to this node, so ignore the error. - s.log.Trace().Msg("Lighthouse node already knows about attestation; ignored") - // Not an error as far as we are concerned, so clear it. - err = nil - case serverType == "lighthouse" && strings.Contains(err.Error(), "UnknownHeadBlock"): - // Lighthouse rejects an attestation for a block that is not its current head. It is possible - // that the node is just behind, and we can't do anything about it anyway at this point having - // already signed an attestation for this slot, so ignore the error. - s.log.Debug().Err(err).Msg("Lighthouse node does not know head block; rejected") - // Not an error as far as we are concerned, so clear it. - err = nil - case serverType == "nimbus" && strings.Contains(err.Error(), "Attempt to send attestation for unknown target"): - // Nimbus rejects an attestation for a block when it does not know the target. It is possible - // that the node is just behind, and we can't do anything about it anyway at this point having - // already signed an attestation for this slot, so ignore the error. - s.log.Debug().Err(err).Msg("Nimbus node does not know target block; rejected") - // Not an error as far as we are concerned, so clear it. - err = nil - } - - return err -} diff --git a/services/submitter/null/service.go b/services/submitter/null/service.go index abd7c52b..4c3e8e24 100644 --- a/services/submitter/null/service.go +++ b/services/submitter/null/service.go @@ -65,27 +65,11 @@ func (s *Service) SubmitProposal(_ context.Context, proposal *api.VersionedSigne } // SubmitAttestations submits multiple attestations. -func (s *Service) SubmitAttestations(_ context.Context, attestations []*phase0.Attestation) error { - if len(attestations) == 0 { +func (s *Service) SubmitAttestations(_ context.Context, opts *api.SubmitAttestationsOpts) error { + if opts == nil || len(opts.Attestations) == 0 { return errors.New("no attestations supplied") } - - if e := s.log.Trace(); e.Enabled() { - data, err := json.Marshal(attestations) - if err == nil { - e.Str("attestations", string(data)).Msg("Not submitting attestations") - } - } - - return nil -} - -// SubmitVersionedAttestations submits multiple attestations. -func (s *Service) SubmitVersionedAttestations(_ context.Context, opts *api.SubmitAttestationsOpts) error { attestations := opts.Attestations - if len(attestations) == 0 { - return errors.New("no attestations supplied") - } if e := s.log.Trace(); e.Enabled() { data, err := json.Marshal(attestations) diff --git a/services/submitter/service.go b/services/submitter/service.go index 1399aa52..21810fcf 100644 --- a/services/submitter/service.go +++ b/services/submitter/service.go @@ -28,13 +28,7 @@ type Service interface{} // AttestationsSubmitter is the interface for a submitter of attestations. type AttestationsSubmitter interface { // SubmitAttestations submits multiple attestations. - SubmitAttestations(ctx context.Context, attestations []*phase0.Attestation) error -} - -// VersionedAttestationsSubmitter is the interface for a submitter of versioned attestations. -type VersionedAttestationsSubmitter interface { - // SubmitVersionedAttestations submits multiple versioned attestations. - SubmitVersionedAttestations(ctx context.Context, opts *api.SubmitAttestationsOpts) error + SubmitAttestations(ctx context.Context, opts *api.SubmitAttestationsOpts) error } // ProposalSubmitter is the interface for a submitter of proposals.