From 4d9779df4b7c4fdc06d2ff609d7123173e16b632 Mon Sep 17 00:00:00 2001 From: Jim McDonald Date: Sun, 12 Nov 2023 21:35:31 +0000 Subject: [PATCH] Update dependencies. --- .golangci.yml | 3 + clients.go | 4 +- go.mod | 91 ++++---- go.sum | 202 +++++++++--------- main.go | 11 +- services/beaconcommittees/standard/handler.go | 6 +- services/blocks/standard/handler.go | 27 ++- services/chaindb/postgresql/forkschedule.go | 8 +- .../chaindb/postgresql/forkschedule_test.go | 4 +- services/chaindb/postgresql/genesis.go | 23 +- services/chaindb/postgresql/spec.go | 19 +- services/chaindb/postgresql/spec_test.go | 5 +- services/chaindb/postgresql/upgrader.go | 1 + services/chaindb/types.go | 1 + services/chaintime/standard/parameters.go | 12 +- services/chaintime/standard/service.go | 63 +++++- services/chaintime/standard/service_test.go | 16 +- services/finalizer/standard/handler.go | 31 ++- .../standard/handler_internal_test.go | 2 +- services/finalizer/standard/service.go | 14 +- services/finalizer/standard/service_test.go | 2 +- services/proposerduties/standard/handler.go | 6 +- services/spec/standard/service.go | 10 +- services/summarizer/standard/handler.go | 15 +- services/summarizer/standard/metadata.go | 1 + services/summarizer/standard/prune.go | 2 +- services/summarizer/standard/service.go | 16 +- services/summarizer/standard/service_test.go | 2 +- services/synccommittees/standard/handler.go | 6 +- .../synccommittees/standard/parameters.go | 4 +- services/synccommittees/standard/service.go | 9 +- services/validators/standard/handler.go | 12 +- testing/mock/eth2client.go | 63 ++++-- 33 files changed, 440 insertions(+), 251 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 8bbe9bf..5ab0fd6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -147,6 +147,7 @@ linters: - golint - gomnd - ifshort + - inamedparam - interfacer - ireturn - lll @@ -156,9 +157,11 @@ linters: - nilnil - nlreturn - nosnakecase + - perfsprint - scopelint - structcheck - varcheck - varnamelen - wrapcheck - wsl + - zerologlint diff --git a/clients.go b/clients.go index f1f7153..d045b61 100644 --- a/clients.go +++ b/clients.go @@ -59,8 +59,8 @@ func fetchClient(ctx context.Context, address string) (eth2client.Service, error } func confirmClientInterfaces(client eth2client.Service) error { - if _, isProvider := client.(eth2client.GenesisTimeProvider); !isProvider { - return errors.New("client is not a GenesisTimeProvider") + if _, isProvider := client.(eth2client.GenesisProvider); !isProvider { + return errors.New("client is not a GenesisProvider") } if _, isProvider := client.(eth2client.SpecProvider); !isProvider { return errors.New("client is not a SpecProvider") diff --git a/go.mod b/go.mod index 6cba3ab..ee19704 100644 --- a/go.mod +++ b/go.mod @@ -3,55 +3,55 @@ module github.com/wealdtech/chaind go 1.20 require ( - github.com/attestantio/go-eth2-client v0.18.0 - github.com/aws/aws-sdk-go v1.44.298 + github.com/attestantio/go-eth2-client v0.19.5 + github.com/aws/aws-sdk-go v1.47.9 github.com/jackc/pgtype v1.14.0 github.com/jackc/pgx/v4 v4.18.1 github.com/mitchellh/go-homedir v1.1.0 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.16.0 + github.com/prometheus/client_golang v1.17.0 github.com/prysmaticlabs/go-bitfield v0.0.0-20210809151128-385d8c5e3fb7 - github.com/rs/zerolog v1.29.1 + github.com/rs/zerolog v1.31.0 github.com/sasha-s/go-deadlock v0.3.1 github.com/shopspring/decimal v1.3.1 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.16.0 + github.com/spf13/viper v1.17.0 github.com/stretchr/testify v1.8.4 github.com/wealdtech/go-majordomo v1.1.1 - go.opentelemetry.io/otel v1.16.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 - go.opentelemetry.io/otel/sdk v1.16.0 - go.opentelemetry.io/otel/trace v1.16.0 + go.opentelemetry.io/otel v1.20.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 + go.opentelemetry.io/otel/sdk v1.20.0 + go.opentelemetry.io/otel/trace v1.20.0 go.uber.org/atomic v1.11.0 - golang.org/x/sync v0.3.0 - google.golang.org/grpc v1.56.2 + golang.org/x/sync v0.5.0 + google.golang.org/grpc v1.59.0 ) require ( - cloud.google.com/go/compute v1.19.1 // indirect + cloud.google.com/go/compute v1.23.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/secretmanager v1.10.0 // indirect + cloud.google.com/go/iam v1.1.1 // indirect + cloud.google.com/go/secretmanager v1.11.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/fatih/color v1.14.1 // indirect github.com/ferranbt/fastssz v0.1.3 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/goccy/go-yaml v1.9.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/google/s2a-go v0.1.3 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.8.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/holiman/uint256 v1.2.2 // indirect + github.com/huandu/go-clone v1.6.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.14.0 // indirect github.com/jackc/pgio v1.0.0 // indirect @@ -63,35 +63,40 @@ require ( github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/minio/sha256-simd v1.0.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.11.1 // indirect github.com/r3labs/sse/v2 v2.10.0 // indirect - github.com/spf13/afero v1.9.5 // indirect + github.com/sagikazarmark/locafero v0.3.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.10.0 // indirect github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect - go.opentelemetry.io/otel/metric v1.16.0 // indirect - go.opentelemetry.io/proto/otlp v0.19.0 // indirect - golang.org/x/crypto v0.10.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.7.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect + go.opentelemetry.io/otel/metric v1.20.0 // indirect + go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.uber.org/multierr v1.9.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/oauth2 v0.12.0 // indirect + golang.org/x/sys v0.14.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.122.0 // indirect + google.golang.org/api v0.143.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 47c4575..3010e7a 100644 --- a/go.sum +++ b/go.sum @@ -32,7 +32,7 @@ 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.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= +cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o= 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= @@ -45,23 +45,22 @@ 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 v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= 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 v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= +cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= +cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= 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.10.0 h1:pu03bha7ukxF8otyPKTFdDz+rr9sE3YauS5PliDXK60= -cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= +cloud.google.com/go/secretmanager v1.11.1 h1:cLTCwAjFh9fKvU6F13Y4L9vPcx9yiWPyWXE4+zkuEQs= +cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= 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= @@ -76,11 +75,11 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/attestantio/go-eth2-client v0.18.0 h1:W8/d6Fa0SvgwO6ybcEwBiRZP1yaUCq7JlvMHHAx3O6Q= -github.com/attestantio/go-eth2-client v0.18.0/go.mod h1:KSVlZSW1A3jUg5H8O89DLtqxgJprRfTtI7k89fLdhu0= +github.com/attestantio/go-eth2-client v0.19.5 h1:4V+vhXsCYji5jWrlONbr03GV7qoLRdzq96dLgXaqmek= +github.com/attestantio/go-eth2-client v0.19.5/go.mod h1:mZve1kV9Ctj0I1HH9gdg+MnI8lZ+Cb2EktEtOYrBlsM= github.com/aws/aws-sdk-go v1.44.81/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.298 h1:5qTxdubgV7PptZJmp/2qDwD2JL187ePL7VOxsSh1i3g= -github.com/aws/aws-sdk-go v1.44.298/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.47.9 h1:rarTsos0mA16q+huicGx0e560aYRtOucV5z2Mw23JRY= +github.com/aws/aws-sdk-go v1.47.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= 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/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= @@ -111,8 +110,9 @@ github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1 github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -124,8 +124,8 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. 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.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/ferranbt/fastssz v0.1.3 h1:ZI+z3JH05h4kgmFXdHuR1aWYsgrg7o+Fw7/NCzM16Mo= github.com/ferranbt/fastssz v0.1.3/go.mod h1:0Y9TEd/9XuFlh7mskMPfXiI2Dkw4Ddg9EyXt1W7MRvE= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= @@ -138,8 +138,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/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= @@ -156,8 +156,7 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -209,8 +208,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -231,14 +229,14 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.3 h1:FAgZmpLl/SXurPEZyCMPBIiiYeTbqfjlbdnCNTAkbGE= -github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.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.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= +github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= 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= @@ -246,20 +244,23 @@ github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0 github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.8.0 h1:UBtEZqx1bjXtOQ5BVTkuYghXrr3N4V123VKJK67vJZc= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= 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/holiman/uint256 v1.2.2 h1:TXKcSGc2WaxPD2+bmzAsVthL4+pEN0YwXcL5qED83vk= github.com/holiman/uint256 v1.2.2/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/go-clone v1.6.0 h1:HMo5uvg4wgfiy5FoGOqlFLQED/VGRm2D9Pi8g1FXPGc= +github.com/huandu/go-clone v1.6.0/go.mod h1:ReGivhG6op3GYr+UY3lS6mxjKp7MIGTknuU5TbTVaXE= github.com/huandu/go-clone/generic v1.6.0 h1:Wgmt/fUZ28r16F2Y3APotFD59sHk1p78K0XLdbUYN5U= 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= @@ -343,7 +344,6 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/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= @@ -351,8 +351,9 @@ github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 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 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= @@ -361,25 +362,26 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +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.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/prysmaticlabs/go-bitfield v0.0.0-20210809151128-385d8c5e3fb7 h1:0tVE4tdWQK9ZpYygoV7+vS6QkDvQVySboMVEIxBJmXw= github.com/prysmaticlabs/go-bitfield v0.0.0-20210809151128-385d8c5e3fb7/go.mod h1:wmuf/mdK4VMD+jA9ThwcUKjg3a2XWM9cVfFYjDyY4j4= github.com/r3labs/sse/v2 v2.10.0 h1:hFEkLLFY4LDifoHdiCN/LlGBAdVJYsANaLqNYa1l/v0= @@ -389,12 +391,16 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= +github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= +github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= +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/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -404,17 +410,17 @@ github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5g github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= +github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= +github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -429,11 +435,10 @@ 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.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/umbracle/gohashtree v0.0.2-alpha.0.20230207094856-5b775a815c10 h1:CQh33pStIp/E30b7TxDlXfM0145bn2e8boI30IxAhTg= github.com/wealdtech/go-majordomo v1.1.1 h1:o+vS/akiT7zuufU7H+A6Cp52qbkjzaaMZlgwm/rciDk= github.com/wealdtech/go-majordomo v1.1.1/go.mod h1:qEuabaXiE3bazGgcTE4WIWYUXlLjHkwh3jGLmC1NOBs= @@ -453,33 +458,33 @@ 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/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0/go.mod h1:JgXSGah17croqhJfhByOLVY719k1emAXC8MVhCIJlRs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0/go.mod h1:I33vtIe0sR96wfrUcilIzLoA3mLHhRmz9S9Te0S3gDo= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= -go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= -go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= +go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= +go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= +go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= +go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -496,11 +501,10 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -511,6 +515,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-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= 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= @@ -585,10 +591,9 @@ golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -610,8 +615,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.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= 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= @@ -625,8 +630,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -701,14 +706,14 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc 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.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.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.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -719,11 +724,9 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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= @@ -838,8 +841,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.122.0 h1:zDobeejm3E7pEG1mNHvdxvjs5XJoCMzyNH+CmwL94Es= -google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= +google.golang.org/api v0.143.0 h1:o8cekTkqhywkbZT6p1UHJPZ9+9uuCAJs/KYomxZB8fA= +google.golang.org/api v0.143.0/go.mod h1:FoX9DO9hT7DLNn97OuoZAGSDuNAXdJRuGK98rSUgurk= 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= @@ -932,8 +935,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-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb h1:XFBgcDwm7irdHTbz4Zk2h7Mh+eis4nfJEFQFYzJzuIA= +google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 h1:N3bU/SQDCDyD6R528GJ/PwW9KjYcJA3dgyH+MovAkIM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= 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= @@ -960,15 +967,14 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= 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.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= 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= @@ -985,8 +991,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.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/main.go b/main.go index 209524a..6ef6b56 100644 --- a/main.go +++ b/main.go @@ -30,6 +30,7 @@ import ( "time" eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" homedir "github.com/mitchellh/go-homedir" "github.com/pkg/errors" zerologger "github.com/rs/zerolog/log" @@ -60,7 +61,7 @@ import ( ) // ReleaseVersion is the release version for the code. -var ReleaseVersion = "0.7.6" +var ReleaseVersion = "0.7.7-dev" func main() { os.Exit(main2()) @@ -301,7 +302,7 @@ func startServices(ctx context.Context, monitor metrics.Service) error { log.Trace().Msg("Starting chain time service") chainTime, err := standardchaintime.New(ctx, standardchaintime.WithLogLevel(util.LogLevel("chaintime")), - standardchaintime.WithGenesisTimeProvider(eth2Client.(eth2client.GenesisTimeProvider)), + standardchaintime.WithGenesisProvider(eth2Client.(eth2client.GenesisProvider)), standardchaintime.WithSpecProvider(eth2Client.(eth2client.SpecProvider)), standardchaintime.WithForkScheduleProvider(eth2Client.(eth2client.ForkScheduleProvider)), ) @@ -393,12 +394,14 @@ func startServices(ctx context.Context, monitor metrics.Service) error { func waitForNodeSync(ctx context.Context, eth2Client eth2client.Service) { for { - syncState, err := eth2Client.(eth2client.NodeSyncingProvider).NodeSyncing(ctx) + syncStateResponse, err := eth2Client.(eth2client.NodeSyncingProvider).NodeSyncing(ctx, &api.NodeSyncingOpts{}) if err != nil { log.Debug().Err(err).Msg("Failed to obtain node sync state; will re-test in 1 minute") time.Sleep(time.Minute) continue } + syncState := syncStateResponse.Data + if syncState == nil { log.Debug().Msg("No node sync state; will re-test in 1 minute") time.Sleep(time.Minute) @@ -743,7 +746,7 @@ func startSyncCommittees( standardsynccommittees.WithETH2Client(eth2Client), standardsynccommittees.WithChainTime(chainTime), standardsynccommittees.WithChainDB(chainDB), - standardsynccommittees.WithSpecProvider(chainDB.(eth2client.SpecProvider)), + standardsynccommittees.WithSpecProvider(chainDB.(chaindb.ChainSpecProvider)), standardsynccommittees.WithStartPeriod(viper.GetInt64("sync-committees.start-period")), ) if err != nil { diff --git a/services/beaconcommittees/standard/handler.go b/services/beaconcommittees/standard/handler.go index e4d34cd..4554ad7 100644 --- a/services/beaconcommittees/standard/handler.go +++ b/services/beaconcommittees/standard/handler.go @@ -18,6 +18,7 @@ import ( "fmt" eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/pkg/errors" "github.com/wealdtech/chaind/services/chaindb" @@ -124,10 +125,13 @@ func (s *Service) updateBeaconCommitteesForEpoch(ctx context.Context, epoch phas defer span.End() log.Trace().Uint64("epoch", uint64(epoch)).Msg("Updating beacon committees") - beaconCommittees, err := s.eth2Client.(eth2client.BeaconCommitteesProvider).BeaconCommittees(ctx, fmt.Sprintf("%d", s.chainTime.FirstSlotOfEpoch(epoch))) + beaconCommitteesResponse, err := s.eth2Client.(eth2client.BeaconCommitteesProvider).BeaconCommittees(ctx, &api.BeaconCommitteesOpts{ + State: fmt.Sprintf("%d", s.chainTime.FirstSlotOfEpoch(epoch)), + }) if err != nil { return errors.Wrap(err, "failed to fetch beacon committees") } + beaconCommittees := beaconCommitteesResponse.Data for _, beaconCommittee := range beaconCommittees { dbBeaconCommittee := &chaindb.BeaconCommittee{ diff --git a/services/blocks/standard/handler.go b/services/blocks/standard/handler.go index dc3664b..4e1cf3c 100644 --- a/services/blocks/standard/handler.go +++ b/services/blocks/standard/handler.go @@ -18,8 +18,10 @@ import ( "context" "fmt" "math/big" + "net/http" eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/altair" "github.com/attestantio/go-eth2-client/spec/bellatrix" @@ -145,17 +147,22 @@ func (s *Service) updateBlockForSlot(ctx context.Context, slot phase0.Slot) erro span.AddEvent("Checked for block") log.Trace().Msg("Updating block for slot") - signedBlock, err := s.eth2Client.(eth2client.SignedBeaconBlockProvider).SignedBeaconBlock(ctx, fmt.Sprintf("%d", slot)) + signedBlockResponse, err := s.eth2Client.(eth2client.SignedBeaconBlockProvider).SignedBeaconBlock(ctx, &api.SignedBeaconBlockOpts{ + Block: fmt.Sprintf("%d", slot), + }) if err != nil { + var apiErr *api.Error + if errors.As(err, &apiErr) && apiErr.StatusCode == http.StatusNotFound { + // Possible that this is a missed slot, don't error. + log.Debug().Msg("No beacon block obtained for slot") + return nil + } + return errors.Wrap(err, "failed to obtain beacon block for slot") } - if signedBlock == nil { - log.Debug().Msg("No beacon block obtained for slot") - return nil - } span.AddEvent("Obtained block") - return s.OnBlock(ctx, signedBlock) + return s.OnBlock(ctx, signedBlockResponse.Data) } // OnBlock handles a block. @@ -857,7 +864,8 @@ func (*Service) dbBlockDeneb( BaseFeePerGas: block.Body.ExecutionPayload.BaseFeePerGas.ToBig(), BlockHash: block.Body.ExecutionPayload.BlockHash, Withdrawals: withdrawals, - ExcessDataGas: block.Body.ExecutionPayload.ExcessDataGas, + BlobGasUsed: block.Body.ExecutionPayload.BlobGasUsed, + ExcessDataGas: block.Body.ExecutionPayload.ExcessBlobGas, }, BLSToExecutionChanges: blsToExecutionChanges, } @@ -1109,10 +1117,13 @@ func (s *Service) beaconCommittee(ctx context.Context, return beaconCommittee, nil } // Try to fetch from the chain. - chainBeaconCommittees, err := s.eth2Client.(eth2client.BeaconCommitteesProvider).BeaconCommittees(ctx, fmt.Sprintf("%d", slot)) + chainBeaconCommitteesResponse, err := s.eth2Client.(eth2client.BeaconCommitteesProvider).BeaconCommittees(ctx, &api.BeaconCommitteesOpts{ + State: fmt.Sprintf("%d", slot), + }) if err != nil { return nil, errors.Wrap(err, "failed to fetch beacon committees") } + chainBeaconCommittees := chainBeaconCommitteesResponse.Data log.Debug().Uint64("slot", uint64(slot)).Msg("Obtained beacon committees from API") for _, chainBeaconCommittee := range chainBeaconCommittees { diff --git a/services/chaindb/postgresql/forkschedule.go b/services/chaindb/postgresql/forkschedule.go index cc9c37e..dfeee34 100644 --- a/services/chaindb/postgresql/forkschedule.go +++ b/services/chaindb/postgresql/forkschedule.go @@ -16,6 +16,7 @@ package postgresql import ( "context" + "github.com/attestantio/go-eth2-client/api" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/pkg/errors" "go.opentelemetry.io/otel" @@ -60,7 +61,7 @@ VALUES($1,$2,$3) } // ForkSchedule provides details of past and future changes in the chain's fork version. -func (s *Service) ForkSchedule(ctx context.Context) ([]*phase0.Fork, error) { +func (s *Service) ForkSchedule(ctx context.Context, _ *api.ForkScheduleOpts) (*api.Response[[]*phase0.Fork], error) { ctx, span := otel.Tracer("wealdtech.chaind.services.chaindb.postgresql").Start(ctx, "ForkSchedule") defer span.End() @@ -104,5 +105,8 @@ ORDER BY f_epoch schedule = append(schedule, fork) } - return schedule, nil + return &api.Response[[]*phase0.Fork]{ + Data: schedule, + Metadata: make(map[string]any), + }, nil } diff --git a/services/chaindb/postgresql/forkschedule_test.go b/services/chaindb/postgresql/forkschedule_test.go index 22a79a9..4df709e 100644 --- a/services/chaindb/postgresql/forkschedule_test.go +++ b/services/chaindb/postgresql/forkschedule_test.go @@ -19,6 +19,7 @@ import ( "testing" eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" "github.com/rs/zerolog" "github.com/stretchr/testify/require" "github.com/wealdtech/chaind/services/chaindb" @@ -41,8 +42,9 @@ func TestForkSchedule(t *testing.T) { require.True(t, isProvider) // Ensure the value. - schedule, err := s.(eth2client.ForkScheduleProvider).ForkSchedule(ctx) + scheduleResponse, err := s.(eth2client.ForkScheduleProvider).ForkSchedule(ctx, &api.ForkScheduleOpts{}) require.NoError(t, err) + schedule := scheduleResponse.Data require.True(t, len(schedule) > 0) } diff --git a/services/chaindb/postgresql/genesis.go b/services/chaindb/postgresql/genesis.go index 0855a2d..fc3fdd2 100644 --- a/services/chaindb/postgresql/genesis.go +++ b/services/chaindb/postgresql/genesis.go @@ -17,13 +17,14 @@ import ( "context" "time" - api "github.com/attestantio/go-eth2-client/api/v1" + "github.com/attestantio/go-eth2-client/api" + apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/pkg/errors" "go.opentelemetry.io/otel" ) // SetGenesis sets the genesis information. -func (s *Service) SetGenesis(ctx context.Context, genesis *api.Genesis) error { +func (s *Service) SetGenesis(ctx context.Context, genesis *apiv1.Genesis) error { ctx, span := otel.Tracer("wealdtech.chaind.services.chaindb.postgresql").Start(ctx, "SetGenesis") defer span.End() @@ -51,7 +52,12 @@ func (s *Service) SetGenesis(ctx context.Context, genesis *api.Genesis) error { } // Genesis fetches genesis values. -func (s *Service) Genesis(ctx context.Context) (*api.Genesis, error) { +func (s *Service) Genesis(ctx context.Context, + _ *api.GenesisOpts, +) ( + *api.Response[*apiv1.Genesis], + error, +) { ctx, span := otel.Tracer("wealdtech.chaind.services.chaindb.postgresql").Start(ctx, "Genesis") defer span.End() @@ -65,7 +71,7 @@ func (s *Service) Genesis(ctx context.Context) (*api.Genesis, error) { tx = s.tx(ctx) } - genesis := &api.Genesis{} + genesis := &apiv1.Genesis{} var genesisValidatorsRoot []byte var genesisForkVersion []byte err := tx.QueryRow(ctx, ` @@ -84,7 +90,10 @@ func (s *Service) Genesis(ctx context.Context) (*api.Genesis, error) { copy(genesis.GenesisValidatorsRoot[:], genesisValidatorsRoot) copy(genesis.GenesisForkVersion[:], genesisForkVersion) - return genesis, nil + return &api.Response[*apiv1.Genesis]{ + Data: genesis, + Metadata: make(map[string]any), + }, nil } // GenesisTime provides the genesis time of the chain. @@ -92,9 +101,9 @@ func (s *Service) GenesisTime(ctx context.Context) (time.Time, error) { ctx, span := otel.Tracer("wealdtech.chaind.services.chaindb.postgresql").Start(ctx, "GenesisTime") defer span.End() - genesis, err := s.Genesis(ctx) + genesisResponse, err := s.Genesis(ctx, &api.GenesisOpts{}) if err != nil { return time.Time{}, errors.Wrap(err, "failed to obtain genesis") } - return genesis.GenesisTime, nil + return genesisResponse.Data.GenesisTime, nil } diff --git a/services/chaindb/postgresql/spec.go b/services/chaindb/postgresql/spec.go index af641fa..cdd0b7b 100644 --- a/services/chaindb/postgresql/spec.go +++ b/services/chaindb/postgresql/spec.go @@ -15,9 +15,24 @@ package postgresql import ( "context" + + "github.com/attestantio/go-eth2-client/api" ) // Spec provides the spec information of the chain. -func (s *Service) Spec(ctx context.Context) (map[string]interface{}, error) { - return s.ChainSpec(ctx) +func (s *Service) Spec(ctx context.Context, + _ *api.SpecOpts, +) ( + *api.Response[map[string]any], + error, +) { + res, err := s.ChainSpec(ctx) + if err != nil { + return nil, err + } + + return &api.Response[map[string]any]{ + Data: res, + Metadata: make(map[string]any), + }, nil } diff --git a/services/chaindb/postgresql/spec_test.go b/services/chaindb/postgresql/spec_test.go index 7ef6de8..beeab84 100644 --- a/services/chaindb/postgresql/spec_test.go +++ b/services/chaindb/postgresql/spec_test.go @@ -19,6 +19,7 @@ import ( "testing" eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" "github.com/rs/zerolog" "github.com/stretchr/testify/require" "github.com/wealdtech/chaind/services/chaindb" @@ -41,8 +42,8 @@ func TestSpec(t *testing.T) { require.True(t, isProvider) // Ensure the value. - spec, err := s.(eth2client.SpecProvider).Spec(ctx) + specResponse, err := s.(eth2client.SpecProvider).Spec(ctx, &api.SpecOpts{}) require.NoError(t, err) // This is hard-coded to the documented value; may fail on non-standard chains. - require.Equal(t, uint64(32), spec["SLOTS_PER_EPOCH"]) + require.Equal(t, uint64(32), specResponse.Data["SLOTS_PER_EPOCH"]) } diff --git a/services/chaindb/postgresql/upgrader.go b/services/chaindb/postgresql/upgrader.go index 1349f93..ca89b1f 100644 --- a/services/chaindb/postgresql/upgrader.go +++ b/services/chaindb/postgresql/upgrader.go @@ -1145,6 +1145,7 @@ CREATE TABLE t_validator_day_summaries ( ,f_attestations_inclusion_delay FLOAT(4) NOT NULL ,f_sync_committee_messages INTEGER NOT NULL ,f_sync_committee_messages_included INTEGER NOT NULL + ,f_withdrawals BIGINT NOT NULL ); CREATE UNIQUE INDEX IF NOT EXISTS i_validator_day_summaries_1 ON t_validator_day_summaries(f_validator_index, f_start_timestamp); CREATE INDEX IF NOT EXISTS i_validator_day_summaries_2 ON t_validator_day_summaries(f_start_timestamp); diff --git a/services/chaindb/types.go b/services/chaindb/types.go index be2d16f..99833a3 100644 --- a/services/chaindb/types.go +++ b/services/chaindb/types.go @@ -297,6 +297,7 @@ type ExecutionPayload struct { BlockHash [32]byte // No transactions, they are stored in execd. Withdrawals []*Withdrawal + BlobGasUsed uint64 ExcessDataGas uint64 } diff --git a/services/chaintime/standard/parameters.go b/services/chaintime/standard/parameters.go index 5ea78c1..7aace4c 100644 --- a/services/chaintime/standard/parameters.go +++ b/services/chaintime/standard/parameters.go @@ -21,7 +21,7 @@ import ( type parameters struct { logLevel zerolog.Level - genesisTimeProvider eth2client.GenesisTimeProvider + genesisProvider eth2client.GenesisProvider specProvider eth2client.SpecProvider forkScheduleProvider eth2client.ForkScheduleProvider } @@ -44,10 +44,10 @@ func WithLogLevel(logLevel zerolog.Level) Parameter { }) } -// WithGenesisTimeProvider sets the genesis time provider. -func WithGenesisTimeProvider(provider eth2client.GenesisTimeProvider) Parameter { +// WithGenesisProvider sets the genesis provider. +func WithGenesisProvider(provider eth2client.GenesisProvider) Parameter { return parameterFunc(func(p *parameters) { - p.genesisTimeProvider = provider + p.genesisProvider = provider }) } @@ -79,8 +79,8 @@ func parseAndCheckParameters(params ...Parameter) (*parameters, error) { if parameters.specProvider == nil { return nil, errors.New("no spec provider specified") } - if parameters.genesisTimeProvider == nil { - return nil, errors.New("no genesis time provider specified") + if parameters.genesisProvider == nil { + return nil, errors.New("no genesis provider specified") } if parameters.forkScheduleProvider == nil { return nil, errors.New("no fork schedule provider specified") diff --git a/services/chaintime/standard/service.go b/services/chaintime/standard/service.go index 3ea1239..3f14e50 100644 --- a/services/chaintime/standard/service.go +++ b/services/chaintime/standard/service.go @@ -18,6 +18,7 @@ import ( "time" eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/pkg/errors" "github.com/rs/zerolog" @@ -33,6 +34,7 @@ type Service struct { altairForkEpoch phase0.Epoch bellatrixForkEpoch phase0.Epoch capellaForkEpoch phase0.Epoch + denebForkEpoch phase0.Epoch } // module-wide log. @@ -48,16 +50,18 @@ func New(ctx context.Context, params ...Parameter) (*Service, error) { // Set logging. log = zerologger.With().Str("service", "chaintime").Str("impl", "standard").Logger().Level(parameters.logLevel) - genesisTime, err := parameters.genesisTimeProvider.GenesisTime(ctx) + genesisResponse, err := parameters.genesisProvider.Genesis(ctx, &api.GenesisOpts{}) if err != nil { - return nil, errors.Wrap(err, "failed to obtain genesis time") + return nil, errors.Wrap(err, "failed to obtain genesis") } + genesisTime := genesisResponse.Data.GenesisTime log.Trace().Time("genesis_time", genesisTime).Msg("Obtained genesis time") - spec, err := parameters.specProvider.Spec(ctx) + specResponse, err := parameters.specProvider.Spec(ctx, &api.SpecOpts{}) if err != nil { return nil, errors.Wrap(err, "failed to obtain spec") } + spec := specResponse.Data tmp, exists := spec["SECONDS_PER_SLOT"] if !exists { @@ -92,12 +96,14 @@ func New(ctx context.Context, params ...Parameter) (*Service, error) { altairForkEpoch = 0xffffffffffffffff } log.Trace().Uint64("epoch", uint64(altairForkEpoch)).Msg("Obtained Altair fork epoch") + bellatrixForkEpoch, err := fetchBellatrixForkEpoch(ctx, parameters.specProvider) if err != nil { // Set to far future epoch. bellatrixForkEpoch = 0xffffffffffffffff } log.Trace().Uint64("epoch", uint64(bellatrixForkEpoch)).Msg("Obtained Bellatrix fork epoch") + capellaForkEpoch, err := fetchCapellaForkEpoch(ctx, parameters.specProvider) if err != nil { // Set to far future epoch. @@ -105,6 +111,13 @@ func New(ctx context.Context, params ...Parameter) (*Service, error) { } log.Trace().Uint64("epoch", uint64(capellaForkEpoch)).Msg("Obtained Capella fork epoch") + denebForkEpoch, err := fetchDenebForkEpoch(ctx, parameters.specProvider) + if err != nil { + // Set to far future epoch. + denebForkEpoch = 0xffffffffffffffff + } + log.Trace().Uint64("epoch", uint64(denebForkEpoch)).Msg("Obtained Deneb fork epoch") + s := &Service{ genesisTime: genesisTime, slotDuration: slotDuration, @@ -113,6 +126,7 @@ func New(ctx context.Context, params ...Parameter) (*Service, error) { altairForkEpoch: altairForkEpoch, bellatrixForkEpoch: bellatrixForkEpoch, capellaForkEpoch: capellaForkEpoch, + denebForkEpoch: denebForkEpoch, } return s, nil @@ -231,10 +245,12 @@ func fetchAltairForkEpoch(ctx context.Context, error, ) { // Fetch the fork version. - spec, err := specProvider.Spec(ctx) + 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["ALTAIR_FORK_EPOCH"] if !exists { return 0, errors.New("altair fork version not known by chain") @@ -260,10 +276,12 @@ func fetchBellatrixForkEpoch(ctx context.Context, error, ) { // Fetch the fork version. - spec, err := specProvider.Spec(ctx) + 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["BELLATRIX_FORK_EPOCH"] if !exists { return 0, errors.New("bellatrix fork version not known by chain") @@ -289,10 +307,12 @@ func fetchCapellaForkEpoch(ctx context.Context, error, ) { // Fetch the fork version. - spec, err := specProvider.Spec(ctx) + 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["CAPELLA_FORK_EPOCH"] if !exists { return 0, errors.New("capella fork version not known by chain") @@ -305,3 +325,34 @@ func fetchCapellaForkEpoch(ctx context.Context, return phase0.Epoch(epoch), nil } + +// DenebInitialEpoch provides the epoch at which the Deneb hard fork takes place. +func (s *Service) DenebInitialEpoch() phase0.Epoch { + return s.denebForkEpoch +} + +func fetchDenebForkEpoch(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["DENEB_FORK_EPOCH"] + if !exists { + return 0, errors.New("deneb fork version not known by chain") + } + epoch, isEpoch := tmp.(uint64) + if !isEpoch { + //nolint:revive + return 0, errors.New("DENEB_FORK_EPOCH is not a uint64!") + } + + return phase0.Epoch(epoch), nil +} diff --git a/services/chaintime/standard/service_test.go b/services/chaintime/standard/service_test.go index 8d29c17..3279681 100644 --- a/services/chaintime/standard/service_test.go +++ b/services/chaintime/standard/service_test.go @@ -44,7 +44,7 @@ func TestService(t *testing.T) { }, } - mockGenesisTimeProvider := mock.NewGenesisTimeProvider(genesisTime) + mockGenesisProvider := mock.NewGenesisProvider(genesisTime) mockSpecProvider := mock.NewSpecProvider(slotDuration, slotsPerEpoch, epochsPerSyncCommitteePeriod) mockForkScheduleProvider := mock.NewForkScheduleProvider(forkSchedule) @@ -54,19 +54,19 @@ func TestService(t *testing.T) { err string }{ { - name: "GenesisTimeProviderMissing", + name: "GenesisProviderMissing", params: []standard.Parameter{ standard.WithLogLevel(zerolog.Disabled), standard.WithSpecProvider(mockSpecProvider), standard.WithForkScheduleProvider(mockForkScheduleProvider), }, - err: "problem with parameters: no genesis time provider specified", + err: "problem with parameters: no genesis provider specified", }, { name: "SpecProviderMissing", params: []standard.Parameter{ standard.WithLogLevel(zerolog.Disabled), - standard.WithGenesisTimeProvider(mockGenesisTimeProvider), + standard.WithGenesisProvider(mockGenesisProvider), standard.WithForkScheduleProvider(mockForkScheduleProvider), }, err: "problem with parameters: no spec provider specified", @@ -75,7 +75,7 @@ func TestService(t *testing.T) { name: "ForkScheduleProviderMissing", params: []standard.Parameter{ standard.WithLogLevel(zerolog.Disabled), - standard.WithGenesisTimeProvider(mockGenesisTimeProvider), + standard.WithGenesisProvider(mockGenesisProvider), standard.WithSpecProvider(mockSpecProvider), }, err: "problem with parameters: no fork schedule provider specified", @@ -84,7 +84,7 @@ func TestService(t *testing.T) { name: "Good", params: []standard.Parameter{ standard.WithLogLevel(zerolog.Disabled), - standard.WithGenesisTimeProvider(mockGenesisTimeProvider), + standard.WithGenesisProvider(mockGenesisProvider), standard.WithSpecProvider(mockSpecProvider), standard.WithForkScheduleProvider(mockForkScheduleProvider), }, @@ -121,11 +121,11 @@ func createService(genesisTime time.Time) (chaintime.Service, time.Duration, uin }, } - mockGenesisTimeProvider := mock.NewGenesisTimeProvider(genesisTime) + mockGenesisProvider := mock.NewGenesisProvider(genesisTime) mockSpecProvider := mock.NewSpecProvider(slotDuration, slotsPerEpoch, epochsPerSyncCommitteePeriod) mockForkScheduleProvider := mock.NewForkScheduleProvider(forkSchedule) s, err := standard.New(context.Background(), - standard.WithGenesisTimeProvider(mockGenesisTimeProvider), + standard.WithGenesisProvider(mockGenesisProvider), standard.WithSpecProvider(mockSpecProvider), standard.WithForkScheduleProvider(mockForkScheduleProvider), ) diff --git a/services/finalizer/standard/handler.go b/services/finalizer/standard/handler.go index d2f5b89..ed919f0 100644 --- a/services/finalizer/standard/handler.go +++ b/services/finalizer/standard/handler.go @@ -17,9 +17,11 @@ import ( "bytes" "context" "fmt" + "net/http" "time" eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/jackc/pgx/v4" @@ -135,12 +137,14 @@ func (s *Service) buildFinalityStack(ctx context.Context, break } - finality, err := s.eth2Client.(eth2client.FinalityProvider).Finality(ctx, fmt.Sprintf("%d", slot)) + finalityResponse, err := s.eth2Client.(eth2client.FinalityProvider).Finality(ctx, &api.FinalityOpts{ + State: fmt.Sprintf("%d", slot), + }) if err != nil { return nil, errors.Wrap(err, "failed to obtain finality for state") } - log.Trace().Uint64("slot", uint64(slot)).Uint64("justified_epoch", uint64(finality.Justified.Epoch)).Msg("Obtained finality") - item = finality.Justified + log.Trace().Uint64("slot", uint64(slot)).Uint64("justified_epoch", uint64(finalityResponse.Data.Justified.Epoch)).Msg("Obtained finality") + item = finalityResponse.Data.Justified } return stack, nil @@ -189,9 +193,7 @@ func (s *Service) updateCanonicalBlocks(ctx context.Context, root phase0.Root) e if err != nil { return errors.Wrap(err, "failed to obtain block") } - if block == nil { - return errors.New("missing canonical block") - } + log.Trace().Uint64("slot", uint64(block.Slot)).Msg("Canonicalizing up to slot") if err := s.canonicalizeBlocks(ctx, root, phase0.Slot(md.LatestCanonicalSlot)); err != nil { @@ -509,14 +511,21 @@ func (s *Service) fetchBlock(ctx context.Context, root phase0.Root) (*chaindb.Bl return nil, errors.Wrap(err, "failed to obtain block from provider") } // Not found in the database, try fetching it from the chain. - log.Debug().Str("block_root", fmt.Sprintf("%#x", root)).Msg("Failed to obtain block from provider; fetching from chain") - signedBlock, err := s.eth2Client.(eth2client.SignedBeaconBlockProvider).SignedBeaconBlock(ctx, fmt.Sprintf("%#x", root)) + log.Debug().Stringer("block_root", root).Msg("Failed to obtain block from provider; fetching from chain") + signedBlockResponse, err := s.eth2Client.(eth2client.SignedBeaconBlockProvider).SignedBeaconBlock(ctx, &api.SignedBeaconBlockOpts{ + Block: root.String(), + }) if err != nil { + var apiErr *api.Error + if errors.As(err, &apiErr) && apiErr.StatusCode == http.StatusNotFound { + // Possible that this is a missed slot, don't error. + log.Debug().Msg("No beacon block obtained for slot") + return nil, nil + } + return nil, errors.Wrap(err, "failed to obtain block from chain") } - if signedBlock == nil { - return nil, nil - } + signedBlock := signedBlockResponse.Data // We need to ensure the finalizer is not running ahead of the blocks service. To do so, we compare the slot of the block // we fetched with the highest known slot in the database. If our block is higher than that already stored it means that diff --git a/services/finalizer/standard/handler_internal_test.go b/services/finalizer/standard/handler_internal_test.go index df82fd9..ef54903 100644 --- a/services/finalizer/standard/handler_internal_test.go +++ b/services/finalizer/standard/handler_internal_test.go @@ -37,7 +37,7 @@ func TestUpdateAttestationHeadCorrect(t *testing.T) { require.NoError(t, err) chainTime, err := standardchaintime.New(ctx, - standardchaintime.WithGenesisTimeProvider(chainDB), + standardchaintime.WithGenesisProvider(chainDB), standardchaintime.WithSpecProvider(chainDB), standardchaintime.WithForkScheduleProvider(chainDB), ) diff --git a/services/finalizer/standard/service.go b/services/finalizer/standard/service.go index 80055dd..5c29912 100644 --- a/services/finalizer/standard/service.go +++ b/services/finalizer/standard/service.go @@ -1,4 +1,4 @@ -// Copyright © 2021, 2022 Weald Technology Trading. +// Copyright © 2021 - 2023 Weald Technology Trading. // 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 @@ -18,7 +18,8 @@ import ( "time" eth2client "github.com/attestantio/go-eth2-client" - api "github.com/attestantio/go-eth2-client/api/v1" + "github.com/attestantio/go-eth2-client/api" + apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/pkg/errors" "github.com/rs/zerolog" @@ -81,21 +82,24 @@ func New(ctx context.Context, params ...Parameter) (*Service, error) { } // Set up the handler for new finality checkpoint updates. - if err := s.eth2Client.(eth2client.EventsProvider).Events(ctx, []string{"finalized_checkpoint"}, func(event *api.Event) { + if err := s.eth2Client.(eth2client.EventsProvider).Events(ctx, []string{"finalized_checkpoint"}, func(event *apiv1.Event) { if event.Data == nil { // Happens when the channel shuts down, nothing to worry about. return } - eventData := event.Data.(*api.FinalizedCheckpointEvent) + eventData := event.Data.(*apiv1.FinalizedCheckpointEvent) log.Trace().Str("event", eventData.String()).Msg("Received event") // The finalizer event commonly occurs at the same time as the head event. Because they cannot both run at the same // time, we sleep for a bit here to allow that to process first. time.Sleep(4 * time.Second) - finality, err := s.eth2Client.(eth2client.FinalityProvider).Finality(ctx, "head") + finalityResponse, err := s.eth2Client.(eth2client.FinalityProvider).Finality(ctx, &api.FinalityOpts{ + State: "head", + }) if err != nil { log.Error().Err(err).Msg("Failed to obtain finality data") } + finality := finalityResponse.Data s.OnFinalityCheckpointReceived(ctx, finality) }); err != nil { diff --git a/services/finalizer/standard/service_test.go b/services/finalizer/standard/service_test.go index efa1c22..f266987 100644 --- a/services/finalizer/standard/service_test.go +++ b/services/finalizer/standard/service_test.go @@ -37,7 +37,7 @@ func TestService(t *testing.T) { require.NoError(t, err) chainTime, err := standardchaintime.New(ctx, - standardchaintime.WithGenesisTimeProvider(chainDB), + standardchaintime.WithGenesisProvider(chainDB), standardchaintime.WithSpecProvider(chainDB), standardchaintime.WithForkScheduleProvider(chainDB), ) diff --git a/services/proposerduties/standard/handler.go b/services/proposerduties/standard/handler.go index c261447..69cfcf5 100644 --- a/services/proposerduties/standard/handler.go +++ b/services/proposerduties/standard/handler.go @@ -17,6 +17,7 @@ import ( "context" eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/pkg/errors" "github.com/wealdtech/chaind/services/chaindb" @@ -58,10 +59,13 @@ func (s *Service) OnBeaconChainHeadUpdated( } func (s *Service) updateProposerDutiesForEpoch(ctx context.Context, epoch phase0.Epoch) error { - duties, err := s.eth2Client.(eth2client.ProposerDutiesProvider).ProposerDuties(ctx, epoch, nil) + dutiesResponse, err := s.eth2Client.(eth2client.ProposerDutiesProvider).ProposerDuties(ctx, &api.ProposerDutiesOpts{ + Epoch: epoch, + }) if err != nil { return errors.Wrap(err, "failed to fetch proposer duties") } + duties := dutiesResponse.Data log.Trace().Uint64("epoch", uint64(epoch)).Msg("Setting proposer duties") for _, duty := range duties { diff --git a/services/spec/standard/service.go b/services/spec/standard/service.go index ae2a87f..0536a3f 100644 --- a/services/spec/standard/service.go +++ b/services/spec/standard/service.go @@ -18,6 +18,7 @@ import ( "time" eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" "github.com/pkg/errors" "github.com/rs/zerolog" zerologger "github.com/rs/zerolog/log" @@ -125,10 +126,11 @@ func (s *Service) updateSpec(ctx context.Context) { func (s *Service) updateChainSpec(ctx context.Context) error { // Fetch the chain spec. - spec, err := s.eth2Client.(eth2client.SpecProvider).Spec(ctx) + specResponse, err := s.eth2Client.(eth2client.SpecProvider).Spec(ctx, &api.SpecOpts{}) if err != nil { return errors.Wrap(err, "failed to obtain chain spec") } + spec := specResponse.Data // Update the database. for k, v := range spec { @@ -141,10 +143,11 @@ func (s *Service) updateChainSpec(ctx context.Context) error { func (s *Service) updateGenesis(ctx context.Context) error { // Fetch genesis parameters. - genesis, err := s.eth2Client.(eth2client.GenesisProvider).Genesis(ctx) + genesisResponse, err := s.eth2Client.(eth2client.GenesisProvider).Genesis(ctx, &api.GenesisOpts{}) if err != nil { return errors.Wrap(err, "failed to obtain genesis") } + genesis := genesisResponse.Data // Update the database. if err := s.genesisSetter.SetGenesis(ctx, genesis); err != nil { @@ -156,10 +159,11 @@ func (s *Service) updateGenesis(ctx context.Context) error { func (s *Service) updateForkSchedule(ctx context.Context) error { // Fetch fork schedule. - schedule, err := s.eth2Client.(eth2client.ForkScheduleProvider).ForkSchedule(ctx) + scheduleResponse, err := s.eth2Client.(eth2client.ForkScheduleProvider).ForkSchedule(ctx, &api.ForkScheduleOpts{}) if err != nil { return errors.Wrap(err, "failed to obtain fork schedule") } + schedule := scheduleResponse.Data // Update the database. if err := s.forkScheduleSetter.SetForkSchedule(ctx, schedule); err != nil { diff --git a/services/summarizer/standard/handler.go b/services/summarizer/standard/handler.go index ad85846..1252a46 100644 --- a/services/summarizer/standard/handler.go +++ b/services/summarizer/standard/handler.go @@ -46,30 +46,31 @@ func (s *Service) OnFinalityUpdated( summaryEpoch := finalizedEpoch - 1 if err := s.summarizeEpochs(ctx, summaryEpoch); err != nil { - log.Warn().Err(err).Msg("Failed to update epochs") + log.Warn().Err(err).Msg("Failed to update epochs; finished handling finality checkpoint") return } if err := s.summarizeBlocks(ctx, summaryEpoch); err != nil { - log.Warn().Err(err).Msg("Failed to update blocks") + log.Warn().Err(err).Msg("Failed to update blocks; finished handling finality checkpoint") return } if err := s.summarizeValidators(ctx, summaryEpoch); err != nil { - log.Warn().Err(err).Msg("Failed to update validators") + log.Warn().Err(err).Msg("Failed to update validators; finished handling finality checkpoint") return } md, err := s.getMetadata(ctx) if err != nil { - log.Error().Err(err).Msg("Failed to obtain metadata for day summarizer") + log.Error().Err(err).Msg("Failed to obtain metadata for day summarizer; finished handling finality checkpoint") + return } if md.PeriodicValidatorRollups { if err := s.summarizeValidatorDays(ctx); err != nil { - log.Warn().Err(err).Msg("Failed to update validator days") + log.Warn().Err(err).Msg("Failed to update validator days; finished handling finality checkpoint") return } if err := s.prune(ctx, summaryEpoch); err != nil { - log.Warn().Err(err).Msg("Failed to prune summaries") + log.Warn().Err(err).Msg("Failed to prune summaries; finished handling finality checkpoint") return } } @@ -107,7 +108,7 @@ func (s *Service) summarizeEpochs(ctx context.Context, summaryEpoch phase0.Epoch return errors.Wrapf(err, "failed to update summary for epoch %d", epoch) } if !updated { - log.Debug().Uint64("epoch", uint64(epoch)).Msg("not enough data to update summary") + log.Debug().Uint64("epoch", uint64(epoch)).Msg("Not enough data to update summary") return nil } } diff --git a/services/summarizer/standard/metadata.go b/services/summarizer/standard/metadata.go index 777b2a2..222e89c 100644 --- a/services/summarizer/standard/metadata.go +++ b/services/summarizer/standard/metadata.go @@ -48,6 +48,7 @@ func (s *Service) getMetadata(ctx context.Context) (*metadata, error) { if err := json.Unmarshal(mdJSON, md); err != nil { return nil, errors.Wrap(err, "failed to unmarshal metadata") } + return md, nil } diff --git a/services/summarizer/standard/prune.go b/services/summarizer/standard/prune.go index 8ddf2bd..529ea76 100644 --- a/services/summarizer/standard/prune.go +++ b/services/summarizer/standard/prune.go @@ -63,7 +63,7 @@ func (s *Service) pruneBalances(ctx context.Context, summaryEpoch phase0.Epoch) } pruneEpoch := s.chainTime.TimestampToEpoch(pruneTime) - log.Trace().Stringer("retention", s.validatorEpochRetention).Time("summary_time", summaryTime).Time("summarized_time", summarizedTime).Time("prune_time", pruneTime).Uint64("prune_epoch", uint64(pruneEpoch)).Msg("Prune parameters for balances") + log.Trace().Stringer("retention", s.validatorBalanceRetention).Time("summary_time", summaryTime).Time("summarized_time", summarizedTime).Time("prune_time", pruneTime).Uint64("prune_epoch", uint64(pruneEpoch)).Msg("Prune parameters for balances") ctx, cancel, err := s.chainDB.BeginTx(ctx) if err != nil { diff --git a/services/summarizer/standard/service.go b/services/summarizer/standard/service.go index 3829ef7..2813753 100644 --- a/services/summarizer/standard/service.go +++ b/services/summarizer/standard/service.go @@ -18,6 +18,7 @@ import ( "math" eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/pkg/errors" "github.com/rs/zerolog" @@ -111,10 +112,11 @@ func New(ctx context.Context, params ...Parameter) (*Service, error) { return nil, errors.New("chain DB does not provide proposer slashings") } - spec, err := parameters.eth2Client.(eth2client.SpecProvider).Spec(ctx) + specResponse, err := parameters.eth2Client.(eth2client.SpecProvider).Spec(ctx, &api.SpecOpts{}) if err != nil { return nil, errors.Wrap(err, "failed to obtain spec") } + spec := specResponse.Data tmp, exists := spec["MIN_ATTESTATION_INCLUSION_DELAY"] if !exists { @@ -191,10 +193,18 @@ func New(ctx context.Context, params ...Parameter) (*Service, error) { } func (s *Service) catchup(ctx context.Context) { - finality, err := s.eth2Client.(eth2client.FinalityProvider).Finality(ctx, "head") + // Only allow 1 handler to be active. + acquired := s.activitySem.TryAcquire(1) + if !acquired { + log.Debug().Msg("Another handler running") + return + } + defer s.activitySem.Release(1) + + finalityResponse, err := s.eth2Client.(eth2client.FinalityProvider).Finality(ctx, &api.FinalityOpts{State: "head"}) // If we receive an error it could be because the chain hasn't yet started. // Even if not, the handler will kick the process off again. - if err != nil || finality.Finalized.Epoch <= 2 { + if err != nil || finalityResponse.Data.Finalized.Epoch <= 2 { return } diff --git a/services/summarizer/standard/service_test.go b/services/summarizer/standard/service_test.go index b68c14d..fed3757 100644 --- a/services/summarizer/standard/service_test.go +++ b/services/summarizer/standard/service_test.go @@ -37,7 +37,7 @@ func TestService(t *testing.T) { require.NoError(t, err) chainTime, err := standardchaintime.New(ctx, - standardchaintime.WithGenesisTimeProvider(chainDB), + standardchaintime.WithGenesisProvider(chainDB), standardchaintime.WithSpecProvider(chainDB), standardchaintime.WithForkScheduleProvider(chainDB), ) diff --git a/services/synccommittees/standard/handler.go b/services/synccommittees/standard/handler.go index 905378b..862c57c 100644 --- a/services/synccommittees/standard/handler.go +++ b/services/synccommittees/standard/handler.go @@ -17,6 +17,7 @@ import ( "context" "fmt" + "github.com/attestantio/go-eth2-client/api" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/pkg/errors" "github.com/wealdtech/chaind/services/chaindb" @@ -65,10 +66,13 @@ func (s *Service) updateSyncCommitteeForPeriod(ctx context.Context, period uint6 log.Trace().Uint64("period", period).Msg("period before Altair; nothing to do") } - syncCommittee, err := s.syncCommitteesProvider.SyncCommittee(ctx, fmt.Sprintf("%d", s.chainTime.FirstSlotOfEpoch(s.chainTime.FirstEpochOfSyncPeriod(period)))) + syncCommitteeResponse, err := s.syncCommitteesProvider.SyncCommittee(ctx, &api.SyncCommitteeOpts{ + State: fmt.Sprintf("%d", s.chainTime.FirstSlotOfEpoch(s.chainTime.FirstEpochOfSyncPeriod(period))), + }) if err != nil { return errors.Wrap(err, "failed to fetch sync committee") } + syncCommittee := syncCommitteeResponse.Data dbSyncCommittee := &chaindb.SyncCommittee{ Period: period, diff --git a/services/synccommittees/standard/parameters.go b/services/synccommittees/standard/parameters.go index 5e0b0af..2af4e03 100644 --- a/services/synccommittees/standard/parameters.go +++ b/services/synccommittees/standard/parameters.go @@ -29,7 +29,7 @@ type parameters struct { eth2Client eth2client.Service chainDB chaindb.Service chainTime chaintime.Service - specProvider eth2client.SpecProvider + specProvider chaindb.ChainSpecProvider startPeriod int64 } @@ -80,7 +80,7 @@ func WithChainTime(chainTime chaintime.Service) Parameter { } // WithSpecProvider sets the spec provider for this module. -func WithSpecProvider(provider eth2client.SpecProvider) Parameter { +func WithSpecProvider(provider chaindb.ChainSpecProvider) Parameter { return parameterFunc(func(p *parameters) { p.specProvider = provider }) diff --git a/services/synccommittees/standard/service.go b/services/synccommittees/standard/service.go index 26f5fd9..d7d14e7 100644 --- a/services/synccommittees/standard/service.go +++ b/services/synccommittees/standard/service.go @@ -17,7 +17,7 @@ import ( "context" eth2client "github.com/attestantio/go-eth2-client" - api "github.com/attestantio/go-eth2-client/api/v1" + apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/pkg/errors" "github.com/rs/zerolog" zerologger "github.com/rs/zerolog/log" @@ -54,10 +54,11 @@ func New(ctx context.Context, params ...Parameter) (*Service, error) { return nil, errors.New("failed to register metrics") } - spec, err := parameters.specProvider.Spec(ctx) + spec, err := parameters.specProvider.ChainSpec(ctx) if err != nil { return nil, errors.Wrap(err, "failed to obtain spec") } + var epochsPerSyncCommitteePeriod uint64 if tmp, exists := spec["EPOCHS_PER_SYNC_COMMITTEE_PERIOD"]; exists { tmp2, ok := tmp.(uint64) @@ -113,8 +114,8 @@ func (s *Service) updateAfterRestart(ctx context.Context, startPeriod int64) { log.Info().Msg("Caught up") // Set up the handler for new chain head updates. - if err := s.eventsProvider.Events(ctx, []string{"head"}, func(event *api.Event) { - eventData := event.Data.(*api.HeadEvent) + if err := s.eventsProvider.Events(ctx, []string{"head"}, func(event *apiv1.Event) { + eventData := event.Data.(*apiv1.HeadEvent) s.OnBeaconChainHeadUpdated(ctx, eventData.Slot) }); err != nil { log.Fatal().Err(err).Msg("Failed to add sync chain head updated handler") diff --git a/services/validators/standard/handler.go b/services/validators/standard/handler.go index 487d13d..d387690 100644 --- a/services/validators/standard/handler.go +++ b/services/validators/standard/handler.go @@ -19,6 +19,7 @@ import ( "fmt" eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/api" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/pkg/errors" "github.com/wealdtech/chaind/services/chaindb" @@ -86,10 +87,13 @@ func (s *Service) onEpochTransitionValidators(ctx context.Context, defer span.End() // We always fetch the latest validator information regardless of epoch. - validators, err := s.eth2Client.(eth2client.ValidatorsProvider).Validators(ctx, "head", nil) + validatorsResponse, err := s.eth2Client.(eth2client.ValidatorsProvider).Validators(ctx, &api.ValidatorsOpts{ + State: "head", + }) if err != nil { return errors.Wrap(err, "failed to obtain validators") } + validators := validatorsResponse.Data // Fetch our current validators from the database. dbVs, err := s.validatorsSetter.(chaindb.ValidatorsProvider).Validators(ctx) @@ -179,10 +183,14 @@ func (s *Service) onEpochTransitionValidatorBalancesForEpoch(ctx context.Context log := log.With().Uint64("epoch", uint64(epoch)).Logger() stateID := fmt.Sprintf("%d", s.chainTime.FirstSlotOfEpoch(epoch)) log.Trace().Uint64("slot", uint64(s.chainTime.FirstSlotOfEpoch(epoch))).Msg("Fetching validators") - validators, err := s.eth2Client.(eth2client.ValidatorsProvider).Validators(ctx, stateID, nil) + validatorsResponse, err := s.eth2Client.(eth2client.ValidatorsProvider).Validators(ctx, &api.ValidatorsOpts{ + State: stateID, + }) if err != nil { return errors.Wrap(err, "failed to obtain validators for validator balances") } + validators := validatorsResponse.Data + span.AddEvent("Obtained validators", trace.WithAttributes( attribute.Int("slot", int(s.chainTime.FirstSlotOfEpoch(epoch))), )) diff --git a/testing/mock/eth2client.go b/testing/mock/eth2client.go index 1dd594e..9be7890 100644 --- a/testing/mock/eth2client.go +++ b/testing/mock/eth2client.go @@ -18,31 +18,42 @@ import ( "time" eth2client "github.com/attestantio/go-eth2-client" - api "github.com/attestantio/go-eth2-client/api/v1" + "github.com/attestantio/go-eth2-client/api" + apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/phase0" ) -// GenesisTimeProvider is a mock for eth2client.GenesisTimeProvider. -type GenesisTimeProvider struct { - genesisTime time.Time +// GenesisProvider is a mock for eth2client.GenesisProvider. +type GenesisProvider struct { + genesis *apiv1.Genesis } -// NewGenesisTimeProvider returns a mock genesis time provider with the provided value. -func NewGenesisTimeProvider(genesisTime time.Time) eth2client.GenesisTimeProvider { - return &GenesisTimeProvider{ - genesisTime: genesisTime, +// NewGenesisProvider returns a mock genesis provider with the provided value. +func NewGenesisProvider(genesisTime time.Time) eth2client.GenesisProvider { + return &GenesisProvider{ + genesis: &apiv1.Genesis{ + GenesisTime: genesisTime, + }, } } -// GenesisTime is a mock. -func (m *GenesisTimeProvider) GenesisTime(_ context.Context) (time.Time, error) { - return m.genesisTime, nil +// Genesis is a mock. +func (m *GenesisProvider) Genesis(_ context.Context, + _ *api.GenesisOpts, +) ( + *api.Response[*apiv1.Genesis], + error, +) { + return &api.Response[*apiv1.Genesis]{ + Data: m.genesis, + Metadata: make(map[string]any), + }, nil } // SpecProvider is a mock for eth2client.SpecProvider. type SpecProvider struct { - spec map[string]interface{} + spec map[string]any } // NewSpecProvider returns a mock spec provider with the provided values. @@ -51,7 +62,7 @@ func NewSpecProvider(slotDuration time.Duration, epochsPerSyncCommitteePeriod uint64, ) eth2client.SpecProvider { return &SpecProvider{ - spec: map[string]interface{}{ + spec: map[string]any{ "SECONDS_PER_SLOT": slotDuration, "SLOTS_PER_EPOCH": slotsPerEpoch, "EPOCHS_PER_SYNC_COMMITTEE_PERIOD": epochsPerSyncCommitteePeriod, @@ -60,8 +71,16 @@ func NewSpecProvider(slotDuration time.Duration, } // Spec is a mock. -func (m *SpecProvider) Spec(_ context.Context) (map[string]interface{}, error) { - return m.spec, nil +func (m *SpecProvider) Spec(_ context.Context, + _ *api.SpecOpts, +) ( + *api.Response[map[string]any], + error, +) { + return &api.Response[map[string]any]{ + Data: m.spec, + Metadata: make(map[string]any), + }, nil } // ForkScheduleProvider is a mock for eth2client.ForkScheduleProvider. @@ -77,8 +96,16 @@ func NewForkScheduleProvider(schedule []*phase0.Fork) eth2client.ForkSchedulePro } // ForkSchedule is a mock. -func (m *ForkScheduleProvider) ForkSchedule(_ context.Context) ([]*phase0.Fork, error) { - return m.schedule, nil +func (m *ForkScheduleProvider) ForkSchedule(_ context.Context, + _ *api.ForkScheduleOpts, +) ( + *api.Response[[]*phase0.Fork], + error, +) { + return &api.Response[[]*phase0.Fork]{ + Data: m.schedule, + Metadata: make(map[string]any), + }, nil } // SlotsPerEpochProvider is a mock for eth2client.SlotsPerEpochProvider. @@ -146,6 +173,6 @@ func NewBeaconCommitteeSubscriptionsSubmitter() eth2client.BeaconCommitteeSubscr } // SubmitBeaconCommitteeSubscriptions is a mock. -func (*BeaconCommitteeSubscriptionsSubmitter) SubmitBeaconCommitteeSubscriptions(_ context.Context, _ []*api.BeaconCommitteeSubscription) error { +func (*BeaconCommitteeSubscriptionsSubmitter) SubmitBeaconCommitteeSubscriptions(_ context.Context, _ []*apiv1.BeaconCommitteeSubscription) error { return nil }