From 93a437446ec3bad71170bcc863d2b6870122c1af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 07:55:04 +0000 Subject: [PATCH 01/24] build(deps): Bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from 0.54.0 to 0.55.0 (#3284) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) from 0.54.0 to 0.55.0.
Release notes

Sourced from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp's releases.

Release v1.30.0/v0.55.0/v0.24.0/v0.10.0/v0.5.0/v0.3.0/v0.2.0

Overview

Added

Removed

Fixed

What's Changed

... (truncated)

Changelog

Sourced from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp's changelog.

[1.30.0/0.55.0/0.24.0/0.10.0/0.5.0/0.3.0/0.2.0] - 2024-09-10

Added

Removed

Fixed

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp&package-manager=go_modules&previous-version=0.54.0&new-version=0.55.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index d21da46e7..fb8cc973f 100644 --- a/go.mod +++ b/go.mod @@ -32,12 +32,12 @@ require ( github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.9.0 github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.4.1 - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 - go.opentelemetry.io/otel v1.28.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 + go.opentelemetry.io/otel v1.30.0 go.opentelemetry.io/otel/exporters/jaeger v1.17.0 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 go.opentelemetry.io/otel/sdk v1.28.0 - go.opentelemetry.io/otel/trace v1.28.0 + go.opentelemetry.io/otel/trace v1.30.0 go.uber.org/automaxprocs v1.5.3 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 @@ -181,7 +181,7 @@ require ( github.com/subosito/gotenv v1.6.0 // indirect github.com/vbatts/tar-split v0.11.5 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.30.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/dig v1.17.1 // indirect go.uber.org/fx v1.20.1 // indirect diff --git a/go.sum b/go.sum index 8d31047ec..9d82e60c2 100644 --- a/go.sum +++ b/go.sum @@ -539,10 +539,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 h1:9M3+rhx7kZCIQQhQRYaZCdNu1V73tm4TvXs2ntl98C4= @@ -551,14 +551,14 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 h1:EVSnY9JbEEW92bEkIYOVMw4q1WJxIAGoFTrtYOzWuRQ= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0/go.mod h1:Ea1N1QQryNXpCD0I1fdLibBAIpQuBkznMmkdKrapk1Y= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= +go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= +go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= From 53a02dd75cc8c52175eb908e7f0bd0ede02fd19c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 07:55:44 +0000 Subject: [PATCH 02/24] build(deps): Bump github.com/prometheus/client_golang from 1.20.3 to 1.20.4 (#3289) Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.3 to 1.20.4.
Release notes

Sourced from github.com/prometheus/client_golang's releases.

v1.20.4

Changelog

Sourced from github.com/prometheus/client_golang's changelog.

Unreleased

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/prometheus/client_golang&package-manager=go_modules&previous-version=1.20.3&new-version=1.20.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 12 +++++++----- go.sum | 25 ++++++++++++++----------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index fb8cc973f..30d0e838e 100644 --- a/go.mod +++ b/go.mod @@ -19,8 +19,8 @@ require ( github.com/libp2p/go-libp2p v0.33.2 github.com/libp2p/go-msgio v0.3.0 github.com/multiformats/go-multiaddr v0.13.0 - github.com/pelletier/go-toml/v2 v2.2.2 - github.com/prometheus/client_golang v1.19.1 + github.com/pelletier/go-toml/v2 v2.2.3 + github.com/prometheus/client_golang v1.20.4 github.com/prometheus/client_model v0.6.1 github.com/protolambda/eth2-shuffle v1.1.0 github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e @@ -70,7 +70,7 @@ require ( github.com/bufbuild/protovalidate-go v0.6.2 // indirect github.com/bufbuild/protoyaml-go v0.1.9 // indirect github.com/bwesterb/go-ristretto v1.2.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/containerd/cgroups v1.1.0 // indirect @@ -120,6 +120,7 @@ require ( github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/koron/go-ssdp v0.0.4 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/libp2p/go-flow-metrics v0.1.0 // indirect github.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect @@ -151,6 +152,7 @@ require ( github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-multistream v0.5.0 // indirect github.com/multiformats/go-varint v0.0.7 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/onsi/ginkgo/v2 v2.15.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect @@ -161,8 +163,8 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pkg/profile v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/common v0.48.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/quic-go v0.42.0 // indirect github.com/quic-go/webtransport-go v0.6.0 // indirect diff --git a/go.sum b/go.sum index 9d82e60c2..7daa548c9 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,8 @@ github.com/bwesterb/go-ristretto v1.2.0 h1:xxWOVbN5m8NNKiSDZXE1jtZvZnC6JSJ9cYFAD github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs= github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww= @@ -284,6 +284,8 @@ github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs= @@ -382,6 +384,8 @@ github.com/multiformats/go-multistream v0.5.0/go.mod h1:n6tMZiwiP2wUsR8DgfDWw1dy github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= @@ -399,8 +403,8 @@ github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTm github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= -github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= -github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= github.com/pk910/dynamic-ssz v0.0.3 h1:fCWzFowq9P6SYCc7NtJMkZcIHk+r5hSVD+32zVi6Aio= github.com/pk910/dynamic-ssz v0.0.3/go.mod h1:b6CrLaB2X7pYA+OSEEbkgXDEcRnjLOZIxZTsMuO/Y9c= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= @@ -416,17 +420,17 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/protolambda/eth2-shuffle v1.1.0 h1:gixIBI84IeugTwwHXm8vej1bSSEhueBCSryA4lAKRLU= github.com/protolambda/eth2-shuffle v1.1.0/go.mod h1:FhA2c0tN15LTC+4T9DNVm+55S7uXTTjQ8TQnBuXlkF8= github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e h1:ATgOe+abbzfx9kCPeXIW4fiWyDdxlwHw07j8UGhdTd4= @@ -516,7 +520,6 @@ 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.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= From a93fa7011467383772a1e6523fef3a908dbbe806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianguido=20Sor=C3=A0?= Date: Wed, 18 Sep 2024 17:03:42 +0200 Subject: [PATCH 03/24] *: disable intrange linter (#3282) Go v1.23 allows to range over int slices without calling `len` first. Since it's a low-importance change, we can disable intrange linter to avoid being blocked by it during pre-commit. category: misc ticket: none --- .golangci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.golangci.yml b/.golangci.yml index 41a679662..8a8461496 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -145,6 +145,7 @@ linters: enable-all: true disable: # Keep disabled + - intrange - containedctx - contextcheck - cyclop From 2dd8e628a93849319c19004e3284cea151124ce6 Mon Sep 17 00:00:00 2001 From: Andrei Smirnov Date: Tue, 1 Oct 2024 17:33:03 +0300 Subject: [PATCH 04/24] dkg: fixed TestSyncFlow (#3309) Possibly fixed the flakey test. category: test ticket: #3308 --- dkg/dkg_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dkg/dkg_test.go b/dkg/dkg_test.go index b830c3d8c..97e1dd2bf 100644 --- a/dkg/dkg_test.go +++ b/dkg/dkg_test.go @@ -6,6 +6,7 @@ import ( "context" "encoding/hex" "encoding/json" + "errors" "fmt" "math/rand" "net/http" @@ -537,7 +538,9 @@ func TestSyncFlow(t *testing.T) { var disconnectedCount int for err := range dkgErrChan { testutil.SkipIfBindErr(t, err) - require.NoError(t, err) + if !errors.Is(err, context.Canceled) { + require.NoError(t, err) + } disconnectedCount++ if disconnectedCount == test.nodes { break From 7812920fb1efcd9149b04ef8785c0248ebb80c35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 14:38:48 +0000 Subject: [PATCH 05/24] build(deps): Bump go.uber.org/automaxprocs from 1.5.3 to 1.6.0 (#3300) Bumps [go.uber.org/automaxprocs](https://github.com/uber-go/automaxprocs) from 1.5.3 to 1.6.0.
Release notes

Sourced from go.uber.org/automaxprocs's releases.

v1.6.0

  • Add RoundQuotaFunc option that allows configuration of rounding behavior for floating point CPU quota.
Changelog

Sourced from go.uber.org/automaxprocs's changelog.

v1.6.0 (2024-07-24)

  • Add RoundQuotaFunc option that allows configuration of rounding behavior for floating point CPU quota.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=go.uber.org/automaxprocs&package-manager=go_modules&previous-version=1.5.3&new-version=1.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 30d0e838e..46e21e31b 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 go.opentelemetry.io/otel/sdk v1.28.0 go.opentelemetry.io/otel/trace v1.30.0 - go.uber.org/automaxprocs v1.5.3 + go.uber.org/automaxprocs v1.6.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 golang.org/x/crypto v0.25.0 diff --git a/go.sum b/go.sum index 7daa548c9..8c51d6843 100644 --- a/go.sum +++ b/go.sum @@ -567,8 +567,8 @@ go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 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/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= -go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/dig v1.17.1 h1:Tga8Lz8PcYNsWsyHMZ1Vm0OQOUaJNDyvPImgbAu9YSc= go.uber.org/dig v1.17.1/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= go.uber.org/fx v1.20.1 h1:zVwVQGS8zYvhh9Xxcu4w1M6ESyeMzebzj2NbSayZ4Mk= From b0046c73f3a260661a3bc876721938540973bc85 Mon Sep 17 00:00:00 2001 From: Kaloyan Tanev <24719519+KaloyanTanev@users.noreply.github.com> Date: Thu, 3 Oct 2024 13:34:15 +0200 Subject: [PATCH 06/24] test: fix test performance flaky test (#3316) Test performance writing to file was checking for the score, even though some tests are based on current machine's measurements. We have excluded testing measurements for a single test, but not for the overall score. category: test ticket: none --- cmd/testpeers_internal_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/testpeers_internal_test.go b/cmd/testpeers_internal_test.go index 1d9fb8e4a..1c15a71d8 100644 --- a/cmd/testpeers_internal_test.go +++ b/cmd/testpeers_internal_test.go @@ -384,13 +384,15 @@ func testWriteFile(t *testing.T, expectedRes testCategoryResult, path string) { require.NoError(t, err) require.Equal(t, expectedRes.CategoryName, res.CategoryName) - require.Equal(t, expectedRes.Score, res.Score) require.Equal(t, len(expectedRes.Targets), len(res.Targets)) + checkFinalScore := true for targetName, testResults := range res.Targets { for idx, testRes := range testResults { // do not test verdicts based on measurements if expectedRes.Targets[targetName][idx].Verdict == testVerdictOk || expectedRes.Targets[targetName][idx].Verdict == testVerdictFail { require.Equal(t, expectedRes.Targets[targetName][idx].Verdict, testRes.Verdict) + } else { + checkFinalScore = false } require.Equal(t, expectedRes.Targets[targetName][idx].IsAcceptable, testRes.IsAcceptable) if expectedRes.Targets[targetName][idx].Error.error != nil { @@ -402,6 +404,10 @@ func testWriteFile(t *testing.T, expectedRes testCategoryResult, path string) { require.Equal(t, expectedRes.Targets[targetName][idx].Suggestion, testRes.Suggestion) } } + // check final score only if there are no tests based on actual measurement + if checkFinalScore { + require.Equal(t, expectedRes.Score, res.Score) + } } func startPeer(t *testing.T, conf testPeersConfig, peerPrivKey *k1.PrivateKey) enr.Record { From e18a332a5680834ead11a2afb2b27e79ec36d902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianguido=20Sor=C3=A0?= Date: Tue, 8 Oct 2024 15:54:46 +0200 Subject: [PATCH 07/24] core/validatorapi: check proposal data against consensus one (#3292) Instead of blindly accepting VC proposal data, check it for integrity against what we have in DutyDB: if they differ, stop the process. category: refactor ticket: none --- app/eth2wrap/eth2wrap_test.go | 10 +- app/eth2wrap/synthproposer_test.go | 9 +- core/validatorapi/validatorapi.go | 134 +++++++++- core/validatorapi/validatorapi_test.go | 205 ++++++++++++++- eth2util/registration/registration_test.go | 20 +- eth2util/signing/signing.go | 5 + eth2util/signing/signing_test.go | 51 ++-- testutil/beaconmock/options.go | 2 +- testutil/beaconmock/server_test.go | 5 +- testutil/beaconmock/static.json | 286 +++++++++++---------- testutil/integration/simnet_test.go | 4 +- 11 files changed, 541 insertions(+), 190 deletions(-) diff --git a/app/eth2wrap/eth2wrap_test.go b/app/eth2wrap/eth2wrap_test.go index bcb64264e..3e35dfad6 100644 --- a/app/eth2wrap/eth2wrap_test.go +++ b/app/eth2wrap/eth2wrap_test.go @@ -462,27 +462,27 @@ func TestLazyDomain(t *testing.T) { { name: "mainnet fork", in: eth2util.Mainnet.GenesisForkVersionHex[2:], - expRes: "040000008c6ebbceb21209e6af5ab7db4a3027998c412c0eb0e15fbc1ee75617", + expRes: "04000000a39ec13dbafa3a331644f8d3a1513e57898fab998fec78f5ada4b8b0", }, { name: "goerli fork", in: eth2util.Goerli.GenesisForkVersionHex[2:], - expRes: "04000000628941ef21d1fe8c7134720add10bb91e3b02c007e0046d2472c6695", + expRes: "04000000f1e25bda59286379f9a2b3ffeb090d650a4db4cfd089e1cc72388a33", }, { name: "gnosis fork", in: eth2util.Gnosis.GenesisForkVersionHex[2:], - expRes: "04000000398beb768264920602d7d79f88da05cac0550ae4108753fd846408b5", + expRes: "040000007c97bfcba5d28a3cdef2ab010944574e387f4b3c7963c215eed87f32", }, { name: "sepolia fork", in: eth2util.Sepolia.GenesisForkVersionHex[2:], - expRes: "040000007191d9b3c210dbffc7810b6ccb436c1b3897b6772452924b20f6f5f2", + expRes: "0400000005b54270938f654bd779212d3be2a63f806a4f58794d455393d8dad8", }, { name: "holesky fork", in: eth2util.Holesky.GenesisForkVersionHex[2:], - expRes: "040000002b3e2c2d17a0d820f3099580a72d1bc743b17616ff7851f32aa303ad", + expRes: "0400000017e2dad36f1d3595152042a9ad23430197557e2e7e82bc7f7fc72972", }, { name: "unknown fork", diff --git a/app/eth2wrap/synthproposer_test.go b/app/eth2wrap/synthproposer_test.go index 132d41c67..492bd1104 100644 --- a/app/eth2wrap/synthproposer_test.go +++ b/app/eth2wrap/synthproposer_test.go @@ -67,15 +67,10 @@ func TestSynthProposer(t *testing.T) { activeVals++ return cached(ctx) } - signedBeaconBlock := bmock.SignedBeaconBlock bmock.SignedBeaconBlockFunc = func(ctx context.Context, blockID string) (*eth2spec.VersionedSignedBeaconBlock, error) { - opts := ð2api.SignedBeaconBlockOpts{Block: blockID} - resp, err := signedBeaconBlock(ctx, opts) - if err != nil { - return nil, err - } + resp := testutil.RandomCapellaVersionedSignedBeaconBlock() - return resp.Data, nil + return resp, nil } eth2Cl := eth2wrap.WithSyntheticDuties(bmock) diff --git a/core/validatorapi/validatorapi.go b/core/validatorapi/validatorapi.go index baafe2aeb..5805b1ebf 100644 --- a/core/validatorapi/validatorapi.go +++ b/core/validatorapi/validatorapi.go @@ -13,8 +13,10 @@ import ( eth2api "github.com/attestantio/go-eth2-client/api" eth2v1 "github.com/attestantio/go-eth2-client/api/v1" + eth2spec "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/altair" eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0" + ssz "github.com/ferranbt/fastssz" "go.opentelemetry.io/otel/trace" "github.com/obolnetwork/charon/app/errors" @@ -394,19 +396,120 @@ func (c Component) Proposal(ctx context.Context, opts *eth2api.ProposalOpts) (*e return wrapResponse(proposal), nil } +// propDataMatchesDuty checks that the VC-signed proposal data and prop are the same. +func propDataMatchesDuty(opts *eth2api.SubmitProposalOpts, prop *eth2api.VersionedProposal) error { + ourPropIdx, err := prop.ProposerIndex() + if err != nil { + return errors.Wrap(err, "cannot fetch validator index from dutydb proposal") + } + + vcPropIdx, err := opts.Proposal.ProposerIndex() + if err != nil { + return errors.Wrap(err, "cannot fetch validator index from VC proposal") + } + + if ourPropIdx != vcPropIdx { + return errors.New( + "dutydb and VC proposals have different index", + z.U64("vc", uint64(vcPropIdx)), + z.U64("dutydb", uint64(ourPropIdx)), + ) + } + + if opts.Proposal.Blinded != prop.Blinded { + return errors.New( + "dutydb and VC proposals have different blinded value", + z.Bool("vc", opts.Proposal.Blinded), + z.Bool("dutydb", prop.Blinded), + ) + } + + if opts.Proposal.Version != prop.Version { + return errors.New( + "dutydb and VC proposals have different version", + z.Str("vc", opts.Proposal.Version.String()), + z.Str("dutydb", prop.Version.String()), + ) + } + + checkHashes := func(d1, d2 ssz.HashRoot) error { + ddb, err := d1.HashTreeRoot() + if err != nil { + return errors.Wrap(err, "hash tree root dutydb") + } + + if d2 == nil { + return errors.New("validator client proposal data for the associated dutydb proposal is nil") + } + + vc, err := d2.HashTreeRoot() + if err != nil { + return errors.Wrap(err, "hash tree root dutydb") + } + + if ddb != vc { + return errors.New("dutydb and VC proposal data have different hash tree root") + } + + return nil + } + + switch prop.Version { + case eth2spec.DataVersionPhase0: + return checkHashes(prop.Phase0, opts.Proposal.Phase0.Message) + case eth2spec.DataVersionAltair: + return checkHashes(prop.Altair, opts.Proposal.Altair.Message) + case eth2spec.DataVersionBellatrix: + switch prop.Blinded { + case false: + return checkHashes(prop.Bellatrix, opts.Proposal.Bellatrix.Message) + case true: + return checkHashes(prop.BellatrixBlinded, opts.Proposal.BellatrixBlinded.Message) + } + case eth2spec.DataVersionCapella: + switch prop.Blinded { + case false: + return checkHashes(prop.Capella, opts.Proposal.Capella.Message) + case true: + return checkHashes(prop.CapellaBlinded, opts.Proposal.CapellaBlinded.Message) + } + case eth2spec.DataVersionDeneb: + switch prop.Blinded { + case false: + return checkHashes(prop.Deneb.Block, opts.Proposal.Deneb.SignedBlock.Message) + case true: + return checkHashes(prop.DenebBlinded, opts.Proposal.DenebBlinded.Message) + } + case eth2spec.DataVersionUnknown: + return errors.New("unexpected block version", z.Str("version", prop.Version.String())) + } + + return nil +} + func (c Component) SubmitProposal(ctx context.Context, opts *eth2api.SubmitProposalOpts) error { slot, err := opts.Proposal.Slot() if err != nil { return err } - pubkey, err := c.getProposerPubkey(ctx, core.NewProposerDuty(uint64(slot))) + duty := core.NewProposerDuty(uint64(slot)) + + pubkey, err := c.getProposerPubkey(ctx, duty) if err != nil { return err } + prop, err := c.awaitProposalFunc(ctx, uint64(slot)) + if err != nil { + return errors.Wrap(err, "could not fetch block definition from dutydb") + } + + if err := propDataMatchesDuty(opts, prop); err != nil { + return errors.Wrap(err, "consensus proposal and VC-submitted one do not match") + } + // Save Partially Signed Block to ParSigDB - duty := core.NewProposerDuty(uint64(slot)) ctx = log.WithCtx(ctx, z.Any("duty", duty)) signedData, err := core.NewPartialVersionedSignedProposal(opts.Proposal, c.shareIdx) @@ -440,15 +543,34 @@ func (c Component) SubmitBlindedProposal(ctx context.Context, opts *eth2api.Subm return err } - pubkey, err := c.getProposerPubkey(ctx, core.NewProposerDuty(uint64(slot))) + duty := core.NewProposerDuty(uint64(slot)) + ctx = log.WithCtx(ctx, z.Any("duty", duty)) + + pubkey, err := c.getProposerPubkey(ctx, duty) if err != nil { return err } - // Save Partially Signed Blinded Block to ParSigDB - duty := core.NewProposerDuty(uint64(slot)) - ctx = log.WithCtx(ctx, z.Any("duty", duty)) + prop, err := c.awaitProposalFunc(ctx, uint64(slot)) + if err != nil { + return errors.Wrap(err, "could not fetch block definition from dutydb") + } + + if err := propDataMatchesDuty(ð2api.SubmitProposalOpts{ + Common: opts.Common, + Proposal: ð2api.VersionedSignedProposal{ + Version: opts.Proposal.Version, + Blinded: true, + BellatrixBlinded: opts.Proposal.Bellatrix, + CapellaBlinded: opts.Proposal.Capella, + DenebBlinded: opts.Proposal.Deneb, + }, + BroadcastValidation: opts.BroadcastValidation, + }, prop); err != nil { + return errors.Wrap(err, "consensus proposal and VC-submitted one do not match") + } + // Save Partially Signed Blinded Block to ParSigDB signedData, err := core.NewPartialVersionedSignedBlindedProposal(opts.Proposal, c.shareIdx) if err != nil { return err diff --git a/core/validatorapi/validatorapi_test.go b/core/validatorapi/validatorapi_test.go index 1bea36d83..97c1090df 100644 --- a/core/validatorapi/validatorapi_test.go +++ b/core/validatorapi/validatorapi_test.go @@ -409,6 +409,104 @@ func TestComponent_Proposal(t *testing.T) { require.Equal(t, block1, block2) } +func TestComponent_SubmitProposalsWithWrongVCData(t *testing.T) { + ctx := context.Background() + + // Create keys (just use normal keys, not split tbls) + secret, err := tbls.GenerateSecretKey() + require.NoError(t, err) + + pubkey, err := tbls.SecretToPublicKey(secret) + require.NoError(t, err) + + const ( + vIdx = 1 + shareIdx = 1 + slot = 123 + epoch = eth2p0.Epoch(3) + ) + + // Convert pubkey + corePubKey, err := core.PubKeyFromBytes(pubkey[:]) + require.NoError(t, err) + allPubSharesByKey := map[core.PubKey]map[int]tbls.PublicKey{corePubKey: {shareIdx: pubkey}} // Maps self to self since not tbls + + // Configure beacon mock + bmock, err := beaconmock.New() + require.NoError(t, err) + + // Construct the validator api component + vapi, err := validatorapi.NewComponent(bmock, allPubSharesByKey, shareIdx, nil, testutil.BuilderFalse, nil) + require.NoError(t, err) + + t.Run("full block fails", func(t *testing.T) { + unsignedBlock := ð2spec.VersionedBeaconBlock{ + Version: eth2spec.DataVersionCapella, + Capella: testutil.RandomCapellaBeaconBlock(), + } + vapi.RegisterGetDutyDefinition(func(ctx context.Context, duty core.Duty) (core.DutyDefinitionSet, error) { + return core.DutyDefinitionSet{corePubKey: nil}, nil + }) + + vapi.RegisterAwaitProposal(func(ctx context.Context, slot uint64) (*eth2api.VersionedProposal, error) { + unsignedBlock := ð2spec.VersionedBeaconBlock{ + Version: eth2spec.DataVersionCapella, + Capella: testutil.RandomCapellaBeaconBlock(), + } + + return ð2api.VersionedProposal{ + Version: unsignedBlock.Version, + Capella: unsignedBlock.Capella, + }, nil + }) + + err = vapi.SubmitProposal(ctx, ð2api.SubmitProposalOpts{ + Proposal: ð2api.VersionedSignedProposal{ + Version: unsignedBlock.Version, + Capella: &capella.SignedBeaconBlock{ + Message: unsignedBlock.Capella, + Signature: eth2p0.BLSSignature{}, + }, + }, + }) + require.ErrorContains(t, err, "consensus proposal and VC-submitted one do not match: dutydb and VC proposal data have different hash tree root") + }) + + t.Run("blinded block fails", func(t *testing.T) { + unsignedBlindedBlock := testutil.RandomCapellaBlindedBeaconBlock() + + vapi.RegisterGetDutyDefinition(func(ctx context.Context, duty core.Duty) (core.DutyDefinitionSet, error) { + return core.DutyDefinitionSet{corePubKey: nil}, nil + }) + + signedBlindedBlock := ð2api.VersionedSignedBlindedProposal{ + Version: eth2spec.DataVersionCapella, + Capella: ð2capella.SignedBlindedBeaconBlock{ + Message: unsignedBlindedBlock, + Signature: eth2p0.BLSSignature{}, + }, + } + + vapi.RegisterAwaitProposal(func(ctx context.Context, slot uint64) (*eth2api.VersionedProposal, error) { + p := ð2api.VersionedProposal{ + Blinded: true, + Version: eth2spec.DataVersionCapella, + CapellaBlinded: testutil.RandomCapellaBlindedBeaconBlock(), + } + + p.CapellaBlinded.ProposerIndex = signedBlindedBlock.Capella.Message.ProposerIndex + + return p, nil + }) + + err = vapi.SubmitBlindedProposal(ctx, ð2api.SubmitBlindedProposalOpts{ + Proposal: signedBlindedBlock, + }) + + require.ErrorContains(t, err, "consensus proposal and VC-submitted one do not match: dutydb and VC proposal data have different hash tree root") + }) +} + func TestComponent_SubmitProposal(t *testing.T) { ctx := context.Background() @@ -478,6 +576,13 @@ func TestComponent_SubmitProposal(t *testing.T) { }, } + vapi.RegisterAwaitProposal(func(ctx context.Context, slot uint64) (*eth2api.VersionedProposal, error) { + return ð2api.VersionedProposal{ + Version: signedBlock.Version, + Capella: unsignedBlock.Capella, + }, nil + }) + // Register subscriber vapi.Subscribe(func(ctx context.Context, duty core.Duty, set core.ParSignedDataSet) error { block, ok := set[corePubKey].SignedData.(core.VersionedSignedProposal) @@ -577,6 +682,17 @@ func TestComponent_SubmitProposal_Gnosis(t *testing.T) { return nil }) + vapi.RegisterAwaitProposal(func(ctx context.Context, slot uint64) (*eth2api.VersionedProposal, error) { + return ð2api.VersionedProposal{ + Version: signedBlock.Version, + Deneb: ð2deneb.BlockContents{ + Block: signedBlock.Deneb.SignedBlock.Message, + KZGProofs: signedBlock.Deneb.KZGProofs, + Blobs: signedBlock.Deneb.Blobs, + }, + }, nil + }) + err = vapi.SubmitProposal(ctx, ð2api.SubmitProposalOpts{ Proposal: signedBlock, }) @@ -638,6 +754,13 @@ func TestComponent_SubmitProposalInvalidSignature(t *testing.T) { }, } + vapi.RegisterAwaitProposal(func(ctx context.Context, slot uint64) (*eth2api.VersionedProposal, error) { + return ð2api.VersionedProposal{ + Version: signedBlock.Version, + Capella: signedBlock.Capella.Message, + }, nil + }) + // Register subscriber vapi.Subscribe(func(ctx context.Context, duty core.Duty, set core.ParSignedDataSet) error { block, ok := set[corePubKey].SignedData.(core.VersionedSignedProposal) @@ -720,8 +843,49 @@ func TestComponent_SubmitProposalInvalidBlock(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { + b := test.block + proposal := ð2api.VersionedProposal{ + Version: b.Version, + Blinded: b.Blinded, + ConsensusValue: b.ConsensusValue, + ExecutionValue: b.ExecutionValue, + } + + if b.Phase0 != nil { + proposal.Phase0 = b.Phase0.Message + } + if b.Altair != nil { + proposal.Altair = b.Altair.Message + } + if b.Bellatrix != nil { + proposal.Bellatrix = b.Bellatrix.Message + } + if b.BellatrixBlinded != nil { + proposal.BellatrixBlinded = b.BellatrixBlinded.Message + } + if b.Capella != nil { + proposal.Capella = b.Capella.Message + } + if b.CapellaBlinded != nil { + proposal.CapellaBlinded = b.CapellaBlinded.Message + } + if b.Deneb != nil { + proposal.Deneb = ð2deneb.BlockContents{ + Block: test.block.Deneb.SignedBlock.Message, + KZGProofs: test.block.Deneb.KZGProofs, + Blobs: test.block.Deneb.Blobs, + } + } + if b.DenebBlinded != nil { + proposal.DenebBlinded = b.DenebBlinded.Message + } + + vapi.RegisterAwaitProposal(func(ctx context.Context, slot uint64) (*eth2api.VersionedProposal, error) { + return proposal, nil + }) + err = vapi.SubmitProposal(ctx, ð2api.SubmitProposalOpts{ - Proposal: test.block, + Proposal: b, }) require.ErrorContains(t, err, test.errMsg) }) @@ -793,6 +957,14 @@ func TestComponent_SubmitBlindedProposal(t *testing.T) { }, } + vapi.RegisterAwaitProposal(func(ctx context.Context, slot uint64) (*eth2api.VersionedProposal, error) { + return ð2api.VersionedProposal{ + Version: signedBlindedBlock.Version, + Blinded: true, + CapellaBlinded: signedBlindedBlock.Capella.Message, + }, nil + }) + // Register subscriber vapi.Subscribe(func(ctx context.Context, duty core.Duty, set core.ParSignedDataSet) error { block, ok := set[corePubKey].SignedData.(core.VersionedSignedProposal) @@ -880,6 +1052,14 @@ func TestComponent_SubmitBlindedProposalInvalidSignature(t *testing.T) { return nil }) + vapi.RegisterAwaitProposal(func(ctx context.Context, slot uint64) (*eth2api.VersionedProposal, error) { + return ð2api.VersionedProposal{ + Version: signedBlindedBlock.Version, + Blinded: true, + CapellaBlinded: signedBlindedBlock.Capella.Message, + }, nil + }) + err = vapi.SubmitBlindedProposal(ctx, ð2api.SubmitBlindedProposalOpts{ Proposal: signedBlindedBlock, }) @@ -970,8 +1150,29 @@ func TestComponent_SubmitBlindedProposalInvalidBlock(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { + b := test.block + proposal := ð2api.VersionedProposal{ + Version: b.Version, + Blinded: true, + } + + if b.Bellatrix != nil { + proposal.BellatrixBlinded = b.Bellatrix.Message + } + if b.Capella != nil { + proposal.CapellaBlinded = b.Capella.Message + } + + if b.Deneb != nil { + proposal.DenebBlinded = b.Deneb.Message + } + + vapi.RegisterAwaitProposal(func(ctx context.Context, slot uint64) (*eth2api.VersionedProposal, error) { + return proposal, nil + }) + err = vapi.SubmitBlindedProposal(ctx, ð2api.SubmitBlindedProposalOpts{ - Proposal: test.block, + Proposal: b, }) require.ErrorContains(t, err, test.errMsg) }) diff --git a/eth2util/registration/registration_test.go b/eth2util/registration/registration_test.go index 9a22b6ab9..fd67700c2 100644 --- a/eth2util/registration/registration_test.go +++ b/eth2util/registration/registration_test.go @@ -106,21 +106,21 @@ func TestVerifySignedRegistration(t *testing.T) { require.NoError(t, err) registrationJSON := ` - { - "message": { - "fee_recipient": "0x000000000000000000000000000000000000dead", - "gas_limit": "30000000", - "timestamp": "1646092800", - "pubkey": "0x86966350b672bd502bfbdb37a6ea8a7392e8fb7f5ebb5c5e2055f4ee168ebfab0fef63084f28c9f62c3ba71f825e527e" - }, - "signature": "0xb101da0fc08addcc5d010ee569f6bbbdca049a5cb27efad231565bff2e3af504ec2bb87b11ed22843e9c1094f1dfe51a0b2a5ad1808df18530a2f59f004032dbf6281ecf0fc3df86d032da5b9d32a3d282c05923de491381f8f28c2863a00180" - }` + { + "message": { + "fee_recipient": "0x000000000000000000000000000000000000dEaD", + "gas_limit": "30000000", + "timestamp": "1646092800", + "pubkey": "0x86966350b672bd502bfbdb37a6ea8a7392e8fb7f5ebb5c5e2055f4ee168ebfab0fef63084f28c9f62c3ba71f825e527e" + }, + "signature": "0xad393c5b42b382cf93cd14f302b0175b4f9ccb000c201d42c3a6389971b8d910a81333d55ad2944b836a9bb35ba968ab06635dcd706380516ad0c653f48b1c6d52b8771c78d708e943b3ea8da59392fbf909decde262adc944fe3e57120d9bb4" + }` reg := new(eth2v1.SignedValidatorRegistration) err = json.Unmarshal([]byte(registrationJSON), reg) require.NoError(t, err) - forkVersion, err := eth2util.NetworkToForkVersionBytes("goerli") + forkVersion, err := eth2util.NetworkToForkVersionBytes("holesky") require.NoError(t, err) sigRoot, err := registration.GetMessageSigningRoot(reg.Message, eth2p0.Version(forkVersion)) diff --git a/eth2util/signing/signing.go b/eth2util/signing/signing.go index 04effc690..6df16c330 100644 --- a/eth2util/signing/signing.go +++ b/eth2util/signing/signing.go @@ -52,6 +52,11 @@ func GetDomain(ctx context.Context, eth2Cl eth2wrap.Client, name DomainName, epo return eth2p0.Domain{}, errors.New("invalid domain type") } + // Domain needs to be genesis one for DomainApplicationBuilder + if name == DomainApplicationBuilder { + return eth2Cl.GenesisDomain(ctx, domainTyped) + } + return eth2Cl.Domain(ctx, domainTyped, epoch) } diff --git a/eth2util/signing/signing_test.go b/eth2util/signing/signing_test.go index dac379fae..0639a0ecd 100644 --- a/eth2util/signing/signing_test.go +++ b/eth2util/signing/signing_test.go @@ -13,6 +13,8 @@ import ( eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/stretchr/testify/require" + "github.com/obolnetwork/charon/eth2util" + "github.com/obolnetwork/charon/eth2util/registration" "github.com/obolnetwork/charon/eth2util/signing" "github.com/obolnetwork/charon/tbls" "github.com/obolnetwork/charon/tbls/tblsconv" @@ -32,24 +34,27 @@ func TestVerifyRegistrationReference(t *testing.T) { require.NoError(t, err) registrationJSON := ` - { - "message": { - "fee_recipient": "0x000000000000000000000000000000000000dead", - "gas_limit": "30000000", - "timestamp": "1646092800", - "pubkey": "0x86966350b672bd502bfbdb37a6ea8a7392e8fb7f5ebb5c5e2055f4ee168ebfab0fef63084f28c9f62c3ba71f825e527e" - }, - "signature": "0xb101da0fc08addcc5d010ee569f6bbbdca049a5cb27efad231565bff2e3af504ec2bb87b11ed22843e9c1094f1dfe51a0b2a5ad1808df18530a2f59f004032dbf6281ecf0fc3df86d032da5b9d32a3d282c05923de491381f8f28c2863a00180" - }` - - registration := new(eth2v1.SignedValidatorRegistration) - err = json.Unmarshal([]byte(registrationJSON), registration) + { + "message": { + "fee_recipient": "0x000000000000000000000000000000000000dEaD", + "gas_limit": "30000000", + "timestamp": "1646092800", + "pubkey": "0x86966350b672bd502bfbdb37a6ea8a7392e8fb7f5ebb5c5e2055f4ee168ebfab0fef63084f28c9f62c3ba71f825e527e" + }, + "signature": "0xad393c5b42b382cf93cd14f302b0175b4f9ccb000c201d42c3a6389971b8d910a81333d55ad2944b836a9bb35ba968ab06635dcd706380516ad0c653f48b1c6d52b8771c78d708e943b3ea8da59392fbf909decde262adc944fe3e57120d9bb4" + }` + + reg := new(eth2v1.SignedValidatorRegistration) + err = json.Unmarshal([]byte(registrationJSON), reg) require.NoError(t, err) - sigRoot, err := registration.Message.HashTreeRoot() + sigRoot, err := reg.Message.HashTreeRoot() require.NoError(t, err) - sigData, err := signing.GetDataRoot(context.Background(), bmock, signing.DomainApplicationBuilder, 0, sigRoot) + fork, err := eth2util.NetworkToForkVersionBytes("holesky") + require.NoError(t, err) + + sigData, err := registration.GetMessageSigningRoot(reg.Message, eth2p0.Version(fork)) require.NoError(t, err) sig, err := tbls.Sign(secretShare, sigData[:]) @@ -57,7 +62,7 @@ func TestVerifyRegistrationReference(t *testing.T) { sigEth2 := eth2p0.BLSSignature(sig) require.Equal(t, - hex.EncodeToString(registration.Signature[:]), + hex.EncodeToString(reg.Signature[:]), hex.EncodeToString(sigEth2[:]), ) @@ -69,10 +74,10 @@ func TestVerifyRegistrationReference(t *testing.T) { } func TestConstantApplicationBuilder(t *testing.T) { - v0 := eth2p0.Version{0x00, 0x00, 0x10, 0x20} - v1 := eth2p0.Version{0x01, 0x00, 0x10, 0x20} - v2 := eth2p0.Version{0x02, 0x00, 0x10, 0x20} - v3 := eth2p0.Version{0x03, 0x00, 0x10, 0x20} + v0 := eth2p0.Version{0x01, 0x01, 0x70, 0x00} + v1 := eth2p0.Version{0x02, 0x01, 0x70, 0x00} + v2 := eth2p0.Version{0x03, 0x01, 0x70, 0x00} + v3 := eth2p0.Version{0x04, 0x01, 0x70, 0x00} forkSchedule := []*eth2p0.Fork{ {PreviousVersion: v0, CurrentVersion: v0, Epoch: 0}, @@ -97,10 +102,10 @@ func TestConstantApplicationBuilder(t *testing.T) { // Assert genesis domain is used for any fork schedule. expect := eth2p0.Domain{ - 0x00, 0x00, 0x00, 0x01, 0xe4, 0xbe, 0x93, 0x93, - 0xb0, 0x74, 0xca, 0x1f, 0x3e, 0x4a, 0xab, 0xd5, - 0x85, 0xca, 0x4b, 0xea, 0x10, 0x11, 0x70, 0xcc, - 0xfa, 0xf7, 0x1b, 0x89, 0xce, 0x5c, 0x5c, 0x38, + 0x0, 0x0, 0x0, 0x1, 0x5b, 0x83, 0xa2, 0x37, + 0x59, 0xc5, 0x60, 0xb2, 0xd0, 0xc6, 0x45, 0x76, + 0xe1, 0xdc, 0xfc, 0x34, 0xea, 0x94, 0xc4, 0x98, + 0x8f, 0x3e, 0xd, 0x9f, 0x77, 0xf0, 0x53, 0x87, } for i := range len(forkSchedule) { diff --git a/testutil/beaconmock/options.go b/testutil/beaconmock/options.go index 1e9905530..201648a27 100644 --- a/testutil/beaconmock/options.go +++ b/testutil/beaconmock/options.go @@ -528,7 +528,7 @@ func defaultMock(httpMock HTTPMock, httpServer *http.Server, clock clockwork.Clo return block, nil }, SignedBeaconBlockFunc: func(context.Context, string) (*eth2spec.VersionedSignedBeaconBlock, error) { - return testutil.RandomCapellaVersionedSignedBeaconBlock(), nil // Note the slot is probably wrong. + return testutil.RandomDenebVersionedSignedBeaconBlock(), nil // Note the slot is probably wrong. }, ProposerDutiesFunc: func(context.Context, eth2p0.Epoch, []eth2p0.ValidatorIndex) ([]*eth2v1.ProposerDuty, error) { return []*eth2v1.ProposerDuty{}, nil diff --git a/testutil/beaconmock/server_test.go b/testutil/beaconmock/server_test.go index a022c0958..98f204a55 100644 --- a/testutil/beaconmock/server_test.go +++ b/testutil/beaconmock/server_test.go @@ -25,11 +25,12 @@ func TestStatic(t *testing.T) { configResp, err := eth2Cl.Spec(ctx, ð2api.SpecOpts{}) require.NoError(t, err) - require.Equal(t, uint64(36660), configResp.Data["ALTAIR_FORK_EPOCH"]) + require.Equal(t, uint64(0), configResp.Data["ALTAIR_FORK_EPOCH"]) + require.Equal(t, uint64(29696), configResp.Data["DENEB_FORK_EPOCH"]) contractResp, err := eth2Cl.DepositContract(ctx, ð2api.DepositContractOpts{}) require.NoError(t, err) - require.Equal(t, uint64(5), contractResp.Data.ChainID) + require.Equal(t, uint64(17000), contractResp.Data.ChainID) slotsPerEpoch, err := eth2Cl.SlotsPerEpoch(ctx) require.NoError(t, err) diff --git a/testutil/beaconmock/static.json b/testutil/beaconmock/static.json index 7902ec02a..41ef96e6a 100644 --- a/testutil/beaconmock/static.json +++ b/testutil/beaconmock/static.json @@ -1,176 +1,196 @@ { "/eth/v1/beacon/genesis": { "data": { - "genesis_time": "1616508000", - "genesis_validators_root": "0x043db0d9a83813551ee2f33450d23797757d430911a9320530ad8a0eabc43efb", - "genesis_fork_version": "0x00001020" + "genesis_time": "1695902400", + "genesis_validators_root": "0x9143aa7c615a7f7115e2b6aac319c03529df8242ae705fba9df39b79c59fa8b1", + "genesis_fork_version": "0x01017000" } }, "/eth/v1/config/deposit_contract": { "data": { - "chain_id": "5", - "address": "0xff50ed3d0ec03aC01D4C79aAd74928BFF48a7b2b" + "chain_id": "17000", + "address": "0x4242424242424242424242424242424242424242" } }, "/eth/v1/config/fork_schedule": { "data": [ { - "previous_version": "0x00001020", - "current_version": "0x00001020", + "previous_version": "0x01017000", + "current_version": "0x01017000", "epoch": "0" }, { - "previous_version": "0x00001020", - "current_version": "0x01001020", - "epoch": "36660" + "previous_version": "0x01017000", + "current_version": "0x02017000", + "epoch": "0" }, { - "previous_version": "0x01001020", - "current_version": "0x02001020", - "epoch": "112260" + "previous_version": "0x02017000", + "current_version": "0x03017000", + "epoch": "0" + }, + { + "previous_version": "0x03017000", + "current_version": "0x04017000", + "epoch": "256" + }, + { + "previous_version": "0x04017000", + "current_version": "0x05017000", + "epoch": "29696" } ] }, "/eth/v1/node/version": { "data": { - "version": "teku/v22.8.0/linux-x86_64/-eclipseadoptium-openjdk64bitservervm-java-17" + "version": "teku/v24.6.1/linux-x86_64/-ubuntu-openjdk64bitservervm-java-21" } }, "/eth/v1/config/spec": { "data": { - "ALTAIR_FORK_EPOCH": "36660", - "ALTAIR_FORK_VERSION": "0x01001020", - "ATTESTATION_PROPAGATION_SLOT_RANGE": "32", - "ATTESTATION_SUBNET_COUNT": "64", - "ATTESTATION_SUBNET_EXTRA_BITS": "0", - "ATTESTATION_SUBNET_PREFIX_BITS": "6", - "BASE_REWARD_FACTOR": "64", - "BELLATRIX_FORK_EPOCH": "112260", - "BELLATRIX_FORK_VERSION": "0x02001020", - "BLS_WITHDRAWAL_PREFIX": "0x00", - "BYTES_PER_LOGS_BLOOM": "256", - "CHURN_LIMIT_QUOTIENT": "65536", - "CONFIG_NAME": "prater", - "DEPOSIT_CHAIN_ID": "5", - "DEPOSIT_CONTRACT_ADDRESS": "0xff50ed3d0ec03aC01D4C79aAd74928BFF48a7b2b", - "DEPOSIT_NETWORK_ID": "5", - "DOMAIN_AGGREGATE_AND_PROOF": "0x06000000", - "DOMAIN_APPLICATION_BUILDER": "0x00000001", - "DOMAIN_BEACON_ATTESTER": "0x01000000", - "DOMAIN_BEACON_PROPOSER": "0x00000000", - "DOMAIN_CONTRIBUTION_AND_PROOF": "0x09000000", - "DOMAIN_DEPOSIT": "0x03000000", - "DOMAIN_RANDAO": "0x02000000", - "DOMAIN_SELECTION_PROOF": "0x05000000", - "DOMAIN_SYNC_COMMITTEE": "0x07000000", - "DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF": "0x08000000", - "DOMAIN_VOLUNTARY_EXIT": "0x04000000", - "EFFECTIVE_BALANCE_INCREMENT": "1000000000", - "EJECTION_BALANCE": "16000000000", - "EPOCHS_PER_ETH1_VOTING_PERIOD": "4", - "EPOCHS_PER_HISTORICAL_VECTOR": "64", - "EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION": "256", - "EPOCHS_PER_SLASHINGS_VECTOR": "64", - "EPOCHS_PER_SUBNET_SUBSCRIPTION": "256", - "EPOCHS_PER_SYNC_COMMITTEE_PERIOD": "256", - "ETH1_FOLLOW_DISTANCE": "2048", - "GOSSIP_MAX_SIZE": "10485760", - "GENESIS_DELAY": "1919188", - "GENESIS_FORK_VERSION": "0x00001020", - "HISTORICAL_ROOTS_LIMIT": "16777216", - "HYSTERESIS_DOWNWARD_MULTIPLIER": "1", - "HYSTERESIS_QUOTIENT": "4", - "HYSTERESIS_UPWARD_MULTIPLIER": "5", - "INACTIVITY_PENALTY_QUOTIENT": "33554432", - "INACTIVITY_PENALTY_QUOTIENT_ALTAIR": "50331648", - "INACTIVITY_PENALTY_QUOTIENT_BELLATRIX": "16777216", + "SLOTS_PER_EPOCH": "32", + "PRESET_BASE": "mainnet", + "TERMINAL_TOTAL_DIFFICULTY": "0", "INACTIVITY_SCORE_BIAS": "4", - "INACTIVITY_SCORE_RECOVERY_RATE": "16", - "MAX_ATTESTATIONS": "128", + "PENDING_BALANCE_DEPOSITS_LIMIT": "134217728", "MAX_ATTESTER_SLASHINGS": "2", - "MAX_CHUNK_SIZE": "10485760", + "MAX_WITHDRAWALS_PER_PAYLOAD": "16", + "INACTIVITY_PENALTY_QUOTIENT_BELLATRIX": "16777216", + "PENDING_PARTIAL_WITHDRAWALS_LIMIT": "134217728", + "INACTIVITY_PENALTY_QUOTIENT": "67108864", + "SAFE_SLOTS_TO_UPDATE_JUSTIFIED": "8", + "SECONDS_PER_ETH1_BLOCK": "14", + "MIN_SEED_LOOKAHEAD": "1", + "VALIDATOR_REGISTRY_LIMIT": "1099511627776", + "REORG_MAX_EPOCHS_SINCE_FINALIZATION": "2", + "SLOTS_PER_HISTORICAL_ROOT": "8192", + "RESP_TIMEOUT": "10", + "DOMAIN_VOLUNTARY_EXIT": "0x04000000", + "MAX_VALIDATORS_PER_COMMITTEE": "2048", + "MIN_GENESIS_TIME": "1695902100", + "ALTAIR_FORK_EPOCH": "0", + "HYSTERESIS_QUOTIENT": "4", + "ALTAIR_FORK_VERSION": "0x02017000", "MAX_BYTES_PER_TRANSACTION": "1073741824", - "MAX_COMMITTEES_PER_SLOT": "4", + "MAX_CHUNK_SIZE": "10485760", + "TTFB_TIMEOUT": "5", + "WHISTLEBLOWER_REWARD_QUOTIENT": "512", + "PROPOSER_REWARD_QUOTIENT": "8", + "MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP": "16384", + "EPOCHS_PER_HISTORICAL_VECTOR": "65536", + "MIN_PER_EPOCH_CHURN_LIMIT": "4", + "MAX_ATTESTER_SLASHINGS_ELECTRA": "1", + "TARGET_AGGREGATORS_PER_SYNC_SUBCOMMITTEE": "16", "MAX_DEPOSITS": "16", - "MAX_EFFECTIVE_BALANCE": "32000000000", + "BELLATRIX_FORK_EPOCH": "0", + "MAX_REQUEST_BLOB_SIDECARS": "768", + "REORG_HEAD_WEIGHT_THRESHOLD": "20", + "TARGET_AGGREGATORS_PER_COMMITTEE": "16", + "DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF": "0x08000000", + "MESSAGE_DOMAIN_INVALID_SNAPPY": "0x00000000", + "EPOCHS_PER_SLASHINGS_VECTOR": "8192", + "MIN_SLASHING_PENALTY_QUOTIENT": "128", + "MAX_BLS_TO_EXECUTION_CHANGES": "16", + "GOSSIP_MAX_SIZE": "10485760", + "DOMAIN_BEACON_ATTESTER": "0x01000000", + "EPOCHS_PER_SUBNET_SUBSCRIPTION": "256", + "MAX_ATTESTATIONS_ELECTRA": "8", + "ATTESTATION_SUBNET_COUNT": "64", + "GENESIS_DELAY": "300", + "MAX_SEED_LOOKAHEAD": "4", + "ETH1_FOLLOW_DISTANCE": "2048", + "SECONDS_PER_SLOT": "12", + "REORG_PARENT_WEIGHT_THRESHOLD": "160", + "MIN_SYNC_COMMITTEE_PARTICIPANTS": "1", + "BELLATRIX_FORK_VERSION": "0x03017000", + "PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX": "3", + "EFFECTIVE_BALANCE_INCREMENT": "1000000000", + "FIELD_ELEMENTS_PER_BLOB": "4096", + "MIN_EPOCHS_TO_INACTIVITY_PENALTY": "4", + "BASE_REWARD_FACTOR": "64", "MAX_EXTRA_DATA_BYTES": "32", + "CONFIG_NAME": "holesky", "MAX_PROPOSER_SLASHINGS": "16", - "MAX_REQUEST_BLOCKS": "1024", - "MAX_SEED_LOOKAHEAD": "4", + "MAX_CONSOLIDATIONS": "1", + "INACTIVITY_SCORE_RECOVERY_RATE": "16", + "MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS": "4096", "MAX_TRANSACTIONS_PER_PAYLOAD": "1048576", - "MAX_VALIDATORS_PER_COMMITTEE": "2048", - "MAX_VOLUNTARY_EXITS": "16", - "MAXIMUM_GOSSIP_CLOCK_DISPARITY": "500", - "MESSAGE_DOMAIN_INVALID_SNAPPY": "0x00000000", - "MESSAGE_DOMAIN_VALID_SNAPPY": "0x01000000", + "DEPOSIT_CONTRACT_ADDRESS": "0x4242424242424242424242424242424242424242", "MIN_ATTESTATION_INCLUSION_DELAY": "1", - "MIN_DEPOSIT_AMOUNT": "1000000000", - "MIN_EPOCHS_FOR_BLOCK_REQUESTS": "33024", - "MIN_EPOCHS_TO_INACTIVITY_PENALTY": "4", - "MIN_GENESIS_ACTIVE_VALIDATOR_COUNT": "16384", - "MIN_GENESIS_TIME": "1614588812", - "MIN_PER_EPOCH_CHURN_LIMIT": "4", - "MIN_SEED_LOOKAHEAD": "1", - "MIN_SLASHING_PENALTY_QUOTIENT": "64", - "MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR": "64", + "SHUFFLE_ROUND_COUNT": "90", + "TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH": "18446744073709551615", + "MAX_EFFECTIVE_BALANCE": "32000000000", + "DOMAIN_BEACON_PROPOSER": "0x00000000", + "DENEB_FORK_EPOCH": "29696", + "DOMAIN_SYNC_COMMITTEE": "0x07000000", + "PROPOSER_SCORE_BOOST": "40", + "DOMAIN_SELECTION_PROOF": "0x05000000", "MIN_SLASHING_PENALTY_QUOTIENT_BELLATRIX": "32", - "MIN_SYNC_COMMITTEE_PARTICIPANTS": "1", - "MIN_VALIDATOR_WITHDRAWABILITY_DELAY": "256", - "PRESET_BASE": "minimal", - "PROPORTIONAL_SLASHING_MULTIPLIER": "2", - "PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR": "2", - "PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX": "3", - "PROPOSER_REWARD_QUOTIENT": "8", - "PROPOSER_SCORE_BOOST": "70", - "RANDOM_SUBNETS_PER_VALIDATOR": "1", - "RESP_TIMEOUT": "10", - "SAFE_SLOTS_TO_UPDATE_JUSTIFIED": "8", - "SECONDS_PER_ETH1_BLOCK": "14", - "SECONDS_PER_SLOT": "12", - "SHARD_COMMITTEE_PERIOD": "256", - "SHUFFLE_ROUND_COUNT": "10", - "SLOTS_PER_EPOCH": "32", - "SLOTS_PER_HISTORICAL_ROOT": "64", + "MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT": "8", + "HYSTERESIS_UPWARD_MULTIPLIER": "5", "SUBNETS_PER_NODE": "2", - "SYNC_COMMITTEE_SIZE": "512", - "SYNC_COMMITTEE_SUBNET_COUNT": "4", - "TARGET_AGGREGATORS_PER_COMMITTEE": "16", - "TARGET_AGGREGATORS_PER_SYNC_SUBCOMMITTEE": "16", - "TARGET_COMMITTEE_SIZE": "4", + "MIN_DEPOSIT_AMOUNT": "1000000000", + "MIN_SLASHING_PENALTY_QUOTIENT_ELECTRA": "4096", + "PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR": "2", + "MAX_BLOBS_PER_BLOCK": "6", + "MIN_VALIDATOR_WITHDRAWABILITY_DELAY": "256", + "MAXIMUM_GOSSIP_CLOCK_DISPARITY": "500", + "TARGET_COMMITTEE_SIZE": "128", "TERMINAL_BLOCK_HASH": "0x0000000000000000000000000000000000000000000000000000000000000000", - "TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH": "18446744073709551615", - "TERMINAL_TOTAL_DIFFICULTY": "10790000", - "TTFB_TIMEOUT": "5", + "DOMAIN_DEPOSIT": "0x03000000", + "DOMAIN_CONTRIBUTION_AND_PROOF": "0x09000000", "UPDATE_TIMEOUT": "8192", - "VALIDATOR_REGISTRY_LIMIT": "1099511627776", - "WHISTLEBLOWER_REWARD_QUOTIENT": "512" + "ELECTRA_FORK_EPOCH": "18446744073709551615", + "SYNC_COMMITTEE_BRANCH_LENGTH": "5", + "DEPOSIT_CHAIN_ID": "17000", + "MAX_BLOB_COMMITMENTS_PER_BLOCK": "4096", + "DOMAIN_RANDAO": "0x02000000", + "CAPELLA_FORK_VERSION": "0x04017000", + "MAX_EFFECTIVE_BALANCE_ELECTRA": "2048000000000", + "MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR": "64", + "EPOCHS_PER_ETH1_VOTING_PERIOD": "64", + "MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD": "8192", + "WHISTLEBLOWER_REWARD_QUOTIENT_ELECTRA": "4096", + "HISTORICAL_ROOTS_LIMIT": "16777216", + "ATTESTATION_PROPAGATION_SLOT_RANGE": "32", + "SYNC_COMMITTEE_SIZE": "512", + "ATTESTATION_SUBNET_PREFIX_BITS": "6", + "PROPORTIONAL_SLASHING_MULTIPLIER": "1", + "MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD": "16", + "MESSAGE_DOMAIN_VALID_SNAPPY": "0x01000000", + "MAX_VOLUNTARY_EXITS": "16", + "PENDING_CONSOLIDATIONS_LIMIT": "262144", + "HYSTERESIS_DOWNWARD_MULTIPLIER": "1", + "DOMAIN_APPLICATION_BUILDER": "0x00000001", + "MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP": "8", + "EPOCHS_PER_SYNC_COMMITTEE_PERIOD": "256", + "BYTES_PER_LOGS_BLOOM": "256", + "MIN_GENESIS_ACTIVE_VALIDATOR_COUNT": "16384", + "MAX_ATTESTATIONS": "128", + "MIN_EPOCHS_FOR_BLOCK_REQUESTS": "33024", + "DENEB_FORK_VERSION": "0x05017000", + "ELECTRA_FORK_VERSION": "0x06017000", + "MAX_REQUEST_BLOCKS": "1024", + "GENESIS_FORK_VERSION": "0x01017000", + "KZG_COMMITMENT_INCLUSION_PROOF_DEPTH": "17", + "DEPOSIT_NETWORK_ID": "17000", + "MAX_REQUEST_BLOCKS_DENEB": "128", + "BLOB_SIDECAR_SUBNET_COUNT": "6", + "SYNC_COMMITTEE_SUBNET_COUNT": "4", + "CAPELLA_FORK_EPOCH": "256", + "EJECTION_BALANCE": "28000000000", + "ATTESTATION_SUBNET_EXTRA_BITS": "0", + "MAX_COMMITTEES_PER_SLOT": "64", + "SHARD_COMMITTEE_PERIOD": "256", + "INACTIVITY_PENALTY_QUOTIENT_ALTAIR": "50331648", + "DOMAIN_AGGREGATE_AND_PROOF": "0x06000000", + "CHURN_LIMIT_QUOTIENT": "65536", + "BLS_WITHDRAWAL_PREFIX": "0x00", + "MIN_ACTIVATION_BALANCE": "32000000000" } }, "/eth/v2/beacon/blocks/0": { - "version": "phase0", - "execution_optimistic": false, - "data": { - "message": { - "slot": "0", - "proposer_index": "0", - "parent_root": "0x0000000000000000000000000000000000000000000000000000000000000000", - "state_root": "0x895390e92edc03df7096e9f51e51896e8dbe6e7e838180dadbfd869fdd77a659", - "body": { - "randao_reveal": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "eth1_data": { - "deposit_root": "0x0000000000000000000000000000000000000000000000000000000000000000", - "deposit_count": "0", - "block_hash": "0x0000000000000000000000000000000000000000000000000000000000000000" - }, - "graffiti": "0x0000000000000000000000000000000000000000000000000000000000000000", - "proposer_slashings": [], - "attester_slashings": [], - "attestations": [], - "deposits": [], - "voluntary_exits": [] - } - }, - "signature": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - } + "code": 404, + "message": "Not found" } } diff --git a/testutil/integration/simnet_test.go b/testutil/integration/simnet_test.go index 5029970b5..2b4ff0378 100644 --- a/testutil/integration/simnet_test.go +++ b/testutil/integration/simnet_test.go @@ -196,7 +196,9 @@ func newSimnetArgs(t *testing.T) simnetArgs { ) seed := 99 random := rand.New(rand.NewSource(int64(seed))) - lock, p2pKeys, secretShares := cluster.NewForT(t, numDVs, n, n, seed, random) + lock, p2pKeys, secretShares := cluster.NewForT(t, numDVs, n, n, seed, random, func(definition *cluster.Definition) { + definition.ForkVersion = []byte{0x01, 0x01, 0x70, 0x00} + }) secrets := secretShares[0] From f0d3aab85a0120aacf99be86a1b760433a82a925 Mon Sep 17 00:00:00 2001 From: Andrei Smirnov Date: Fri, 18 Oct 2024 12:53:15 +0300 Subject: [PATCH 08/24] app/version: v1.2-rc --- app/version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/version/version.go b/app/version/version.go index 8fdc5c540..0e1174dab 100644 --- a/app/version/version.go +++ b/app/version/version.go @@ -15,7 +15,7 @@ import ( ) // version a string since it is overwritten at build-time with the git tag for official releases. -var version = "v1.1-rc" +var version = "v1.2-rc" // Version is the branch version of the codebase. // - Main branch: v0.X-dev From 1e786933f788c4fc5c59e15d0e13043c075e6f9e Mon Sep 17 00:00:00 2001 From: Andrei Smirnov Date: Thu, 10 Oct 2024 10:51:06 +0300 Subject: [PATCH 09/24] *: bumped protoc-gen-go (#3331) The new protoc-gen-go v1.35.1 needs our proto files to be regenerarted, otherwise pre-commit is failing. category: fixbuild ticket: none --- app/log/loki/lokipb/v1/loki.pb.go | 70 ++------ app/peerinfo/peerinfopb/v1/peerinfo.pb.go | 26 +-- app/protonil/testdata/v1/test.pb.go | 136 +++------------ cluster/manifestpb/v1/manifest.pb.go | 202 ++++------------------ core/corepb/v1/consensus.pb.go | 114 +++--------- core/corepb/v1/core.pb.go | 92 ++-------- core/corepb/v1/parsigex.pb.go | 26 +-- core/corepb/v1/priority.pb.go | 114 +++--------- core/validatorapi/validatorapi_test.go | 2 +- dkg/dkgpb/v1/bcast.pb.go | 70 ++------ dkg/dkgpb/v1/frost.pb.go | 158 ++++------------- dkg/dkgpb/v1/nodesigs.pb.go | 26 +-- dkg/dkgpb/v1/sync.pb.go | 48 +---- 13 files changed, 201 insertions(+), 883 deletions(-) diff --git a/app/log/loki/lokipb/v1/loki.pb.go b/app/log/loki/lokipb/v1/loki.pb.go index 4b6d54ab0..30c9403ae 100644 --- a/app/log/loki/lokipb/v1/loki.pb.go +++ b/app/log/loki/lokipb/v1/loki.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: app/log/loki/lokipb/v1/loki.proto @@ -31,11 +31,9 @@ type PushRequest struct { func (x *PushRequest) Reset() { *x = PushRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_app_log_loki_lokipb_v1_loki_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_log_loki_lokipb_v1_loki_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PushRequest) String() string { @@ -46,7 +44,7 @@ func (*PushRequest) ProtoMessage() {} func (x *PushRequest) ProtoReflect() protoreflect.Message { mi := &file_app_log_loki_lokipb_v1_loki_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80,11 +78,9 @@ type Stream struct { func (x *Stream) Reset() { *x = Stream{} - if protoimpl.UnsafeEnabled { - mi := &file_app_log_loki_lokipb_v1_loki_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_log_loki_lokipb_v1_loki_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stream) String() string { @@ -95,7 +91,7 @@ func (*Stream) ProtoMessage() {} func (x *Stream) ProtoReflect() protoreflect.Message { mi := &file_app_log_loki_lokipb_v1_loki_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,11 +138,9 @@ type Entry struct { func (x *Entry) Reset() { *x = Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_app_log_loki_lokipb_v1_loki_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_log_loki_lokipb_v1_loki_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entry) String() string { @@ -157,7 +151,7 @@ func (*Entry) ProtoMessage() {} func (x *Entry) ProtoReflect() protoreflect.Message { mi := &file_app_log_loki_lokipb_v1_loki_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -253,44 +247,6 @@ func file_app_log_loki_lokipb_v1_loki_proto_init() { if File_app_log_loki_lokipb_v1_loki_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_app_log_loki_lokipb_v1_loki_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PushRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_log_loki_lokipb_v1_loki_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Stream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_log_loki_lokipb_v1_loki_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/app/peerinfo/peerinfopb/v1/peerinfo.pb.go b/app/peerinfo/peerinfopb/v1/peerinfo.pb.go index daaa60454..e23453cf0 100644 --- a/app/peerinfo/peerinfopb/v1/peerinfo.pb.go +++ b/app/peerinfo/peerinfopb/v1/peerinfo.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: app/peerinfo/peerinfopb/v1/peerinfo.proto @@ -36,11 +36,9 @@ type PeerInfo struct { func (x *PeerInfo) Reset() { *x = PeerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_app_peerinfo_peerinfopb_v1_peerinfo_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_peerinfo_peerinfopb_v1_peerinfo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PeerInfo) String() string { @@ -51,7 +49,7 @@ func (*PeerInfo) ProtoMessage() {} func (x *PeerInfo) ProtoReflect() protoreflect.Message { mi := &file_app_peerinfo_peerinfopb_v1_peerinfo_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,20 +173,6 @@ func file_app_peerinfo_peerinfopb_v1_peerinfo_proto_init() { if File_app_peerinfo_peerinfopb_v1_peerinfo_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_app_peerinfo_peerinfopb_v1_peerinfo_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PeerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_app_peerinfo_peerinfopb_v1_peerinfo_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/app/protonil/testdata/v1/test.pb.go b/app/protonil/testdata/v1/test.pb.go index 8b50c2d1b..be5292b85 100644 --- a/app/protonil/testdata/v1/test.pb.go +++ b/app/protonil/testdata/v1/test.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: app/protonil/testdata/v1/test.proto @@ -32,11 +32,9 @@ type M1 struct { func (x *M1) Reset() { *x = M1{} - if protoimpl.UnsafeEnabled { - mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *M1) String() string { @@ -47,7 +45,7 @@ func (*M1) ProtoMessage() {} func (x *M1) ProtoReflect() protoreflect.Message { mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95,11 +93,9 @@ type M2 struct { func (x *M2) Reset() { *x = M2{} - if protoimpl.UnsafeEnabled { - mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *M2) String() string { @@ -110,7 +106,7 @@ func (*M2) ProtoMessage() {} func (x *M2) ProtoReflect() protoreflect.Message { mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,11 +152,9 @@ type M3 struct { func (x *M3) Reset() { *x = M3{} - if protoimpl.UnsafeEnabled { - mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *M3) String() string { @@ -171,7 +165,7 @@ func (*M3) ProtoMessage() {} func (x *M3) ProtoReflect() protoreflect.Message { mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -205,11 +199,9 @@ type M4 struct { func (x *M4) Reset() { *x = M4{} - if protoimpl.UnsafeEnabled { - mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *M4) String() string { @@ -220,7 +212,7 @@ func (*M4) ProtoMessage() {} func (x *M4) ProtoReflect() protoreflect.Message { mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +259,9 @@ type MaxIndex struct { func (x *MaxIndex) Reset() { *x = MaxIndex{} - if protoimpl.UnsafeEnabled { - mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaxIndex) String() string { @@ -282,7 +272,7 @@ func (*MaxIndex) ProtoMessage() {} func (x *MaxIndex) ProtoReflect() protoreflect.Message { mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -321,11 +311,9 @@ type Attack struct { func (x *Attack) Reset() { *x = Attack{} - if protoimpl.UnsafeEnabled { - mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attack) String() string { @@ -336,7 +324,7 @@ func (*Attack) ProtoMessage() {} func (x *Attack) ProtoReflect() protoreflect.Message { mi := &file_app_protonil_testdata_v1_test_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -502,80 +490,6 @@ func file_app_protonil_testdata_v1_test_proto_init() { if File_app_protonil_testdata_v1_test_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_app_protonil_testdata_v1_test_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*M1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_protonil_testdata_v1_test_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*M2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_protonil_testdata_v1_test_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*M3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_protonil_testdata_v1_test_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*M4); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_protonil_testdata_v1_test_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MaxIndex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_app_protonil_testdata_v1_test_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Attack); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_app_protonil_testdata_v1_test_proto_msgTypes[0].OneofWrappers = []any{} file_app_protonil_testdata_v1_test_proto_msgTypes[1].OneofWrappers = []any{} file_app_protonil_testdata_v1_test_proto_msgTypes[5].OneofWrappers = []any{} diff --git a/cluster/manifestpb/v1/manifest.pb.go b/cluster/manifestpb/v1/manifest.pb.go index aa6b000c1..cec646a99 100644 --- a/cluster/manifestpb/v1/manifest.pb.go +++ b/cluster/manifestpb/v1/manifest.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: cluster/manifestpb/v1/manifest.proto @@ -39,11 +39,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -54,7 +52,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138,11 +136,9 @@ type Mutation struct { func (x *Mutation) Reset() { *x = Mutation{} - if protoimpl.UnsafeEnabled { - mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation) String() string { @@ -153,7 +149,7 @@ func (*Mutation) ProtoMessage() {} func (x *Mutation) ProtoReflect() protoreflect.Message { mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +198,9 @@ type SignedMutation struct { func (x *SignedMutation) Reset() { *x = SignedMutation{} - if protoimpl.UnsafeEnabled { - mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignedMutation) String() string { @@ -217,7 +211,7 @@ func (*SignedMutation) ProtoMessage() {} func (x *SignedMutation) ProtoReflect() protoreflect.Message { mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +258,9 @@ type SignedMutationList struct { func (x *SignedMutationList) Reset() { *x = SignedMutationList{} - if protoimpl.UnsafeEnabled { - mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignedMutationList) String() string { @@ -279,7 +271,7 @@ func (*SignedMutationList) ProtoMessage() {} func (x *SignedMutationList) ProtoReflect() protoreflect.Message { mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +305,9 @@ type Operator struct { func (x *Operator) Reset() { *x = Operator{} - if protoimpl.UnsafeEnabled { - mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Operator) String() string { @@ -328,7 +318,7 @@ func (*Operator) ProtoMessage() {} func (x *Operator) ProtoReflect() protoreflect.Message { mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +362,9 @@ type Validator struct { func (x *Validator) Reset() { *x = Validator{} - if protoimpl.UnsafeEnabled { - mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Validator) String() string { @@ -387,7 +375,7 @@ func (*Validator) ProtoMessage() {} func (x *Validator) ProtoReflect() protoreflect.Message { mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -448,11 +436,9 @@ type ValidatorList struct { func (x *ValidatorList) Reset() { *x = ValidatorList{} - if protoimpl.UnsafeEnabled { - mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidatorList) String() string { @@ -463,7 +449,7 @@ func (*ValidatorList) ProtoMessage() {} func (x *ValidatorList) ProtoReflect() protoreflect.Message { mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +482,9 @@ type LegacyLock struct { func (x *LegacyLock) Reset() { *x = LegacyLock{} - if protoimpl.UnsafeEnabled { - mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LegacyLock) String() string { @@ -511,7 +495,7 @@ func (*LegacyLock) ProtoMessage() {} func (x *LegacyLock) ProtoReflect() protoreflect.Message { mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -542,11 +526,9 @@ type Empty struct { func (x *Empty) Reset() { *x = Empty{} - if protoimpl.UnsafeEnabled { - mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Empty) String() string { @@ -557,7 +539,7 @@ func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_cluster_manifestpb_v1_manifest_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -700,116 +682,6 @@ func file_cluster_manifestpb_v1_manifest_proto_init() { if File_cluster_manifestpb_v1_manifest_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_cluster_manifestpb_v1_manifest_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cluster_manifestpb_v1_manifest_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Mutation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cluster_manifestpb_v1_manifest_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SignedMutation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cluster_manifestpb_v1_manifest_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SignedMutationList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cluster_manifestpb_v1_manifest_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Operator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cluster_manifestpb_v1_manifest_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Validator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cluster_manifestpb_v1_manifest_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ValidatorList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cluster_manifestpb_v1_manifest_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*LegacyLock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cluster_manifestpb_v1_manifest_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Empty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/core/corepb/v1/consensus.pb.go b/core/corepb/v1/consensus.pb.go index 82ceec09a..fb70b6c67 100644 --- a/core/corepb/v1/consensus.pb.go +++ b/core/corepb/v1/consensus.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: core/corepb/v1/consensus.proto @@ -39,11 +39,9 @@ type QBFTMsg struct { func (x *QBFTMsg) Reset() { *x = QBFTMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_consensus_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_consensus_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QBFTMsg) String() string { @@ -54,7 +52,7 @@ func (*QBFTMsg) ProtoMessage() {} func (x *QBFTMsg) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_consensus_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137,11 +135,9 @@ type ConsensusMsg struct { func (x *ConsensusMsg) Reset() { *x = ConsensusMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_consensus_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_consensus_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConsensusMsg) String() string { @@ -152,7 +148,7 @@ func (*ConsensusMsg) ProtoMessage() {} func (x *ConsensusMsg) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_consensus_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,11 +195,9 @@ type SniffedConsensusMsg struct { func (x *SniffedConsensusMsg) Reset() { *x = SniffedConsensusMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_consensus_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_consensus_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SniffedConsensusMsg) String() string { @@ -214,7 +208,7 @@ func (*SniffedConsensusMsg) ProtoMessage() {} func (x *SniffedConsensusMsg) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_consensus_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,11 +250,9 @@ type SniffedConsensusInstance struct { func (x *SniffedConsensusInstance) Reset() { *x = SniffedConsensusInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_consensus_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_consensus_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SniffedConsensusInstance) String() string { @@ -271,7 +263,7 @@ func (*SniffedConsensusInstance) ProtoMessage() {} func (x *SniffedConsensusInstance) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_consensus_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -325,11 +317,9 @@ type SniffedConsensusInstances struct { func (x *SniffedConsensusInstances) Reset() { *x = SniffedConsensusInstances{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_consensus_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_consensus_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SniffedConsensusInstances) String() string { @@ -340,7 +330,7 @@ func (*SniffedConsensusInstances) ProtoMessage() {} func (x *SniffedConsensusInstances) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_consensus_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,68 +480,6 @@ func file_core_corepb_v1_consensus_proto_init() { return } file_core_corepb_v1_core_proto_init() - if !protoimpl.UnsafeEnabled { - file_core_corepb_v1_consensus_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*QBFTMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_corepb_v1_consensus_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ConsensusMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_corepb_v1_consensus_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SniffedConsensusMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_corepb_v1_consensus_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SniffedConsensusInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_corepb_v1_consensus_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SniffedConsensusInstances); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/core/corepb/v1/core.pb.go b/core/corepb/v1/core.pb.go index 7b472d6fd..d83df0143 100644 --- a/core/corepb/v1/core.pb.go +++ b/core/corepb/v1/core.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: core/corepb/v1/core.proto @@ -31,11 +31,9 @@ type Duty struct { func (x *Duty) Reset() { *x = Duty{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_core_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_core_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Duty) String() string { @@ -46,7 +44,7 @@ func (*Duty) ProtoMessage() {} func (x *Duty) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_core_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85,11 +83,9 @@ type UnsignedDataSet struct { func (x *UnsignedDataSet) Reset() { *x = UnsignedDataSet{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_core_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_core_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnsignedDataSet) String() string { @@ -100,7 +96,7 @@ func (*UnsignedDataSet) ProtoMessage() {} func (x *UnsignedDataSet) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_core_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132,11 +128,9 @@ type ParSignedDataSet struct { func (x *ParSignedDataSet) Reset() { *x = ParSignedDataSet{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_core_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_core_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParSignedDataSet) String() string { @@ -147,7 +141,7 @@ func (*ParSignedDataSet) ProtoMessage() {} func (x *ParSignedDataSet) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_core_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,11 +175,9 @@ type ParSignedData struct { func (x *ParSignedData) Reset() { *x = ParSignedData{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_core_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_core_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParSignedData) String() string { @@ -196,7 +188,7 @@ func (*ParSignedData) ProtoMessage() {} func (x *ParSignedData) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_core_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,56 +301,6 @@ func file_core_corepb_v1_core_proto_init() { if File_core_corepb_v1_core_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_core_corepb_v1_core_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Duty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_corepb_v1_core_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UnsignedDataSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_corepb_v1_core_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ParSignedDataSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_corepb_v1_core_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ParSignedData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/core/corepb/v1/parsigex.pb.go b/core/corepb/v1/parsigex.pb.go index aa767fd59..78097a497 100644 --- a/core/corepb/v1/parsigex.pb.go +++ b/core/corepb/v1/parsigex.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: core/corepb/v1/parsigex.proto @@ -31,11 +31,9 @@ type ParSigExMsg struct { func (x *ParSigExMsg) Reset() { *x = ParSigExMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_parsigex_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_parsigex_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParSigExMsg) String() string { @@ -46,7 +44,7 @@ func (*ParSigExMsg) ProtoMessage() {} func (x *ParSigExMsg) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_parsigex_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130,20 +128,6 @@ func file_core_corepb_v1_parsigex_proto_init() { return } file_core_corepb_v1_core_proto_init() - if !protoimpl.UnsafeEnabled { - file_core_corepb_v1_parsigex_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ParSigExMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/core/corepb/v1/priority.pb.go b/core/corepb/v1/priority.pb.go index e40e12cc8..1083b8e07 100644 --- a/core/corepb/v1/priority.pb.go +++ b/core/corepb/v1/priority.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: core/corepb/v1/priority.proto @@ -33,11 +33,9 @@ type PriorityResult struct { func (x *PriorityResult) Reset() { *x = PriorityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_priority_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_priority_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriorityResult) String() string { @@ -48,7 +46,7 @@ func (*PriorityResult) ProtoMessage() {} func (x *PriorityResult) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_priority_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91,11 +89,9 @@ type PriorityMsg struct { func (x *PriorityMsg) Reset() { *x = PriorityMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_priority_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_priority_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriorityMsg) String() string { @@ -106,7 +102,7 @@ func (*PriorityMsg) ProtoMessage() {} func (x *PriorityMsg) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_priority_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -161,11 +157,9 @@ type PriorityTopicProposal struct { func (x *PriorityTopicProposal) Reset() { *x = PriorityTopicProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_priority_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_priority_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriorityTopicProposal) String() string { @@ -176,7 +170,7 @@ func (*PriorityTopicProposal) ProtoMessage() {} func (x *PriorityTopicProposal) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_priority_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -219,11 +213,9 @@ type PriorityTopicResult struct { func (x *PriorityTopicResult) Reset() { *x = PriorityTopicResult{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_priority_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_priority_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriorityTopicResult) String() string { @@ -234,7 +226,7 @@ func (*PriorityTopicResult) ProtoMessage() {} func (x *PriorityTopicResult) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_priority_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,11 +267,9 @@ type PriorityScoredResult struct { func (x *PriorityScoredResult) Reset() { *x = PriorityScoredResult{} - if protoimpl.UnsafeEnabled { - mi := &file_core_corepb_v1_priority_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_corepb_v1_priority_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriorityScoredResult) String() string { @@ -290,7 +280,7 @@ func (*PriorityScoredResult) ProtoMessage() {} func (x *PriorityScoredResult) ProtoReflect() protoreflect.Message { mi := &file_core_corepb_v1_priority_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,68 +411,6 @@ func file_core_corepb_v1_priority_proto_init() { return } file_core_corepb_v1_core_proto_init() - if !protoimpl.UnsafeEnabled { - file_core_corepb_v1_priority_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PriorityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_corepb_v1_priority_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PriorityMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_corepb_v1_priority_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PriorityTopicProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_corepb_v1_priority_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PriorityTopicResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_corepb_v1_priority_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PriorityScoredResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/core/validatorapi/validatorapi_test.go b/core/validatorapi/validatorapi_test.go index 97c1090df..8440cffed 100644 --- a/core/validatorapi/validatorapi_test.go +++ b/core/validatorapi/validatorapi_test.go @@ -436,7 +436,7 @@ func TestComponent_SubmitProposalsWithWrongVCData(t *testing.T) { require.NoError(t, err) // Construct the validator api component - vapi, err := validatorapi.NewComponent(bmock, allPubSharesByKey, shareIdx, nil, testutil.BuilderFalse, nil) + vapi, err := validatorapi.NewComponent(bmock, allPubSharesByKey, shareIdx, nil, false, nil) require.NoError(t, err) t.Run("full block fails", func(t *testing.T) { diff --git a/dkg/dkgpb/v1/bcast.pb.go b/dkg/dkgpb/v1/bcast.pb.go index 2b31dc35e..19674c2fb 100644 --- a/dkg/dkgpb/v1/bcast.pb.go +++ b/dkg/dkgpb/v1/bcast.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: dkg/dkgpb/v1/bcast.proto @@ -32,11 +32,9 @@ type BCastSigRequest struct { func (x *BCastSigRequest) Reset() { *x = BCastSigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_bcast_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_bcast_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BCastSigRequest) String() string { @@ -47,7 +45,7 @@ func (*BCastSigRequest) ProtoMessage() {} func (x *BCastSigRequest) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_bcast_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87,11 +85,9 @@ type BCastSigResponse struct { func (x *BCastSigResponse) Reset() { *x = BCastSigResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_bcast_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_bcast_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BCastSigResponse) String() string { @@ -102,7 +98,7 @@ func (*BCastSigResponse) ProtoMessage() {} func (x *BCastSigResponse) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_bcast_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143,11 +139,9 @@ type BCastMessage struct { func (x *BCastMessage) Reset() { *x = BCastMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_bcast_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_bcast_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BCastMessage) String() string { @@ -158,7 +152,7 @@ func (*BCastMessage) ProtoMessage() {} func (x *BCastMessage) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_bcast_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,44 +252,6 @@ func file_dkg_dkgpb_v1_bcast_proto_init() { if File_dkg_dkgpb_v1_bcast_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_dkg_dkgpb_v1_bcast_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BCastSigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dkg_dkgpb_v1_bcast_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BCastSigResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dkg_dkgpb_v1_bcast_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BCastMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dkg/dkgpb/v1/frost.pb.go b/dkg/dkgpb/v1/frost.pb.go index 84e3f2028..140bd6709 100644 --- a/dkg/dkgpb/v1/frost.pb.go +++ b/dkg/dkgpb/v1/frost.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: dkg/dkgpb/v1/frost.proto @@ -32,11 +32,9 @@ type FrostMsgKey struct { func (x *FrostMsgKey) Reset() { *x = FrostMsgKey{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FrostMsgKey) String() string { @@ -47,7 +45,7 @@ func (*FrostMsgKey) ProtoMessage() {} func (x *FrostMsgKey) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93,11 +91,9 @@ type FrostRound1Casts struct { func (x *FrostRound1Casts) Reset() { *x = FrostRound1Casts{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FrostRound1Casts) String() string { @@ -108,7 +104,7 @@ func (*FrostRound1Casts) ProtoMessage() {} func (x *FrostRound1Casts) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143,11 +139,9 @@ type FrostRound1Cast struct { func (x *FrostRound1Cast) Reset() { *x = FrostRound1Cast{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FrostRound1Cast) String() string { @@ -158,7 +152,7 @@ func (*FrostRound1Cast) ProtoMessage() {} func (x *FrostRound1Cast) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,11 +205,9 @@ type FrostRound1P2P struct { func (x *FrostRound1P2P) Reset() { *x = FrostRound1P2P{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FrostRound1P2P) String() string { @@ -226,7 +218,7 @@ func (*FrostRound1P2P) ProtoMessage() {} func (x *FrostRound1P2P) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +252,9 @@ type FrostRound1ShamirShare struct { func (x *FrostRound1ShamirShare) Reset() { *x = FrostRound1ShamirShare{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FrostRound1ShamirShare) String() string { @@ -275,7 +265,7 @@ func (*FrostRound1ShamirShare) ProtoMessage() {} func (x *FrostRound1ShamirShare) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -321,11 +311,9 @@ type FrostRound2Casts struct { func (x *FrostRound2Casts) Reset() { *x = FrostRound2Casts{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FrostRound2Casts) String() string { @@ -336,7 +324,7 @@ func (*FrostRound2Casts) ProtoMessage() {} func (x *FrostRound2Casts) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +358,9 @@ type FrostRound2Cast struct { func (x *FrostRound2Cast) Reset() { *x = FrostRound2Cast{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FrostRound2Cast) String() string { @@ -385,7 +371,7 @@ func (*FrostRound2Cast) ProtoMessage() {} func (x *FrostRound2Cast) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_frost_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -517,92 +503,6 @@ func file_dkg_dkgpb_v1_frost_proto_init() { if File_dkg_dkgpb_v1_frost_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_dkg_dkgpb_v1_frost_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FrostMsgKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dkg_dkgpb_v1_frost_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FrostRound1Casts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dkg_dkgpb_v1_frost_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FrostRound1Cast); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dkg_dkgpb_v1_frost_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FrostRound1P2P); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dkg_dkgpb_v1_frost_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FrostRound1ShamirShare); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dkg_dkgpb_v1_frost_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FrostRound2Casts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dkg_dkgpb_v1_frost_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*FrostRound2Cast); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dkg/dkgpb/v1/nodesigs.pb.go b/dkg/dkgpb/v1/nodesigs.pb.go index c76d912c8..0ca2721d8 100644 --- a/dkg/dkgpb/v1/nodesigs.pb.go +++ b/dkg/dkgpb/v1/nodesigs.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: dkg/dkgpb/v1/nodesigs.proto @@ -31,11 +31,9 @@ type MsgNodeSig struct { func (x *MsgNodeSig) Reset() { *x = MsgNodeSig{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_nodesigs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_nodesigs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MsgNodeSig) String() string { @@ -46,7 +44,7 @@ func (*MsgNodeSig) ProtoMessage() {} func (x *MsgNodeSig) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_nodesigs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120,20 +118,6 @@ func file_dkg_dkgpb_v1_nodesigs_proto_init() { if File_dkg_dkgpb_v1_nodesigs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_dkg_dkgpb_v1_nodesigs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MsgNodeSig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dkg/dkgpb/v1/sync.pb.go b/dkg/dkgpb/v1/sync.pb.go index 53d1a1e2f..c9f62afb6 100644 --- a/dkg/dkgpb/v1/sync.pb.go +++ b/dkg/dkgpb/v1/sync.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.1 // protoc (unknown) // source: dkg/dkgpb/v1/sync.proto @@ -35,11 +35,9 @@ type MsgSync struct { func (x *MsgSync) Reset() { *x = MsgSync{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_sync_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_sync_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MsgSync) String() string { @@ -50,7 +48,7 @@ func (*MsgSync) ProtoMessage() {} func (x *MsgSync) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_sync_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,11 +109,9 @@ type MsgSyncResponse struct { func (x *MsgSyncResponse) Reset() { *x = MsgSyncResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_dkg_dkgpb_v1_sync_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dkg_dkgpb_v1_sync_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MsgSyncResponse) String() string { @@ -126,7 +122,7 @@ func (*MsgSyncResponse) ProtoMessage() {} func (x *MsgSyncResponse) ProtoReflect() protoreflect.Message { mi := &file_dkg_dkgpb_v1_sync_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,32 +216,6 @@ func file_dkg_dkgpb_v1_sync_proto_init() { if File_dkg_dkgpb_v1_sync_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_dkg_dkgpb_v1_sync_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MsgSync); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dkg_dkgpb_v1_sync_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MsgSyncResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ From a2c47dbf88090454875d4f6d1c9e24ba65695fb7 Mon Sep 17 00:00:00 2001 From: Andrei Smirnov Date: Thu, 10 Oct 2024 17:56:01 +0300 Subject: [PATCH 10/24] testutil: fixed smoke test (#3332) This addresses two issues: 1. The broken Smoke Test with lodestar, it refuses accepting network config for dev network. 2. Re-enabled previously disabled compatibility test. category: test ticket: #3004 --- testutil/compose/smoke/smoke_test.go | 74 ++++++++++++------------- testutil/compose/static/lodestar/run.sh | 2 - 2 files changed, 37 insertions(+), 39 deletions(-) diff --git a/testutil/compose/smoke/smoke_test.go b/testutil/compose/smoke/smoke_test.go index 449634b48..b4a921e42 100644 --- a/testutil/compose/smoke/smoke_test.go +++ b/testutil/compose/smoke/smoke_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/obolnetwork/charon/app/version" "github.com/obolnetwork/charon/testutil" "github.com/obolnetwork/charon/testutil/compose" ) @@ -84,26 +85,26 @@ func TestSmoke(t *testing.T) { }, Timeout: time.Minute * 2, }, - // TODO: https://github.com/ObolNetwork/charon/issues/3004 - // { - // Name: "run_version_matrix_with_dkg", - // PrintYML: true, - // ConfigFunc: func(conf *compose.Config) { - // conf.KeyGen = compose.KeyGenDKG - // // NOTE: Add external VCs when supported versions include minimal preset. - // conf.VCs = []compose.VCType{compose.VCMock} - // }, - // DefineTmplFunc: func(data *compose.TmplData) { - // // Use oldest supported version for cluster lock - // pegImageTag(data.Nodes, 0, last(version.Supported()[1:])+"-rc") - // }, - // RunTmplFunc: func(data *compose.TmplData) { - // // Node 0 is local build - // pegImageTag(data.Nodes, 1, nth(version.Supported(), 0)+"-dev") // Node 1 is previous commit on this branch (v0.X-dev/rc) Note this will fail for first commit on new branch version. - // pegImageTag(data.Nodes, 2, nth(version.Supported()[1:], 1)+"-rc") - // pegImageTag(data.Nodes, 3, nth(version.Supported()[1:], 2)+"-rc") - // }, - // }, + { + Name: "run_version_matrix_with_dkg", + PrintYML: true, + ConfigFunc: func(conf *compose.Config) { + conf.KeyGen = compose.KeyGenDKG + // NOTE: Add external VCs when supported versions include minimal preset. + conf.VCs = []compose.VCType{compose.VCMock} + }, + DefineTmplFunc: func(data *compose.TmplData) { + // Use oldest supported version for cluster lock + pegImageTag(data.Nodes, 0, last(version.Supported()[1:])+".0-rc1") + }, + RunTmplFunc: func(data *compose.TmplData) { + // Node 0 is local build + // Nodeы 1-3 use the previous release; ensure better diversity in the matrix when more releases are added. + pegImageTag(data.Nodes, 1, nth(version.Supported(), 1)+".0-rc1") + pegImageTag(data.Nodes, 2, nth(version.Supported(), 1)+".0-rc1") + pegImageTag(data.Nodes, 3, nth(version.Supported(), 1)+".0-rc1") + }, + }, { Name: "teku_versions", ConfigFunc: func(conf *compose.Config) { @@ -171,8 +172,7 @@ func TestSmoke(t *testing.T) { for _, test := range tests { t.Run(test.Name, func(t *testing.T) { - dir, err := os.MkdirTemp("", "") - require.NoError(t, err) + dir := t.TempDir() conf := compose.NewDefaultConfig() conf.Monitoring = false @@ -204,7 +204,7 @@ func TestSmoke(t *testing.T) { autoConfig.LogFile = path.Join(*logDir, test.Name+".log") } - err = compose.Auto(context.Background(), autoConfig) + err := compose.Auto(context.Background(), autoConfig) testutil.RequireNoError(t, err) }) } @@ -212,17 +212,17 @@ func TestSmoke(t *testing.T) { // pegImageTag pegs the charon docker image tag for one of the nodes. // It overrides the default that uses locally built latest version. -// func pegImageTag(nodes []compose.TmplNode, index int, imageTag string) { -// nodes[index].ImageTag = imageTag -// nodes[index].Entrypoint = "/usr/local/bin/charon" // Use contains binary, not locally built latest version. -// } - -// // last returns the last element of a slice. -// func last(s []version.SemVer) string { -// return s[len(s)-1].String() -// } - -// // nth returns the nth element of a slice, wrapping if n > len(s). -// func nth(s []version.SemVer, n int) string { -// return s[n%len(s)].String() -// } +func pegImageTag(nodes []compose.TmplNode, index int, imageTag string) { + nodes[index].ImageTag = imageTag + nodes[index].Entrypoint = "/usr/local/bin/charon" // Use contains binary, not locally built latest version. +} + +// last returns the last element of a slice. +func last(s []version.SemVer) string { + return s[len(s)-1].String() +} + +// nth returns the nth element of a slice, wrapping if n > len(s). +func nth(s []version.SemVer, n int) string { + return s[n%len(s)].String() +} diff --git a/testutil/compose/static/lodestar/run.sh b/testutil/compose/static/lodestar/run.sh index b8350d0e1..eb4ebbfa0 100755 --- a/testutil/compose/static/lodestar/run.sh +++ b/testutil/compose/static/lodestar/run.sh @@ -24,8 +24,6 @@ echo "Imported all keys" node /usr/app/packages/cli/bin/lodestar validator \ --network="dev" \ - --presetFile="/tmp/testnet/config.yaml" \ - --paramsFile="/tmp/testnet/config.yaml" \ --metrics=true \ --metrics.address="0.0.0.0" \ --metrics.port=5064 \ From 946dd6a65d2edb83431ad81160330fddd9f41294 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 04:41:16 +0000 Subject: [PATCH 11/24] build(deps): Bump golang.org/x/tools from 0.25.0 to 0.26.0 (#3333) Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.25.0 to 0.26.0.
Commits
  • 2ab3b51 go.mod: update golang.org/x dependencies
  • 2683c79 gopls/internal/golang/stubmethods: rename analysis/stubmethods
  • efd951d gopls/internal/analysis/stubmethods: merge into CodeAction
  • d0d0d9e gopls/internal/cache: memoize dependent hash on analysisNode
  • a19eef6 gopls/internal/cache: express packageHandle as a state machine
  • dd745ec gopls/internal/test/marker: update regression test issue68918.txt
  • a02ee35 go/analysis/passes/stdversion: reenable tests
  • a24facf all: set gotypesalias=0 explicitly
  • ce2a33e gopls/internal: fix extract refactor for cases with anonymous functions
  • a2ff832 go/ssa: remove references to GOEXPERIMENT range
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/tools&package-manager=go_modules&previous-version=0.25.0&new-version=0.26.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 22 ++++++++++++---------- go.sum | 36 ++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index 46e21e31b..e53e1b549 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/obolnetwork/charon -go 1.22 +go 1.22.0 + +toolchain go1.23.2 require ( github.com/attestantio/go-eth2-client v0.21.9 @@ -41,12 +43,12 @@ require ( go.uber.org/automaxprocs v1.6.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.25.0 + golang.org/x/crypto v0.28.0 golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 - golang.org/x/sync v0.7.0 - golang.org/x/term v0.22.0 - golang.org/x/time v0.5.0 - golang.org/x/tools v0.23.0 + golang.org/x/sync v0.8.0 + golang.org/x/term v0.25.0 + golang.org/x/time v0.6.0 + golang.org/x/tools v0.26.0 google.golang.org/protobuf v1.34.2 gopkg.in/natefinch/lumberjack.v2 v2.2.1 ) @@ -189,10 +191,10 @@ require ( go.uber.org/fx v1.20.1 // indirect go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/mod v0.19.0 // indirect - golang.org/x/net v0.27.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.30.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/text v0.19.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect diff --git a/go.sum b/go.sum index 8c51d6843..30c9fae85 100644 --- a/go.sum +++ b/go.sum @@ -594,8 +594,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= @@ -608,8 +608,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -627,8 +627,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -642,8 +642,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -671,21 +671,21 @@ 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.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -698,8 +698,8 @@ golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= -golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From ff166ce670606517329e642a78d21b77374ed41f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 04:51:16 +0000 Subject: [PATCH 12/24] build(deps): Bump golang.org/x/time from 0.6.0 to 0.7.0 (#3322) Bumps [golang.org/x/time](https://github.com/golang/time) from 0.6.0 to 0.7.0.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/time&package-manager=go_modules&previous-version=0.6.0&new-version=0.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e53e1b549..9efefacb9 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 golang.org/x/sync v0.8.0 golang.org/x/term v0.25.0 - golang.org/x/time v0.6.0 + golang.org/x/time v0.7.0 golang.org/x/tools v0.26.0 google.golang.org/protobuf v1.34.2 gopkg.in/natefinch/lumberjack.v2 v2.2.1 diff --git a/go.sum b/go.sum index 30c9fae85..56caa2dfb 100644 --- a/go.sum +++ b/go.sum @@ -684,8 +684,8 @@ golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 6e5c2c3abbeca771f02b9a188023ab74a0ac9bef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 05:41:29 +0000 Subject: [PATCH 13/24] build(deps): Bump golang from 1.23.1-bookworm to 1.23.2-bookworm (#3314) Bumps golang from 1.23.1-bookworm to 1.23.2-bookworm. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang&package-manager=docker&previous-version=1.23.1-bookworm&new-version=1.23.2-bookworm)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f9ab8a8be..bb0396192 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Container for building Go binary. -FROM golang:1.22.5-bookworm AS builder +FROM golang:1.23.2-bookworm AS builder # Install dependencies RUN apt-get update && apt-get install -y build-essential git # Prep and copy source From dc404fb2f09bdfd1af4e06a016dab81f6f735347 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 07:08:27 +0000 Subject: [PATCH 14/24] build(deps): Bump go.opentelemetry.io/otel from 1.30.0 to 1.31.0 (#3339) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.30.0 to 1.31.0.
Changelog

Sourced from go.opentelemetry.io/otel's changelog.

[1.31.0/0.53.0/0.7.0/0.0.10] 2024-10-11

Added

  • Add go.opentelemetry.io/otel/sdk/metric/exemplar package which includes Exemplar, Filter, TraceBasedFilter, AlwaysOnFilter, HistogramReservoir, FixedSizeReservoir, Reservoir, Value and ValueType types. These will be used for configuring the exemplar reservoir for the metrics sdk. (#5747, #5862)
  • Add WithExportBufferSize option to log batch processor.(#5877)

Changed

  • Enable exemplars by default in go.opentelemetry.io/otel/sdk/metric. Exemplars can be disabled by setting OTEL_METRICS_EXEMPLAR_FILTER=always_off (#5778)
  • Logger.Enabled in go.opentelemetry.io/otel/log now accepts a newly introduced EnabledParameters type instead of Record. (#5791)
  • FilterProcessor.Enabled in go.opentelemetry.io/otel/sdk/log/internal/x now accepts EnabledParameters instead of Record. (#5791)
  • The Record type in go.opentelemetry.io/otel/log is no longer comparable. (#5847)
  • Performance improvements for the trace SDK SetAttributes method in Span. (#5864)
  • Reduce memory allocations for the Event and Link lists in Span. (#5858)
  • Performance improvements for the trace SDK AddEvent, AddLink, RecordError and End methods in Span. (#5874)

Deprecated

Fixed

  • The race condition for multiple FixedSize exemplar reservoirs identified in #5814 is resolved. (#5819)
  • Fix log records duplication in case of heterogeneous resource attributes by correctly mapping each log record to it's resource and scope. (#5803)
  • Fix timer channel drain to avoid hanging on Go 1.23. (#5868)
  • Fix delegation for global meter providers, and panic when calling otel.SetMeterProvider. (#5827)
  • Change the reflect.TypeOf to use a nil pointer to not allocate on the heap unless necessary. (#5827)
Commits
  • bc2fe88 Release v1.31.0/v0.53.0/v0.7.0/v0.0.10 (#5883)
  • a7d5c1a Add an option to configure the exporter buffer of the BatchProcessor (#5877)
  • eb9279b fix(deps): update golang.org/x/exp digest to f66d83c (#5880)
  • 6441653 Performance improvements for the trace SDK in Span. (#5874)
  • 8e9baf2 chore(deps): update lycheeverse/lychee-action action to v2 (#5878)
  • 8fbaa97 Reduce newEvictedQueueLink and newEvictedQueueEvent memory allocations (#...
  • 4a911f9 chore(deps): update googleapis to 5fefd90 (#5876)
  • 98cbdcb fix(deps): update module google.golang.org/protobuf to v1.35.1 (#5875)
  • 3cbd967 Performance improvements for recordingSpan SetAttributes and `addOverCapA...
  • 9e791a6 fix(deps): update golang.org/x (#5872)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=go.opentelemetry.io/otel&package-manager=go_modules&previous-version=1.30.0&new-version=1.31.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 9efefacb9..29032b8d7 100644 --- a/go.mod +++ b/go.mod @@ -35,11 +35,11 @@ require ( github.com/stretchr/testify v1.9.0 github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.4.1 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 - go.opentelemetry.io/otel v1.30.0 + go.opentelemetry.io/otel v1.31.0 go.opentelemetry.io/otel/exporters/jaeger v1.17.0 - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 - go.opentelemetry.io/otel/sdk v1.28.0 - go.opentelemetry.io/otel/trace v1.30.0 + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0 + go.opentelemetry.io/otel/sdk v1.30.0 + go.opentelemetry.io/otel/trace v1.31.0 go.uber.org/automaxprocs v1.6.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 @@ -185,7 +185,7 @@ require ( github.com/subosito/gotenv v1.6.0 // indirect github.com/vbatts/tar-split v0.11.5 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect - go.opentelemetry.io/otel/metric v1.30.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/dig v1.17.1 // indirect go.uber.org/fx v1.20.1 // indirect diff --git a/go.sum b/go.sum index 56caa2dfb..12c59b4f6 100644 --- a/go.sum +++ b/go.sum @@ -544,24 +544,24 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= -go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= -go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 h1:9M3+rhx7kZCIQQhQRYaZCdNu1V73tm4TvXs2ntl98C4= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0/go.mod h1:noq80iT8rrHP1SfybmPiRGc9dc5M8RPmGvtwo7Oo7tc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 h1:EVSnY9JbEEW92bEkIYOVMw4q1WJxIAGoFTrtYOzWuRQ= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0/go.mod h1:Ea1N1QQryNXpCD0I1fdLibBAIpQuBkznMmkdKrapk1Y= -go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= -go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0 h1:kn1BudCgwtE7PxLqcZkErpD8GKqLZ6BSzeW9QihQJeM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0/go.mod h1:ljkUDtAMdleoi9tIG1R6dJUpVwDcYjw3J2Q6Q/SuiC0= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= +go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= -go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= -go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= From e29eceac8696b43807f6544900548dcb00f050f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 07:16:26 +0000 Subject: [PATCH 15/24] build(deps): Bump go.opentelemetry.io/otel/exporters/stdout/stdouttrace from 1.30.0 to 1.31.0 (#3337) Bumps [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](https://github.com/open-telemetry/opentelemetry-go) from 1.30.0 to 1.31.0.
Changelog

Sourced from go.opentelemetry.io/otel/exporters/stdout/stdouttrace's changelog.

[1.31.0/0.53.0/0.7.0/0.0.10] 2024-10-11

Added

  • Add go.opentelemetry.io/otel/sdk/metric/exemplar package which includes Exemplar, Filter, TraceBasedFilter, AlwaysOnFilter, HistogramReservoir, FixedSizeReservoir, Reservoir, Value and ValueType types. These will be used for configuring the exemplar reservoir for the metrics sdk. (#5747, #5862)
  • Add WithExportBufferSize option to log batch processor.(#5877)

Changed

  • Enable exemplars by default in go.opentelemetry.io/otel/sdk/metric. Exemplars can be disabled by setting OTEL_METRICS_EXEMPLAR_FILTER=always_off (#5778)
  • Logger.Enabled in go.opentelemetry.io/otel/log now accepts a newly introduced EnabledParameters type instead of Record. (#5791)
  • FilterProcessor.Enabled in go.opentelemetry.io/otel/sdk/log/internal/x now accepts EnabledParameters instead of Record. (#5791)
  • The Record type in go.opentelemetry.io/otel/log is no longer comparable. (#5847)
  • Performance improvements for the trace SDK SetAttributes method in Span. (#5864)
  • Reduce memory allocations for the Event and Link lists in Span. (#5858)
  • Performance improvements for the trace SDK AddEvent, AddLink, RecordError and End methods in Span. (#5874)

Deprecated

Fixed

  • The race condition for multiple FixedSize exemplar reservoirs identified in #5814 is resolved. (#5819)
  • Fix log records duplication in case of heterogeneous resource attributes by correctly mapping each log record to it's resource and scope. (#5803)
  • Fix timer channel drain to avoid hanging on Go 1.23. (#5868)
  • Fix delegation for global meter providers, and panic when calling otel.SetMeterProvider. (#5827)
  • Change the reflect.TypeOf to use a nil pointer to not allocate on the heap unless necessary. (#5827)
Commits
  • bc2fe88 Release v1.31.0/v0.53.0/v0.7.0/v0.0.10 (#5883)
  • a7d5c1a Add an option to configure the exporter buffer of the BatchProcessor (#5877)
  • eb9279b fix(deps): update golang.org/x/exp digest to f66d83c (#5880)
  • 6441653 Performance improvements for the trace SDK in Span. (#5874)
  • 8e9baf2 chore(deps): update lycheeverse/lychee-action action to v2 (#5878)
  • 8fbaa97 Reduce newEvictedQueueLink and newEvictedQueueEvent memory allocations (#...
  • 4a911f9 chore(deps): update googleapis to 5fefd90 (#5876)
  • 98cbdcb fix(deps): update module google.golang.org/protobuf to v1.35.1 (#5875)
  • 3cbd967 Performance improvements for recordingSpan SetAttributes and `addOverCapA...
  • 9e791a6 fix(deps): update golang.org/x (#5872)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=go.opentelemetry.io/otel/exporters/stdout/stdouttrace&package-manager=go_modules&previous-version=1.30.0&new-version=1.31.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 29032b8d7..8a2d41f1e 100644 --- a/go.mod +++ b/go.mod @@ -37,8 +37,8 @@ require ( go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 go.opentelemetry.io/otel v1.31.0 go.opentelemetry.io/otel/exporters/jaeger v1.17.0 - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0 - go.opentelemetry.io/otel/sdk v1.30.0 + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 + go.opentelemetry.io/otel/sdk v1.31.0 go.opentelemetry.io/otel/trace v1.31.0 go.uber.org/automaxprocs v1.6.0 go.uber.org/goleak v1.3.0 diff --git a/go.sum b/go.sum index 12c59b4f6..7ea0d754e 100644 --- a/go.sum +++ b/go.sum @@ -552,12 +552,12 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 h1:9M3+rhx7kZCIQQhQRYa go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0/go.mod h1:noq80iT8rrHP1SfybmPiRGc9dc5M8RPmGvtwo7Oo7tc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0 h1:kn1BudCgwtE7PxLqcZkErpD8GKqLZ6BSzeW9QihQJeM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0/go.mod h1:ljkUDtAMdleoi9tIG1R6dJUpVwDcYjw3J2Q6Q/SuiC0= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 h1:UGZ1QwZWY67Z6BmckTU+9Rxn04m2bD3gD6Mk0OIOCPk= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0/go.mod h1:fcwWuDuaObkkChiDlhEpSq9+X1C0omv+s5mBtToAQ64= go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= -go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= -go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= From 5944c48b52ae5010ee3663415db5551cf4a0b0f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 07:28:52 +0000 Subject: [PATCH 16/24] build(deps): Bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from 0.55.0 to 0.56.0 (#3338) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) from 0.55.0 to 0.56.0.
Release notes

Sourced from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp's releases.

Release v1.31.0/v0.56.0/v0.25.0/v0.11.0/v0.6.0/v0.4.0/v0.3.0

Overview

Added

  • The Severitier and SeverityVar types are added to go.opentelemetry.io/contrib/processors/minsev allowing dynamic configuration of the severity used by the LogProcessor. (#6116)
  • Move examples from go.opentelemetry.io/otel to this repository under examples directory. (#6158)
  • Support yaml/json struct tags for generated code in go.opentelemetry.io/contrib/config. (#5433)
  • Add support for parsing YAML configuration via ParseYAML in go.opentelemetry.io/contrib/config. (#5433)
  • Add support for temporality preference configuration in go.opentelemetry.io/contrib/config. (#5860)

Changed

  • The function signature of NewLogProcessor in go.opentelemetry.io/contrib/processors/minsev has changed to accept the added Severitier interface instead of a log.Severity. (#6116)
  • Updated go.opentelemetry.io/contrib/config to use the v0.3.0 release of schema which includes backwards incompatible changes. (#6126)
  • NewSDK in go.opentelemetry.io/contrib/config now returns a no-op SDK if disabled is set to true. (#6185)
  • The deprecated go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho package has found a Code Owner. The package is no longer deprecated. (#6207)

Fixed

  • Possible nil dereference panic in go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace. (#5965)
  • logrus.Level transformed to appropriate log.Severity in go.opentelemetry.io/contrib/bridges/otellogrus. (#6191)

Removed

  • The Minimum field of the LogProcessor in go.opentelemetry.io/contrib/processors/minsev is removed. Use NewLogProcessor to configure this setting. (#6116)
  • The deprecated go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron package is removed. (#6186)
  • The deprecated go.opentelemetry.io/contrib/samplers/aws/xray package is removed. (#6187)

What's Changed

... (truncated)

Changelog

Sourced from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp's changelog.

[1.31.0/0.56.0/0.25.0/0.11.0/0.6.0/0.4.0/0.3.0] - 2024-10-14

Added

  • The Severitier and SeverityVar types are added to go.opentelemetry.io/contrib/processors/minsev allowing dynamic configuration of the severity used by the LogProcessor. (#6116)
  • Move examples from go.opentelemetry.io/otel to this repository under examples directory. (#6158)
  • Support yaml/json struct tags for generated code in go.opentelemetry.io/contrib/config. (#5433)
  • Add support for parsing YAML configuration via ParseYAML in go.opentelemetry.io/contrib/config. (#5433)
  • Add support for temporality preference configuration in go.opentelemetry.io/contrib/config. (#5860)

Changed

  • The function signature of NewLogProcessor in go.opentelemetry.io/contrib/processors/minsev has changed to accept the added Severitier interface instead of a log.Severity. (#6116)
  • Updated go.opentelemetry.io/contrib/config to use the v0.3.0 release of schema which includes backwards incompatible changes. (#6126)
  • NewSDK in go.opentelemetry.io/contrib/config now returns a no-op SDK if disabled is set to true. (#6185)
  • The deprecated go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho package has found a Code Owner. The package is no longer deprecated. (#6207)

Fixed

  • Possible nil dereference panic in go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace. (#5965)
  • logrus.Level transformed to appropriate log.Severity in go.opentelemetry.io/contrib/bridges/otellogrus. (#6191)

Removed

  • The Minimum field of the LogProcessor in go.opentelemetry.io/contrib/processors/minsev is removed. Use NewLogProcessor to configure this setting. (#6116)
  • The deprecated go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron package is removed. (#6186)
  • The deprecated go.opentelemetry.io/contrib/samplers/aws/xray package is removed. (#6187)
Commits
  • 9cf5701 Release v1.31.0/v0.56.0/v0.25.0/v0.11.0/v0.6.0/v0.4.0/v0.3.0 (#6243)
  • d6305c0 chore(deps): update module github.com/klauspost/compress to v1.17.11 (#6232)
  • 09cbf41 fix(deps): update module github.com/aws/aws-sdk-go-v2/service/s3 to v1.65.3 (...
  • c3c8538 Update otel core to the latest release (#6233)
  • 79bb705 otelecho: Add Code Owner and remove deprecation (#6207)
  • 45ba204 config: support v0.3 of the config schema (#6126)
  • 20e45af Revert "chore(deps): update lycheeverse/lychee-action action to v2" (#6229)
  • 5322670 Remove otelmacaron (#6186)
  • 87d0229 feat(instrumentation/http/otelhttp): move client metrics creation into intern...
  • 900fc4b Run the test compatibility check even if tests failed (#6224)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp&package-manager=go_modules&previous-version=0.55.0&new-version=0.56.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8a2d41f1e..4199cd44c 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.9.0 github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.4.1 - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 go.opentelemetry.io/otel v1.31.0 go.opentelemetry.io/otel/exporters/jaeger v1.17.0 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 diff --git a/go.sum b/go.sum index 7ea0d754e..56341d86e 100644 --- a/go.sum +++ b/go.sum @@ -542,8 +542,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM= go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= From b5bead1b30c04b3037464cbffacf47a69fb773f9 Mon Sep 17 00:00:00 2001 From: David <39963997+No0key@users.noreply.github.com> Date: Tue, 15 Oct 2024 19:10:10 +0300 Subject: [PATCH 17/24] *: optimize Dockerfile (#3281) Hello! This PR optimizes the `Dockerfile`. Changes include: - Combined RUN commands to reduce the number of layers - Cached Go dependencies to speed up build times - Cleaned up unnecessary apt files to reduce image size - Consolidated user creation and permission setting commands Reduced image size from 370MB to 302MB category: refactor ticket: none --- Dockerfile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index bb0396192..75f0184f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,18 @@ # Container for building Go binary. FROM golang:1.23.2-bookworm AS builder # Install dependencies -RUN apt-get update && apt-get install -y build-essential git +RUN apt-get update && apt-get install -y --no-install-recommends build-essential git + # Prep and copy source WORKDIR /app/charon + COPY . . + # Populate GO_BUILD_FLAG with a build arg to provide an optional go build flag. ARG GO_BUILD_FLAG ENV GO_BUILD_FLAG=${GO_BUILD_FLAG} RUN echo "Building with GO_BUILD_FLAG='${GO_BUILD_FLAG}'" + # Build with Go module and Go build caches. RUN \ --mount=type=cache,target=/go/pkg \ @@ -18,30 +22,35 @@ RUN echo "Built charon version=$(./charon version)" # Copy final binary into light stage. FROM debian:bookworm-slim -RUN apt-get update && apt-get install -y ca-certificates wget fio +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates fio wget \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ARG GITHUB_SHA=local ENV GITHUB_SHA=${GITHUB_SHA} + COPY --from=builder /app/charon/charon /usr/local/bin/ + # Don't run container as root ENV USER=charon ENV UID=1000 ENV GID=1000 -RUN addgroup --gid "$GID" "$USER" -RUN adduser \ +RUN addgroup --gid "$GID" "$USER" \ + && adduser \ --disabled-password \ --gecos "charon" \ --home "/opt/$USER" \ --ingroup "$USER" \ --no-create-home \ --uid "$UID" \ - "$USER" -RUN chown charon /usr/local/bin/charon -RUN chmod u+x /usr/local/bin/charon + "$USER" \ + && chown "$USER" /usr/local/bin/charon \ + && chmod u+x /usr/local/bin/charon + WORKDIR "/opt/$USER" -RUN chown charon "/opt/$USER" USER charon + ENTRYPOINT ["/usr/local/bin/charon"] CMD ["run"] + # Used by GitHub to associate container with repo. LABEL org.opencontainers.image.source="https://github.com/obolnetwork/charon" LABEL org.opencontainers.image.title="charon" From 51f38578384d4a17c1cb53472e0e121a822a442a Mon Sep 17 00:00:00 2001 From: Kaloyan Tanev <24719519+KaloyanTanev@users.noreply.github.com> Date: Tue, 15 Oct 2024 18:27:36 +0200 Subject: [PATCH 18/24] github: use minor go versions in pipelines (#3321) Instead of having to bump golang version on each patch release, use latest patch. That's what we already do in `go.mod`. category: misc ticket: none --- .github/actions/setup-go/action.yml | 2 +- .golangci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-go/action.yml b/.github/actions/setup-go/action.yml index d36e379a9..9cc2fdd9e 100644 --- a/.github/actions/setup-go/action.yml +++ b/.github/actions/setup-go/action.yml @@ -6,4 +6,4 @@ runs: - name: Setup go uses: actions/setup-go@v4 with: - go-version: '1.22.5' + go-version: '1.23' diff --git a/.golangci.yml b/.golangci.yml index 8a8461496..4fa83a68a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ run: timeout: 5m - go: "1.22.5" + go: "1.23" linters-settings: cyclop: max-complexity: 15 From 0b14afcd39b2cd39b551eaf47aadca62f0eb7032 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 05:43:08 +0000 Subject: [PATCH 19/24] build(deps): Bump github.com/prometheus/client_golang from 1.20.4 to 1.20.5 (#3340) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.4 to 1.20.5.
Release notes

Sourced from github.com/prometheus/client_golang's releases.

v1.20.5 / 2024-10-15

We decided to revert the testutil change that made our util functions less error-prone, but created a lot of work for our downstream users. Apologies for the pain! This revert should not cause any major breaking change, even if you already did the work--unless you depend on the exact error message.

Going forward, we plan to reinforce our release testing strategy [1],[2] and deliver an enhanced testutil package/module with more flexible and safer APIs.

Thanks to @​dashpole @​dgrisonnet @​kakkoyun @​ArthurSens @​vesari @​logicalhan @​krajorama @​bwplotka who helped in this patch release! 🤗

Changelog

[BUGFIX] testutil: Reverted #1424; functions using compareMetricFamilies are (again) only failing if filtered metricNames are in the expected input. #1645

Changelog

Sourced from github.com/prometheus/client_golang's changelog.

1.20.5 / 2024-10-15

  • [BUGFIX] testutil: Reverted #1424; functions using compareMetricFamilies are (again) only failing if filtered metricNames are in the expected input.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/prometheus/client_golang&package-manager=go_modules&previous-version=1.20.4&new-version=1.20.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4199cd44c..3dfb5924a 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/libp2p/go-msgio v0.3.0 github.com/multiformats/go-multiaddr v0.13.0 github.com/pelletier/go-toml/v2 v2.2.3 - github.com/prometheus/client_golang v1.20.4 + github.com/prometheus/client_golang v1.20.5 github.com/prometheus/client_model v0.6.1 github.com/protolambda/eth2-shuffle v1.1.0 github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e diff --git a/go.sum b/go.sum index 56341d86e..15754e640 100644 --- a/go.sum +++ b/go.sum @@ -420,8 +420,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= -github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= From 279ca3ed1bc10eeec9697c370a7c055e550cc13c Mon Sep 17 00:00:00 2001 From: Andrei Smirnov Date: Wed, 16 Oct 2024 16:58:34 +0300 Subject: [PATCH 20/24] core/consensus: logging leader index (#3334) Added `core_consensus_decided_leader_index` gauge to reflect the leader index of QBFT decision round. Also, logging essential decision round data as a debug message. category: feature ticket: none --- core/consensus/component.go | 24 ++++++++++++++++++++---- core/consensus/metrics.go | 11 ++++++++++- docs/metrics.md | 1 + 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/core/consensus/component.go b/core/consensus/component.go index fe5ffb1dd..c98f07f89 100644 --- a/core/consensus/component.go +++ b/core/consensus/component.go @@ -432,15 +432,31 @@ func (c *Component) runInstance(ctx context.Context, duty core.Duty) (err error) } // Instrument consensus instance. - var decided bool + var ( + decided bool + nodes = len(c.peers) + ) + decideCallback := func(qcommit []qbft.Msg[core.Duty, [32]byte]) { + round := qcommit[0].Round() decided = true - decidedRoundsGauge.WithLabelValues(duty.Type.String(), string(roundTimer.Type())).Set(float64(qcommit[0].Round())) + decidedRoundsGauge.WithLabelValues(duty.Type.String(), string(roundTimer.Type())).Set(float64(round)) inst.decidedAtCh <- time.Now() + + leaderIndex := leader(duty, round, nodes) + leaderName := c.peers[leaderIndex].Name + log.Debug(ctx, "QBFT consensus decided", + z.Str("duty", duty.Type.String()), + z.U64("slot", duty.Slot), + z.I64("round", round), + z.I64("leader_index", leaderIndex), + z.Str("leader_name", leaderName)) + + decidedLeaderGauge.WithLabelValues(duty.Type.String()).Set(float64(leaderIndex)) } // Create a new qbft definition for this instance. - def := newDefinition(len(c.peers), c.subscribers, roundTimer, decideCallback) + def := newDefinition(nodes, c.subscribers, roundTimer, decideCallback) // Create a new transport that handles sending and receiving for this instance. t := transport{ @@ -466,7 +482,7 @@ func (c *Component) runInstance(ctx context.Context, duty core.Duty) (err error) } // Run the algo, blocking until the context is cancelled. - err = qbft.Run[core.Duty, [32]byte](ctx, def, qt, duty, peerIdx, inst.hashCh) + err = qbft.Run(ctx, def, qt, duty, peerIdx, inst.hashCh) if err != nil && !isContextErr(err) { consensusError.Inc() return err // Only return non-context errors. diff --git a/core/consensus/metrics.go b/core/consensus/metrics.go index 0c9b98648..8a6eee996 100644 --- a/core/consensus/metrics.go +++ b/core/consensus/metrics.go @@ -9,12 +9,21 @@ import ( ) var ( + // Using gauge since the value changes slowly, once per slot. decidedRoundsGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "core", Subsystem: "consensus", Name: "decided_rounds", Help: "Number of rounds it took to decide consensus instances by duty and timer type.", - }, []string{"duty", "timer"}) // Using gauge since the value changes slowly, once per slot. + }, []string{"duty", "timer"}) + + // Using gauge since the value changes slowly, once per slot. + decidedLeaderGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{ + Namespace: "core", + Subsystem: "consensus", + Name: "decided_leader_index", + Help: "Leader node index of the decision round by duty.", + }, []string{"duty"}) consensusDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "core", diff --git a/docs/metrics.md b/docs/metrics.md index 4bcfcbe96..aa8e0e771 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -43,6 +43,7 @@ when storing metrics from multiple nodes or clusters in one Prometheus instance. | `core_bcast_recast_errors_total` | Counter | The total count of failed recasted registrations by source; `pregen` vs `downstream` | `source` | | `core_bcast_recast_registration_total` | Counter | The total number of unique validator registration stored in recaster per pubkey | `pubkey` | | `core_bcast_recast_total` | Counter | The total count of recasted registrations by source; `pregen` vs `downstream` | `source` | +| `core_consensus_decided_leader_index` | Gauge | Leader node index of the decision round by duty. | `duty` | | `core_consensus_decided_rounds` | Gauge | Number of rounds it took to decide consensus instances by duty and timer type. | `duty, timer` | | `core_consensus_duration_seconds` | Histogram | Duration of a consensus instance in seconds by duty and timer type. | `duty, timer` | | `core_consensus_error_total` | Counter | Total count of consensus errors | | From cd4a46f1de1e2e9a9750f07e423243e7697430a8 Mon Sep 17 00:00:00 2001 From: Andrei Smirnov Date: Fri, 18 Oct 2024 13:40:07 +0300 Subject: [PATCH 21/24] Fixed build --- core/validatorapi/validatorapi_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/validatorapi/validatorapi_test.go b/core/validatorapi/validatorapi_test.go index 8440cffed..97c1090df 100644 --- a/core/validatorapi/validatorapi_test.go +++ b/core/validatorapi/validatorapi_test.go @@ -436,7 +436,7 @@ func TestComponent_SubmitProposalsWithWrongVCData(t *testing.T) { require.NoError(t, err) // Construct the validator api component - vapi, err := validatorapi.NewComponent(bmock, allPubSharesByKey, shareIdx, nil, false, nil) + vapi, err := validatorapi.NewComponent(bmock, allPubSharesByKey, shareIdx, nil, testutil.BuilderFalse, nil) require.NoError(t, err) t.Run("full block fails", func(t *testing.T) { From b6b7b44b786344652aa21cdd907aacb29102cd0d Mon Sep 17 00:00:00 2001 From: Andrei Smirnov Date: Fri, 18 Oct 2024 13:45:16 +0300 Subject: [PATCH 22/24] Added v1.2 to the supported versions --- app/version/version.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/version/version.go b/app/version/version.go index 0e1174dab..a2cc30cee 100644 --- a/app/version/version.go +++ b/app/version/version.go @@ -25,6 +25,7 @@ var Version, _ = Parse(version) // Error is caught in tests. // Supported returns the supported minor versions in order of precedence. func Supported() []SemVer { return []SemVer{ + {major: 1, minor: 2}, {major: 1, minor: 1}, {major: 1, minor: 0}, } From 8775ee5880a4516611033cfb6f96a6ce283f2abd Mon Sep 17 00:00:00 2001 From: Kaloyan Tanev <24719519+KaloyanTanev@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:06:01 +0200 Subject: [PATCH 23/24] *: bump go to 1.23 (#3250) Bump go version to 1.23. category: misc ticket: #3251 --- .github/workflows/codeql-analysis.yml | 2 +- .pre-commit-config.yaml | 2 +- go.mod | 4 +--- testutil/promrated/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9c6ba92dc..a05d7464c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,7 +21,7 @@ on: - cron: '18 19 * * 6' env: - GOLANG_VERSION: '1.22' + GOLANG_VERSION: '1.23' jobs: analyze: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 82f26597f..beb5019b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: rev: v0.0.3 hooks: - id: check-go-version - args: [ -v=go1.22 ] # Only check minor version locally + args: [ -v=go1.23 ] # Only check minor version locally pass_filenames: false additional_dependencies: [ packaging ] - id: check-licence-header diff --git a/go.mod b/go.mod index 3dfb5924a..1dfe35996 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/obolnetwork/charon -go 1.22.0 - -toolchain go1.23.2 +go 1.23 require ( github.com/attestantio/go-eth2-client v0.21.9 diff --git a/testutil/promrated/Dockerfile b/testutil/promrated/Dockerfile index d75382daf..a757b24ee 100644 --- a/testutil/promrated/Dockerfile +++ b/testutil/promrated/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.5-alpine AS builder +FROM golang:1.23.0-alpine AS builder # Install dependencies RUN apk add --no-cache build-base git From c1cfa1de7bf31e2108c347a999bb27978312db17 Mon Sep 17 00:00:00 2001 From: Kaloyan Tanev <24719519+KaloyanTanev@users.noreply.github.com> Date: Wed, 4 Sep 2024 09:49:33 +0200 Subject: [PATCH 24/24] *: bump linter to v1.60.3 (#3247) Bump golangci-lint version to v1.60.3 category: misc ticket: none --- .github/workflows/golangci-lint.yml | 2 +- .golangci.yml | 19 ++++++++--------- .pre-commit/run_linter.sh | 2 +- app/eth2wrap/httpwrap.go | 1 - app/expbackoff/expbackoff.go | 8 ++++---- app/health/checks.go | 16 +++++++-------- app/health/checks_internal_test.go | 26 ++++++++++++------------ app/health/reducers.go | 8 ++++---- app/health/select.go | 8 ++++---- app/log/loki/client.go | 1 - app/obolapi/api.go | 1 - cluster/helpers.go | 1 - cmd/markdown_internal_test.go | 1 + cmd/testperformance.go | 1 - core/aggsigdb/memory_v2_internal_test.go | 4 ++-- core/tracker/tracker.go | 1 + core/validatorapi/router.go | 1 - eth2util/keymanager/keymanager.go | 1 - p2p/bootnode.go | 2 +- testutil/promrated/rated.go | 2 +- 20 files changed, 49 insertions(+), 57 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 735861149..73051431d 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -19,7 +19,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.59.1 + version: v1.60.3 - name: notify failure if: failure() && github.ref == 'refs/heads/main' env: diff --git a/.golangci.yml b/.golangci.yml index 4fa83a68a..20a6b434a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -116,6 +116,12 @@ linters-settings: - expected-actual go-require: ignore-http-handlers: true + gosec: + excludes: + # Flags for potentially-unsafe casting of ints, seems good, + # but currently is really unstable with no clear way to make the linter pass. + # https://github.com/securego/gosec/issues/1187 + - G115 issues: fix: true @@ -159,7 +165,6 @@ linters: - gocyclo - godot - godox - - goerr113 - gomnd - gomoddirectives - inamedparam @@ -177,13 +182,5 @@ linters: - varnamelen - wsl # Deprecated - - deadcode - - exhaustivestruct - - golint - - ifshort - - interfacer - - maligned - - nosnakecase - - structcheck - - scopelint - - varcheck + - goerr113 + - execinquery diff --git a/.pre-commit/run_linter.sh b/.pre-commit/run_linter.sh index 46a738ec7..86d167724 100755 --- a/.pre-commit/run_linter.sh +++ b/.pre-commit/run_linter.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERSION="1.59.1" +VERSION="1.60.3" if ! command -v golangci-lint &> /dev/null then diff --git a/app/eth2wrap/httpwrap.go b/app/eth2wrap/httpwrap.go index d257fa5d1..747ab546d 100644 --- a/app/eth2wrap/httpwrap.go +++ b/app/eth2wrap/httpwrap.go @@ -296,7 +296,6 @@ func httpPost(ctx context.Context, base string, endpoint string, body io.Reader, return nil, errors.Wrap(err, "failed to read POST response") } - //nolint:usestdlibvars // we should not replace 100 with http.StatusContinue, it makes it less readable if res.StatusCode/100 != 2 { return nil, errors.New("post failed", z.Int("status", res.StatusCode), z.Str("body", string(data))) } diff --git a/app/expbackoff/expbackoff.go b/app/expbackoff/expbackoff.go index f76c647a8..863c37816 100644 --- a/app/expbackoff/expbackoff.go +++ b/app/expbackoff/expbackoff.go @@ -148,14 +148,14 @@ func Backoff(config Config, retries int) time.Duration { } backoff := float64(config.BaseDelay) - max := float64(config.MaxDelay) + maxVal := float64(config.MaxDelay) - for backoff < max && retries > 0 { + for backoff < maxVal && retries > 0 { backoff *= config.Multiplier retries-- } - if backoff > max { - backoff = max + if backoff > maxVal { + backoff = maxVal } // Randomize backoff delays so that if a cluster of requests start at // the same time, they won't operate in lockstep. diff --git a/app/health/checks.go b/app/health/checks.go index 0af5b4e61..ef1603829 100644 --- a/app/health/checks.go +++ b/app/health/checks.go @@ -70,12 +70,12 @@ var checks = []check{ Description: "Beacon Node in syncing state.", Severity: severityCritical, Func: func(q query, _ Metadata) (bool, error) { - max, err := q("app_monitoring_beacon_node_syncing", noLabels, gaugeMax) + maxVal, err := q("app_monitoring_beacon_node_syncing", noLabels, gaugeMax) if err != nil { return false, err } - return max == 1, nil + return maxVal == 1, nil }, }, { @@ -83,14 +83,14 @@ var checks = []check{ Description: "Not connected to at least quorum peers. Check logs for networking issue or coordinate with peers.", Severity: severityCritical, Func: func(q query, m Metadata) (bool, error) { - max, err := q("p2p_ping_success", countNonZeroLabels, gaugeMax) + maxVal, err := q("p2p_ping_success", countNonZeroLabels, gaugeMax) if err != nil { return false, err } required := float64(m.QuorumPeers) - 1 // Exclude self - return max < required, nil + return maxVal < required, nil }, }, { @@ -98,14 +98,14 @@ var checks = []check{ Description: "Pending validators detected. Activate them to start validating.", Severity: severityInfo, Func: func(q query, _ Metadata) (bool, error) { - max, err := q("core_scheduler_validator_status", + maxVal, err := q("core_scheduler_validator_status", countLabels(l("status", "pending")), gaugeMax) if err != nil { return false, err } - return max > 0, nil + return maxVal > 0, nil }, }, { @@ -140,12 +140,12 @@ var checks = []check{ Description: "Metrics reached high cardinality threshold. Please check metrics reported by app_health_metrics_high_cardinality.", Severity: severityWarning, Func: func(q query, _ Metadata) (bool, error) { - max, err := q("app_health_metrics_high_cardinality", sumLabels(), gaugeMax) + maxVal, err := q("app_health_metrics_high_cardinality", sumLabels(), gaugeMax) if err != nil { return false, err } - return max > 0, nil + return maxVal > 0, nil }, }, } diff --git a/app/health/checks_internal_test.go b/app/health/checks_internal_test.go index 2e3b17aa0..332bc6bba 100644 --- a/app/health/checks_internal_test.go +++ b/app/health/checks_internal_test.go @@ -407,19 +407,19 @@ func testCheck(t *testing.T, m Metadata, checkName string, expect bool, metrics genGauge(genLabels("bar", "bar2"), 1, 1, 1), ) - var max int - if len(metrics) > max { - max = len(metrics) + var maxVal int + if len(metrics) > maxVal { + maxVal = len(metrics) } - if len(randomFamFoo) > max { - max = len(randomFamFoo) + if len(randomFamFoo) > maxVal { + maxVal = len(randomFamFoo) } - if len(randomFamBar) > max { - max = len(randomFamBar) + if len(randomFamBar) > maxVal { + maxVal = len(randomFamBar) } - multiFams := make([][]*pb.MetricFamily, max) - for i := range max { + multiFams := make([][]*pb.MetricFamily, maxVal) + for i := range maxVal { var fam []*pb.MetricFamily if i < len(metrics) { fam = append(fam, metrics[i]) @@ -455,14 +455,14 @@ func genFam(name string, metrics ...[]*pb.Metric) []*pb.MetricFamily { typ = pb.MetricType_GAUGE } - var max int + var maxVal int for _, series := range metrics { - if len(series) > max { - max = len(series) + if len(series) > maxVal { + maxVal = len(series) } } - resp := make([]*pb.MetricFamily, max) + resp := make([]*pb.MetricFamily, maxVal) for _, series := range metrics { for i, metric := range series { if resp[i] == nil { diff --git a/app/health/reducers.go b/app/health/reducers.go index 52507cb7f..a81ab5428 100644 --- a/app/health/reducers.go +++ b/app/health/reducers.go @@ -29,16 +29,16 @@ func increase(samples []*pb.Metric) (float64, error) { // gaugeMax returns the maximum value in a time series of gauge metrics. func gaugeMax(samples []*pb.Metric) (float64, error) { - var max float64 + var maxVal float64 for _, sample := range samples { if sample.GetGauge() == nil { return 0, errors.New("bug: non-gauge metric passed") } - if sample.GetGauge().GetValue() > max { - max = sample.GetGauge().GetValue() + if sample.GetGauge().GetValue() > maxVal { + maxVal = sample.GetGauge().GetValue() } } - return max, nil + return maxVal, nil } diff --git a/app/health/select.go b/app/health/select.go index 3d42f5b68..a1c17d62e 100644 --- a/app/health/select.go +++ b/app/health/select.go @@ -15,8 +15,8 @@ type labelSelector func(*pb.MetricFamily) (*pb.Metric, error) // maxLabel returns the metric with the highest value. func maxLabel(metricsFam *pb.MetricFamily) *pb.Metric { //nolint: unused // This is used in the future. var ( - max float64 - resp *pb.Metric + maxVal float64 + resp *pb.Metric ) for _, metric := range metricsFam.GetMetric() { var val float64 @@ -29,8 +29,8 @@ func maxLabel(metricsFam *pb.MetricFamily) *pb.Metric { //nolint: unused // This panic("invalid metric type for simple value labelSelector") } - if max == 0 || val > max { - max = val + if maxVal == 0 || val > maxVal { + maxVal = val resp = metric } } diff --git a/app/log/loki/client.go b/app/log/loki/client.go index e1b3c18c9..327fd72be 100644 --- a/app/log/loki/client.go +++ b/app/log/loki/client.go @@ -210,7 +210,6 @@ func send(ctx context.Context, client *http.Client, endpoint string, batch *batc } defer resp.Body.Close() - //nolint:usestdlibvars // we should not replace 100 with http.StatusContinue, it makes it less readable if resp.StatusCode/100 != 2 { scanner := bufio.NewScanner(io.LimitReader(resp.Body, maxErrMsgLen)) line := "" diff --git a/app/obolapi/api.go b/app/obolapi/api.go index 0c58a67b4..4ce60a1a8 100644 --- a/app/obolapi/api.go +++ b/app/obolapi/api.go @@ -123,7 +123,6 @@ func httpPost(ctx context.Context, url *url.URL, b []byte) error { return errors.Wrap(err, "failed to read POST response") } - //nolint:usestdlibvars // we should not replace 100 with http.StatusContinue, it makes it less readable if res.StatusCode/100 != 2 { return errors.New("post failed", z.Int("status", res.StatusCode), z.Str("body", string(data))) } diff --git a/cluster/helpers.go b/cluster/helpers.go index 788bdc696..8ff3ee1ef 100644 --- a/cluster/helpers.go +++ b/cluster/helpers.go @@ -40,7 +40,6 @@ func FetchDefinition(ctx context.Context, url string) (Definition, error) { return Definition{}, errors.Wrap(err, "fetch file") } - //nolint:usestdlibvars // we should not replace 100 with http.StatusContinue, it makes it less readable if resp.StatusCode/100 != 2 { return Definition{}, errors.New("http error", z.Int("status_code", resp.StatusCode)) } diff --git a/cmd/markdown_internal_test.go b/cmd/markdown_internal_test.go index b46a95a47..98815d0e3 100644 --- a/cmd/markdown_internal_test.go +++ b/cmd/markdown_internal_test.go @@ -205,6 +205,7 @@ func writeMarkdown(t *testing.T, file string, tpl *template.Template, data any) content, err := os.ReadFile(file) require.NoError(t, err) + //nolint:testifylint // don't remove fmt.Sprintf, it's not unnecessary require.Equal(t, string(content), result, fmt.Sprintf("%s doesn't contain latest metrics.\n"+ "To fix, run: go test github.com/obolnetwork/charon/cmd -update-markdown", file)) diff --git a/cmd/testperformance.go b/cmd/testperformance.go index 7acd4b839..69e5980d4 100644 --- a/cmd/testperformance.go +++ b/cmd/testperformance.go @@ -656,7 +656,6 @@ func fetchOoklaServer(_ context.Context, conf *testPerformanceConfig) (speedtest } if len(conf.InternetTestServersExclude) != 0 { - var targets speedtest.Servers for _, server := range serverList { if !slices.Contains(conf.InternetTestServersExclude, server.Name) { targets = append(targets, server) diff --git a/core/aggsigdb/memory_v2_internal_test.go b/core/aggsigdb/memory_v2_internal_test.go index 1b15cb946..6bd30a5be 100644 --- a/core/aggsigdb/memory_v2_internal_test.go +++ b/core/aggsigdb/memory_v2_internal_test.go @@ -35,8 +35,8 @@ func TestDutyExpirationV2(t *testing.T) { deadliner.Expire() - require.Zero(t, len(db.data)) - require.Zero(t, len(db.keysByDuty)) + require.Empty(t, db.data) + require.Empty(t, db.keysByDuty) } func TestCancelledQueryV2(t *testing.T) { diff --git a/core/tracker/tracker.go b/core/tracker/tracker.go index f9bf3d695..728c0e6f7 100644 --- a/core/tracker/tracker.go +++ b/core/tracker/tracker.go @@ -196,6 +196,7 @@ func dutyFailedStep(es []event) (bool, step, error) { } // Final step was successful. + //nolint:gosec // false positive slice index out of range if lastEvent.step == lastStep(es[0].duty.Type) && lastEvent.stepErr == nil { return false, zero, nil } diff --git a/core/validatorapi/router.go b/core/validatorapi/router.go index 6de62dbb9..8abd8af58 100644 --- a/core/validatorapi/router.go +++ b/core/validatorapi/router.go @@ -1144,7 +1144,6 @@ func writeError(ctx context.Context, w http.ResponseWriter, endpoint string, err } } - //nolint:usestdlibvars // we should not replace 100 with http.StatusContinue, it makes it less readable if aerr.StatusCode/100 == 4 { // 4xx status codes are client errors (not server), so log as debug only. log.Debug(ctx, "Validator api 4xx response", diff --git a/eth2util/keymanager/keymanager.go b/eth2util/keymanager/keymanager.go index fdfaed76b..124f0dfab 100644 --- a/eth2util/keymanager/keymanager.go +++ b/eth2util/keymanager/keymanager.go @@ -110,7 +110,6 @@ func postKeys(ctx context.Context, addr, authToken string, reqBody keymanagerReq } _ = resp.Body.Close() - //nolint:usestdlibvars // we should not replace 100 with http.StatusContinue, it makes it less readable if resp.StatusCode/100 != 2 { return errors.New("failed posting keys", z.Int("status", resp.StatusCode), z.Str("body", string(data))) } diff --git a/p2p/bootnode.go b/p2p/bootnode.go index 53d7f3380..4ebd4495b 100644 --- a/p2p/bootnode.go +++ b/p2p/bootnode.go @@ -153,7 +153,7 @@ func queryRelayAddrs(ctx context.Context, relayURL string, backoff func(), lockH if err != nil { log.Warn(ctx, "Failure querying relay addresses (will try again)", err) continue - } else if resp.StatusCode/100 != 2 { //nolint:usestdlibvars // we should not replace 100 with http.StatusContinue, it makes it less readable + } else if resp.StatusCode/100 != 2 { log.Warn(ctx, "Non-200 response querying relay addresses (will try again)", nil, z.Int("status_code", resp.StatusCode)) continue } diff --git a/testutil/promrated/rated.go b/testutil/promrated/rated.go index 68fb76182..e175025ef 100644 --- a/testutil/promrated/rated.go +++ b/testutil/promrated/rated.go @@ -106,7 +106,7 @@ func queryRatedAPI(ctx context.Context, url *url.URL, ratedAuth string, network backoff() continue - } else if res.StatusCode/100 != 2 { //nolint:usestdlibvars // we should not replace 100 with http.StatusContinue, it makes it less readable + } else if res.StatusCode/100 != 2 { incRatedErrors(res.StatusCode) return nil, errors.New("not ok http response", z.Str("body", string(body)))