diff --git a/evmd/go.mod b/evmd/go.mod index 3df843653..6fec3ed35 100644 --- a/evmd/go.mod +++ b/evmd/go.mod @@ -1,6 +1,6 @@ module github.com/cosmos/evm/evmd -go 1.25.0 +go 1.25.5 require ( cosmossdk.io/api v0.9.2 @@ -16,7 +16,7 @@ require ( cosmossdk.io/x/upgrade v0.2.0 github.com/cometbft/cometbft v0.39.0-beta.2 github.com/cosmos/cosmos-db v1.1.3 - github.com/cosmos/cosmos-sdk v0.54.0-beta.0 + github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa github.com/cosmos/evm v0.2.0 github.com/cosmos/gogoproto v1.7.2 github.com/cosmos/ibc-go/v10 v10.0.0-beta.0.0.20251027215440-22f0033d0aee @@ -29,7 +29,7 @@ require ( github.com/spf13/viper v1.21.0 github.com/stretchr/testify v1.11.1 golang.org/x/sync v0.18.0 - google.golang.org/grpc v1.76.0 + google.golang.org/grpc v1.77.0 ) require ( @@ -37,7 +37,7 @@ require ( cloud.google.com/go v0.122.0 // indirect cloud.google.com/go/auth v0.16.5 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect - cloud.google.com/go/compute/metadata v0.8.0 // indirect + cloud.google.com/go/compute/metadata v0.9.0 // indirect cloud.google.com/go/iam v1.5.2 // indirect cloud.google.com/go/monitoring v1.24.2 // indirect cloud.google.com/go/storage v1.56.1 // indirect @@ -50,7 +50,7 @@ require ( github.com/99designs/keyring v1.2.2 // indirect github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/zstd v1.5.7 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect @@ -76,7 +76,7 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.2.0 // indirect - github.com/bits-and-blooms/bitset v1.24.3 // indirect + github.com/bits-and-blooms/bitset v1.24.4 // indirect github.com/btcsuite/btcd v0.24.2 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.5 // indirect github.com/btcsuite/btcd/btcutil v1.1.6 // indirect @@ -85,10 +85,11 @@ require ( github.com/bytedance/sonic v1.14.2 // indirect github.com/bytedance/sonic/loader v0.4.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cloudwego/base64x v0.1.6 // indirect - github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect + github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.12.0 // indirect github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect @@ -120,8 +121,9 @@ require ( github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect + github.com/ebitengine/purego v0.8.4 // indirect github.com/emicklei/dot v1.8.0 // indirect - github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect + github.com/envoyproxy/go-control-plane/envoy v1.35.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect github.com/ethereum/go-verkle v0.2.2 // indirect @@ -130,7 +132,7 @@ require ( github.com/ferranbt/fastssz v0.1.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/getsentry/sentry-go v0.35.0 // indirect - github.com/go-jose/go-jose/v4 v4.1.2 // indirect + github.com/go-jose/go-jose/v4 v4.1.3 // indirect github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.1 // indirect @@ -158,8 +160,10 @@ require ( github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect + github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -188,6 +192,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.10.3 // indirect + github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -212,9 +217,11 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.67.1 // indirect + github.com/prometheus/common v0.67.4 // indirect + github.com/prometheus/otlptranslator v0.0.2 // indirect github.com/prometheus/procfs v0.17.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect github.com/rivo/uniseg v0.2.0 // indirect @@ -224,9 +231,10 @@ require ( github.com/sagikazarmark/locafero v0.11.0 // indirect github.com/sasha-s/go-deadlock v0.3.6 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect + github.com/shirou/gopsutil/v4 v4.25.7 // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spf13/afero v1.15.0 // indirect - github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect + github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.16 // indirect @@ -243,20 +251,38 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ulikunitz/xz v0.5.15 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - github.com/zeebo/errs v1.4.0 // indirect github.com/zondax/golem v0.27.0 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v1.0.1 // indirect go.etcd.io/bbolt v1.4.0 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.38.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect + go.opentelemetry.io/contrib/instrumentation/host v0.63.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect + go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0 // indirect + go.opentelemetry.io/contrib/otelconf v0.18.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.37.0 // indirect + go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 // indirect go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.60.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 // indirect + go.opentelemetry.io/otel/log v0.14.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect go.opentelemetry.io/otel/sdk v1.38.0 // indirect + go.opentelemetry.io/otel/sdk/log v0.14.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.38.0 // indirect go.opentelemetry.io/otel/trace v1.38.0 // indirect + go.opentelemetry.io/proto/otlp v1.7.1 // indirect go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/mock v0.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect @@ -267,7 +293,7 @@ require ( golang.org/x/crypto v0.45.0 // indirect golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect golang.org/x/net v0.47.0 // indirect - golang.org/x/oauth2 v0.31.0 // indirect + golang.org/x/oauth2 v0.32.0 // indirect golang.org/x/sys v0.38.0 // indirect golang.org/x/term v0.37.0 // indirect golang.org/x/text v0.31.0 // indirect @@ -275,8 +301,8 @@ require ( golang.org/x/tools v0.38.0 // indirect google.golang.org/api v0.247.0 // indirect google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 // indirect google.golang.org/protobuf v1.36.10 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/evmd/go.sum b/evmd/go.sum index aedd18606..129de4cb9 100644 --- a/evmd/go.sum +++ b/evmd/go.sum @@ -8,8 +8,8 @@ cloud.google.com/go/auth v0.16.5 h1:mFWNQ2FEVWAliEQWpAdH80omXFokmrnbDhUS9cBywsI= cloud.google.com/go/auth v0.16.5/go.mod h1:utzRfHMP+Vv0mpOkTRQoWD2q3BatTOoWbA7gCc2dUhQ= cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= -cloud.google.com/go/compute/metadata v0.8.0 h1:HxMRIbao8w17ZX6wBnjhcDkW6lTFpgcaobyVfZWqRLA= -cloud.google.com/go/compute/metadata v0.8.0/go.mod h1:sYOGTp851OV9bOFJ9CH7elVvyzopvWQFNNghtDQ/Biw= +cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= +cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8= cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE= cloud.google.com/go/logging v1.13.0 h1:7j0HgAp0B94o1YRDqiqm26w4q1rDMH7XNRU34lJXHYc= @@ -66,8 +66,8 @@ github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bp github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.7 h1:ybO8RBeh29qrxIhCA9E8gKY6xfONU9T6G6aP9DTKfLE= github.com/DataDog/zstd v1.5.7/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0 h1:UQUsRi8WTzhZntp5313l+CHIAT95ojUI2lpP/ExlZa4= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0/go.mod h1:Cz6ft6Dkn3Et6l2v2a9/RpN7epQ1GtDlO6lj8bEcOvw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 h1:sBEjpZlNHzK1voKq9695PJSX2o5NEXl7/OL3coiIY0c= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 h1:owcC2UnmsZycprQ5RfRgjydWhuoxg71LUfyiQdijZuM= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0/go.mod h1:ZPpqegjbE99EPKsu3iUWV22A04wzGPcAY/ziSIQEEgs= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.53.0 h1:4LP6hvB4I5ouTbGgWtixJhgED6xdf67twf9PoY96Tbg= @@ -153,8 +153,8 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.24.3 h1:Bte86SlO3lwPQqww+7BE9ZuUCKIjfqnG5jtEyqA9y9Y= -github.com/bits-and-blooms/bitset v1.24.3/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.24.4 h1:95H15Og1clikBrKr/DuzMXkQzECs1M6hhoGXLwLQOZE= +github.com/bits-and-blooms/bitset v1.24.4/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= @@ -198,6 +198,8 @@ github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= 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/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= @@ -232,8 +234,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= -github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f h1:Y8xYupdHxryycyPlc9Y+bSQAYZnetRJ70VMVKm5CKI0= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f/go.mod h1:HlzOvOjVBOfTGSRXRyY0OiCS/3J1akRGQQpRO/7zyF4= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -272,8 +274,8 @@ github.com/cosmos/cosmos-db v1.1.3 h1:7QNT77+vkefostcKkhrzDK9uoIEryzFrU9eoMeaQOP github.com/cosmos/cosmos-db v1.1.3/go.mod h1:kN+wGsnwUJZYn8Sy5Q2O0vCYA99MJllkKASbs6Unb9U= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.54.0-beta.0 h1:KOyM1CjuriSxMm2CNhceGfEc2LbRWuImKw7L9yp3+SM= -github.com/cosmos/cosmos-sdk v0.54.0-beta.0/go.mod h1:VBGchDTNoLW3xNy5mPNlnDFZiEjgRN/06vwSkXuBQdg= +github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa h1:/V1l4snedPDF0D02n4RcBGIc7Zh+AVUGDmdsfShIt/0= +github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa/go.mod h1:zLaCSzfwEXz3whgptvaqfiYweilHL0K9qRoEFwQQvEg= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/go-ethereum v1.16.2-cosmos-1 h1:QIaIS6HIdPSBdTvpFhxswhMLUJgcr4irbd2o9ZKldAI= @@ -356,6 +358,8 @@ github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw= +github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/emicklei/dot v1.8.0 h1:HnD60yAKFAevNeT+TPYr9pb8VB9bqdeSo0nzwIW6IOI= github.com/emicklei/dot v1.8.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= @@ -366,10 +370,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M= -github.com/envoyproxy/go-control-plane v0.13.4/go.mod h1:kDfuBlDVsSj2MjrLEtRWtHlsWIFcGyB2RMO44Dc5GZA= -github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A= -github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= +github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329 h1:K+fnvUM0VZ7ZFJf0n4L/BRlnsb9pL/GuDG6FqaH+PwM= +github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329/go.mod h1:Alz8LEClvR7xKsrq3qzoc4N0guvVNSS8KmSChGYr9hs= +github.com/envoyproxy/go-control-plane/envoy v1.35.0 h1:ixjkELDE+ru6idPxcHLj8LBVc2bFP7iBytj353BoHUo= +github.com/envoyproxy/go-control-plane/envoy v1.35.0/go.mod h1:09qwbGVuSWWAyN5t/b3iyVfz5+z8QWGrzkoqm/8SbEs= github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI= github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -408,8 +412,8 @@ github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SU github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v4 v4.1.2 h1:TK/7NqRQZfgAh+Td8AlsrvtPoUyiHh0LqVvokh+1vHI= -github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo= +github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= +github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -543,6 +547,8 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc h1:GN2Lv3MGO7AS6PrRoT6yV5+wkrOpcszoIsO4+4ds248= +github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc/go.mod h1:+JKpmjMGhpgPL+rXZ5nsZieVzvarn86asRlBg4uNGnk= github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -553,6 +559,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 h1:81+kWbE1yErFBMjME0I5k3x3kojjKsWtPYHEAutoPow= @@ -693,6 +701,8 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.10.3 h1:0laII9AQ6kFxo5SjhdTfSh9EgF20piD6TMHK6YuDm+4= github.com/linxGnu/grocksdb v1.10.3/go.mod h1:OLQKZwiKwaJiAVCsOzWKvwiLwfZ5Vz8Md5TYR7t7pM8= +github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54 h1:mFWunSatvkQQDhpdyuFAYwyAan3hzCuma+Pz8sqvOfg= +github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= @@ -841,6 +851,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= 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.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -867,8 +879,10 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.67.1 h1:OTSON1P4DNxzTg4hmKCc37o4ZAZDv0cfXLkOt0oEowI= -github.com/prometheus/common v0.67.1/go.mod h1:RpmT9v35q2Y+lsieQsdOh5sXZ6ajUGC8NjZAmr8vb0Q= +github.com/prometheus/common v0.67.4 h1:yR3NqWO1/UyO1w2PhUvXlGQs/PtFmoveVO0KZ4+Lvsc= +github.com/prometheus/common v0.67.4/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI= +github.com/prometheus/otlptranslator v0.0.2 h1:+1CdeLVrRQ6Psmhnobldo0kTp96Rj80DRXRd5OSnMEQ= +github.com/prometheus/otlptranslator v0.0.2/go.mod h1:P8AwMgdD7XEr6QRUJ2QWLpiAZTgTE2UYgjlu3svompI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -910,6 +924,8 @@ github.com/sasha-s/go-deadlock v0.3.6/go.mod h1:CUqNyyvMxTyjFqDT7MRg9mb4Dv/btmGT github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v4 v4.25.7 h1:bNb2JuqKuAu3tRlPv5piSmBZyMfecwQ+t/ILq+1JqVM= +github.com/shirou/gopsutil/v4 v4.25.7/go.mod h1:XV/egmwJtd3ZQjBpJVY5kndsiOO4IRqy9TQnmm6VP7U= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -937,8 +953,8 @@ github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= -github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= -github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= +github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo= +github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1007,8 +1023,6 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= -github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= github.com/zondax/golem v0.27.0 h1:IbBjGIXF3SoGOZHsILJvIM/F/ylwJzMcHAcggiqniPw= github.com/zondax/golem v0.27.0/go.mod h1:AmorCgJPt00L8xN1VrMBe13PSifoZksnQ1Ge906bu4A= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= @@ -1022,27 +1036,65 @@ go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mI go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/detectors/gcp v1.36.0 h1:F7q2tNlCaHY9nMKHR6XH9/qkp8FktLnIcy6jJNyOCQw= -go.opentelemetry.io/contrib/detectors/gcp v1.36.0/go.mod h1:IbBN8uAIIx734PTonTPxAxnjc2pQTxWNkwfstZ+6H2k= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/detectors/gcp v1.38.0 h1:ZoYbqX7OaA/TAikspPl3ozPI6iY6LiIY9I8cUfm+pJs= +go.opentelemetry.io/contrib/detectors/gcp v1.38.0/go.mod h1:SU+iU7nu5ud4oCb3LQOhIZ3nRLj6FNVrKgtflbaf2ts= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= +go.opentelemetry.io/contrib/instrumentation/host v0.63.0 h1:zsaUrWypCf0NtYSUby+/BS6QqhXVNxMQD5w4dLczKCQ= +go.opentelemetry.io/contrib/instrumentation/host v0.63.0/go.mod h1:Ru+kuFO+ToZqBKwI59rCStOhW6LWrbGisYrFaX61bJk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 h1:Hf9xI/XLML9ElpiHVDNwvqI0hIFlzV8dgIr35kV1kRU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0/go.mod h1:NfchwuyNoMcZ5MLHwPrODwUF1HWCXWrL31s8gSAdIKY= +go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0 h1:PeBoRj6af6xMI7qCupwFvTbbnd49V7n5YpG6pg8iDYQ= +go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0/go.mod h1:ingqBCtMCe8I4vpz/UVzCW6sxoqgZB37nao91mLQ3Bw= +go.opentelemetry.io/contrib/otelconf v0.18.0 h1:ciF2Gf00BWs0DnexKFZXcxg9kJ8r3SUW1LOzW3CsKA8= +go.opentelemetry.io/contrib/otelconf v0.18.0/go.mod h1:FcP7k+JLwBLdOxS6qY6VQ/4b5VBntI6L6o80IMwhAeI= +go.opentelemetry.io/contrib/propagators/b3 v1.37.0 h1:0aGKdIuVhy5l4GClAjl72ntkZJhijf2wg1S7b5oLoYA= +go.opentelemetry.io/contrib/propagators/b3 v1.37.0/go.mod h1:nhyrxEJEOQdwR15zXrCKI6+cJK60PXAkJ/jRyfhr2mg= +go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 h1:pW+qDVo0jB0rLsNeaP85xLuz20cvsECUcN7TE+D8YTM= +go.opentelemetry.io/contrib/propagators/jaeger v1.37.0/go.mod h1:x7bd+t034hxLTve1hF9Yn9qQJlO/pP8H5pWIt7+gsFM= go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0 h1:OMqPldHt79PqWKOMYIAQs3CxAi7RLgPxwfFSwr4ZxtM= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0/go.mod h1:1biG4qiqTxKiUCtoWDPpL3fB3KxVwCiGw81j3nKMuHE= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0 h1:QQqYw3lkrzwVsoEX0w//EhH/TCnpRdEenKBOOEIMjWc= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0/go.mod h1:gSVQcr17jk2ig4jqJ2DX30IdWH251JcNAecvrqTxH1s= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0 h1:vl9obrcoWVKp/lwl8tRE33853I8Xru9HFbw/skNeLs8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0/go.mod h1:GAXRxmLJcVM3u22IjTg74zWBrRCKq8BnOqUVLodpcpw= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0 h1:Oe2z/BCg5q7k4iXC3cqJxKYg0ieRiOqF0cecFYdPTwk= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0/go.mod h1:ZQM5lAJpOsKnYagGg/zV2krVqTtaVdYdDkhMoX6Oalg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 h1:lwI4Dc5leUqENgGuQImwLo4WnuXFPetmPpkLi2IrX54= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0/go.mod h1:Kz/oCE7z5wuyhPxsXDuaPteSWqjSBD5YaSdbxZYGbGk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 h1:aTL7F04bJHUlztTsNGJ2l+6he8c+y/b//eR0jjjemT4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4= +go.opentelemetry.io/otel/exporters/prometheus v0.60.0 h1:cGtQxGvZbnrWdC2GyjZi0PDKVSLWP/Jocix3QWfXtbo= +go.opentelemetry.io/otel/exporters/prometheus v0.60.0/go.mod h1:hkd1EekxNo69PTV4OWFGZcKQiIqg0RfuWExcPKFvepk= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0 h1:B/g+qde6Mkzxbry5ZZag0l7QrQBCtVm7lVjaLgmpje8= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0/go.mod h1:mOJK8eMmgW6ocDJn6Bn11CcZ05gi3P8GylBXEkZtbgA= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0 h1:wm/Q0GAAykXv83wzcKzGGqAnnfLFyFe7RslekZuv+VI= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0/go.mod h1:ra3Pa40+oKjvYh+ZD3EdxFZZB0xdMfuileHAm4nNN7w= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 h1:kJxSDN4SgWWTjG/hPp3O7LCGLcHXFlvS2/FFOrwL+SE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0/go.mod h1:mgIOzS7iZeKJdeB8/NYHrJ48fdGc71Llo5bJ1J4DWUE= +go.opentelemetry.io/otel/log v0.14.0 h1:2rzJ+pOAZ8qmZ3DDHg73NEKzSZkhkGIua9gXtxNGgrM= +go.opentelemetry.io/otel/log v0.14.0/go.mod h1:5jRG92fEAgx0SU/vFPxmJvhIuDU9E1SUnEQrMlJpOno= go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/log v0.14.0 h1:JU/U3O7N6fsAXj0+CXz21Czg532dW2V4gG1HE/e8Zrg= +go.opentelemetry.io/otel/sdk/log v0.14.0/go.mod h1:imQvII+0ZylXfKU7/wtOND8Hn4OpT3YUoIgqJVksUkM= +go.opentelemetry.io/otel/sdk/log/logtest v0.14.0 h1:Ijbtz+JKXl8T2MngiwqBlPaHqc4YCaP/i13Qrow6gAM= +go.opentelemetry.io/otel/sdk/log/logtest v0.14.0/go.mod h1:dCU8aEL6q+L9cYTqcVOk8rM9Tp8WdnHOPLiBgp0SGOA= go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= +go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1148,8 +1200,8 @@ golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo= -golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= +golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1197,6 +1249,7 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1301,10 +1354,10 @@ google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4= google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s= -google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 h1:BIRfGDEjiHRrk0QKZe3Xv2ieMhtgRGeLcZQ0mIVn4EY= -google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5/go.mod h1:j3QtIyytwqGr1JUDtYXwtMXWPKsEa5LtzIFN1Wn5WvE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 h1:eaY8u2EuxbRv7c3NiGK0/NedzVsCcV6hDuU5qPX5EGE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc= +google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 h1:mepRgnBZa07I4TRuomDE4sTIYieg/osKmzIf4USdWS4= +google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 h1:M1rk8KBnUsBDg1oPGHNCxG4vc1f49epmTO7xscSajMk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1322,8 +1375,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A= -google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= +google.golang.org/grpc v1.77.0 h1:wVVY6/8cGA6vvffn+wWK5ToddbgdU3d8MNENr4evgXM= +google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/go.mod b/go.mod index 312f4b7eb..8da5c59cb 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cosmos/evm -go 1.25.0 +go 1.25.5 require ( cosmossdk.io/api v0.9.2 @@ -18,7 +18,7 @@ require ( github.com/cometbft/cometbft v0.39.0-beta.2 github.com/cosmos/cosmos-db v1.1.3 github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.54.0-beta.0 + github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.7.2 github.com/cosmos/ibc-go/v10 v10.0.0-beta.0.0.20251027215440-22f0033d0aee @@ -47,13 +47,16 @@ require ( github.com/tidwall/sjson v1.2.5 github.com/tyler-smith/go-bip39 v1.1.0 github.com/zondax/hid v0.9.2 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 + go.opentelemetry.io/otel v1.38.0 + go.opentelemetry.io/otel/trace v1.38.0 go.uber.org/mock v0.6.0 golang.org/x/crypto v0.45.0 golang.org/x/net v0.47.0 golang.org/x/sync v0.18.0 golang.org/x/text v0.31.0 - google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 - google.golang.org/grpc v1.76.0 + google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 + google.golang.org/grpc v1.77.0 google.golang.org/protobuf v1.36.10 sigs.k8s.io/yaml v1.6.0 ) @@ -63,7 +66,7 @@ require ( cloud.google.com/go v0.122.0 // indirect cloud.google.com/go/auth v0.16.5 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect - cloud.google.com/go/compute/metadata v0.8.0 // indirect + cloud.google.com/go/compute/metadata v0.9.0 // indirect cloud.google.com/go/iam v1.5.2 // indirect cloud.google.com/go/monitoring v1.24.2 // indirect cloud.google.com/go/storage v1.56.1 // indirect @@ -76,7 +79,7 @@ require ( github.com/99designs/keyring v1.2.2 // indirect github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/zstd v1.5.7 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect @@ -102,17 +105,18 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.2.0 // indirect - github.com/bits-and-blooms/bitset v1.24.3 // indirect + github.com/bits-and-blooms/bitset v1.24.4 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.5 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect github.com/bytedance/gopkg v0.1.3 // indirect github.com/bytedance/sonic v1.14.2 // indirect github.com/bytedance/sonic/loader v0.4.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cloudwego/base64x v0.1.6 // indirect - github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect + github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f // indirect github.com/cockroachdb/errors v1.12.0 // indirect github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect @@ -136,8 +140,9 @@ require ( github.com/dgraph-io/ristretto/v2 v2.1.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect + github.com/ebitengine/purego v0.8.4 // indirect github.com/emicklei/dot v1.8.0 // indirect - github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect + github.com/envoyproxy/go-control-plane/envoy v1.35.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect github.com/ethereum/go-verkle v0.2.2 // indirect @@ -146,7 +151,7 @@ require ( github.com/ferranbt/fastssz v0.1.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/getsentry/sentry-go v0.35.0 // indirect - github.com/go-jose/go-jose/v4 v4.1.2 // indirect + github.com/go-jose/go-jose/v4 v4.1.3 // indirect github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.1 // indirect @@ -169,7 +174,9 @@ require ( github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect github.com/googleapis/gax-go/v2 v2.15.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect + github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -194,6 +201,7 @@ require ( github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.9 // indirect + github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -217,9 +225,11 @@ require ( github.com/pion/transport/v3 v3.0.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.67.1 // indirect + github.com/prometheus/common v0.67.4 // indirect + github.com/prometheus/otlptranslator v0.0.2 // indirect github.com/prometheus/procfs v0.17.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect github.com/rivo/uniseg v0.2.0 // indirect @@ -228,10 +238,11 @@ require ( github.com/sagikazarmark/locafero v0.11.0 // indirect github.com/sasha-s/go-deadlock v0.3.6 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect + github.com/shirou/gopsutil/v4 v4.25.7 // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/pflag v1.0.10 // indirect - github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect + github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.16 // indirect @@ -245,20 +256,34 @@ require ( github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ulikunitz/xz v0.5.15 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - github.com/zeebo/errs v1.4.0 // indirect github.com/zondax/golem v0.27.0 // indirect github.com/zondax/ledger-go v1.0.1 // indirect go.etcd.io/bbolt v1.4.0 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.38.0 // indirect + go.opentelemetry.io/contrib/instrumentation/host v0.63.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect - go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0 // indirect + go.opentelemetry.io/contrib/otelconf v0.18.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.37.0 // indirect + go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.60.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0 // indirect go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 // indirect + go.opentelemetry.io/otel/log v0.14.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect go.opentelemetry.io/otel/sdk v1.38.0 // indirect + go.opentelemetry.io/otel/sdk/log v0.14.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.38.0 // indirect - go.opentelemetry.io/otel/trace v1.38.0 // indirect + go.opentelemetry.io/proto/otlp v1.7.1 // indirect go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect @@ -266,14 +291,14 @@ require ( go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/arch v0.21.0 // indirect golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect - golang.org/x/oauth2 v0.31.0 // indirect + golang.org/x/oauth2 v0.32.0 // indirect golang.org/x/sys v0.38.0 // indirect golang.org/x/term v0.37.0 // indirect golang.org/x/time v0.13.0 // indirect golang.org/x/tools v0.38.0 // indirect google.golang.org/api v0.247.0 // indirect google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.2 // indirect diff --git a/go.sum b/go.sum index ece2e2572..9c1972d61 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,8 @@ cloud.google.com/go/auth v0.16.5 h1:mFWNQ2FEVWAliEQWpAdH80omXFokmrnbDhUS9cBywsI= cloud.google.com/go/auth v0.16.5/go.mod h1:utzRfHMP+Vv0mpOkTRQoWD2q3BatTOoWbA7gCc2dUhQ= cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= -cloud.google.com/go/compute/metadata v0.8.0 h1:HxMRIbao8w17ZX6wBnjhcDkW6lTFpgcaobyVfZWqRLA= -cloud.google.com/go/compute/metadata v0.8.0/go.mod h1:sYOGTp851OV9bOFJ9CH7elVvyzopvWQFNNghtDQ/Biw= +cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= +cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8= cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE= cloud.google.com/go/logging v1.13.0 h1:7j0HgAp0B94o1YRDqiqm26w4q1rDMH7XNRU34lJXHYc= @@ -64,8 +64,8 @@ github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bp github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.7 h1:ybO8RBeh29qrxIhCA9E8gKY6xfONU9T6G6aP9DTKfLE= github.com/DataDog/zstd v1.5.7/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0 h1:UQUsRi8WTzhZntp5313l+CHIAT95ojUI2lpP/ExlZa4= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0/go.mod h1:Cz6ft6Dkn3Et6l2v2a9/RpN7epQ1GtDlO6lj8bEcOvw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 h1:sBEjpZlNHzK1voKq9695PJSX2o5NEXl7/OL3coiIY0c= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 h1:owcC2UnmsZycprQ5RfRgjydWhuoxg71LUfyiQdijZuM= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0/go.mod h1:ZPpqegjbE99EPKsu3iUWV22A04wzGPcAY/ziSIQEEgs= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.53.0 h1:4LP6hvB4I5ouTbGgWtixJhgED6xdf67twf9PoY96Tbg= @@ -151,8 +151,8 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.24.3 h1:Bte86SlO3lwPQqww+7BE9ZuUCKIjfqnG5jtEyqA9y9Y= -github.com/bits-and-blooms/bitset v1.24.3/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.24.4 h1:95H15Og1clikBrKr/DuzMXkQzECs1M6hhoGXLwLQOZE= +github.com/bits-and-blooms/bitset v1.24.4/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= @@ -196,6 +196,8 @@ github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= 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/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= @@ -227,8 +229,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= -github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f h1:Y8xYupdHxryycyPlc9Y+bSQAYZnetRJ70VMVKm5CKI0= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f/go.mod h1:HlzOvOjVBOfTGSRXRyY0OiCS/3J1akRGQQpRO/7zyF4= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -267,8 +269,8 @@ github.com/cosmos/cosmos-db v1.1.3 h1:7QNT77+vkefostcKkhrzDK9uoIEryzFrU9eoMeaQOP github.com/cosmos/cosmos-db v1.1.3/go.mod h1:kN+wGsnwUJZYn8Sy5Q2O0vCYA99MJllkKASbs6Unb9U= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.54.0-beta.0 h1:KOyM1CjuriSxMm2CNhceGfEc2LbRWuImKw7L9yp3+SM= -github.com/cosmos/cosmos-sdk v0.54.0-beta.0/go.mod h1:VBGchDTNoLW3xNy5mPNlnDFZiEjgRN/06vwSkXuBQdg= +github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa h1:/V1l4snedPDF0D02n4RcBGIc7Zh+AVUGDmdsfShIt/0= +github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa/go.mod h1:zLaCSzfwEXz3whgptvaqfiYweilHL0K9qRoEFwQQvEg= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/go-ethereum v1.16.2-cosmos-1 h1:QIaIS6HIdPSBdTvpFhxswhMLUJgcr4irbd2o9ZKldAI= @@ -343,6 +345,8 @@ github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw= +github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/emicklei/dot v1.8.0 h1:HnD60yAKFAevNeT+TPYr9pb8VB9bqdeSo0nzwIW6IOI= github.com/emicklei/dot v1.8.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= @@ -353,10 +357,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M= -github.com/envoyproxy/go-control-plane v0.13.4/go.mod h1:kDfuBlDVsSj2MjrLEtRWtHlsWIFcGyB2RMO44Dc5GZA= -github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A= -github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= +github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329 h1:K+fnvUM0VZ7ZFJf0n4L/BRlnsb9pL/GuDG6FqaH+PwM= +github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329/go.mod h1:Alz8LEClvR7xKsrq3qzoc4N0guvVNSS8KmSChGYr9hs= +github.com/envoyproxy/go-control-plane/envoy v1.35.0 h1:ixjkELDE+ru6idPxcHLj8LBVc2bFP7iBytj353BoHUo= +github.com/envoyproxy/go-control-plane/envoy v1.35.0/go.mod h1:09qwbGVuSWWAyN5t/b3iyVfz5+z8QWGrzkoqm/8SbEs= github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI= github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -395,8 +399,8 @@ github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SU github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v4 v4.1.2 h1:TK/7NqRQZfgAh+Td8AlsrvtPoUyiHh0LqVvokh+1vHI= -github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo= +github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= +github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -527,6 +531,8 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc h1:GN2Lv3MGO7AS6PrRoT6yV5+wkrOpcszoIsO4+4ds248= +github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc/go.mod h1:+JKpmjMGhpgPL+rXZ5nsZieVzvarn86asRlBg4uNGnk= github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -537,6 +543,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 h1:81+kWbE1yErFBMjME0I5k3x3kojjKsWtPYHEAutoPow= @@ -674,6 +682,8 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.10.3 h1:0laII9AQ6kFxo5SjhdTfSh9EgF20piD6TMHK6YuDm+4= github.com/linxGnu/grocksdb v1.10.3/go.mod h1:OLQKZwiKwaJiAVCsOzWKvwiLwfZ5Vz8Md5TYR7t7pM8= +github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54 h1:mFWunSatvkQQDhpdyuFAYwyAan3hzCuma+Pz8sqvOfg= +github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= @@ -822,6 +832,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= 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.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -848,8 +860,10 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.67.1 h1:OTSON1P4DNxzTg4hmKCc37o4ZAZDv0cfXLkOt0oEowI= -github.com/prometheus/common v0.67.1/go.mod h1:RpmT9v35q2Y+lsieQsdOh5sXZ6ajUGC8NjZAmr8vb0Q= +github.com/prometheus/common v0.67.4 h1:yR3NqWO1/UyO1w2PhUvXlGQs/PtFmoveVO0KZ4+Lvsc= +github.com/prometheus/common v0.67.4/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI= +github.com/prometheus/otlptranslator v0.0.2 h1:+1CdeLVrRQ6Psmhnobldo0kTp96Rj80DRXRd5OSnMEQ= +github.com/prometheus/otlptranslator v0.0.2/go.mod h1:P8AwMgdD7XEr6QRUJ2QWLpiAZTgTE2UYgjlu3svompI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -890,6 +904,8 @@ github.com/sasha-s/go-deadlock v0.3.6/go.mod h1:CUqNyyvMxTyjFqDT7MRg9mb4Dv/btmGT github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v4 v4.25.7 h1:bNb2JuqKuAu3tRlPv5piSmBZyMfecwQ+t/ILq+1JqVM= +github.com/shirou/gopsutil/v4 v4.25.7/go.mod h1:XV/egmwJtd3ZQjBpJVY5kndsiOO4IRqy9TQnmm6VP7U= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -917,8 +933,8 @@ github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= -github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= -github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= +github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo= +github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -987,8 +1003,6 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= -github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= github.com/zondax/golem v0.27.0 h1:IbBjGIXF3SoGOZHsILJvIM/F/ylwJzMcHAcggiqniPw= github.com/zondax/golem v0.27.0/go.mod h1:AmorCgJPt00L8xN1VrMBe13PSifoZksnQ1Ge906bu4A= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= @@ -1002,27 +1016,65 @@ go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mI go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/detectors/gcp v1.36.0 h1:F7q2tNlCaHY9nMKHR6XH9/qkp8FktLnIcy6jJNyOCQw= -go.opentelemetry.io/contrib/detectors/gcp v1.36.0/go.mod h1:IbBN8uAIIx734PTonTPxAxnjc2pQTxWNkwfstZ+6H2k= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/detectors/gcp v1.38.0 h1:ZoYbqX7OaA/TAikspPl3ozPI6iY6LiIY9I8cUfm+pJs= +go.opentelemetry.io/contrib/detectors/gcp v1.38.0/go.mod h1:SU+iU7nu5ud4oCb3LQOhIZ3nRLj6FNVrKgtflbaf2ts= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= +go.opentelemetry.io/contrib/instrumentation/host v0.63.0 h1:zsaUrWypCf0NtYSUby+/BS6QqhXVNxMQD5w4dLczKCQ= +go.opentelemetry.io/contrib/instrumentation/host v0.63.0/go.mod h1:Ru+kuFO+ToZqBKwI59rCStOhW6LWrbGisYrFaX61bJk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 h1:Hf9xI/XLML9ElpiHVDNwvqI0hIFlzV8dgIr35kV1kRU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0/go.mod h1:NfchwuyNoMcZ5MLHwPrODwUF1HWCXWrL31s8gSAdIKY= +go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0 h1:PeBoRj6af6xMI7qCupwFvTbbnd49V7n5YpG6pg8iDYQ= +go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0/go.mod h1:ingqBCtMCe8I4vpz/UVzCW6sxoqgZB37nao91mLQ3Bw= +go.opentelemetry.io/contrib/otelconf v0.18.0 h1:ciF2Gf00BWs0DnexKFZXcxg9kJ8r3SUW1LOzW3CsKA8= +go.opentelemetry.io/contrib/otelconf v0.18.0/go.mod h1:FcP7k+JLwBLdOxS6qY6VQ/4b5VBntI6L6o80IMwhAeI= +go.opentelemetry.io/contrib/propagators/b3 v1.37.0 h1:0aGKdIuVhy5l4GClAjl72ntkZJhijf2wg1S7b5oLoYA= +go.opentelemetry.io/contrib/propagators/b3 v1.37.0/go.mod h1:nhyrxEJEOQdwR15zXrCKI6+cJK60PXAkJ/jRyfhr2mg= +go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 h1:pW+qDVo0jB0rLsNeaP85xLuz20cvsECUcN7TE+D8YTM= +go.opentelemetry.io/contrib/propagators/jaeger v1.37.0/go.mod h1:x7bd+t034hxLTve1hF9Yn9qQJlO/pP8H5pWIt7+gsFM= go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0 h1:OMqPldHt79PqWKOMYIAQs3CxAi7RLgPxwfFSwr4ZxtM= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0/go.mod h1:1biG4qiqTxKiUCtoWDPpL3fB3KxVwCiGw81j3nKMuHE= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0 h1:QQqYw3lkrzwVsoEX0w//EhH/TCnpRdEenKBOOEIMjWc= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0/go.mod h1:gSVQcr17jk2ig4jqJ2DX30IdWH251JcNAecvrqTxH1s= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0 h1:vl9obrcoWVKp/lwl8tRE33853I8Xru9HFbw/skNeLs8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0/go.mod h1:GAXRxmLJcVM3u22IjTg74zWBrRCKq8BnOqUVLodpcpw= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0 h1:Oe2z/BCg5q7k4iXC3cqJxKYg0ieRiOqF0cecFYdPTwk= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0/go.mod h1:ZQM5lAJpOsKnYagGg/zV2krVqTtaVdYdDkhMoX6Oalg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 h1:lwI4Dc5leUqENgGuQImwLo4WnuXFPetmPpkLi2IrX54= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0/go.mod h1:Kz/oCE7z5wuyhPxsXDuaPteSWqjSBD5YaSdbxZYGbGk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 h1:aTL7F04bJHUlztTsNGJ2l+6he8c+y/b//eR0jjjemT4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4= +go.opentelemetry.io/otel/exporters/prometheus v0.60.0 h1:cGtQxGvZbnrWdC2GyjZi0PDKVSLWP/Jocix3QWfXtbo= +go.opentelemetry.io/otel/exporters/prometheus v0.60.0/go.mod h1:hkd1EekxNo69PTV4OWFGZcKQiIqg0RfuWExcPKFvepk= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0 h1:B/g+qde6Mkzxbry5ZZag0l7QrQBCtVm7lVjaLgmpje8= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0/go.mod h1:mOJK8eMmgW6ocDJn6Bn11CcZ05gi3P8GylBXEkZtbgA= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0 h1:wm/Q0GAAykXv83wzcKzGGqAnnfLFyFe7RslekZuv+VI= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0/go.mod h1:ra3Pa40+oKjvYh+ZD3EdxFZZB0xdMfuileHAm4nNN7w= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 h1:kJxSDN4SgWWTjG/hPp3O7LCGLcHXFlvS2/FFOrwL+SE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0/go.mod h1:mgIOzS7iZeKJdeB8/NYHrJ48fdGc71Llo5bJ1J4DWUE= +go.opentelemetry.io/otel/log v0.14.0 h1:2rzJ+pOAZ8qmZ3DDHg73NEKzSZkhkGIua9gXtxNGgrM= +go.opentelemetry.io/otel/log v0.14.0/go.mod h1:5jRG92fEAgx0SU/vFPxmJvhIuDU9E1SUnEQrMlJpOno= go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/log v0.14.0 h1:JU/U3O7N6fsAXj0+CXz21Czg532dW2V4gG1HE/e8Zrg= +go.opentelemetry.io/otel/sdk/log v0.14.0/go.mod h1:imQvII+0ZylXfKU7/wtOND8Hn4OpT3YUoIgqJVksUkM= +go.opentelemetry.io/otel/sdk/log/logtest v0.14.0 h1:Ijbtz+JKXl8T2MngiwqBlPaHqc4YCaP/i13Qrow6gAM= +go.opentelemetry.io/otel/sdk/log/logtest v0.14.0/go.mod h1:dCU8aEL6q+L9cYTqcVOk8rM9Tp8WdnHOPLiBgp0SGOA= go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= +go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1128,8 +1180,8 @@ golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo= -golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= +golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1177,6 +1229,7 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1281,10 +1334,10 @@ google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4= google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s= -google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 h1:BIRfGDEjiHRrk0QKZe3Xv2ieMhtgRGeLcZQ0mIVn4EY= -google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5/go.mod h1:j3QtIyytwqGr1JUDtYXwtMXWPKsEa5LtzIFN1Wn5WvE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 h1:eaY8u2EuxbRv7c3NiGK0/NedzVsCcV6hDuU5qPX5EGE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc= +google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 h1:mepRgnBZa07I4TRuomDE4sTIYieg/osKmzIf4USdWS4= +google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 h1:M1rk8KBnUsBDg1oPGHNCxG4vc1f49epmTO7xscSajMk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1302,8 +1355,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A= -google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= +google.golang.org/grpc v1.77.0 h1:wVVY6/8cGA6vvffn+wWK5ToddbgdU3d8MNENr4evgXM= +google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/rpc/backend/account_info.go b/rpc/backend/account_info.go index 9bbaff660..5b5e67130 100644 --- a/rpc/backend/account_info.go +++ b/rpc/backend/account_info.go @@ -1,6 +1,7 @@ package backend import ( + "context" "fmt" "math" "math/big" @@ -8,10 +9,13 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/pkg/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" "github.com/cometbft/cometbft/libs/bytes" rpctypes "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" evmtypes "github.com/cosmos/evm/x/vm/types" errorsmod "cosmossdk.io/errors" @@ -23,17 +27,21 @@ import ( ) // GetCode returns the contract code at the given address and block number. -func (b *Backend) GetCode(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error) { - blockNum, err := b.BlockNumberFromComet(blockNrOrHash) +func (b *Backend) GetCode(ctx context.Context, address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (bz hexutil.Bytes, err error) { + ctx, span := tracer.Start(ctx, "GetCode", trace.WithAttributes(attribute.String("address", address.String()), attribute.String("blockNorHash", unwrapBlockNOrHash(blockNrOrHash)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + blockNum, err := b.BlockNumberFromComet(ctx, blockNrOrHash) if err != nil { return nil, err } + ctx = rpctypes.ContextWithHeight(ctx, blockNum.Int64()) req := &evmtypes.QueryCodeRequest{ Address: address.String(), } - res, err := b.QueryClient.Code(rpctypes.ContextWithHeight(blockNum.Int64()), req) + res, err := b.QueryClient.Code(ctx, req) if err != nil { return nil, err } @@ -42,15 +50,18 @@ func (b *Backend) GetCode(address common.Address, blockNrOrHash rpctypes.BlockNu } // GetProof returns an account object with proof and any storage proofs -func (b *Backend) GetProof(address common.Address, storageKeys []string, blockNrOrHash rpctypes.BlockNumberOrHash) (*rpctypes.AccountResult, error) { - blockNum, err := b.BlockNumberFromComet(blockNrOrHash) +func (b *Backend) GetProof(ctx context.Context, address common.Address, storageKeys []string, blockNrOrHash rpctypes.BlockNumberOrHash) (result *rpctypes.AccountResult, err error) { + ctx, span := tracer.Start(ctx, "GetProof", trace.WithAttributes(attribute.String("address", address.String()), attribute.StringSlice("storageKeys", storageKeys), attribute.String("blockNorHash", unwrapBlockNOrHash(blockNrOrHash)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + blockNum, err := b.BlockNumberFromComet(ctx, blockNrOrHash) if err != nil { return nil, err } height := int64(blockNum) - _, err = b.CometHeaderByNumber(blockNum) + _, err = b.CometHeaderByNumber(ctx, blockNum) if err != nil { // the error message imitates geth behavior return nil, errors.New("header not found") @@ -58,7 +69,7 @@ func (b *Backend) GetProof(address common.Address, storageKeys []string, blockNr // if the height is equal to zero, meaning the query condition of the block is either "pending" or "latest" if height == 0 { - bn, err := b.BlockNumber() + bn, err := b.BlockNumber(ctx) if err != nil { return nil, err } @@ -70,8 +81,8 @@ func (b *Backend) GetProof(address common.Address, storageKeys []string, blockNr height = int64(bn) //#nosec G115 -- checked for int overflow already } - ctx := rpctypes.ContextWithHeight(height) - clientCtx := b.ClientCtx.WithHeight(height) + ctx = rpctypes.ContextWithHeight(ctx, height) + clientCtx := b.ClientCtx.WithHeight(height).WithCmdContext(ctx) // query storage proofs storageProofs := make([]rpctypes.StorageResult, len(storageKeys)) @@ -124,18 +135,22 @@ func (b *Backend) GetProof(address common.Address, storageKeys []string, blockNr } // GetStorageAt returns the contract storage at the given address, block number, and key. -func (b *Backend) GetStorageAt(address common.Address, key string, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error) { - blockNum, err := b.BlockNumberFromComet(blockNrOrHash) +func (b *Backend) GetStorageAt(ctx context.Context, address common.Address, key string, blockNrOrHash rpctypes.BlockNumberOrHash) (result hexutil.Bytes, err error) { + ctx, span := tracer.Start(ctx, "GetStorageAt", trace.WithAttributes(attribute.String("address", address.String()), attribute.String("key", key), attribute.String("blockNorHash", unwrapBlockNOrHash(blockNrOrHash)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + blockNum, err := b.BlockNumberFromComet(ctx, blockNrOrHash) if err != nil { return nil, err } + ctx = rpctypes.ContextWithHeight(ctx, blockNum.Int64()) req := &evmtypes.QueryStorageRequest{ Address: address.String(), Key: key, } - res, err := b.QueryClient.Storage(rpctypes.ContextWithHeight(blockNum.Int64()), req) + res, err := b.QueryClient.Storage(ctx, req) if err != nil { return nil, err } @@ -145,22 +160,26 @@ func (b *Backend) GetStorageAt(address common.Address, key string, blockNrOrHash } // GetBalance returns the provided account's *spendable* balance up to the provided block number. -func (b *Backend) GetBalance(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (*hexutil.Big, error) { - blockNum, err := b.BlockNumberFromComet(blockNrOrHash) +func (b *Backend) GetBalance(ctx context.Context, address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (result *hexutil.Big, err error) { + ctx, span := tracer.Start(ctx, "GetBalance", trace.WithAttributes(attribute.String("address", address.String()), attribute.String("blockNorHash", unwrapBlockNOrHash(blockNrOrHash)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + blockNum, err := b.BlockNumberFromComet(ctx, blockNrOrHash) if err != nil { return nil, err } + ctx = rpctypes.ContextWithHeight(ctx, blockNum.Int64()) req := &evmtypes.QueryBalanceRequest{ Address: address.String(), } - _, err = b.CometHeaderByNumber(blockNum) + _, err = b.CometHeaderByNumber(ctx, blockNum) if err != nil { return nil, err } - res, err := b.QueryClient.Balance(rpctypes.ContextWithHeight(blockNum.Int64()), req) + res, err := b.QueryClient.Balance(ctx, req) if err != nil { return nil, err } @@ -179,9 +198,12 @@ func (b *Backend) GetBalance(address common.Address, blockNrOrHash rpctypes.Bloc } // GetTransactionCount returns the number of transactions at the given address up to the given block number. -func (b *Backend) GetTransactionCount(address common.Address, blockNum rpctypes.BlockNumber) (*hexutil.Uint64, error) { +func (b *Backend) GetTransactionCount(ctx context.Context, address common.Address, blockNum rpctypes.BlockNumber) (result *hexutil.Uint64, err error) { + ctx, span := tracer.Start(ctx, "GetTransactionCount", trace.WithAttributes(attribute.String("address", address.String()), attribute.Int64("blockNum", blockNum.Int64()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + n := hexutil.Uint64(0) - bn, err := b.BlockNumber() + bn, err := b.BlockNumber(ctx) if err != nil { return &n, err } @@ -199,14 +221,14 @@ func (b *Backend) GetTransactionCount(address common.Address, blockNum rpctypes. from := sdk.AccAddress(address.Bytes()) accRet := b.ClientCtx.AccountRetriever - err = accRet.EnsureExists(b.ClientCtx, from) + err = accRet.EnsureExists(b.ClientCtx.WithCmdContext(ctx), from) if err != nil { // account doesn't exist yet, return 0 return &n, nil } includePending := blockNum == rpctypes.EthPendingBlockNumber - nonce, err := b.getAccountNonce(address, includePending, blockNum.Int64(), b.Logger) + nonce, err := b.getAccountNonce(ctx, address, includePending, blockNum.Int64(), b.Logger) if err != nil { return nil, err } diff --git a/rpc/backend/backend.go b/rpc/backend/backend.go index 06079229d..2769a57b9 100644 --- a/rpc/backend/backend.go +++ b/rpc/backend/backend.go @@ -7,6 +7,8 @@ import ( "math/big" "time" + tmrpcclient "github.com/cometbft/cometbft/rpc/client" + tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/math" @@ -14,9 +16,7 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/signer/core/apitypes" - - tmrpcclient "github.com/cometbft/cometbft/rpc/client" - tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" + "go.opentelemetry.io/otel" evmmempool "github.com/cosmos/evm/mempool" "github.com/cosmos/evm/rpc/types" @@ -45,9 +45,9 @@ type BackendI interface { //nolint: revive type EVMBackend interface { // Node specific queries Accounts() ([]common.Address, error) - Syncing() (interface{}, error) - SetEtherbase(etherbase common.Address) bool - SetGasPrice(gasPrice hexutil.Big) bool + Syncing(ctx context.Context) (interface{}, error) + SetEtherbase(ctx context.Context, etherbase common.Address) bool + SetGasPrice(ctx context.Context, gasPrice hexutil.Big) bool ImportRawKey(privkey, password string) (common.Address, error) ListAccounts() ([]common.Address, error) NewMnemonic(uid string, language keyring.Language, hdPath, bip39Passphrase string, algo keyring.SignatureAlgo) (*keyring.Record, error) @@ -59,85 +59,89 @@ type EVMBackend interface { // Sign Tx Sign(address common.Address, data hexutil.Bytes) (hexutil.Bytes, error) - SendTransaction(args evmtypes.TransactionArgs) (common.Hash, error) + SendTransaction(ctx context.Context, args evmtypes.TransactionArgs) (common.Hash, error) SignTypedData(address common.Address, typedData apitypes.TypedData) (hexutil.Bytes, error) // Blocks Info - BlockNumber() (hexutil.Uint64, error) - GetHeaderByNumber(blockNum types.BlockNumber) (map[string]interface{}, error) - GetHeaderByHash(hash common.Hash) (map[string]interface{}, error) - GetBlockByNumber(blockNum types.BlockNumber, fullTx bool) (map[string]interface{}, error) - GetBlockByHash(hash common.Hash, fullTx bool) (map[string]interface{}, error) - GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint - GetBlockTransactionCountByNumber(blockNum types.BlockNumber) *hexutil.Uint - CometBlockByNumber(blockNum types.BlockNumber) (*tmrpctypes.ResultBlock, error) - CometBlockByHash(blockHash common.Hash) (*tmrpctypes.ResultBlock, error) - BlockNumberFromComet(blockNrOrHash types.BlockNumberOrHash) (types.BlockNumber, error) - BlockNumberFromCometByHash(blockHash common.Hash) (*big.Int, error) - EthMsgsFromCometBlock(block *tmrpctypes.ResultBlock, blockRes *tmrpctypes.ResultBlockResults) []*evmtypes.MsgEthereumTx - BlockBloomFromCometBlock(blockRes *tmrpctypes.ResultBlockResults) (ethtypes.Bloom, error) - HeaderByNumber(blockNum types.BlockNumber) (*ethtypes.Header, error) - HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error) - RPCBlockFromCometBlock(resBlock *tmrpctypes.ResultBlock, blockRes *tmrpctypes.ResultBlockResults, fullTx bool) (map[string]interface{}, error) - EthBlockByNumber(blockNum types.BlockNumber) (*ethtypes.Block, error) - EthBlockFromCometBlock(resBlock *tmrpctypes.ResultBlock, blockRes *tmrpctypes.ResultBlockResults) (*ethtypes.Block, error) - GetBlockReceipts(blockNrOrHash types.BlockNumberOrHash) ([]map[string]interface{}, error) + BlockNumber(ctx context.Context) (hexutil.Uint64, error) + GetHeaderByNumber(ctx context.Context, blockNum types.BlockNumber) (map[string]interface{}, error) + GetHeaderByHash(ctx context.Context, hash common.Hash) (map[string]interface{}, error) + GetBlockByNumber(ctx context.Context, blockNum types.BlockNumber, fullTx bool) (map[string]interface{}, error) + GetBlockByHash(ctx context.Context, hash common.Hash, fullTx bool) (map[string]interface{}, error) + GetBlockTransactionCountByHash(ctx context.Context, hash common.Hash) *hexutil.Uint + GetBlockTransactionCountByNumber(ctx context.Context, blockNum types.BlockNumber) *hexutil.Uint + CometBlockByNumber(ctx context.Context, blockNum types.BlockNumber) (*tmrpctypes.ResultBlock, error) + CometBlockByHash(ctx context.Context, blockHash common.Hash) (*tmrpctypes.ResultBlock, error) + BlockNumberFromComet(ctx context.Context, blockNrOrHash types.BlockNumberOrHash) (types.BlockNumber, error) + BlockNumberFromCometByHash(ctx context.Context, blockHash common.Hash) (*big.Int, error) + EthMsgsFromCometBlock(ctx context.Context, block *tmrpctypes.ResultBlock, blockRes *tmrpctypes.ResultBlockResults) []*evmtypes.MsgEthereumTx + BlockBloomFromCometBlock(ctx context.Context, blockRes *tmrpctypes.ResultBlockResults) (ethtypes.Bloom, error) + HeaderByNumber(ctx context.Context, blockNum types.BlockNumber) (*ethtypes.Header, error) + HeaderByHash(ctx context.Context, blockHash common.Hash) (*ethtypes.Header, error) + RPCBlockFromCometBlock(ctx context.Context, resBlock *tmrpctypes.ResultBlock, blockRes *tmrpctypes.ResultBlockResults, fullTx bool) (map[string]interface{}, error) + EthBlockByNumber(ctx context.Context, blockNum types.BlockNumber) (*ethtypes.Block, error) + EthBlockFromCometBlock(ctx context.Context, resBlock *tmrpctypes.ResultBlock, blockRes *tmrpctypes.ResultBlockResults) (*ethtypes.Block, error) + GetBlockReceipts(ctx context.Context, blockNrOrHash types.BlockNumberOrHash) ([]map[string]interface{}, error) // Account Info - GetCode(address common.Address, blockNrOrHash types.BlockNumberOrHash) (hexutil.Bytes, error) - GetBalance(address common.Address, blockNrOrHash types.BlockNumberOrHash) (*hexutil.Big, error) - GetStorageAt(address common.Address, key string, blockNrOrHash types.BlockNumberOrHash) (hexutil.Bytes, error) - GetProof(address common.Address, storageKeys []string, blockNrOrHash types.BlockNumberOrHash) (*types.AccountResult, error) - GetTransactionCount(address common.Address, blockNum types.BlockNumber) (*hexutil.Uint64, error) + GetCode(ctx context.Context, address common.Address, blockNrOrHash types.BlockNumberOrHash) (hexutil.Bytes, error) + GetBalance(ctx context.Context, address common.Address, blockNrOrHash types.BlockNumberOrHash) (*hexutil.Big, error) + GetStorageAt(ctx context.Context, address common.Address, key string, blockNrOrHash types.BlockNumberOrHash) (hexutil.Bytes, error) + GetProof(ctx context.Context, address common.Address, storageKeys []string, blockNrOrHash types.BlockNumberOrHash) (*types.AccountResult, error) + GetTransactionCount(ctx context.Context, address common.Address, blockNum types.BlockNumber) (*hexutil.Uint64, error) // Chain Info - ChainID() (*hexutil.Big, error) + ChainID(ctx context.Context) (*hexutil.Big, error) ChainConfig() *params.ChainConfig - GlobalMinGasPrice() (*big.Int, error) - BaseFee(blockRes *tmrpctypes.ResultBlockResults) (*big.Int, error) - CurrentHeader() (*ethtypes.Header, error) - PendingTransactions() ([]*sdk.Tx, error) - GetCoinbase() (sdk.AccAddress, error) - FeeHistory(blockCount math.HexOrDecimal64, lastBlock rpc.BlockNumber, rewardPercentiles []float64) (*types.FeeHistoryResult, error) - SuggestGasTipCap(baseFee *big.Int) (*big.Int, error) + GlobalMinGasPrice(ctx context.Context) (*big.Int, error) + BaseFee(ctx context.Context, blockRes *tmrpctypes.ResultBlockResults) (*big.Int, error) + CurrentHeader(ctx context.Context) (*ethtypes.Header, error) + PendingTransactions(ctx context.Context) ([]*sdk.Tx, error) + GetCoinbase(ctx context.Context) (sdk.AccAddress, error) + FeeHistory(ctx context.Context, blockCount math.HexOrDecimal64, lastBlock rpc.BlockNumber, rewardPercentiles []float64) (*types.FeeHistoryResult, error) + SuggestGasTipCap(ctx context.Context, baseFee *big.Int) (*big.Int, error) // Tx Info - GetTransactionByHash(txHash common.Hash) (*types.RPCTransaction, error) - GetTxByEthHash(txHash common.Hash) (*servertypes.TxResult, error) - GetTxByTxIndex(height int64, txIndex uint) (*servertypes.TxResult, error) - GetTransactionByBlockAndIndex(block *tmrpctypes.ResultBlock, idx hexutil.Uint) (*types.RPCTransaction, error) - GetTransactionReceipt(hash common.Hash) (map[string]interface{}, error) - GetTransactionLogs(hash common.Hash) ([]*ethtypes.Log, error) - GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (*types.RPCTransaction, error) - GetTransactionByBlockNumberAndIndex(blockNum types.BlockNumber, idx hexutil.Uint) (*types.RPCTransaction, error) - CreateAccessList(args evmtypes.TransactionArgs, blockNrOrHash types.BlockNumberOrHash, overrides *json.RawMessage) (*types.AccessListResult, error) + GetTransactionByHash(ctx context.Context, txHash common.Hash) (*types.RPCTransaction, error) + GetTxByEthHash(ctx context.Context, txHash common.Hash) (*servertypes.TxResult, error) + GetTxByTxIndex(ctx context.Context, height int64, txIndex uint) (*servertypes.TxResult, error) + GetTransactionByBlockAndIndex(ctx context.Context, block *tmrpctypes.ResultBlock, idx hexutil.Uint) (*types.RPCTransaction, error) + GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error) + GetTransactionLogs(ctx context.Context, hash common.Hash) ([]*ethtypes.Log, error) + GetTransactionByBlockHashAndIndex(ctx context.Context, hash common.Hash, idx hexutil.Uint) (*types.RPCTransaction, error) + GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNum types.BlockNumber, idx hexutil.Uint) (*types.RPCTransaction, error) + CreateAccessList(ctx context.Context, args evmtypes.TransactionArgs, blockNrOrHash types.BlockNumberOrHash, overrides *json.RawMessage) (*types.AccessListResult, error) // Send Transaction - Resend(args evmtypes.TransactionArgs, gasPrice *hexutil.Big, gasLimit *hexutil.Uint64) (common.Hash, error) - SendRawTransaction(data hexutil.Bytes) (common.Hash, error) - SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.TransactionArgs, error) - EstimateGas(args evmtypes.TransactionArgs, blockNrOrHash *types.BlockNumberOrHash, overrides *json.RawMessage) (hexutil.Uint64, error) - DoCall(args evmtypes.TransactionArgs, blockNr types.BlockNumber, overrides *json.RawMessage) (*evmtypes.MsgEthereumTxResponse, error) - GasPrice() (*hexutil.Big, error) + Resend(ctx context.Context, args evmtypes.TransactionArgs, gasPrice *hexutil.Big, gasLimit *hexutil.Uint64) (common.Hash, error) + SendRawTransaction(ctx context.Context, data hexutil.Bytes) (common.Hash, error) + SetTxDefaults(ctx context.Context, args evmtypes.TransactionArgs) (evmtypes.TransactionArgs, error) + EstimateGas(ctx context.Context, args evmtypes.TransactionArgs, blockNrOrHash *types.BlockNumberOrHash, overrides *json.RawMessage) (hexutil.Uint64, error) + DoCall(ctx context.Context, args evmtypes.TransactionArgs, blockNr types.BlockNumber, overrides *json.RawMessage) (*evmtypes.MsgEthereumTxResponse, error) + GasPrice(ctx context.Context) (*hexutil.Big, error) // Filter API - GetLogs(hash common.Hash) ([][]*ethtypes.Log, error) - GetLogsByHeight(height *int64) ([][]*ethtypes.Log, error) + GetLogs(ctx context.Context, hash common.Hash) ([][]*ethtypes.Log, error) + GetLogsByHeight(ctx context.Context, height *int64) ([][]*ethtypes.Log, error) BloomStatus() (uint64, uint64) // TxPool API - Content() (map[string]map[string]map[string]*types.RPCTransaction, error) - ContentFrom(address common.Address) (map[string]map[string]*types.RPCTransaction, error) - Inspect() (map[string]map[string]map[string]string, error) - Status() (map[string]hexutil.Uint, error) + Content(ctx context.Context) (map[string]map[string]map[string]*types.RPCTransaction, error) + ContentFrom(ctx context.Context, address common.Address) (map[string]map[string]*types.RPCTransaction, error) + Inspect(ctx context.Context) (map[string]map[string]map[string]string, error) + Status(ctx context.Context) (map[string]hexutil.Uint, error) // Tracing - TraceTransaction(hash common.Hash, config *types.TraceConfig) (interface{}, error) - TraceBlock(height types.BlockNumber, config *types.TraceConfig, block *tmrpctypes.ResultBlock) ([]*evmtypes.TxTraceResult, error) - TraceCall(args evmtypes.TransactionArgs, blockNrOrHash types.BlockNumberOrHash, config *types.TraceConfig) (interface{}, error) + TraceTransaction(ctx context.Context, hash common.Hash, config *types.TraceConfig) (interface{}, error) + TraceBlock(ctx context.Context, height types.BlockNumber, config *types.TraceConfig, block *tmrpctypes.ResultBlock) ([]*evmtypes.TxTraceResult, error) + TraceCall(ctx context.Context, args evmtypes.TransactionArgs, blockNrOrHash types.BlockNumberOrHash, config *types.TraceConfig) (interface{}, error) } -var _ BackendI = (*Backend)(nil) +var ( + _ BackendI = (*Backend)(nil) + + tracer = otel.Tracer("evm/rpc/backend") +) // ProcessBlocker is a function type that processes a block and its associated data // for fee history calculation. It takes a Tendermint block, its corresponding @@ -145,6 +149,7 @@ var _ BackendI = (*Backend)(nil) // block results, and a target fee history entry to populate. // // Parameters: +// - ctx: Context for the request // - tendermintBlock: The raw Tendermint block data // - ethBlock: The Ethereum-formatted block representation // - rewardPercentiles: Percentiles used for fee reward calculation @@ -153,6 +158,7 @@ var _ BackendI = (*Backend)(nil) // // Returns an error if block processing fails. type ProcessBlocker func( + ctx context.Context, tendermintBlock *tmrpctypes.ResultBlock, ethBlock *map[string]interface{}, rewardPercentiles []float64, @@ -162,7 +168,6 @@ type ProcessBlocker func( // Backend implements the BackendI interface type Backend struct { - Ctx context.Context ClientCtx client.Context RPCClient tmrpcclient.SignClient QueryClient *types.QueryClient // gRPC query client @@ -199,7 +204,6 @@ func NewBackend( } b := &Backend{ - Ctx: context.Background(), ClientCtx: clientCtx, RPCClient: rpcClient, QueryClient: types.NewQueryClient(clientCtx), diff --git a/rpc/backend/blocks.go b/rpc/backend/blocks.go index e3b8aa105..91de7d1b6 100644 --- a/rpc/backend/blocks.go +++ b/rpc/backend/blocks.go @@ -1,18 +1,22 @@ package backend import ( + "context" "fmt" "strconv" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" "google.golang.org/grpc" "google.golang.org/grpc/metadata" cmtrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" evmtypes "github.com/cosmos/evm/x/vm/types" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" @@ -22,10 +26,13 @@ import ( // app state could lag behind from cometbft latest block, it's more stable for // the client to use the latest block number in abci app state than cometbft // rpc. -func (b *Backend) BlockNumber() (hexutil.Uint64, error) { +func (b *Backend) BlockNumber(ctx context.Context) (result hexutil.Uint64, err error) { + ctx, span := tracer.Start(ctx, "GetBlockNumber") + defer func() { evmtrace.EndSpanErr(span, err) }() + // do any grpc query, ignore the response and use the returned block height var header metadata.MD - _, err := b.QueryClient.Params(b.Ctx, &evmtypes.QueryParamsRequest{}, grpc.Header(&header)) + _, err = b.QueryClient.Params(ctx, &evmtypes.QueryParamsRequest{}, grpc.Header(&header)) if err != nil { return hexutil.Uint64(0), err } @@ -46,8 +53,11 @@ func (b *Backend) BlockNumber() (hexutil.Uint64, error) { // GetBlockByNumber returns the JSON-RPC compatible Ethereum block identified by // block number. Depending on fullTx it either returns the full transaction // objects or if false only the hashes of the transactions. -func (b *Backend) GetBlockByNumber(blockNum types.BlockNumber, fullTx bool) (map[string]interface{}, error) { - resBlock, err := b.CometBlockByNumber(blockNum) +func (b *Backend) GetBlockByNumber(ctx context.Context, blockNum types.BlockNumber, fullTx bool) (result map[string]interface{}, err error) { + ctx, span := tracer.Start(ctx, "GetBlockByNumber", trace.WithAttributes(attribute.Int64("blockNum", blockNum.Int64()), attribute.Bool("fullTx", fullTx))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + resBlock, err := b.CometBlockByNumber(ctx, blockNum) if err != nil { return nil, nil } @@ -57,25 +67,28 @@ func (b *Backend) GetBlockByNumber(blockNum types.BlockNumber, fullTx bool) (map return nil, nil } - blockRes, err := b.RPCClient.BlockResults(b.Ctx, &resBlock.Block.Height) + blockRes, err := b.RPCClient.BlockResults(ctx, &resBlock.Block.Height) if err != nil { b.Logger.Debug("failed to fetch block result from CometBFT", "height", blockNum, "error", err.Error()) return nil, nil } - res, err := b.RPCBlockFromCometBlock(resBlock, blockRes, fullTx) + result, err = b.RPCBlockFromCometBlock(ctx, resBlock, blockRes, fullTx) if err != nil { b.Logger.Debug("RPCBlockFromCometBlock failed", "height", blockNum, "error", err.Error()) return nil, err } - return res, nil + return result, nil } // GetBlockByHash returns the JSON-RPC compatible Ethereum block identified by // hash. -func (b *Backend) GetBlockByHash(hash common.Hash, fullTx bool) (map[string]interface{}, error) { - resBlock, err := b.CometBlockByHash(hash) +func (b *Backend) GetBlockByHash(ctx context.Context, hash common.Hash, fullTx bool) (result map[string]interface{}, err error) { + ctx, span := tracer.Start(ctx, "GetBlockByHash", trace.WithAttributes(attribute.String("hash", hash.Hex()), attribute.Bool("fullTx", fullTx))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + resBlock, err := b.CometBlockByHash(ctx, hash) if err != nil { return nil, err } @@ -85,25 +98,27 @@ func (b *Backend) GetBlockByHash(hash common.Hash, fullTx bool) (map[string]inte return nil, nil } - blockRes, err := b.RPCClient.BlockResults(b.Ctx, &resBlock.Block.Height) + blockRes, err := b.RPCClient.BlockResults(ctx, &resBlock.Block.Height) if err != nil { b.Logger.Debug("failed to fetch block result from CometBFT", "block-hash", hash.String(), "error", err.Error()) return nil, nil } - res, err := b.RPCBlockFromCometBlock(resBlock, blockRes, fullTx) + result, err = b.RPCBlockFromCometBlock(ctx, resBlock, blockRes, fullTx) if err != nil { b.Logger.Debug("RPCBlockFromCometBlock failed", "hash", hash, "error", err.Error()) return nil, err } - return res, nil + return result, nil } // GetBlockTransactionCountByHash returns the number of Ethereum transactions in // the block identified by hash. -func (b *Backend) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint { - block, err := b.RPCClient.BlockByHash(b.Ctx, hash.Bytes()) +func (b *Backend) GetBlockTransactionCountByHash(ctx context.Context, hash common.Hash) *hexutil.Uint { + ctx, span := tracer.Start(ctx, "GetBlockTransactionCountByHash", trace.WithAttributes(attribute.String("hash", hash.Hex()))) + defer span.End() + block, err := b.RPCClient.BlockByHash(ctx, hash.Bytes()) if err != nil { b.Logger.Debug("block not found", "hash", hash.Hex(), "error", err.Error()) return nil @@ -114,13 +129,15 @@ func (b *Backend) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint return nil } - return b.getBlockTransactionCount(block) + return b.getBlockTransactionCount(ctx, block) } // GetBlockTransactionCountByNumber returns the number of Ethereum transactions // in the block identified by number. -func (b *Backend) GetBlockTransactionCountByNumber(blockNum types.BlockNumber) *hexutil.Uint { - block, err := b.CometBlockByNumber(blockNum) +func (b *Backend) GetBlockTransactionCountByNumber(ctx context.Context, blockNum types.BlockNumber) *hexutil.Uint { + ctx, span := tracer.Start(ctx, "GetBlockTransactionCountByNumber", trace.WithAttributes(attribute.Int64("blockNum", blockNum.Int64()))) + defer span.End() + block, err := b.CometBlockByNumber(ctx, blockNum) if err != nil { b.Logger.Debug("block not found", "height", blockNum.Int64(), "error", err.Error()) return nil @@ -131,25 +148,30 @@ func (b *Backend) GetBlockTransactionCountByNumber(blockNum types.BlockNumber) * return nil } - return b.getBlockTransactionCount(block) + return b.getBlockTransactionCount(ctx, block) } // getBlockTransactionCount returns the number of Ethereum transactions in a // given block. -func (b *Backend) getBlockTransactionCount(block *cmtrpctypes.ResultBlock) *hexutil.Uint { - blockRes, err := b.RPCClient.BlockResults(b.Ctx, &block.Block.Height) +func (b *Backend) getBlockTransactionCount(ctx context.Context, block *cmtrpctypes.ResultBlock) *hexutil.Uint { + ctx, span := tracer.Start(ctx, "getBlockTransactionCount") + defer span.End() + blockRes, err := b.RPCClient.BlockResults(ctx, &block.Block.Height) if err != nil { return nil } - ethMsgs := b.EthMsgsFromCometBlock(block, blockRes) + ethMsgs := b.EthMsgsFromCometBlock(ctx, block, blockRes) n := hexutil.Uint(len(ethMsgs)) return &n } // EthBlockByNumber returns the Ethereum Block identified by number. -func (b *Backend) EthBlockByNumber(blockNum types.BlockNumber) (*ethtypes.Block, error) { - resBlock, err := b.CometBlockByNumber(blockNum) +func (b *Backend) EthBlockByNumber(ctx context.Context, blockNum types.BlockNumber) (result *ethtypes.Block, err error) { + ctx, span := tracer.Start(ctx, "EthBlockByNumber", trace.WithAttributes(attribute.Int64("blockNum", blockNum.Int64()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + resBlock, err := b.CometBlockByNumber(ctx, blockNum) if err != nil { return nil, err } @@ -159,29 +181,33 @@ func (b *Backend) EthBlockByNumber(blockNum types.BlockNumber) (*ethtypes.Block, return nil, fmt.Errorf("block not found for height %d", blockNum) } - blockRes, err := b.RPCClient.BlockResults(b.Ctx, &resBlock.Block.Height) + blockRes, err := b.RPCClient.BlockResults(ctx, &resBlock.Block.Height) if err != nil { return nil, fmt.Errorf("block result not found for height %d", resBlock.Block.Height) } - ethBlock, err := b.EthBlockFromCometBlock(resBlock, blockRes) + result, err = b.EthBlockFromCometBlock(ctx, resBlock, blockRes) if err != nil { return nil, fmt.Errorf("failed to get eth block from comet block: %w", err) } - return ethBlock, nil + return result, nil } // GetBlockReceipts returns the receipts for a given block number or hash. func (b *Backend) GetBlockReceipts( + ctx context.Context, blockNrOrHash types.BlockNumberOrHash, -) ([]map[string]interface{}, error) { - blockNum, err := b.BlockNumberFromComet(blockNrOrHash) +) (result []map[string]interface{}, err error) { + ctx, span := tracer.Start(ctx, "GetBlockReceipts", trace.WithAttributes(attribute.String("blockNrOrHash", unwrapBlockNOrHash(blockNrOrHash)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + blockNum, err := b.BlockNumberFromComet(ctx, blockNrOrHash) if err != nil { return nil, fmt.Errorf("failed to get block number from hash: %w", err) } - resBlock, err := b.CometBlockByNumber(blockNum) + resBlock, err := b.CometBlockByNumber(ctx, blockNum) if err != nil { return nil, fmt.Errorf("failed to get block by number: %w", err) } @@ -190,19 +216,19 @@ func (b *Backend) GetBlockReceipts( return nil, fmt.Errorf("block not found for height %d", *blockNum.CmtHeight()) } - blockRes, err := b.RPCClient.BlockResults(b.Ctx, blockNum.CmtHeight()) + blockRes, err := b.RPCClient.BlockResults(ctx, blockNum.CmtHeight()) if err != nil { return nil, fmt.Errorf("block result not found for height %d", resBlock.Block.Height) } - msgs := b.EthMsgsFromCometBlock(resBlock, blockRes) + msgs := b.EthMsgsFromCometBlock(ctx, resBlock, blockRes) - receipts, err := b.ReceiptsFromCometBlock(resBlock, blockRes, msgs) + receipts, err := b.ReceiptsFromCometBlock(ctx, resBlock, blockRes, msgs) if err != nil { return nil, fmt.Errorf("failed to get receipts from comet block: %w, ", err) } - result := make([]map[string]interface{}, len(msgs)) + result = make([]map[string]interface{}, len(msgs)) for i, msg := range msgs { var signer ethtypes.Signer tx := msg.AsTransaction() diff --git a/rpc/backend/call_tx.go b/rpc/backend/call_tx.go index 61dfc0b34..a278a7017 100644 --- a/rpc/backend/call_tx.go +++ b/rpc/backend/call_tx.go @@ -13,11 +13,14 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/pkg/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/cosmos/evm/mempool" rpctypes "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" evmtypes "github.com/cosmos/evm/x/vm/types" errorsmod "cosmossdk.io/errors" @@ -28,12 +31,15 @@ import ( // Resend accepts an existing transaction and a new gas price and limit. It will remove // the given transaction from the pool and reinsert it with the new gas price and limit. -func (b *Backend) Resend(args evmtypes.TransactionArgs, gasPrice *hexutil.Big, gasLimit *hexutil.Uint64) (common.Hash, error) { +func (b *Backend) Resend(ctx context.Context, args evmtypes.TransactionArgs, gasPrice *hexutil.Big, gasLimit *hexutil.Uint64) (result common.Hash, err error) { + ctx, span := tracer.Start(ctx, "Resend", trace.WithAttributes(attribute.String("from", args.GetFrom().Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + if args.Nonce == nil { return common.Hash{}, fmt.Errorf("missing transaction nonce in transaction spec") } - args, err := b.SetTxDefaults(args) + args, err = b.SetTxDefaults(ctx, args) if err != nil { return common.Hash{}, err } @@ -62,15 +68,15 @@ func (b *Backend) Resend(args evmtypes.TransactionArgs, gasPrice *hexutil.Big, g return common.Hash{}, err } - pending, err := b.PendingTransactions() + pending, err := b.PendingTransactions(ctx) if err != nil { return common.Hash{}, err } - for _, tx := range pending { + for _, txItem := range pending { // FIXME does Resend api possible at all? https://github.com/evmos/ethermint/issues/905 - p, err := evmtypes.UnwrapEthereumMsg(tx, common.Hash{}) - if err != nil { + p, unwrapErr := evmtypes.UnwrapEthereumMsg(txItem, common.Hash{}) + if unwrapErr != nil { // not valid ethereum tx continue } @@ -78,8 +84,8 @@ func (b *Backend) Resend(args evmtypes.TransactionArgs, gasPrice *hexutil.Big, g pTx := p.AsTransaction() wantSigHash := signer.Hash(matchTx) - pFrom, err := ethtypes.Sender(signer, pTx) - if err != nil { + pFrom, senderErr := ethtypes.Sender(signer, pTx) + if senderErr != nil { continue } @@ -92,7 +98,7 @@ func (b *Backend) Resend(args evmtypes.TransactionArgs, gasPrice *hexutil.Big, g args.Gas = gasLimit } - return b.SendTransaction(args) // TODO: this calls SetTxDefaults again, refactor to avoid calling it twice + return b.SendTransaction(ctx, args) // TODO: this calls SetTxDefaults again, refactor to avoid calling it twice } } @@ -100,7 +106,10 @@ func (b *Backend) Resend(args evmtypes.TransactionArgs, gasPrice *hexutil.Big, g } // SendRawTransaction send a raw Ethereum transaction. -func (b *Backend) SendRawTransaction(data hexutil.Bytes) (common.Hash, error) { +func (b *Backend) SendRawTransaction(ctx context.Context, data hexutil.Bytes) (result common.Hash, err error) { + ctx, span := tracer.Start(ctx, "SendRawTransaction") + defer func() { evmtrace.EndSpanErr(span, err) }() + // RLP decode raw transaction bytes tx := ðtypes.Transaction{} if err := tx.UnmarshalBinary(data); err != nil { @@ -108,6 +117,8 @@ func (b *Backend) SendRawTransaction(data hexutil.Bytes) (common.Hash, error) { return common.Hash{}, err } + span.SetAttributes(attribute.String("tx_hash", tx.Hash().Hex())) + // check the local node config in case unprotected txs are disabled if !b.UnprotectedAllowed() { if !tx.Protected() { @@ -165,7 +176,7 @@ func (b *Backend) SendRawTransaction(data hexutil.Bytes) (common.Hash, error) { if err != nil { return common.Hash{}, fmt.Errorf("failed to get sender address: %w", err) } - nonce, err := b.getAccountNonce(from, false, b.ClientCtx.Height, b.Logger) + nonce, err := b.getAccountNonce(ctx, from, false, b.ClientCtx.Height, b.Logger) if err != nil { return common.Hash{}, fmt.Errorf("failed to get sender's current nonce: %w", err) } @@ -188,12 +199,15 @@ func (b *Backend) SendRawTransaction(data hexutil.Bytes) (common.Hash, error) { // SetTxDefaults populates tx message with default values in case they are not // provided on the args -func (b *Backend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.TransactionArgs, error) { +func (b *Backend) SetTxDefaults(ctx context.Context, args evmtypes.TransactionArgs) (result evmtypes.TransactionArgs, err error) { + ctx, span := tracer.Start(ctx, "SetTxDefaults") + defer func() { evmtrace.EndSpanErr(span, err) }() + if args.GasPrice != nil && (args.MaxFeePerGas != nil || args.MaxPriorityFeePerGas != nil) { return args, errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified") } - head, _ := b.CurrentHeader() // #nosec G703 -- no need to check error cause we're already checking that head == nil + head, _ := b.CurrentHeader(ctx) // #nosec G703 -- no need to check error cause we're already checking that head == nil if head == nil { return args, errors.New("latest header is nil") } @@ -204,7 +218,7 @@ func (b *Backend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.Transac // In this clause, user left some fields unspecified. if head.BaseFee != nil && args.GasPrice == nil { if args.MaxPriorityFeePerGas == nil { - tip, err := b.SuggestGasTipCap(head.BaseFee) + tip, err := b.SuggestGasTipCap(ctx, head.BaseFee) if err != nil { return args, err } @@ -228,7 +242,7 @@ func (b *Backend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.Transac } if args.GasPrice == nil { - price, err := b.SuggestGasTipCap(head.BaseFee) + price, err := b.SuggestGasTipCap(ctx, head.BaseFee) if err != nil { return args, err } @@ -254,7 +268,7 @@ func (b *Backend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.Transac if args.Nonce == nil { // get the nonce from the account retriever // ignore error in case tge account doesn't exist yet - nonce, _ := b.getAccountNonce(*args.From, true, 0, b.Logger) // #nosec G703s + nonce, _ := b.getAccountNonce(ctx, *args.From, true, 0, b.Logger) // #nosec G703s args.Nonce = (*hexutil.Uint64)(&nonce) } @@ -300,7 +314,7 @@ func (b *Backend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.Transac blockNr := rpctypes.NewBlockNumber(big.NewInt(0)) blockNrOrHash := rpctypes.BlockNumberOrHash{BlockNumber: &blockNr} - estimated, err := b.EstimateGas(callArgs, &blockNrOrHash, nil) + estimated, err := b.EstimateGas(ctx, callArgs, &blockNrOrHash, nil) if err != nil { return args, err } @@ -317,14 +331,22 @@ func (b *Backend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.Transac // EstimateGas returns an estimate of gas usage for the given smart contract call. func (b *Backend) EstimateGas( + ctx context.Context, args evmtypes.TransactionArgs, blockNrOrHash *rpctypes.BlockNumberOrHash, overrides *json.RawMessage, -) (hexutil.Uint64, error) { +) (result hexutil.Uint64, err error) { + var toAddr string + if args.To != nil { + toAddr = args.To.Hex() + } + ctx, span := tracer.Start(ctx, "EstimateGas", trace.WithAttributes(attribute.String("from", args.GetFrom().Hex()), attribute.String("to", toAddr))) + defer func() { evmtrace.EndSpanErr(span, err) }() + blockNr := rpctypes.EthPendingBlockNumber if blockNrOrHash != nil { var err error - blockNr, err = b.BlockNumberFromComet(*blockNrOrHash) + blockNr, err = b.BlockNumberFromComet(ctx, *blockNrOrHash) if err != nil { return 0, err } @@ -335,7 +357,7 @@ func (b *Backend) EstimateGas( return 0, err } - header, err := b.CometHeaderByNumber(blockNr) + header, err := b.CometHeaderByNumber(ctx, blockNr) if err != nil { // the error message imitates geth behavior return 0, errors.New("header not found") @@ -354,10 +376,11 @@ func (b *Backend) EstimateGas( Overrides: bzOverrides, } - // From ContextWithHeight: if the provided height is 0, + // From NewContextWithHeight: if the provided height is 0, // it will return an empty context and the gRPC query will use // the latest block height for querying. - res, err := b.QueryClient.EstimateGas(rpctypes.ContextWithHeight(blockNr.Int64()), &req) + ctx = rpctypes.ContextWithHeight(ctx, blockNr.Int64()) + res, err := b.QueryClient.EstimateGas(ctx, &req) if err != nil { return 0, err } @@ -370,15 +393,23 @@ func (b *Backend) EstimateGas( // DoCall performs a simulated call operation through the evmtypes. It returns the // estimated gas used on the operation or an error if fails. func (b *Backend) DoCall( + ctx context.Context, args evmtypes.TransactionArgs, blockNr rpctypes.BlockNumber, overrides *json.RawMessage, -) (*evmtypes.MsgEthereumTxResponse, error) { +) (result *evmtypes.MsgEthereumTxResponse, err error) { + var toAddr string + if args.To != nil { + toAddr = args.To.Hex() + } + ctx, span := tracer.Start(ctx, "DoCall", trace.WithAttributes(attribute.String("from", args.GetFrom().Hex()), attribute.String("to", toAddr), attribute.Int64("blockNr", blockNr.Int64()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + bz, err := json.Marshal(&args) if err != nil { return nil, err } - header, err := b.CometHeaderByNumber(blockNr) + header, err := b.CometHeaderByNumber(ctx, blockNr) if err != nil { // the error message imitates geth behavior return nil, errors.New("header not found") @@ -397,10 +428,10 @@ func (b *Backend) DoCall( Overrides: bzOverrides, } - // From ContextWithHeight: if the provided height is 0, + // From NewContextWithHeight: if the provided height is 0, // it will return an empty context and the gRPC query will use // the latest block height for querying. - ctx := rpctypes.ContextWithHeight(blockNr.Int64()) + ctx = rpctypes.ContextWithHeight(ctx, blockNr.Int64()) timeout := b.RPCEVMTimeout() // Setup context so it may be canceled the call has completed @@ -429,37 +460,36 @@ func (b *Backend) DoCall( } // GasPrice returns the current gas price based on Cosmos EVM' gas price oracle. -func (b *Backend) GasPrice() (*hexutil.Big, error) { - var ( - result *big.Int - err error - ) +func (b *Backend) GasPrice(ctx context.Context) (result *hexutil.Big, err error) { + ctx, span := tracer.Start(ctx, "GasPrice") + defer func() { evmtrace.EndSpanErr(span, err) }() - head, err := b.CurrentHeader() + head, err := b.CurrentHeader(ctx) if err != nil { return nil, err } + var gasPrice *big.Int if head.BaseFee != nil { - result, err = b.SuggestGasTipCap(head.BaseFee) + gasPrice, err = b.SuggestGasTipCap(ctx, head.BaseFee) if err != nil { return nil, err } - result = result.Add(result, head.BaseFee) + gasPrice = gasPrice.Add(gasPrice, head.BaseFee) } else { - result = b.RPCMinGasPrice() + gasPrice = b.RPCMinGasPrice() } // return at least GlobalMinGasPrice from FeeMarket module - minGasPrice, err := b.GlobalMinGasPrice() + minGasPrice, err := b.GlobalMinGasPrice(ctx) if err != nil { return nil, err } - if result.Cmp(minGasPrice) < 0 { - result = minGasPrice + if gasPrice.Cmp(minGasPrice) < 0 { + gasPrice = minGasPrice } - return (*hexutil.Big)(result), nil + return (*hexutil.Big)(gasPrice), nil } // handleRevertError returns revert related error. diff --git a/rpc/backend/chain_info.go b/rpc/backend/chain_info.go index 3686a3250..863e06e34 100644 --- a/rpc/backend/chain_info.go +++ b/rpc/backend/chain_info.go @@ -1,6 +1,7 @@ package backend import ( + "context" "fmt" gomath "math" "math/big" @@ -12,11 +13,14 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" "github.com/pkg/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" cmtrpcclient "github.com/cometbft/cometbft/rpc/client" cmtrpctypes "github.com/cometbft/cometbft/rpc/core/types" rpctypes "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" feemarkettypes "github.com/cosmos/evm/x/feemarket/types" evmtypes "github.com/cosmos/evm/x/vm/types" @@ -27,9 +31,12 @@ import ( ) // ChainID is the EIP-155 replay-protection chain id for the current ethereum chain config. -func (b *Backend) ChainID() (*hexutil.Big, error) { +func (b *Backend) ChainID(ctx context.Context) (result *hexutil.Big, err error) { + ctx, span := tracer.Start(ctx, "ChainID") + defer func() { evmtrace.EndSpanErr(span, err) }() + // if current block is at or past the EIP-155 replay-protection fork block, return EvmChainID from config - bn, err := b.BlockNumber() + bn, err := b.BlockNumber(ctx) if err != nil { b.Logger.Debug("failed to fetch latest block number", "error", err.Error()) return (*hexutil.Big)(b.EvmChainID), nil @@ -48,8 +55,11 @@ func (b *Backend) ChainConfig() *params.ChainConfig { } // GlobalMinGasPrice returns MinGasPrice param from FeeMarket -func (b *Backend) GlobalMinGasPrice() (*big.Int, error) { - res, err := b.QueryClient.GlobalMinGasPrice(b.Ctx, &evmtypes.QueryGlobalMinGasPriceRequest{}) +func (b *Backend) GlobalMinGasPrice(ctx context.Context) (result *big.Int, err error) { + ctx, span := tracer.Start(ctx, "GlobalMinGasPrice") + defer func() { evmtrace.EndSpanErr(span, err) }() + + res, err := b.QueryClient.GlobalMinGasPrice(ctx, &evmtypes.QueryGlobalMinGasPriceRequest{}) if err != nil { return nil, err } @@ -63,9 +73,13 @@ func (b *Backend) GlobalMinGasPrice() (*big.Int, error) { // If the base fee is not enabled globally, the query returns nil. // If the London hard fork is not activated at the current height, the query will // return nil. -func (b *Backend) BaseFee(blockRes *cmtrpctypes.ResultBlockResults) (*big.Int, error) { +func (b *Backend) BaseFee(ctx context.Context, blockRes *cmtrpctypes.ResultBlockResults) (result *big.Int, err error) { + ctx, span := tracer.Start(ctx, "BaseFee", trace.WithAttributes(attribute.Int64("height", blockRes.Height))) + defer func() { evmtrace.EndSpanErr(span, err) }() + // return BaseFee if London hard fork is activated and feemarket is enabled - res, err := b.QueryClient.BaseFee(rpctypes.ContextWithHeight(blockRes.Height), &evmtypes.QueryBaseFeeRequest{}) + ctx = rpctypes.ContextWithHeight(ctx, blockRes.Height) + res, err := b.QueryClient.BaseFee(ctx, &evmtypes.QueryBaseFeeRequest{}) if err != nil || res.BaseFee == nil { // we can't tell if it's london HF not enabled or the state is pruned, // in either case, we'll fallback to parsing from begin blocker event, @@ -93,28 +107,34 @@ func (b *Backend) BaseFee(blockRes *cmtrpctypes.ResultBlockResults) (*big.Int, e // CurrentHeader returns the latest block header // This will return error as per node configuration // if the ABCI responses are discarded ('discard_abci_responses' config param) -func (b *Backend) CurrentHeader() (*ethtypes.Header, error) { - return b.HeaderByNumber(rpctypes.EthLatestBlockNumber) +func (b *Backend) CurrentHeader(ctx context.Context) (result *ethtypes.Header, err error) { + ctx, span := tracer.Start(ctx, "CurrentHeader") + defer func() { evmtrace.EndSpanErr(span, err) }() + + return b.HeaderByNumber(ctx, rpctypes.EthLatestBlockNumber) } // PendingTransactions returns the transactions that are in the transaction pool // and have a from address that is one of the accounts this node manages. -func (b *Backend) PendingTransactions() ([]*sdk.Tx, error) { +func (b *Backend) PendingTransactions(ctx context.Context) (result []*sdk.Tx, err error) { + ctx, span := tracer.Start(ctx, "PendingTransactions") + defer func() { evmtrace.EndSpanErr(span, err) }() + mc, ok := b.ClientCtx.Client.(cmtrpcclient.MempoolClient) if !ok { return nil, errors.New("invalid rpc client") } - res, err := mc.UnconfirmedTxs(b.Ctx, nil) + res, err := mc.UnconfirmedTxs(ctx, nil) if err != nil { return nil, err } - result := make([]*sdk.Tx, 0, len(res.Txs)) + result = make([]*sdk.Tx, 0, len(res.Txs)) for _, txBz := range res.Txs { - tx, err := b.ClientCtx.TxConfig.TxDecoder()(txBz) - if err != nil { - return nil, err + tx, decodeErr := b.ClientCtx.TxConfig.TxDecoder()(txBz) + if decodeErr != nil { + return nil, decodeErr } result = append(result, &tx) } @@ -123,13 +143,16 @@ func (b *Backend) PendingTransactions() ([]*sdk.Tx, error) { } // GetCoinbase is the address that staking rewards will be send to (alias for Etherbase). -func (b *Backend) GetCoinbase() (sdk.AccAddress, error) { +func (b *Backend) GetCoinbase(ctx context.Context) (result sdk.AccAddress, err error) { + ctx, span := tracer.Start(ctx, "GetCoinbase") + defer func() { evmtrace.EndSpanErr(span, err) }() + node, err := b.ClientCtx.GetNode() if err != nil { return nil, err } - status, err := node.Status(b.Ctx) + status, err := node.Status(ctx) if err != nil { return nil, err } @@ -138,7 +161,7 @@ func (b *Backend) GetCoinbase() (sdk.AccAddress, error) { ConsAddress: sdk.ConsAddress(status.ValidatorInfo.Address).String(), } - res, err := b.QueryClient.ValidatorAccount(b.Ctx, req) + res, err := b.QueryClient.ValidatorAccount(ctx, req) if err != nil { return nil, err } @@ -154,10 +177,13 @@ var ( // FeeHistory returns data relevant for fee estimation based on the specified range of blocks. func (b *Backend) FeeHistory( + ctx context.Context, userBlockCount math.HexOrDecimal64, // number blocks to fetch, maximum is 100 lastBlock rpc.BlockNumber, // the block to start search , to oldest rewardPercentiles []float64, // percentiles to fetch reward -) (*rpctypes.FeeHistoryResult, error) { +) (_ *rpctypes.FeeHistoryResult, err error) { + ctx, span := tracer.Start(ctx, "FeeHistory", trace.WithAttributes(attribute.Int64("blockCount", int64(userBlockCount)), attribute.Int64("lastBlock", int64(lastBlock)))) + defer func() { evmtrace.EndSpanErr(span, err) }() for i, p := range rewardPercentiles { if p < 0 || p > 100 { return nil, fmt.Errorf("%w: %f", errInvalidPercentile, p) @@ -166,7 +192,7 @@ func (b *Backend) FeeHistory( return nil, fmt.Errorf("%w: #%d:%f > #%d:%f", errInvalidPercentile, i-1, rewardPercentiles[i-1], i, p) } } - blkNumber, err := b.BlockNumber() + blkNumber, err := b.BlockNumber(ctx) if err != nil { return nil, err } @@ -241,21 +267,21 @@ func (b *Backend) FeeHistory( // fetch block // CometBFT block blockNum := rpctypes.BlockNumber(blockStart + int64(index)) - cometBlock, err := b.CometBlockByNumber(blockNum) + cometBlock, err := b.CometBlockByNumber(ctx, blockNum) if cometBlock == nil { chanErr <- err return } // eth block - ethBlock, err := b.GetBlockByNumber(blockNum, true) + ethBlock, err := b.GetBlockByNumber(ctx, blockNum, true) if ethBlock == nil { chanErr <- err return } // CometBFT block result - cometBlockResult, err := b.CometBlockResultByNumber(&cometBlock.Block.Height) + cometBlockResult, err := b.CometBlockResultByNumber(ctx, &cometBlock.Block.Height) if cometBlockResult == nil { b.Logger.Debug("block result not found", "height", cometBlock.Block.Height, "error", err.Error()) chanErr <- err @@ -263,7 +289,7 @@ func (b *Backend) FeeHistory( } oneFeeHistory := rpctypes.OneFeeHistory{} - err = b.ProcessBlocker(cometBlock, ðBlock, rewardPercentiles, cometBlockResult, &oneFeeHistory) + err = b.ProcessBlocker(ctx, cometBlock, ðBlock, rewardPercentiles, cometBlockResult, &oneFeeHistory) if err != nil { chanErr <- err return @@ -320,13 +346,15 @@ func (b *Backend) FeeHistory( // SuggestGasTipCap returns the suggested tip cap // Although we don't support tx prioritization yet, but we return a positive value to help client to // mitigate the base fee changes. -func (b *Backend) SuggestGasTipCap(baseFee *big.Int) (*big.Int, error) { +func (b *Backend) SuggestGasTipCap(ctx context.Context, baseFee *big.Int) (_ *big.Int, err error) { + ctx, span := tracer.Start(ctx, "SuggestGasTipCap") + defer func() { evmtrace.EndSpanErr(span, err) }() if baseFee == nil { // london hardfork not enabled or feemarket not enabled return big.NewInt(0), nil } - params, err := b.QueryClient.FeeMarket.Params(b.Ctx, &feemarkettypes.QueryParamsRequest{}) + params, err := b.QueryClient.FeeMarket.Params(ctx, &feemarkettypes.QueryParamsRequest{}) if err != nil { return nil, err } diff --git a/rpc/backend/comet.go b/rpc/backend/comet.go index 3b295b08b..89c4f6309 100644 --- a/rpc/backend/comet.go +++ b/rpc/backend/comet.go @@ -1,25 +1,32 @@ package backend import ( + "context" "fmt" "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" cmtrpctypes "github.com/cometbft/cometbft/rpc/core/types" rpctypes "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" "github.com/cosmos/evm/utils" ) // CometBlockByNumber returns a CometBFT-formatted block for a given // block number -func (b *Backend) CometBlockByNumber(blockNum rpctypes.BlockNumber) (*cmtrpctypes.ResultBlock, error) { - height, err := b.getHeightByBlockNum(blockNum) +func (b *Backend) CometBlockByNumber(ctx context.Context, blockNum rpctypes.BlockNumber) (result *cmtrpctypes.ResultBlock, err error) { + ctx, span := tracer.Start(ctx, "CometBlockByNumber", trace.WithAttributes(attribute.Int64("blockNum", blockNum.Int64()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + height, err := b.getHeightByBlockNum(ctx, blockNum) if err != nil { return nil, err } - resBlock, err := b.RPCClient.Block(b.Ctx, &height) + resBlock, err := b.RPCClient.Block(ctx, &height) if err != nil { b.Logger.Debug("cometbft client failed to get block", "height", height, "error", err.Error()) return nil, err @@ -35,21 +42,31 @@ func (b *Backend) CometBlockByNumber(blockNum rpctypes.BlockNumber) (*cmtrpctype // CometHeaderByNumber returns a CometBFT-formatted header for a given // block number -func (b *Backend) CometHeaderByNumber(blockNum rpctypes.BlockNumber) (*cmtrpctypes.ResultHeader, error) { - height, err := b.getHeightByBlockNum(blockNum) +func (b *Backend) CometHeaderByNumber(ctx context.Context, blockNum rpctypes.BlockNumber) (result *cmtrpctypes.ResultHeader, err error) { + ctx, span := tracer.Start(ctx, "CometHeaderByNumber", trace.WithAttributes(attribute.Int64("blockNum", blockNum.Int64()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + height, err := b.getHeightByBlockNum(ctx, blockNum) if err != nil { return nil, err } - return b.RPCClient.Header(b.Ctx, &height) + return b.RPCClient.Header(ctx, &height) } // CometBlockResultByNumber returns a CometBFT-formatted block result // by block number -func (b *Backend) CometBlockResultByNumber(height *int64) (*cmtrpctypes.ResultBlockResults, error) { +func (b *Backend) CometBlockResultByNumber(ctx context.Context, height *int64) (result *cmtrpctypes.ResultBlockResults, err error) { + var heightAttr int64 + if height != nil { + heightAttr = *height + } + ctx, span := tracer.Start(ctx, "CometBlockResultByNumber", trace.WithAttributes(attribute.Int64("height", heightAttr))) + defer func() { evmtrace.EndSpanErr(span, err) }() + if height != nil && *height == 0 { height = nil } - res, err := b.RPCClient.BlockResults(b.Ctx, height) + res, err := b.RPCClient.BlockResults(ctx, height) if err != nil { return nil, fmt.Errorf("failed to fetch block result from CometBFT %d: %w", *height, err) } @@ -58,8 +75,11 @@ func (b *Backend) CometBlockResultByNumber(height *int64) (*cmtrpctypes.ResultBl } // CometBlockByHash returns a CometBFT-formatted block by block number -func (b *Backend) CometBlockByHash(blockHash common.Hash) (*cmtrpctypes.ResultBlock, error) { - resBlock, err := b.RPCClient.BlockByHash(b.Ctx, blockHash.Bytes()) +func (b *Backend) CometBlockByHash(ctx context.Context, blockHash common.Hash) (result *cmtrpctypes.ResultBlock, err error) { + ctx, span := tracer.Start(ctx, "CometBlockByHash", trace.WithAttributes(attribute.String("blockHash", blockHash.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + resBlock, err := b.RPCClient.BlockByHash(ctx, blockHash.Bytes()) if err != nil { b.Logger.Debug("CometBFT client failed to get block", "blockHash", blockHash.Hex(), "error", err.Error()) return nil, err @@ -73,9 +93,12 @@ func (b *Backend) CometBlockByHash(blockHash common.Hash) (*cmtrpctypes.ResultBl return resBlock, nil } -func (b *Backend) getHeightByBlockNum(blockNum rpctypes.BlockNumber) (int64, error) { +func (b *Backend) getHeightByBlockNum(ctx context.Context, blockNum rpctypes.BlockNumber) (height int64, err error) { + ctx, span := tracer.Start(ctx, "getHeightByBlockNum", trace.WithAttributes(attribute.Int64("blockNum", blockNum.Int64()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + if blockNum == rpctypes.EthEarliestBlockNumber { - status, err := b.ClientCtx.Client.Status(b.Ctx) + status, err := b.ClientCtx.Client.Status(ctx) if err != nil { return 0, errors.New("failed to get earliest block height") } @@ -83,7 +106,7 @@ func (b *Backend) getHeightByBlockNum(blockNum rpctypes.BlockNumber) (int64, err return status.SyncInfo.EarliestBlockHeight, nil } - height := blockNum.Int64() + height = blockNum.Int64() if height <= 0 { // In cometBFT, LatestBlockNumber, FinalizedBlockNumber, SafeBlockNumber all map to the latest block height. // Fetch the latest block number from the app state, more accurate than the CometBFT block store state. @@ -91,7 +114,7 @@ func (b *Backend) getHeightByBlockNum(blockNum rpctypes.BlockNumber) (int64, err // For PendingBlockNumber, we alsoe returns the latest block height. // The reason is that CometBFT does not have the concept of pending block, // and the application state is only updated when a block is committed. - n, err := b.BlockNumber() + n, err := b.BlockNumber(ctx) if err != nil { return 0, err } diff --git a/rpc/backend/comet_to_eth.go b/rpc/backend/comet_to_eth.go index 8b4847726..18efa09b4 100644 --- a/rpc/backend/comet_to_eth.go +++ b/rpc/backend/comet_to_eth.go @@ -1,6 +1,7 @@ package backend import ( + "context" "fmt" "math/big" @@ -10,10 +11,13 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/trie" "github.com/pkg/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" cmtrpctypes "github.com/cometbft/cometbft/rpc/core/types" rpctypes "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" evmtypes "github.com/cosmos/evm/x/vm/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -22,10 +26,14 @@ import ( // RPCBlockFromCometBlock returns a JSON-RPC compatible Ethereum block from a // given CometBFT block and its block result. func (b *Backend) RPCHeaderFromCometBlock( + ctx context.Context, resBlock *cmtrpctypes.ResultBlock, blockRes *cmtrpctypes.ResultBlockResults, -) (map[string]interface{}, error) { - ethBlock, err := b.EthBlockFromCometBlock(resBlock, blockRes) +) (result map[string]interface{}, err error) { + ctx, span := tracer.Start(ctx, "RPCHeaderFromCometBlock") + defer func() { evmtrace.EndSpanErr(span, err) }() + + ethBlock, err := b.EthBlockFromCometBlock(ctx, resBlock, blockRes) if err != nil { return nil, fmt.Errorf("failed to get rpc block from comet block: %w", err) } @@ -36,12 +44,16 @@ func (b *Backend) RPCHeaderFromCometBlock( // RPCBlockFromCometBlock returns a JSON-RPC compatible Ethereum block from a // given CometBFT block and its block result. func (b *Backend) RPCBlockFromCometBlock( + ctx context.Context, resBlock *cmtrpctypes.ResultBlock, blockRes *cmtrpctypes.ResultBlockResults, fullTx bool, -) (map[string]interface{}, error) { - msgs := b.EthMsgsFromCometBlock(resBlock, blockRes) - ethBlock, err := b.EthBlockFromCometBlock(resBlock, blockRes) +) (result map[string]interface{}, err error) { + ctx, span := tracer.Start(ctx, "RPCBlockFromCometBlock") + defer func() { evmtrace.EndSpanErr(span, err) }() + + msgs := b.EthMsgsFromCometBlock(ctx, resBlock, blockRes) + ethBlock, err := b.EthBlockFromCometBlock(ctx, resBlock, blockRes) if err != nil { return nil, fmt.Errorf("failed to get rpc block from comet block: %w", err) } @@ -50,12 +62,15 @@ func (b *Backend) RPCBlockFromCometBlock( } // BlockNumberFromComet returns the BlockNumber from BlockNumberOrHash -func (b *Backend) BlockNumberFromComet(blockNrOrHash rpctypes.BlockNumberOrHash) (rpctypes.BlockNumber, error) { +func (b *Backend) BlockNumberFromComet(ctx context.Context, blockNrOrHash rpctypes.BlockNumberOrHash) (result rpctypes.BlockNumber, err error) { + ctx, span := tracer.Start(ctx, "BlockNumberFromComet", trace.WithAttributes(attribute.String("blockNrOrHash", unwrapBlockNOrHash(blockNrOrHash)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + switch { case blockNrOrHash.BlockHash == nil && blockNrOrHash.BlockNumber == nil: return rpctypes.EthEarliestBlockNumber, fmt.Errorf("types BlockHash and BlockNumber cannot be both nil") case blockNrOrHash.BlockHash != nil: - blockNumber, err := b.BlockNumberFromCometByHash(*blockNrOrHash.BlockHash) + blockNumber, err := b.BlockNumberFromCometByHash(ctx, *blockNrOrHash.BlockHash) if err != nil { return rpctypes.EthEarliestBlockNumber, err } @@ -68,8 +83,11 @@ func (b *Backend) BlockNumberFromComet(blockNrOrHash rpctypes.BlockNumberOrHash) } // BlockNumberFromCometByHash returns the block height of given block hash -func (b *Backend) BlockNumberFromCometByHash(blockHash common.Hash) (*big.Int, error) { - resHeader, err := b.RPCClient.HeaderByHash(b.Ctx, blockHash.Bytes()) +func (b *Backend) BlockNumberFromCometByHash(ctx context.Context, blockHash common.Hash) (result *big.Int, err error) { + ctx, span := tracer.Start(ctx, "BlockNumberFromCometByHash", trace.WithAttributes(attribute.String("blockHash", blockHash.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + resHeader, err := b.RPCClient.HeaderByHash(ctx, blockHash.Bytes()) if err != nil { return nil, err } @@ -85,9 +103,12 @@ func (b *Backend) BlockNumberFromCometByHash(blockHash common.Hash) (*big.Int, e // CometBFT block. It also ensures consistency over the correct txs indexes // across RPC endpoints func (b *Backend) EthMsgsFromCometBlock( + ctx context.Context, resBlock *cmtrpctypes.ResultBlock, blockRes *cmtrpctypes.ResultBlockResults, ) []*evmtypes.MsgEthereumTx { + ctx, span := tracer.Start(ctx, "EthMsgsFromCometBlock") + defer span.End() var result []*evmtypes.MsgEthereumTx block := resBlock.Block @@ -125,26 +146,30 @@ func (b *Backend) EthMsgsFromCometBlock( // RPCBlockFromCometBlock returns a JSON-RPC compatible Ethereum block from a // given CometBFT block and its block result. func (b *Backend) EthBlockFromCometBlock( + ctx context.Context, resBlock *cmtrpctypes.ResultBlock, blockRes *cmtrpctypes.ResultBlockResults, -) (*ethtypes.Block, error) { +) (result *ethtypes.Block, err error) { + ctx, span := tracer.Start(ctx, "EthBlockFromCometBlock") + defer func() { evmtrace.EndSpanErr(span, err) }() + cmtBlock := resBlock.Block // 1. get base fee - baseFee, err := b.BaseFee(blockRes) + baseFee, err := b.BaseFee(ctx, blockRes) if err != nil { // handle the error for pruned node. b.Logger.Error("failed to fetch Base Fee from prunned block. Check node prunning configuration", "height", cmtBlock.Height, "error", err) } // 2. get miner - miner, err := b.MinerFromCometBlock(resBlock) + miner, err := b.MinerFromCometBlock(ctx, resBlock) if err != nil { return nil, fmt.Errorf("failed to get miner(block proposer) address from comet block") } // 3. get block gasLimit - ctx := rpctypes.ContextWithHeight(cmtBlock.Height) + ctx = rpctypes.ContextWithHeight(ctx, cmtBlock.Height) gasLimit, err := rpctypes.BlockMaxGasFromConsensusParams(ctx, b.ClientCtx, cmtBlock.Height) if err != nil { b.Logger.Error("failed to query consensus params", "error", err.Error()) @@ -154,7 +179,7 @@ func (b *Backend) EthBlockFromCometBlock( ethHeader := rpctypes.MakeHeader(cmtBlock.Header, gasLimit, miner, baseFee) // 5. get MsgEthereumTxs - msgs := b.EthMsgsFromCometBlock(resBlock, blockRes) + msgs := b.EthMsgsFromCometBlock(ctx, resBlock, blockRes) txs := make([]*ethtypes.Transaction, len(msgs)) for i, ethMsg := range msgs { txs[i] = ethMsg.AsTransaction() @@ -168,7 +193,7 @@ func (b *Backend) EthBlockFromCometBlock( } // 7. receipts - receipts, err := b.ReceiptsFromCometBlock(resBlock, blockRes, msgs) + receipts, err := b.ReceiptsFromCometBlock(ctx, resBlock, blockRes, msgs) if err != nil { return nil, fmt.Errorf("failed to get receipts from comet block: %w", err) } @@ -191,8 +216,12 @@ func (b *Backend) EthBlockFromCometBlock( } func (b *Backend) MinerFromCometBlock( + ctx context.Context, resBlock *cmtrpctypes.ResultBlock, -) (common.Address, error) { +) (result common.Address, err error) { + ctx, span := tracer.Start(ctx, "MinerFromCometBlock") + defer func() { evmtrace.EndSpanErr(span, err) }() + cmtBlock := resBlock.Block req := &evmtypes.QueryValidatorAccountRequest{ @@ -201,7 +230,7 @@ func (b *Backend) MinerFromCometBlock( var validatorAccAddr sdk.AccAddress - ctx := rpctypes.ContextWithHeight(cmtBlock.Height) + ctx = rpctypes.ContextWithHeight(ctx, cmtBlock.Height) res, err := b.QueryClient.ValidatorAccount(ctx, req) if err != nil { b.Logger.Debug( @@ -223,11 +252,15 @@ func (b *Backend) MinerFromCometBlock( } func (b *Backend) ReceiptsFromCometBlock( + ctx context.Context, resBlock *cmtrpctypes.ResultBlock, blockRes *cmtrpctypes.ResultBlockResults, msgs []*evmtypes.MsgEthereumTx, -) ([]*ethtypes.Receipt, error) { - baseFee, err := b.BaseFee(blockRes) +) (result []*ethtypes.Receipt, err error) { + ctx, span := tracer.Start(ctx, "ReceiptsFromCometBlock") + defer func() { evmtrace.EndSpanErr(span, err) }() + + baseFee, err := b.BaseFee(ctx, blockRes) if err != nil { // handle the error for pruned node. b.Logger.Error("failed to fetch Base Fee from prunned block. Check node prunning configuration", "height", resBlock.Block.Height, "error", err) @@ -237,7 +270,7 @@ func (b *Backend) ReceiptsFromCometBlock( receipts := make([]*ethtypes.Receipt, len(msgs)) cumulatedGasUsed := uint64(0) for i, ethMsg := range msgs { - txResult, err := b.GetTxByEthHash(ethMsg.Hash()) + txResult, err := b.GetTxByEthHash(ctx, ethMsg.Hash()) if err != nil { return nil, fmt.Errorf("tx not found: hash=%s, error=%s", ethMsg.Hash(), err.Error()) } @@ -306,7 +339,10 @@ func (b *Backend) ReceiptsFromCometBlock( } // BlockBloom query block bloom filter from block results -func (b *Backend) BlockBloomFromCometBlock(blockRes *cmtrpctypes.ResultBlockResults) (ethtypes.Bloom, error) { +func (b *Backend) BlockBloomFromCometBlock(ctx context.Context, blockRes *cmtrpctypes.ResultBlockResults) (result ethtypes.Bloom, err error) { + ctx, span := tracer.Start(ctx, "BlockBloomFromCometBlock") + defer func() { evmtrace.EndSpanErr(span, err) }() + for _, event := range blockRes.FinalizeBlockEvents { if event.Type != evmtypes.EventTypeBlockBloom { continue diff --git a/rpc/backend/filters.go b/rpc/backend/filters.go index fe44ddee3..7e079da19 100644 --- a/rpc/backend/filters.go +++ b/rpc/backend/filters.go @@ -1,27 +1,43 @@ package backend import ( + "context" + "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" + + evmtrace "github.com/cosmos/evm/trace" ) // GetLogs returns all the logs from all the ethereum transactions in a block. -func (b *Backend) GetLogs(hash common.Hash) ([][]*ethtypes.Log, error) { - resBlock, err := b.CometBlockByHash(hash) +func (b *Backend) GetLogs(ctx context.Context, hash common.Hash) (result [][]*ethtypes.Log, err error) { + ctx, span := tracer.Start(ctx, "GetLogs", trace.WithAttributes(attribute.String("hash", hash.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + resBlock, err := b.CometBlockByHash(ctx, hash) if err != nil { return nil, err } if resBlock == nil { return nil, errors.Errorf("block not found for hash %s", hash) } - return b.GetLogsByHeight(&resBlock.Block.Height) + return b.GetLogsByHeight(ctx, &resBlock.Block.Height) } // GetLogsByHeight returns all the logs from all the ethereum transactions in a block. -func (b *Backend) GetLogsByHeight(height *int64) ([][]*ethtypes.Log, error) { +func (b *Backend) GetLogsByHeight(ctx context.Context, height *int64) (result [][]*ethtypes.Log, err error) { + var heightAttr int64 + if height != nil { + heightAttr = *height + } + ctx, span := tracer.Start(ctx, "GetLogsByHeight", trace.WithAttributes(attribute.Int64("height", heightAttr))) + defer func() { evmtrace.EndSpanErr(span, err) }() + // NOTE: we query the state in case the tx result logs are not persisted after an upgrade. - blockRes, err := b.RPCClient.BlockResults(b.Ctx, height) + blockRes, err := b.RPCClient.BlockResults(ctx, height) if err != nil { return nil, err } diff --git a/rpc/backend/headers.go b/rpc/backend/headers.go index 14e466f4f..ab9841bc1 100644 --- a/rpc/backend/headers.go +++ b/rpc/backend/headers.go @@ -1,19 +1,26 @@ package backend import ( + "context" "fmt" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" rpctypes "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" ) // GetBlockByNumber returns the JSON-RPC compatible Ethereum block identified by // block number. Depending on fullTx it either returns the full transaction // objects or if false only the hashes of the transactions. -func (b *Backend) GetHeaderByNumber(blockNum rpctypes.BlockNumber) (map[string]interface{}, error) { - resBlock, err := b.CometBlockByNumber(blockNum) +func (b *Backend) GetHeaderByNumber(ctx context.Context, blockNum rpctypes.BlockNumber) (result map[string]interface{}, err error) { + ctx, span := tracer.Start(ctx, "GetHeaderByNumber", trace.WithAttributes(attribute.Int64("blockNum", blockNum.Int64()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + resBlock, err := b.CometBlockByNumber(ctx, blockNum) if err != nil { return nil, nil } @@ -23,13 +30,13 @@ func (b *Backend) GetHeaderByNumber(blockNum rpctypes.BlockNumber) (map[string]i return nil, nil } - blockRes, err := b.RPCClient.BlockResults(b.Ctx, &resBlock.Block.Height) + blockRes, err := b.RPCClient.BlockResults(ctx, &resBlock.Block.Height) if err != nil { b.Logger.Debug("failed to fetch block result from CometBFT", "height", blockNum, "error", err.Error()) return nil, nil } - res, err := b.RPCHeaderFromCometBlock(resBlock, blockRes) + res, err := b.RPCHeaderFromCometBlock(ctx, resBlock, blockRes) if err != nil { b.Logger.Debug("RPCBlockFromCometBlock failed", "height", blockNum, "error", err.Error()) return nil, err @@ -40,8 +47,11 @@ func (b *Backend) GetHeaderByNumber(blockNum rpctypes.BlockNumber) (map[string]i // GetBlockByHash returns the JSON-RPC compatible Ethereum block identified by // hash. -func (b *Backend) GetHeaderByHash(hash common.Hash) (map[string]interface{}, error) { - resBlock, err := b.CometBlockByHash(hash) +func (b *Backend) GetHeaderByHash(ctx context.Context, hash common.Hash) (result map[string]interface{}, err error) { + ctx, span := tracer.Start(ctx, "GetHeaderByHash", trace.WithAttributes(attribute.String("hash", hash.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + resBlock, err := b.CometBlockByHash(ctx, hash) if err != nil { return nil, err } @@ -51,13 +61,13 @@ func (b *Backend) GetHeaderByHash(hash common.Hash) (map[string]interface{}, err return nil, nil } - blockRes, err := b.RPCClient.BlockResults(b.Ctx, &resBlock.Block.Height) + blockRes, err := b.RPCClient.BlockResults(ctx, &resBlock.Block.Height) if err != nil { b.Logger.Debug("failed to fetch block result from CometBFT", "block-hash", hash.String(), "error", err.Error()) return nil, nil } - res, err := b.RPCHeaderFromCometBlock(resBlock, blockRes) + res, err := b.RPCHeaderFromCometBlock(ctx, resBlock, blockRes) if err != nil { b.Logger.Debug("RPCBlockFromCometBlock failed", "hash", hash, "error", err.Error()) return nil, err @@ -67,8 +77,11 @@ func (b *Backend) GetHeaderByHash(hash common.Hash) (map[string]interface{}, err } // HeaderByNumber returns the block header identified by height. -func (b *Backend) HeaderByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Header, error) { - resBlock, err := b.CometBlockByNumber(blockNum) +func (b *Backend) HeaderByNumber(ctx context.Context, blockNum rpctypes.BlockNumber) (result *ethtypes.Header, err error) { + ctx, span := tracer.Start(ctx, "HeaderByNumber", trace.WithAttributes(attribute.Int64("blockNum", blockNum.Int64()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + resBlock, err := b.CometBlockByNumber(ctx, blockNum) if err != nil { return nil, err } @@ -78,12 +91,12 @@ func (b *Backend) HeaderByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Heade return nil, nil } - blockRes, err := b.CometBlockResultByNumber(&resBlock.Block.Height) + blockRes, err := b.CometBlockResultByNumber(ctx, &resBlock.Block.Height) if err != nil { return nil, fmt.Errorf("header result not found for height %d", resBlock.Block.Height) } - ethBlock, err := b.EthBlockFromCometBlock(resBlock, blockRes) + ethBlock, err := b.EthBlockFromCometBlock(ctx, resBlock, blockRes) if err != nil { return nil, fmt.Errorf("failed to get rpc block from comet block: %w", err) } @@ -92,8 +105,11 @@ func (b *Backend) HeaderByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Heade } // HeaderByHash returns the block header identified by hash. -func (b *Backend) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error) { - resBlock, err := b.CometBlockByHash(blockHash) +func (b *Backend) HeaderByHash(ctx context.Context, blockHash common.Hash) (result *ethtypes.Header, err error) { + ctx, span := tracer.Start(ctx, "HeaderByHash", trace.WithAttributes(attribute.String("blockHash", blockHash.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + resBlock, err := b.CometBlockByHash(ctx, blockHash) if err != nil { return nil, err } @@ -103,13 +119,13 @@ func (b *Backend) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error) return nil, nil } - blockRes, err := b.RPCClient.BlockResults(b.Ctx, &resBlock.Block.Height) + blockRes, err := b.RPCClient.BlockResults(ctx, &resBlock.Block.Height) if err != nil { b.Logger.Debug("failed to fetch block result from CometBFT", "block-hash", blockHash.String(), "error", err.Error()) return nil, nil } - ethBlock, err := b.EthBlockFromCometBlock(resBlock, blockRes) + ethBlock, err := b.EthBlockFromCometBlock(ctx, resBlock, blockRes) if err != nil { return nil, fmt.Errorf("failed to get rpc block from comet block: %w", err) } diff --git a/rpc/backend/node_info.go b/rpc/backend/node_info.go index dcdf28a68..bb6005b2f 100644 --- a/rpc/backend/node_info.go +++ b/rpc/backend/node_info.go @@ -1,6 +1,7 @@ package backend import ( + "context" "fmt" "math/big" "time" @@ -15,6 +16,7 @@ import ( rpctypes "github.com/cosmos/evm/rpc/types" "github.com/cosmos/evm/server/config" "github.com/cosmos/evm/testutil/constants" + evmtrace "github.com/cosmos/evm/trace" evmtypes "github.com/cosmos/evm/x/vm/types" errorsmod "cosmossdk.io/errors" @@ -63,8 +65,11 @@ func (b *Backend) Accounts() ([]common.Address, error) { // - highestBlock: block number of the highest block header this node has received from peers // - pulledStates: number of state entries processed until now // - knownStates: number of known state entries that still need to be pulled -func (b *Backend) Syncing() (interface{}, error) { - status, err := b.ClientCtx.Client.Status(b.Ctx) +func (b *Backend) Syncing(ctx context.Context) (result interface{}, err error) { + ctx, span := tracer.Start(ctx, "Syncing") + defer func() { evmtrace.EndSpanErr(span, err) }() + + status, err := b.ClientCtx.Client.Status(ctx) if err != nil { return false, err } @@ -83,13 +88,15 @@ func (b *Backend) Syncing() (interface{}, error) { } // SetEtherbase sets the etherbase of the miner -func (b *Backend) SetEtherbase(etherbase common.Address) bool { +func (b *Backend) SetEtherbase(ctx context.Context, etherbase common.Address) bool { + ctx, span := tracer.Start(ctx, "SetEtherbase") + defer span.End() if !b.Cfg.JSONRPC.AllowInsecureUnlock { b.Logger.Debug("account unlock with HTTP access is forbidden") return false } - delAddr, err := b.GetCoinbase() + delAddr, err := b.GetCoinbase(ctx) if err != nil { b.Logger.Debug("failed to get coinbase address", "error", err.Error()) return false @@ -121,7 +128,7 @@ func (b *Backend) SetEtherbase(etherbase common.Address) bool { denom := minGasPrices[0].Denom delCommonAddr := common.BytesToAddress(delAddr.Bytes()) - nonce, err := b.GetTransactionCount(delCommonAddr, rpctypes.EthPendingBlockNumber) + nonce, err := b.GetTransactionCount(ctx, delCommonAddr, rpctypes.EthPendingBlockNumber) if err != nil { b.Logger.Debug("failed to get nonce", "error", err.Error()) return false @@ -154,7 +161,7 @@ func (b *Backend) SetEtherbase(etherbase common.Address) bool { return false } - if err := tx.Sign(b.ClientCtx.CmdContext, txFactory, keyInfo.Name, builder, false); err != nil { + if err := tx.Sign(ctx, txFactory, keyInfo.Name, builder, false); err != nil { b.Logger.Debug("failed to sign tx", "error", err.Error()) return false } @@ -263,7 +270,7 @@ func (b *Backend) NewMnemonic(uid string, // SetGasPrice sets the minimum accepted gas price for the miner. // NOTE: this function accepts only integers to have the same interface than go-eth // to use float values, the gas prices must be configured using the configuration file -func (b *Backend) SetGasPrice(gasPrice hexutil.Big) bool { +func (b *Backend) SetGasPrice(ctx context.Context, gasPrice hexutil.Big) bool { appConf, err := config.GetConfig(b.ClientCtx.Viper) if err != nil { b.Logger.Debug("could not get the server config", "error", err.Error()) diff --git a/rpc/backend/sign_tx.go b/rpc/backend/sign_tx.go index 859c2c3a8..3a44b1c09 100644 --- a/rpc/backend/sign_tx.go +++ b/rpc/backend/sign_tx.go @@ -1,6 +1,7 @@ package backend import ( + "context" "errors" "fmt" "math/big" @@ -12,8 +13,11 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/signer/core/apitypes" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" "github.com/cosmos/evm/mempool" + evmtrace "github.com/cosmos/evm/trace" evmtypes "github.com/cosmos/evm/x/vm/types" errorsmod "cosmossdk.io/errors" @@ -24,14 +28,21 @@ import ( ) // SendTransaction sends transaction based on received args using Node's key to sign it -func (b *Backend) SendTransaction(args evmtypes.TransactionArgs) (common.Hash, error) { +func (b *Backend) SendTransaction(ctx context.Context, args evmtypes.TransactionArgs) (result common.Hash, err error) { + var toAddr string + if args.To != nil { + toAddr = args.To.Hex() + } + ctx, span := tracer.Start(ctx, "SendTransaction", trace.WithAttributes(attribute.String("from", args.GetFrom().Hex()), attribute.String("to", toAddr))) + defer func() { evmtrace.EndSpanErr(span, err) }() + // Look up the wallet containing the requested signer if !b.Cfg.JSONRPC.AllowInsecureUnlock { b.Logger.Debug("account unlock with HTTP access is forbidden") return common.Hash{}, fmt.Errorf("account unlock with HTTP access is forbidden") } - _, err := b.ClientCtx.Keyring.KeyByAddress(sdk.AccAddress(args.GetFrom().Bytes())) + _, err = b.ClientCtx.Keyring.KeyByAddress(sdk.AccAddress(args.GetFrom().Bytes())) if err != nil { b.Logger.Error("failed to find key in keyring", "address", args.GetFrom(), "error", err.Error()) return common.Hash{}, fmt.Errorf("failed to find key in the node's keyring; %s; %s", keystore.ErrNoMatch, err.Error()) @@ -41,18 +52,18 @@ func (b *Backend) SendTransaction(args evmtypes.TransactionArgs) (common.Hash, e return common.Hash{}, fmt.Errorf("chainId does not match node's (have=%v, want=%v)", args.ChainID, (*hexutil.Big)(b.EvmChainID)) } - args, err = b.SetTxDefaults(args) + args, err = b.SetTxDefaults(ctx, args) if err != nil { return common.Hash{}, err } - bn, err := b.BlockNumber() + bn, err := b.BlockNumber(ctx) if err != nil { b.Logger.Debug("failed to fetch latest block number", "error", err.Error()) return common.Hash{}, err } - header, err := b.CurrentHeader() + header, err := b.CurrentHeader(ctx) if err != nil { return common.Hash{}, err } diff --git a/rpc/backend/tracing.go b/rpc/backend/tracing.go index fa1ee67c4..39201fd8d 100644 --- a/rpc/backend/tracing.go +++ b/rpc/backend/tracing.go @@ -1,6 +1,7 @@ package backend import ( + "context" "encoding/json" "fmt" "math" @@ -8,11 +9,14 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/pkg/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" tmrpcclient "github.com/cometbft/cometbft/rpc/client" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" rpctypes "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" evmtypes "github.com/cosmos/evm/x/vm/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -20,9 +24,12 @@ import ( // TraceTransaction returns the structured logs created during the execution of EVM // and returns them as a JSON object. -func (b *Backend) TraceTransaction(hash common.Hash, config *rpctypes.TraceConfig) (interface{}, error) { +func (b *Backend) TraceTransaction(ctx context.Context, hash common.Hash, config *rpctypes.TraceConfig) (result interface{}, err error) { + ctx, span := tracer.Start(ctx, "TraceTransaction", trace.WithAttributes(attribute.String("hash", hash.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + // Get transaction by hash - transaction, err := b.GetTxByEthHash(hash) + transaction, err := b.GetTxByEthHash(ctx, hash) if err != nil { b.Logger.Debug("tx not found", "hash", hash) return nil, err @@ -33,7 +40,7 @@ func (b *Backend) TraceTransaction(hash common.Hash, config *rpctypes.TraceConfi return nil, errors.New("genesis is not traceable") } - blk, err := b.CometBlockByNumber(rpctypes.BlockNumber(transaction.Height)) + blk, err := b.CometBlockByNumber(ctx, rpctypes.BlockNumber(transaction.Height)) if err != nil { b.Logger.Debug("block not found", "height", transaction.Height) return nil, err @@ -93,7 +100,7 @@ func (b *Backend) TraceTransaction(hash common.Hash, config *rpctypes.TraceConfi return nil, errors.New("invalid rpc client") } - cp, err := nc.ConsensusParams(b.Ctx, &blk.Block.Height) + cp, err := nc.ConsensusParams(ctx, &blk.Block.Height) if err != nil { return nil, err } @@ -120,7 +127,7 @@ func (b *Backend) TraceTransaction(hash common.Hash, config *rpctypes.TraceConfi // So here we set the minimum requested height to 1. contextHeight = 1 } - traceResult, err := b.QueryClient.TraceTx(rpctypes.ContextWithHeight(contextHeight), &traceTxRequest) + traceResult, err := b.QueryClient.TraceTx(rpctypes.ContextWithHeight(ctx, contextHeight), &traceTxRequest) if err != nil { return nil, err } @@ -148,10 +155,13 @@ func (b *Backend) convertConfig(config *rpctypes.TraceConfig) *evmtypes.TraceCon // TraceBlock configures a new tracer according to the provided configuration, and // executes all the transactions contained within. The return value will be one item // per transaction, dependent on the requested tracer. -func (b *Backend) TraceBlock(height rpctypes.BlockNumber, +func (b *Backend) TraceBlock(ctx context.Context, height rpctypes.BlockNumber, config *rpctypes.TraceConfig, block *tmrpctypes.ResultBlock, -) ([]*evmtypes.TxTraceResult, error) { +) (result []*evmtypes.TxTraceResult, err error) { + ctx, span := tracer.Start(ctx, "TraceBlock", trace.WithAttributes(attribute.Int64("height", height.Int64()), attribute.String("blockHash", common.BytesToHash(block.BlockID.Hash).Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + txs := block.Block.Txs txsLength := len(txs) @@ -160,7 +170,7 @@ func (b *Backend) TraceBlock(height rpctypes.BlockNumber, return []*evmtypes.TxTraceResult{}, nil } - blockRes, err := b.CometBlockResultByNumber(&block.Block.Height) + blockRes, err := b.CometBlockResultByNumber(ctx, &block.Block.Height) if err != nil { b.Logger.Debug("block result not found", "height", block.Block.Height, "error", err.Error()) return nil, nil @@ -192,17 +202,17 @@ func (b *Backend) TraceBlock(height rpctypes.BlockNumber, // minus one to get the context at the beginning of the block contextHeight := height - 1 if contextHeight < 1 { - // 0 is a special value for `ContextWithHeight`. + // 0 is a special value for `NewContextWithHeight`. contextHeight = 1 } - ctxWithHeight := rpctypes.ContextWithHeight(int64(contextHeight)) + ctxWithHeight := rpctypes.ContextWithHeight(ctx, int64(contextHeight)) nc, ok := b.ClientCtx.Client.(tmrpcclient.NetworkClient) if !ok { return nil, errors.New("invalid rpc client") } - cp, err := nc.ConsensusParams(b.Ctx, &block.Block.Height) + cp, err := nc.ConsensusParams(ctx, &block.Block.Height) if err != nil { return nil, err } @@ -234,10 +244,18 @@ func (b *Backend) TraceBlock(height rpctypes.BlockNumber, // TraceCall executes a call with the given arguments and returns the structured logs // created during the execution of EVM. It returns them as a JSON object. func (b *Backend) TraceCall( + ctx context.Context, args evmtypes.TransactionArgs, blockNrOrHash rpctypes.BlockNumberOrHash, config *rpctypes.TraceConfig, -) (interface{}, error) { +) (result interface{}, err error) { + var toAddr string + if args.To != nil { + toAddr = args.To.Hex() + } + ctx, span := tracer.Start(ctx, "TraceCall", trace.WithAttributes(attribute.String("from", args.GetFrom().Hex()), attribute.String("to", toAddr), attribute.String("blockNrOrHash", unwrapBlockNOrHash(blockNrOrHash)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + // Marshal tx args bz, err := json.Marshal(&args) if err != nil { @@ -245,13 +263,13 @@ func (b *Backend) TraceCall( } // Get block number from blockNrOrHash - blockNr, err := b.BlockNumberFromComet(blockNrOrHash) + blockNr, err := b.BlockNumberFromComet(ctx, blockNrOrHash) if err != nil { return nil, err } // Get the block to get necessary context - header, err := b.CometHeaderByNumber(blockNr) + header, err := b.CometHeaderByNumber(ctx, blockNr) if err != nil { b.Logger.Debug("block not found", "number", blockNr) return nil, err @@ -280,7 +298,7 @@ func (b *Backend) TraceCall( } // Use the block height as context for the query - ctxWithHeight := rpctypes.ContextWithHeight(contextHeight) + ctxWithHeight := rpctypes.ContextWithHeight(ctx, contextHeight) traceResult, err := b.QueryClient.TraceCall(ctxWithHeight, &traceCallRequest) if err != nil { return nil, err diff --git a/rpc/backend/tx_info.go b/rpc/backend/tx_info.go index 9c84198ff..c8d019865 100644 --- a/rpc/backend/tx_info.go +++ b/rpc/backend/tx_info.go @@ -1,6 +1,7 @@ package backend import ( + "context" "encoding/json" "fmt" "math" @@ -14,6 +15,8 @@ import ( "github.com/ethereum/go-ethereum/eth/tracers/logger" "github.com/ethereum/go-ethereum/params" "github.com/pkg/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" cmtrpcclient "github.com/cometbft/cometbft/rpc/client" cmtrpctypes "github.com/cometbft/cometbft/rpc/core/types" @@ -21,6 +24,7 @@ import ( "github.com/cosmos/evm/mempool/txpool" rpctypes "github.com/cosmos/evm/rpc/types" servertypes "github.com/cosmos/evm/server/types" + evmtrace "github.com/cosmos/evm/trace" "github.com/cosmos/evm/utils" evmtypes "github.com/cosmos/evm/x/vm/types" @@ -30,13 +34,16 @@ import ( ) // GetTransactionByHash returns the Ethereum format transaction identified by Ethereum transaction hash -func (b *Backend) GetTransactionByHash(txHash common.Hash) (*rpctypes.RPCTransaction, error) { - res, err := b.GetTxByEthHash(txHash) +func (b *Backend) GetTransactionByHash(ctx context.Context, txHash common.Hash) (result *rpctypes.RPCTransaction, err error) { + ctx, span := tracer.Start(ctx, "GetTransactionByHash", trace.WithAttributes(attribute.String("txHash", txHash.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + res, err := b.GetTxByEthHash(ctx, txHash) if err != nil { - return b.GetTransactionByHashPending(txHash) + return b.GetTransactionByHashPending(ctx, txHash) } - block, err := b.CometBlockByNumber(rpctypes.BlockNumber(res.Height)) + block, err := b.CometBlockByNumber(ctx, rpctypes.BlockNumber(res.Height)) if err != nil { return nil, err } @@ -52,7 +59,7 @@ func (b *Backend) GetTransactionByHash(txHash common.Hash) (*rpctypes.RPCTransac return nil, errors.New("invalid ethereum tx") } - blockRes, err := b.RPCClient.BlockResults(b.Ctx, &block.Block.Height) + blockRes, err := b.RPCClient.BlockResults(ctx, &block.Block.Height) if err != nil { b.Logger.Debug("block result not found", "height", block.Block.Height, "error", err.Error()) return nil, fmt.Errorf("block result not found: %w", err) @@ -60,7 +67,7 @@ func (b *Backend) GetTransactionByHash(txHash common.Hash) (*rpctypes.RPCTransac if res.EthTxIndex == -1 { // Fallback to find tx index by iterating all valid eth transactions - msgs := b.EthMsgsFromCometBlock(block, blockRes) + msgs := b.EthMsgsFromCometBlock(ctx, block, blockRes) for i := range msgs { if msgs[i].Hash() == txHash { if i > math.MaxInt32 { @@ -76,7 +83,7 @@ func (b *Backend) GetTransactionByHash(txHash common.Hash) (*rpctypes.RPCTransac return nil, errors.New("can't find index of ethereum tx") } - baseFee, err := b.BaseFee(blockRes) + baseFee, err := b.BaseFee(ctx, blockRes) if err != nil { // handle the error for pruned node. b.Logger.Error("failed to fetch Base Fee from prunned block. Check node prunning configuration", "height", blockRes.Height, "error", err) @@ -97,10 +104,13 @@ func (b *Backend) GetTransactionByHash(txHash common.Hash) (*rpctypes.RPCTransac } // GetTransactionByHashPending find pending tx from mempool -func (b *Backend) GetTransactionByHashPending(txHash common.Hash) (*rpctypes.RPCTransaction, error) { +func (b *Backend) GetTransactionByHashPending(ctx context.Context, txHash common.Hash) (result *rpctypes.RPCTransaction, err error) { + ctx, span := tracer.Start(ctx, "GetTransactionByHashPending", trace.WithAttributes(attribute.String("txHash", txHash.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + hexTx := txHash.Hex() // try to find tx in mempool - txs, err := b.PendingTransactions() + txs, err := b.PendingTransactions(ctx) if err != nil { b.Logger.Debug("tx not found", "hash", hexTx, "error", err.Error()) return nil, nil @@ -132,12 +142,15 @@ func (b *Backend) GetTransactionByHashPending(txHash common.Hash) (*rpctypes.RPC } // GetGasUsed returns gasUsed from transaction -func (b *Backend) GetGasUsed(res *servertypes.TxResult, price *big.Int, gas uint64) uint64 { +func (b *Backend) GetGasUsed(res *servertypes.TxResult, _ *big.Int, _ uint64) uint64 { return res.GasUsed } // GetTransactionReceipt returns the transaction receipt identified by hash. -func (b *Backend) GetTransactionReceipt(hash common.Hash) (map[string]interface{}, error) { +func (b *Backend) GetTransactionReceipt(ctx context.Context, hash common.Hash) (result map[string]interface{}, err error) { + ctx, span := tracer.Start(ctx, "GetTransactionReceipt", trace.WithAttributes(attribute.String("hash", hash.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + hexTx := hash.Hex() b.Logger.Debug("eth_getTransactionReceipt", "hash", hexTx) @@ -146,10 +159,9 @@ func (b *Backend) GetTransactionReceipt(hash common.Hash) (map[string]interface{ baseDelay := 50 * time.Millisecond var res *servertypes.TxResult - var err error for attempt := 0; attempt <= maxRetries; attempt++ { - res, err = b.GetTxByEthHash(hash) + res, err = b.GetTxByEthHash(ctx, hash) if err == nil { break // Found the transaction } @@ -174,7 +186,7 @@ func (b *Backend) GetTransactionReceipt(hash common.Hash) (map[string]interface{ return nil, nil } - resBlock, err := b.CometBlockByNumber(rpctypes.BlockNumber(res.Height)) + resBlock, err := b.CometBlockByNumber(ctx, rpctypes.BlockNumber(res.Height)) if err != nil { b.Logger.Debug("block not found", "height", res.Height, "error", err.Error()) return nil, fmt.Errorf("block not found at height %d: %w", res.Height, err) @@ -186,14 +198,14 @@ func (b *Backend) GetTransactionReceipt(hash common.Hash) (map[string]interface{ return nil, fmt.Errorf("failed to decode tx: %w", err) } - blockRes, err := b.RPCClient.BlockResults(b.Ctx, &res.Height) + blockRes, err := b.RPCClient.BlockResults(ctx, &res.Height) if err != nil { b.Logger.Debug("failed to retrieve block results", "height", res.Height, "error", err.Error()) return nil, fmt.Errorf("block result not found at height %d: %w", res.Height, err) } ethMsg := tx.GetMsgs()[res.MsgIndex].(*evmtypes.MsgEthereumTx) - receipts, err := b.ReceiptsFromCometBlock(resBlock, blockRes, []*evmtypes.MsgEthereumTx{ethMsg}) + receipts, err := b.ReceiptsFromCometBlock(ctx, resBlock, blockRes, []*evmtypes.MsgEthereumTx{ethMsg}) if err != nil { return nil, fmt.Errorf("failed to get receipts from comet block") } @@ -214,10 +226,13 @@ func (b *Backend) GetTransactionReceipt(hash common.Hash) (map[string]interface{ } // GetTransactionLogs returns the transaction logs identified by hash. -func (b *Backend) GetTransactionLogs(hash common.Hash) ([]*ethtypes.Log, error) { +func (b *Backend) GetTransactionLogs(ctx context.Context, hash common.Hash) (result []*ethtypes.Log, err error) { + ctx, span := tracer.Start(ctx, "GetTransactionLogs", trace.WithAttributes(attribute.String("hash", hash.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + hexTx := hash.Hex() - res, err := b.GetTxByEthHash(hash) + res, err := b.GetTxByEthHash(ctx, hash) if err != nil { b.Logger.Debug("tx not found", "hash", hexTx, "error", err.Error()) return nil, nil @@ -228,7 +243,7 @@ func (b *Backend) GetTransactionLogs(hash common.Hash) ([]*ethtypes.Log, error) return nil, nil } - resBlockResult, err := b.RPCClient.BlockResults(b.Ctx, &res.Height) + resBlockResult, err := b.RPCClient.BlockResults(ctx, &res.Height) if err != nil { b.Logger.Debug("block result not found", "number", res.Height, "error", err.Error()) return nil, nil @@ -252,14 +267,17 @@ func (b *Backend) GetTransactionLogs(hash common.Hash) ([]*ethtypes.Log, error) } // GetTransactionByBlockHashAndIndex returns the transaction identified by hash and index. -func (b *Backend) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (*rpctypes.RPCTransaction, error) { +func (b *Backend) GetTransactionByBlockHashAndIndex(ctx context.Context, hash common.Hash, idx hexutil.Uint) (result *rpctypes.RPCTransaction, err error) { + ctx, span := tracer.Start(ctx, "GetTransactionByBlockHashAndIndex", trace.WithAttributes(attribute.String("hash", hash.Hex()), attribute.Int64("idx", int64(idx)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + b.Logger.Debug("eth_getTransactionByBlockHashAndIndex", "hash", hash.Hex(), "index", idx) sc, ok := b.ClientCtx.Client.(cmtrpcclient.SignClient) if !ok { return nil, errors.New("invalid rpc client") } - block, err := sc.BlockByHash(b.Ctx, hash.Bytes()) + block, err := sc.BlockByHash(ctx, hash.Bytes()) if err != nil { b.Logger.Debug("block not found", "hash", hash.Hex(), "error", err.Error()) return nil, nil @@ -270,14 +288,17 @@ func (b *Backend) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexuti return nil, nil } - return b.GetTransactionByBlockAndIndex(block, idx) + return b.GetTransactionByBlockAndIndex(ctx, block, idx) } // GetTransactionByBlockNumberAndIndex returns the transaction identified by number and index. -func (b *Backend) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockNumber, idx hexutil.Uint) (*rpctypes.RPCTransaction, error) { +func (b *Backend) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNum rpctypes.BlockNumber, idx hexutil.Uint) (result *rpctypes.RPCTransaction, err error) { + ctx, span := tracer.Start(ctx, "GetTransactionByBlockNumberAndIndex", trace.WithAttributes(attribute.Int64("blockNum", blockNum.Int64()), attribute.Int64("idx", int64(idx)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + b.Logger.Debug("eth_getTransactionByBlockNumberAndIndex", "number", blockNum, "index", idx) - block, err := b.CometBlockByNumber(blockNum) + block, err := b.CometBlockByNumber(ctx, blockNum) if err != nil { b.Logger.Debug("block not found", "height", blockNum.Int64(), "error", err.Error()) return nil, nil @@ -288,20 +309,23 @@ func (b *Backend) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockNum return nil, nil } - return b.GetTransactionByBlockAndIndex(block, idx) + return b.GetTransactionByBlockAndIndex(ctx, block, idx) } // GetTxByEthHash uses `/tx_query` to find transaction by ethereum tx hash // TODO: Don't need to convert once hashing is fixed on CometBFT // https://github.com/cometbft/cometbft/issues/6539 -func (b *Backend) GetTxByEthHash(hash common.Hash) (*servertypes.TxResult, error) { +func (b *Backend) GetTxByEthHash(ctx context.Context, hash common.Hash) (result *servertypes.TxResult, err error) { + ctx, span := tracer.Start(ctx, "GetTxByEthHash", trace.WithAttributes(attribute.String("hash", hash.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + if b.Indexer != nil { return b.Indexer.GetByTxHash(hash) } // fallback to CometBFT tx indexer query := fmt.Sprintf("%s.%s='%s'", evmtypes.TypeMsgEthereumTx, evmtypes.AttributeKeyEthereumTxHash, hash.Hex()) - txResult, err := b.QueryCometTxIndexer(query, func(txs *rpctypes.ParsedTxs) *rpctypes.ParsedTx { + txResult, err := b.QueryCometTxIndexer(ctx, query, func(txs *rpctypes.ParsedTxs) *rpctypes.ParsedTx { return txs.GetTxByHash(hash) }) if err != nil { @@ -311,7 +335,10 @@ func (b *Backend) GetTxByEthHash(hash common.Hash) (*servertypes.TxResult, error } // GetTxByTxIndex uses `/tx_query` to find transaction by tx index of valid ethereum txs -func (b *Backend) GetTxByTxIndex(height int64, index uint) (*servertypes.TxResult, error) { +func (b *Backend) GetTxByTxIndex(ctx context.Context, height int64, index uint) (result *servertypes.TxResult, err error) { + ctx, span := tracer.Start(ctx, "GetTxByTxIndex", trace.WithAttributes(attribute.Int64("height", height), attribute.Int64("index", int64(index)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + int32Index := int32(index) //#nosec G115 -- checked for int overflow already if b.Indexer != nil { return b.Indexer.GetByBlockAndIndex(height, int32Index) @@ -322,7 +349,7 @@ func (b *Backend) GetTxByTxIndex(height int64, index uint) (*servertypes.TxResul height, evmtypes.TypeMsgEthereumTx, evmtypes.AttributeKeyTxIndex, index, ) - txResult, err := b.QueryCometTxIndexer(query, func(txs *rpctypes.ParsedTxs) *rpctypes.ParsedTx { + txResult, err := b.QueryCometTxIndexer(ctx, query, func(txs *rpctypes.ParsedTxs) *rpctypes.ParsedTx { return txs.GetTxByTxIndex(int(index)) // #nosec G115 -- checked for int overflow already }) if err != nil { @@ -332,8 +359,11 @@ func (b *Backend) GetTxByTxIndex(height int64, index uint) (*servertypes.TxResul } // QueryCometTxIndexer query tx in CometBFT tx indexer -func (b *Backend) QueryCometTxIndexer(query string, txGetter func(*rpctypes.ParsedTxs) *rpctypes.ParsedTx) (*servertypes.TxResult, error) { - resTxs, err := b.ClientCtx.Client.TxSearch(b.Ctx, query, false, nil, nil, "") +func (b *Backend) QueryCometTxIndexer(ctx context.Context, query string, txGetter func(*rpctypes.ParsedTxs) *rpctypes.ParsedTx) (result *servertypes.TxResult, err error) { + ctx, span := tracer.Start(ctx, "QueryCometTxIndexer") + defer func() { evmtrace.EndSpanErr(span, err) }() + + resTxs, err := b.ClientCtx.Client.TxSearch(ctx, query, false, nil, nil, "") if err != nil { return nil, err } @@ -358,15 +388,18 @@ func (b *Backend) QueryCometTxIndexer(query string, txGetter func(*rpctypes.Pars } // GetTransactionByBlockAndIndex is the common code shared by `GetTransactionByBlockNumberAndIndex` and `GetTransactionByBlockHashAndIndex`. -func (b *Backend) GetTransactionByBlockAndIndex(block *cmtrpctypes.ResultBlock, idx hexutil.Uint) (*rpctypes.RPCTransaction, error) { - blockRes, err := b.RPCClient.BlockResults(b.Ctx, &block.Block.Height) +func (b *Backend) GetTransactionByBlockAndIndex(ctx context.Context, block *cmtrpctypes.ResultBlock, idx hexutil.Uint) (result *rpctypes.RPCTransaction, err error) { + ctx, span := tracer.Start(ctx, "GetTransactionByBlockAndIndex", trace.WithAttributes(attribute.Int64("blockHeight", block.Block.Height), attribute.Int64("idx", int64(idx)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + blockRes, err := b.RPCClient.BlockResults(ctx, &block.Block.Height) if err != nil { return nil, nil } var msg *evmtypes.MsgEthereumTx // find in tx indexer - res, err := b.GetTxByTxIndex(block.Block.Height, uint(idx)) + res, err := b.GetTxByTxIndex(ctx, block.Block.Height, uint(idx)) if err == nil { tx, err := b.ClientCtx.TxConfig.TxDecoder()(block.Block.Txs[res.TxIndex]) if err != nil { @@ -383,7 +416,7 @@ func (b *Backend) GetTransactionByBlockAndIndex(block *cmtrpctypes.ResultBlock, } } else { i := int(idx) // #nosec G115 - ethMsgs := b.EthMsgsFromCometBlock(block, blockRes) + ethMsgs := b.EthMsgsFromCometBlock(ctx, block, blockRes) if i >= len(ethMsgs) { b.Logger.Debug("block txs index out of bound", "index", i) return nil, nil @@ -392,7 +425,7 @@ func (b *Backend) GetTransactionByBlockAndIndex(block *cmtrpctypes.ResultBlock, msg = ethMsgs[i] } - baseFee, err := b.BaseFee(blockRes) + baseFee, err := b.BaseFee(ctx, blockRes) if err != nil { // handle the error for pruned node. b.Logger.Error("failed to fetch Base Fee from prunned block. Check node prunning configuration", "height", block.Block.Height, "error", err) @@ -415,24 +448,28 @@ func (b *Backend) GetTransactionByBlockAndIndex(block *cmtrpctypes.ResultBlock, // CreateAccessList returns the list of addresses and storage keys used by the transaction (except for the // sender account and precompiles), plus the estimated gas if the access list were added to the transaction. func (b *Backend) CreateAccessList( + ctx context.Context, args evmtypes.TransactionArgs, blockNrOrHash rpctypes.BlockNumberOrHash, overrides *json.RawMessage, -) (*rpctypes.AccessListResult, error) { - accessList, gasUsed, vmErr, err := b.createAccessList(args, blockNrOrHash, overrides) +) (result *rpctypes.AccessListResult, err error) { + ctx, span := tracer.Start(ctx, "CreateAccessList", trace.WithAttributes(attribute.String("from", args.GetFrom().Hex()), attribute.String("blockNrOrHash", unwrapBlockNOrHash(blockNrOrHash)))) + defer func() { evmtrace.EndSpanErr(span, err) }() + + accessList, gasUsed, vmErr, err := b.createAccessList(ctx, args, blockNrOrHash, overrides) if err != nil { return nil, err } hexGasUsed := hexutil.Uint64(gasUsed) - result := rpctypes.AccessListResult{ + res := rpctypes.AccessListResult{ AccessList: &accessList, GasUsed: &hexGasUsed, } if vmErr != nil { - result.Error = vmErr.Error() + res.Error = vmErr.Error() } - return &result, nil + return &res, nil } // createAccessList creates the access list for the transaction. @@ -441,29 +478,32 @@ func (b *Backend) CreateAccessList( // If the access list has not converged, an error is returned. // If the transaction itself fails, an vmErr is returned. func (b *Backend) createAccessList( + ctx context.Context, args evmtypes.TransactionArgs, blockNrOrHash rpctypes.BlockNumberOrHash, overrides *json.RawMessage, -) (ethtypes.AccessList, uint64, error, error) { - args, err := b.SetTxDefaults(args) +) (_ ethtypes.AccessList, _ uint64, _ error, sysErr error) { + ctx, span := tracer.Start(ctx, "createAccessList") + defer func() { evmtrace.EndSpanErr(span, sysErr) }() + args, err := b.SetTxDefaults(ctx, args) if err != nil { b.Logger.Error("failed to set tx defaults", "error", err) return nil, 0, nil, err } - blockNum, err := b.BlockNumberFromComet(blockNrOrHash) + blockNum, err := b.BlockNumberFromComet(ctx, blockNrOrHash) if err != nil { b.Logger.Error("failed to get block number", "error", err) return nil, 0, nil, err } - addressesToExclude, err := b.getAccessListExcludes(args, blockNum) + addressesToExclude, err := b.getAccessListExcludes(ctx, args, blockNum) if err != nil { b.Logger.Error("failed to get access list excludes", "error", err) return nil, 0, nil, err } - prevTracer, traceArgs, err := b.initAccessListTracer(args, blockNum, addressesToExclude) + prevTracer, traceArgs, err := b.initAccessListTracer(ctx, args, blockNum, addressesToExclude) if err != nil { b.Logger.Error("failed to init access list tracer", "error", err) return nil, 0, nil, err @@ -473,7 +513,7 @@ func (b *Backend) createAccessList( for { accessList := prevTracer.AccessList() traceArgs.AccessList = &accessList - res, err := b.DoCall(*traceArgs, blockNum, overrides) + res, err := b.DoCall(ctx, *traceArgs, blockNum, overrides) if err != nil { b.Logger.Error("failed to apply transaction", "error", err) return nil, 0, nil, fmt.Errorf("failed to apply transaction: %v err: %v", traceArgs.ToTransaction(ethtypes.LegacyTxType).Hash(), err) @@ -497,8 +537,10 @@ func (b *Backend) createAccessList( // getAccessListExcludes returns the addresses to exclude from the access list. // This includes the sender account, the target account (if provided), precompiles, // and any addresses in the authorization list. -func (b *Backend) getAccessListExcludes(args evmtypes.TransactionArgs, blockNum rpctypes.BlockNumber) (map[common.Address]struct{}, error) { - header, err := b.HeaderByNumber(blockNum) +func (b *Backend) getAccessListExcludes(ctx context.Context, args evmtypes.TransactionArgs, blockNum rpctypes.BlockNumber) (_ map[common.Address]struct{}, err error) { + ctx, span := tracer.Start(ctx, "getAccessListExcludes") + defer func() { evmtrace.EndSpanErr(span, err) }() + header, err := b.HeaderByNumber(ctx, blockNum) if err != nil { b.Logger.Error("failed to get header by number", "error", err) return nil, err @@ -544,8 +586,10 @@ func (b *Backend) getAccessListExcludes(args evmtypes.TransactionArgs, blockNum // initAccessListTracer initializes the access list tracer for the transaction. // It sets the default call arguments and creates a new access list tracer. // If an access list is provided in args, it uses that instead of creating a new one. -func (b *Backend) initAccessListTracer(args evmtypes.TransactionArgs, blockNum rpctypes.BlockNumber, addressesToExclude map[common.Address]struct{}) (*logger.AccessListTracer, *evmtypes.TransactionArgs, error) { - header, err := b.HeaderByNumber(blockNum) +func (b *Backend) initAccessListTracer(ctx context.Context, args evmtypes.TransactionArgs, blockNum rpctypes.BlockNumber, addressesToExclude map[common.Address]struct{}) (*logger.AccessListTracer, *evmtypes.TransactionArgs, error) { + ctx, span := tracer.Start(ctx, "initAccessListTracer") + defer span.End() + header, err := b.HeaderByNumber(ctx, blockNum) if err != nil { b.Logger.Error("failed to get header by number", "error", err) return nil, nil, err @@ -553,7 +597,7 @@ func (b *Backend) initAccessListTracer(args evmtypes.TransactionArgs, blockNum r if args.Nonce == nil { pending := blockNum == rpctypes.EthPendingBlockNumber - nonce, err := b.getAccountNonce(args.GetFrom(), pending, blockNum.Int64(), b.Logger) + nonce, err := b.getAccountNonce(ctx, args.GetFrom(), pending, blockNum.Int64(), b.Logger) if err != nil { b.Logger.Error("failed to get account nonce", "error", err) return nil, nil, err diff --git a/rpc/backend/tx_info_test.go b/rpc/backend/tx_info_test.go index 01bc77791..439cf9bb3 100644 --- a/rpc/backend/tx_info_test.go +++ b/rpc/backend/tx_info_test.go @@ -77,7 +77,6 @@ func setupMockBackend(t *testing.T) *Backend { mockFeeMarketQueryClient := mocks.NewFeeMarketQueryClient(t) backend.QueryClient.QueryClient = mockEVMQueryClient backend.QueryClient.FeeMarket = mockFeeMarketQueryClient - backend.Ctx = rpctypes.ContextWithHeight(1) mockClient := backend.ClientCtx.Client.(*mocks.Client) mockClient.On("Status", context.Background()).Return(&tmrpctypes.ResultStatus{ @@ -376,7 +375,7 @@ func TestCreateAccessList(t *testing.T) { require.NotEqual(t, common.Address{}, args.GetFrom(), "From address should not be zero") } - result, err := backend.CreateAccessList(args, blockNumOrHash, tc.overrides) + result, err := backend.CreateAccessList(rpctypes.NewContextWithHeight(1), args, blockNumOrHash, tc.overrides) if tc.expectError { require.Error(t, err) @@ -491,7 +490,7 @@ func TestReceiptsFromCometBlock(t *testing.T) { backend.Indexer = mockIndexer mockEVMQueryClient := backend.QueryClient.QueryClient.(*mocks.EVMQueryClient) mockEVMQueryClient.On("BaseFee", mock.Anything, mock.Anything).Return(&evmtypes.QueryBaseFeeResponse{}, nil) - receipts, err := backend.ReceiptsFromCometBlock(resBlock, blockRes, msgs) + receipts, err := backend.ReceiptsFromCometBlock(rpctypes.NewContextWithHeight(1), resBlock, blockRes, msgs) require.NoError(t, err) require.Len(t, receipts, 1) actualTxIndex := receipts[0].TransactionIndex diff --git a/rpc/backend/tx_pool.go b/rpc/backend/tx_pool.go index 61b980e3b..b76ad1e12 100644 --- a/rpc/backend/tx_pool.go +++ b/rpc/backend/tx_pool.go @@ -1,14 +1,18 @@ package backend import ( + "context" "fmt" "strconv" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" ) const ( @@ -19,14 +23,17 @@ const ( // The code style for this API is based off of the Go-Ethereum implementation: // Content returns the transactions contained within the transaction pool. -func (b *Backend) Content() (map[string]map[string]map[string]*types.RPCTransaction, error) { +func (b *Backend) Content(ctx context.Context) (result map[string]map[string]map[string]*types.RPCTransaction, err error) { + ctx, span := tracer.Start(ctx, "Content") + defer func() { evmtrace.EndSpanErr(span, err) }() + content := map[string]map[string]map[string]*types.RPCTransaction{ StatusPending: make(map[string]map[string]*types.RPCTransaction), StatusQueued: make(map[string]map[string]*types.RPCTransaction), } // Get current block header - curHeader, err := b.CurrentHeader() + curHeader, err := b.CurrentHeader(ctx) if err != nil { return content, fmt.Errorf("failed to get current header: %w", err) } @@ -70,11 +77,14 @@ func (b *Backend) Content() (map[string]map[string]map[string]*types.RPCTransact } // ContentFrom returns the transactions contained within the transaction pool -func (b *Backend) ContentFrom(addr common.Address) (map[string]map[string]*types.RPCTransaction, error) { +func (b *Backend) ContentFrom(ctx context.Context, addr common.Address) (result map[string]map[string]*types.RPCTransaction, err error) { + ctx, span := tracer.Start(ctx, "ContentFrom", trace.WithAttributes(attribute.String("address", addr.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + content := make(map[string]map[string]*types.RPCTransaction, 2) // Get current block header - curHeader, err := b.CurrentHeader() + curHeader, err := b.CurrentHeader(ctx) if err != nil { return content, fmt.Errorf("failed to get current header: %w", err) } @@ -108,7 +118,7 @@ func (b *Backend) ContentFrom(addr common.Address) (map[string]map[string]*types } // Inspect returns the content of the transaction pool and flattens it into an easily inspectable list. -func (b *Backend) Inspect() (map[string]map[string]map[string]string, error) { +func (b *Backend) Inspect(_ context.Context) (map[string]map[string]map[string]string, error) { inspect := map[string]map[string]map[string]string{ StatusPending: make(map[string]map[string]string), StatusQueued: make(map[string]map[string]string), @@ -155,7 +165,7 @@ func (b *Backend) Inspect() (map[string]map[string]map[string]string, error) { } // Status returns the number of pending and queued transaction in the pool. -func (b *Backend) Status() (map[string]hexutil.Uint, error) { +func (b *Backend) Status(_ context.Context) (map[string]hexutil.Uint, error) { // Get the global mempool instance evmMempool := b.Mempool if evmMempool == nil { diff --git a/rpc/backend/utils.go b/rpc/backend/utils.go index ca46109b0..3175a8449 100644 --- a/rpc/backend/utils.go +++ b/rpc/backend/utils.go @@ -1,6 +1,7 @@ package backend import ( + "context" "fmt" "math" "math/big" @@ -19,6 +20,7 @@ import ( cmtrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" "github.com/cosmos/evm/utils" feemarkettypes "github.com/cosmos/evm/x/feemarket/types" evmtypes "github.com/cosmos/evm/x/vm/types" @@ -49,10 +51,12 @@ func (s sortGasAndReward) Less(i, j int) bool { // If the pending value is true, it will iterate over the mempool (pending) // txs in order to compute and return the pending tx sequence. // Todo: include the ability to specify a blockNumber -func (b *Backend) getAccountNonce(accAddr common.Address, pending bool, height int64, logger log.Logger) (uint64, error) { +func (b *Backend) getAccountNonce(ctx context.Context, accAddr common.Address, pending bool, height int64, logger log.Logger) (_ uint64, err error) { + ctx, span := tracer.Start(ctx, "getAccountNonce") + defer func() { evmtrace.EndSpanErr(span, err) }() queryClient := authtypes.NewQueryClient(b.ClientCtx) adr := sdk.AccAddress(accAddr.Bytes()).String() - ctx := types.ContextWithHeight(height) + ctx = types.ContextWithHeight(ctx, height) res, err := queryClient.Account(ctx, &authtypes.QueryAccountRequest{Address: adr}) if err != nil { st, ok := status.FromError(err) @@ -81,7 +85,7 @@ func (b *Backend) getAccountNonce(accAddr common.Address, pending bool, height i // the account retriever doesn't include the uncommitted transactions on the nonce so we need to // to manually add them. - pendingTxs, err := b.PendingTransactions() + pendingTxs, err := b.PendingTransactions(ctx) if err != nil { logger.Error("failed to fetch pending transactions", "error", err.Error()) return nonce, nil @@ -122,6 +126,7 @@ func (b *Backend) getAccountNonce(accAddr common.Address, pending bool, height i // - Transaction reward percentiles based on effective gas tip values // // Parameters: +// - ctx: Context for the request // - cometBlock: The raw CometBFT block containing transaction data // - ethBlock: Ethereum-formatted block with gas limit and usage information // - rewardPercentiles: Percentile values (0-100) for reward calculation @@ -130,14 +135,17 @@ func (b *Backend) getAccountNonce(accAddr common.Address, pending bool, height i // // Returns an error if block processing fails due to invalid data types or calculation errors. func (b *Backend) ProcessBlock( + ctx context.Context, cometBlock *cmtrpctypes.ResultBlock, ethBlock *map[string]interface{}, rewardPercentiles []float64, cometBlockResult *cmtrpctypes.ResultBlockResults, targetOneFeeHistory *types.OneFeeHistory, -) error { +) (err error) { + ctx, span := tracer.Start(ctx, "ProcessBlock") + defer func() { evmtrace.EndSpanErr(span, err) }() blockHeight := cometBlock.Block.Height - blockBaseFee, err := b.BaseFee(cometBlockResult) + blockBaseFee, err := b.BaseFee(ctx, cometBlockResult) if err != nil || blockBaseFee == nil { targetOneFeeHistory.BaseFee = big.NewInt(0) } else { @@ -176,7 +184,7 @@ func (b *Backend) ProcessBlock( targetOneFeeHistory.BlobGasUsedRatio = 0 if cfg.IsLondon(big.NewInt(blockHeight + 1)) { - ctx := types.ContextWithHeight(blockHeight) + ctx = types.ContextWithHeight(ctx, blockHeight) params, err := b.QueryClient.FeeMarket.Params(ctx, &feemarkettypes.QueryParamsRequest{}) if err != nil { return err @@ -337,3 +345,13 @@ func GetHexProofs(proof *crypto.ProofOps) []string { } return proofs } + +func unwrapBlockNOrHash(blockNOrHash types.BlockNumberOrHash) string { + if blockNOrHash.BlockHash != nil { + return blockNOrHash.BlockHash.String() + } + if blockNOrHash.BlockNumber != nil { + return fmt.Sprintf("%d", *blockNOrHash.BlockNumber) + } + return "" +} diff --git a/rpc/namespaces/ethereum/debug/api.go b/rpc/namespaces/ethereum/debug/api.go index 65ff0c5e7..c244c40ae 100644 --- a/rpc/namespaces/ethereum/debug/api.go +++ b/rpc/namespaces/ethereum/debug/api.go @@ -2,6 +2,7 @@ package debug import ( "bytes" + "context" "errors" "fmt" "io" @@ -19,9 +20,13 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" stderrors "github.com/pkg/errors" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" "github.com/cosmos/evm/rpc/backend" rpctypes "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" evmtypes "github.com/cosmos/evm/x/vm/types" "cosmossdk.io/log" @@ -29,6 +34,8 @@ import ( "github.com/cosmos/cosmos-sdk/server" ) +var tracer = otel.Tracer("evm/rpc/namespaces/ethereum/debug") + // HandlerT keeps track of the cpu profiler and trace execution type HandlerT struct { cpuFilename string @@ -66,32 +73,38 @@ func NewAPI( // and returns them as a JSON object. func (a *API) TraceTransaction(hash common.Hash, config *rpctypes.TraceConfig) (interface{}, error) { a.logger.Debug("debug_traceTransaction", "hash", hash) - return a.backend.TraceTransaction(hash, config) + ctx, span := tracer.Start(context.Background(), "eth_traceTransaction", trace.WithAttributes(attribute.String("hash", hash.String()))) + defer span.End() + return a.backend.TraceTransaction(ctx, hash, config) } // TraceBlockByNumber returns the structured logs created during the execution of // EVM and returns them as a JSON object. -func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *rpctypes.TraceConfig) ([]*evmtypes.TxTraceResult, error) { +func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *rpctypes.TraceConfig) (res []*evmtypes.TxTraceResult, err error) { a.logger.Debug("debug_traceBlockByNumber", "height", height) + ctx, span := tracer.Start(context.Background(), "eth_traceBlockByNumber", trace.WithAttributes(attribute.Int64("height", int64(height)))) + defer func() { evmtrace.EndSpanErr(span, err) }() if height == 0 { return nil, errors.New("genesis is not traceable") } // Get CometBFT Block - resBlock, err := a.backend.CometBlockByNumber(height) + resBlock, err := a.backend.CometBlockByNumber(ctx, height) if err != nil { a.logger.Debug("get block failed", "height", height, "error", err.Error()) return nil, err } - return a.backend.TraceBlock(rpctypes.BlockNumber(resBlock.Block.Height), config, resBlock) + return a.backend.TraceBlock(ctx, rpctypes.BlockNumber(resBlock.Block.Height), config, resBlock) } // TraceBlockByHash returns the structured logs created during the execution of // EVM and returns them as a JSON object. func (a *API) TraceBlockByHash(hash common.Hash, config *rpctypes.TraceConfig) ([]*evmtypes.TxTraceResult, error) { a.logger.Debug("debug_traceBlockByHash", "hash", hash) + ctx, span := tracer.Start(context.Background(), "eth_traceBlockByHash") + defer span.End() // Get CometBFT Block - resBlock, err := a.backend.CometBlockByHash(hash) + resBlock, err := a.backend.CometBlockByHash(ctx, hash) if err != nil { a.logger.Debug("get block failed", "hash", hash.Hex(), "error", err.Error()) return nil, err @@ -102,13 +115,15 @@ func (a *API) TraceBlockByHash(hash common.Hash, config *rpctypes.TraceConfig) ( return nil, errors.New("block not found") } - return a.backend.TraceBlock(rpctypes.BlockNumber(resBlock.Block.Height), config, resBlock) + return a.backend.TraceBlock(ctx, rpctypes.BlockNumber(resBlock.Block.Height), config, resBlock) } // TraceBlock returns the structured logs created during the execution of // EVM and returns them as a JSON object. It accepts an RLP-encoded block. -func (a *API) TraceBlock(tblockRlp hexutil.Bytes, config *rpctypes.TraceConfig) ([]*evmtypes.TxTraceResult, error) { +func (a *API) TraceBlock(ctx context.Context, tblockRlp hexutil.Bytes, config *rpctypes.TraceConfig) (_ []*evmtypes.TxTraceResult, err error) { a.logger.Debug("debug_traceBlock", "size", len(tblockRlp)) + ctx, span := tracer.Start(ctx, "eth_traceBlock") + defer func() { evmtrace.EndSpanErr(span, err) }() // Decode RLP-encoded block var block types.Block if err := rlp.DecodeBytes(tblockRlp, &block); err != nil { @@ -125,7 +140,7 @@ func (a *API) TraceBlock(tblockRlp hexutil.Bytes, config *rpctypes.TraceConfig) a.logger.Debug("decoded block", "number", blockNumber, "hash", block.Hash().Hex()) // Get CometBFT block by number (not hash, as Ethereum block hash may differ from CometBFT hash) - resBlock, err := a.backend.CometBlockByNumber(blockNumber) + resBlock, err := a.backend.CometBlockByNumber(ctx, blockNumber) if err != nil { a.logger.Debug("get block failed", "number", blockNumber, "error", err.Error()) return nil, err @@ -136,29 +151,32 @@ func (a *API) TraceBlock(tblockRlp hexutil.Bytes, config *rpctypes.TraceConfig) return nil, errors.New("block not found") } - return a.backend.TraceBlock(blockNumber, config, resBlock) + return a.backend.TraceBlock(ctx, blockNumber, config, resBlock) } // TraceCall lets you trace a given eth_call. It collects the structured logs // created during the execution of EVM if the given transaction was added on // top of the provided block and returns them as a JSON object. -func (a *API) TraceCall(args evmtypes.TransactionArgs, blockNrOrHash rpctypes.BlockNumberOrHash, config *rpctypes.TraceConfig) (interface{}, error) { +func (a *API) TraceCall(ctx context.Context, args evmtypes.TransactionArgs, blockNrOrHash rpctypes.BlockNumberOrHash, config *rpctypes.TraceConfig) (interface{}, error) { a.logger.Debug("debug_traceCall", "args", args, "block number or hash", blockNrOrHash) - return a.backend.TraceCall(args, blockNrOrHash, config) + ctx, span := tracer.Start(context.Background(), "eth_traceCall") + defer span.End() + return a.backend.TraceCall(ctx, args, blockNrOrHash, config) } // GetRawBlock retrieves the RLP-encoded block by block number or hash. -func (a *API) GetRawBlock(blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error) { +func (a *API) GetRawBlock(ctx context.Context, blockNrOrHash rpctypes.BlockNumberOrHash) (_ hexutil.Bytes, err error) { a.logger.Debug("debug_getRawBlock", "block number or hash", blockNrOrHash) - + ctx, span := tracer.Start(ctx, "eth_getRawBlock") + defer func() { evmtrace.EndSpanErr(span, err) }() // Get block number from blockNrOrHash - blockNum, err := a.backend.BlockNumberFromComet(blockNrOrHash) + blockNum, err := a.backend.BlockNumberFromComet(ctx, blockNrOrHash) if err != nil { return nil, err } // Get Ethereum block by number - block, err := a.backend.EthBlockByNumber(blockNum) + block, err := a.backend.EthBlockByNumber(ctx, blockNum) if err != nil { return nil, err } @@ -406,11 +424,13 @@ func (a *API) SetGCPercent(v int) (int, error) { } // GetHeaderRlp retrieves the RLP encoded for of a single header. -func (a *API) GetHeaderRlp(number uint64) (hexutil.Bytes, error) { +func (a *API) GetHeaderRlp(number uint64) (_ hexutil.Bytes, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getHeaderRlp") + defer func() { evmtrace.EndSpanErr(span, err) }() if !a.profilingEnabled { return nil, rpctypes.ErrProfilingDisabled } - header, err := a.backend.HeaderByNumber(rpctypes.BlockNumber(number)) //#nosec G115 -- int overflow is not a concern here -- block number is not likely to exceed int64 max value + header, err := a.backend.HeaderByNumber(ctx, rpctypes.BlockNumber(number)) //#nosec G115 -- int overflow is not a concern here -- block number is not likely to exceed int64 max value if err != nil { return nil, err } @@ -419,11 +439,13 @@ func (a *API) GetHeaderRlp(number uint64) (hexutil.Bytes, error) { } // GetBlockRlp retrieves the RLP encoded for of a single block. -func (a *API) GetBlockRlp(number uint64) (hexutil.Bytes, error) { +func (a *API) GetBlockRlp(number uint64) (_ hexutil.Bytes, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getBlockRlp") + defer func() { evmtrace.EndSpanErr(span, err) }() if !a.profilingEnabled { return nil, rpctypes.ErrProfilingDisabled } - block, err := a.backend.EthBlockByNumber(rpctypes.BlockNumber(number)) //#nosec G115 -- int overflow is not a concern here -- block number is not likely to exceed int64 max value + block, err := a.backend.EthBlockByNumber(ctx, rpctypes.BlockNumber(number)) //#nosec G115 -- int overflow is not a concern here -- block number is not likely to exceed int64 max value if err != nil { return nil, err } @@ -432,11 +454,13 @@ func (a *API) GetBlockRlp(number uint64) (hexutil.Bytes, error) { } // PrintBlock retrieves a block and returns its pretty printed form. -func (a *API) PrintBlock(number uint64) (string, error) { +func (a *API) PrintBlock(number uint64) (_ string, err error) { + ctx, span := tracer.Start(context.Background(), "eth_printBlock") + defer func() { evmtrace.EndSpanErr(span, err) }() if !a.profilingEnabled { return "", rpctypes.ErrProfilingDisabled } - block, err := a.backend.EthBlockByNumber(rpctypes.BlockNumber(number)) //#nosec G115 -- int overflow is not a concern here -- block number is not likely to exceed int64 max value + block, err := a.backend.EthBlockByNumber(ctx, rpctypes.BlockNumber(number)) //#nosec G115 -- int overflow is not a concern here -- block number is not likely to exceed int64 max value if err != nil { return "", err } diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index 9521f41b0..decee2735 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -4,20 +4,23 @@ import ( "context" "encoding/json" + "github.com/cosmos/evm/rpc/backend" + rpctypes "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" + evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/math" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/signer/core/apitypes" - - "github.com/cosmos/evm/rpc/backend" - rpctypes "github.com/cosmos/evm/rpc/types" - evmtypes "github.com/cosmos/evm/x/vm/types" + "go.opentelemetry.io/otel" "cosmossdk.io/log" ) +var tracer = otel.Tracer("evm/rpc/namespaces/ethereum/eth") + // The Ethereum API allows applications to connect to an node of any Cosmos EVM based blockchain. // Developers can interact with on-chain EVM data // and send different types of transactions to the network by utilizing the @@ -133,15 +136,19 @@ func NewPublicAPI(logger log.Logger, backend backend.EVMBackend) *PublicAPI { // - When blockNr is -2 the chain latest header is returned. // - When blockNr is -3 the chain finalized header is returned. // - When blockNr is -4 the chain safe header is returned. -func (e *PublicAPI) GetHeaderByNumber(ethBlockNum rpctypes.BlockNumber) (map[string]interface{}, error) { +func (e *PublicAPI) GetHeaderByNumber(ethBlockNum rpctypes.BlockNumber) (_ map[string]interface{}, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getHeaderByNumber") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getHeaderByNumber", "number", ethBlockNum) - return e.backend.GetHeaderByNumber(ethBlockNum) + return e.backend.GetHeaderByNumber(ctx, ethBlockNum) } // GetHeaderByHash returns the requested header by hash. -func (e *PublicAPI) GetHeaderByHash(hash common.Hash) (map[string]interface{}, error) { +func (e *PublicAPI) GetHeaderByHash(hash common.Hash) (_ map[string]interface{}, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getHeaderByHash") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getHeaderByHash", "hash", hash.Hex()) - return e.backend.GetHeaderByHash(hash) + return e.backend.GetHeaderByHash(ctx, hash) } //////////////////////////////////////////////////////////////////////////////////////// @@ -149,27 +156,35 @@ func (e *PublicAPI) GetHeaderByHash(hash common.Hash) (map[string]interface{}, e //////////////////////////////////////////////////////////////////////////////////////// // BlockNumber returns the current block number. -func (e *PublicAPI) BlockNumber() (hexutil.Uint64, error) { +func (e *PublicAPI) BlockNumber() (_ hexutil.Uint64, err error) { + ctx, span := tracer.Start(context.Background(), "eth_blockNumber") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_blockNumber") - return e.backend.BlockNumber() + return e.backend.BlockNumber(ctx) } // GetBlockByNumber returns the block identified by number. -func (e *PublicAPI) GetBlockByNumber(ethBlockNum rpctypes.BlockNumber, fullTx bool) (map[string]interface{}, error) { +func (e *PublicAPI) GetBlockByNumber(ethBlockNum rpctypes.BlockNumber, fullTx bool) (_ map[string]interface{}, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getBlockByNumber") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getBlockByNumber", "number", ethBlockNum, "full", fullTx) - return e.backend.GetBlockByNumber(ethBlockNum, fullTx) + return e.backend.GetBlockByNumber(ctx, ethBlockNum, fullTx) } // GetBlockByHash returns the block identified by hash. -func (e *PublicAPI) GetBlockByHash(hash common.Hash, fullTx bool) (map[string]interface{}, error) { +func (e *PublicAPI) GetBlockByHash(hash common.Hash, fullTx bool) (_ map[string]interface{}, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getBlockByHash") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getBlockByHash", "hash", hash.Hex(), "full", fullTx) - return e.backend.GetBlockByHash(hash, fullTx) + return e.backend.GetBlockByHash(ctx, hash, fullTx) } // GetBlockReceipts returns the block receipts for the given block hash or number or tag. -func (e *PublicAPI) GetBlockReceipts(ctx context.Context, blockNrOrHash rpctypes.BlockNumberOrHash) ([]map[string]interface{}, error) { +func (e *PublicAPI) GetBlockReceipts(ctx context.Context, blockNrOrHash rpctypes.BlockNumberOrHash) (_ []map[string]interface{}, err error) { + ctx, span := tracer.Start(ctx, "eth_getBlockReceipts") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getBlockReceipts", "block number or hash", blockNrOrHash) - return e.backend.GetBlockReceipts(blockNrOrHash) + return e.backend.GetBlockReceipts(ctx, blockNrOrHash) } /////////////////////////////////////////////////////////////////////////////// @@ -177,50 +192,64 @@ func (e *PublicAPI) GetBlockReceipts(ctx context.Context, blockNrOrHash rpctypes /////////////////////////////////////////////////////////////////////////////// // GetTransactionByHash returns the transaction identified by hash. -func (e *PublicAPI) GetTransactionByHash(hash common.Hash) (*rpctypes.RPCTransaction, error) { +func (e *PublicAPI) GetTransactionByHash(hash common.Hash) (_ *rpctypes.RPCTransaction, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getTransactionByHash") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getTransactionByHash", "hash", hash.Hex()) - return e.backend.GetTransactionByHash(hash) + return e.backend.GetTransactionByHash(ctx, hash) } // GetTransactionCount returns the number of transactions at the given address up to the given block number. -func (e *PublicAPI) GetTransactionCount(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (*hexutil.Uint64, error) { +func (e *PublicAPI) GetTransactionCount(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (_ *hexutil.Uint64, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getTransactionCount") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getTransactionCount", "address", address.Hex(), "block number or hash", blockNrOrHash) - blockNum, err := e.backend.BlockNumberFromComet(blockNrOrHash) + blockNum, err := e.backend.BlockNumberFromComet(ctx, blockNrOrHash) if err != nil { return nil, err } - return e.backend.GetTransactionCount(address, blockNum) + return e.backend.GetTransactionCount(ctx, address, blockNum) } // GetTransactionReceipt returns the transaction receipt identified by hash. -func (e *PublicAPI) GetTransactionReceipt(hash common.Hash) (map[string]interface{}, error) { +func (e *PublicAPI) GetTransactionReceipt(hash common.Hash) (_ map[string]interface{}, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getTransactionReceipt") + defer func() { evmtrace.EndSpanErr(span, err) }() hexTx := hash.Hex() e.logger.Debug("eth_getTransactionReceipt", "hash", hexTx) - return e.backend.GetTransactionReceipt(hash) + return e.backend.GetTransactionReceipt(ctx, hash) } // GetBlockTransactionCountByHash returns the number of transactions in the block identified by hash. -func (e *PublicAPI) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint { +func (e *PublicAPI) GetBlockTransactionCountByHash(hash common.Hash) (_ *hexutil.Uint) { + ctx, span := tracer.Start(context.Background(), "eth_getBlockTransactionCountByHash") + defer span.End() e.logger.Debug("eth_getBlockTransactionCountByHash", "hash", hash.Hex()) - return e.backend.GetBlockTransactionCountByHash(hash) + return e.backend.GetBlockTransactionCountByHash(ctx, hash) } // GetBlockTransactionCountByNumber returns the number of transactions in the block identified by number. -func (e *PublicAPI) GetBlockTransactionCountByNumber(blockNum rpctypes.BlockNumber) *hexutil.Uint { +func (e *PublicAPI) GetBlockTransactionCountByNumber(blockNum rpctypes.BlockNumber) (_ *hexutil.Uint) { + ctx, span := tracer.Start(context.Background(), "eth_getBlockTransactionCountByNumber") + defer span.End() e.logger.Debug("eth_getBlockTransactionCountByNumber", "height", blockNum.Int64()) - return e.backend.GetBlockTransactionCountByNumber(blockNum) + return e.backend.GetBlockTransactionCountByNumber(ctx, blockNum) } // GetTransactionByBlockHashAndIndex returns the transaction identified by hash and index. -func (e *PublicAPI) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (*rpctypes.RPCTransaction, error) { +func (e *PublicAPI) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (_ *rpctypes.RPCTransaction, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getTransactionByBlockHashAndIndex") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getTransactionByBlockHashAndIndex", "hash", hash.Hex(), "index", idx) - return e.backend.GetTransactionByBlockHashAndIndex(hash, idx) + return e.backend.GetTransactionByBlockHashAndIndex(ctx, hash, idx) } // GetTransactionByBlockNumberAndIndex returns the transaction identified by number and index. -func (e *PublicAPI) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockNumber, idx hexutil.Uint) (*rpctypes.RPCTransaction, error) { +func (e *PublicAPI) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockNumber, idx hexutil.Uint) (_ *rpctypes.RPCTransaction, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getTransactionByBlockNumberAndIndex") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getTransactionByBlockNumberAndIndex", "number", blockNum, "index", idx) - return e.backend.GetTransactionByBlockNumberAndIndex(blockNum, idx) + return e.backend.GetTransactionByBlockNumberAndIndex(ctx, blockNum, idx) } /////////////////////////////////////////////////////////////////////////////// @@ -228,15 +257,19 @@ func (e *PublicAPI) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockN /////////////////////////////////////////////////////////////////////////////// // SendRawTransaction send a raw Ethereum transaction. -func (e *PublicAPI) SendRawTransaction(data hexutil.Bytes) (common.Hash, error) { +func (e *PublicAPI) SendRawTransaction(data hexutil.Bytes) (_ common.Hash, err error) { + ctx, span := tracer.Start(context.Background(), "eth_sendRawTransaction") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_sendRawTransaction", "length", len(data)) - return e.backend.SendRawTransaction(data) + return e.backend.SendRawTransaction(ctx, data) } // SendTransaction sends an Ethereum transaction. -func (e *PublicAPI) SendTransaction(args evmtypes.TransactionArgs) (common.Hash, error) { +func (e *PublicAPI) SendTransaction(args evmtypes.TransactionArgs) (_ common.Hash, err error) { + ctx, span := tracer.Start(context.Background(), "eth_sendTransaction") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_sendTransaction", "args", args) - return e.backend.SendTransaction(args) + return e.backend.SendTransaction(ctx, args) } /////////////////////////////////////////////////////////////////////////////// @@ -250,30 +283,38 @@ func (e *PublicAPI) Accounts() ([]common.Address, error) { } // GetBalance returns the provided account's balance up to the provided block number. -func (e *PublicAPI) GetBalance(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (*hexutil.Big, error) { +func (e *PublicAPI) GetBalance(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (_ *hexutil.Big, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getBalance") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getBalance", "address", address.String(), "block number or hash", blockNrOrHash) - return e.backend.GetBalance(address, blockNrOrHash) + return e.backend.GetBalance(ctx, address, blockNrOrHash) } // GetStorageAt returns the contract storage at the given address, block number, and key. -func (e *PublicAPI) GetStorageAt(address common.Address, key string, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error) { +func (e *PublicAPI) GetStorageAt(address common.Address, key string, blockNrOrHash rpctypes.BlockNumberOrHash) (_ hexutil.Bytes, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getStorageAt") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getStorageAt", "address", address.Hex(), "key", key, "block number or hash", blockNrOrHash) - return e.backend.GetStorageAt(address, key, blockNrOrHash) + return e.backend.GetStorageAt(ctx, address, key, blockNrOrHash) } // GetCode returns the contract code at the given address and block number. -func (e *PublicAPI) GetCode(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error) { +func (e *PublicAPI) GetCode(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (_ hexutil.Bytes, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getCode") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getCode", "address", address.Hex(), "block number or hash", blockNrOrHash) - return e.backend.GetCode(address, blockNrOrHash) + return e.backend.GetCode(ctx, address, blockNrOrHash) } // GetProof returns an account object with proof and any storage proofs func (e *PublicAPI) GetProof(address common.Address, storageKeys []string, blockNrOrHash rpctypes.BlockNumberOrHash, -) (*rpctypes.AccountResult, error) { +) (_ *rpctypes.AccountResult, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getProof") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getProof", "address", address.Hex(), "keys", storageKeys, "block number or hash", blockNrOrHash) - return e.backend.GetProof(address, storageKeys, blockNrOrHash) + return e.backend.GetProof(ctx, address, storageKeys, blockNrOrHash) } /////////////////////////////////////////////////////////////////////////////// @@ -285,14 +326,16 @@ func (e *PublicAPI) Call( args evmtypes.TransactionArgs, blockNrOrHash rpctypes.BlockNumberOrHash, overrides *json.RawMessage, -) (hexutil.Bytes, error) { +) (_ hexutil.Bytes, err error) { + ctx, span := tracer.Start(context.Background(), "eth_call") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_call", "args", args, "block number or hash", blockNrOrHash) - blockNum, err := e.backend.BlockNumberFromComet(blockNrOrHash) + blockNum, err := e.backend.BlockNumberFromComet(ctx, blockNrOrHash) if err != nil { return nil, err } - data, err := e.backend.DoCall(args, blockNum, overrides) + data, err := e.backend.DoCall(ctx, args, blockNum, overrides) if err != nil { return []byte{}, err } @@ -316,34 +359,42 @@ func (e *PublicAPI) ProtocolVersion() hexutil.Uint { } // GasPrice returns the current gas price based on Cosmos EVM's gas price oracle. -func (e *PublicAPI) GasPrice() (*hexutil.Big, error) { +func (e *PublicAPI) GasPrice() (_ *hexutil.Big, err error) { + ctx, span := tracer.Start(context.Background(), "eth_gasPrice") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_gasPrice") - return e.backend.GasPrice() + return e.backend.GasPrice(ctx) } // EstimateGas returns an estimate of gas usage for the given smart contract call. -func (e *PublicAPI) EstimateGas(args evmtypes.TransactionArgs, blockNrOrHash *rpctypes.BlockNumberOrHash, overrides *json.RawMessage) (hexutil.Uint64, error) { +func (e *PublicAPI) EstimateGas(args evmtypes.TransactionArgs, blockNrOrHash *rpctypes.BlockNumberOrHash, overrides *json.RawMessage) (_ hexutil.Uint64, err error) { + ctx, span := tracer.Start(context.Background(), "eth_estimateGas") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_estimateGas") - return e.backend.EstimateGas(args, blockNrOrHash, overrides) + return e.backend.EstimateGas(ctx, args, blockNrOrHash, overrides) } func (e *PublicAPI) FeeHistory( blockCount math.HexOrDecimal64, lastBlock rpc.BlockNumber, rewardPercentiles []float64, -) (*rpctypes.FeeHistoryResult, error) { +) (_ *rpctypes.FeeHistoryResult, err error) { + ctx, span := tracer.Start(context.Background(), "eth_feeHistory") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_feeHistory") - return e.backend.FeeHistory(blockCount, lastBlock, rewardPercentiles) + return e.backend.FeeHistory(ctx, blockCount, lastBlock, rewardPercentiles) } // MaxPriorityFeePerGas returns a suggestion for a gas tip cap for dynamic fee transactions. -func (e *PublicAPI) MaxPriorityFeePerGas() (*hexutil.Big, error) { +func (e *PublicAPI) MaxPriorityFeePerGas() (_ *hexutil.Big, err error) { + ctx, span := tracer.Start(context.Background(), "eth_maxPriorityFeePerGas") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_maxPriorityFeePerGas") - head, err := e.backend.CurrentHeader() + head, err := e.backend.CurrentHeader(ctx) if err != nil { return nil, err } - tipcap, err := e.backend.SuggestGasTipCap(head.BaseFee) + tipcap, err := e.backend.SuggestGasTipCap(ctx, head.BaseFee) if err != nil { return nil, err } @@ -351,9 +402,11 @@ func (e *PublicAPI) MaxPriorityFeePerGas() (*hexutil.Big, error) { } // ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config. -func (e *PublicAPI) ChainId() (*hexutil.Big, error) { //nolint +func (e *PublicAPI) ChainId() (_ *hexutil.Big, err error) { //nolint + ctx, span := tracer.Start(context.Background(), "eth_chainId") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_chainId") - return e.backend.ChainID() + return e.backend.ChainID(ctx) } /////////////////////////////////////////////////////////////////////////////// @@ -391,9 +444,11 @@ func (e *PublicAPI) GetUncleCountByBlockNumber(_ rpctypes.BlockNumber) hexutil.U // - highestBlock: block number of the highest block header this node has received from peers // - pulledStates: number of state entries processed until now // - knownStates: number of known state entries that still need to be pulled -func (e *PublicAPI) Syncing() (interface{}, error) { +func (e *PublicAPI) Syncing() (_ interface{}, err error) { + ctx, span := tracer.Start(context.Background(), "eth_syncing") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_syncing") - return e.backend.Syncing() + return e.backend.Syncing(ctx) } // Sign signs the provided data using the private key of address via Geth's signature standard. @@ -403,10 +458,12 @@ func (e *PublicAPI) Sign(address common.Address, data hexutil.Bytes) (hexutil.By } // GetTransactionLogs returns the logs given a transaction hash. -func (e *PublicAPI) GetTransactionLogs(txHash common.Hash) ([]*ethtypes.Log, error) { +func (e *PublicAPI) GetTransactionLogs(txHash common.Hash) (_ []*ethtypes.Log, err error) { + ctx, span := tracer.Start(context.Background(), "eth_getTransactionLogs") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_getTransactionLogs", "hash", txHash) - return e.backend.GetTransactionLogs(txHash) + return e.backend.GetTransactionLogs(ctx, txHash) } // SignTypedData signs EIP-712 conformant typed data @@ -418,9 +475,11 @@ func (e *PublicAPI) SignTypedData(address common.Address, typedData apitypes.Typ // FillTransaction fills the defaults (nonce, gas, gasPrice or 1559 fields) // on a given unsigned transaction, and returns it to the caller for further // processing (signing + broadcast). -func (e *PublicAPI) FillTransaction(args evmtypes.TransactionArgs) (*rpctypes.SignTransactionResult, error) { +func (e *PublicAPI) FillTransaction(args evmtypes.TransactionArgs) (_ *rpctypes.SignTransactionResult, err error) { + ctx, span := tracer.Start(context.Background(), "eth_fillTransaction") + defer func() { evmtrace.EndSpanErr(span, err) }() // Set some sanity defaults and terminate on failure - args, err := e.backend.SetTxDefaults(args) + args, err = e.backend.SetTxDefaults(ctx, args) if err != nil { return nil, err } @@ -428,7 +487,8 @@ func (e *PublicAPI) FillTransaction(args evmtypes.TransactionArgs) (*rpctypes.Si // Assemble the transaction and obtain rlp tx := args.ToTransaction(ethtypes.LegacyTxType) - data, err := tx.MarshalBinary() + var data []byte + data, err = tx.MarshalBinary() if err != nil { return nil, err } @@ -441,13 +501,15 @@ func (e *PublicAPI) FillTransaction(args evmtypes.TransactionArgs) (*rpctypes.Si // Resend accepts an existing transaction and a new gas price and limit. It will remove // the given transaction from the pool and reinsert it with the new gas price and limit. -func (e *PublicAPI) Resend(_ context.Context, +func (e *PublicAPI) Resend(ctx context.Context, args evmtypes.TransactionArgs, gasPrice *hexutil.Big, gasLimit *hexutil.Uint64, -) (common.Hash, error) { +) (_ common.Hash, err error) { + ctx, span := tracer.Start(ctx, "eth_resend") + defer func() { evmtrace.EndSpanErr(span, err) }() e.logger.Debug("eth_resend", "args", args) - return e.backend.Resend(args, gasPrice, gasLimit) + return e.backend.Resend(ctx, args, gasPrice, gasLimit) } // CreateAccessList returns the list of addresses and storage keys used by the transaction (except for the @@ -456,8 +518,10 @@ func (e *PublicAPI) CreateAccessList( args evmtypes.TransactionArgs, blockNrOrHash rpctypes.BlockNumberOrHash, overrides *json.RawMessage, -) (*rpctypes.AccessListResult, error) { - res, err := e.backend.CreateAccessList(args, blockNrOrHash, overrides) +) (_ *rpctypes.AccessListResult, err error) { + ctx, span := tracer.Start(context.Background(), "eth_createAccessList") + defer func() { evmtrace.EndSpanErr(span, err) }() + res, err := e.backend.CreateAccessList(ctx, args, blockNrOrHash, overrides) if err != nil { return nil, err } diff --git a/rpc/namespaces/ethereum/eth/filters/api.go b/rpc/namespaces/ethereum/eth/filters/api.go index 987992e45..b5f3a6be9 100644 --- a/rpc/namespaces/ethereum/eth/filters/api.go +++ b/rpc/namespaces/ethereum/eth/filters/api.go @@ -11,11 +11,13 @@ import ( "github.com/ethereum/go-ethereum/eth/filters" "github.com/ethereum/go-ethereum/rpc" "github.com/pkg/errors" + "go.opentelemetry.io/otel" coretypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cosmos/evm/rpc/stream" "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" "cosmossdk.io/log" @@ -25,6 +27,8 @@ import ( var ( errInvalidBlockRange = errors.New("invalid block range params") errPendingLogsUnsupported = errors.New("pending logs are not supported") + + tracer = otel.Tracer("evm/rpc/namespaces/ethereum/eth/filters") ) // FilterAPI gathers @@ -40,14 +44,14 @@ type FilterAPI interface { // Backend defines the methods requided by the PublicFilterAPI backend type Backend interface { - GetBlockByNumber(blockNum types.BlockNumber, fullTx bool) (map[string]interface{}, error) - HeaderByNumber(blockNum types.BlockNumber) (*ethtypes.Header, error) - HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error) - CometBlockByHash(hash common.Hash) (*coretypes.ResultBlock, error) - CometBlockResultByNumber(height *int64) (*coretypes.ResultBlockResults, error) - GetLogs(blockHash common.Hash) ([][]*ethtypes.Log, error) - GetLogsByHeight(*int64) ([][]*ethtypes.Log, error) - BlockBloomFromCometBlock(blockRes *coretypes.ResultBlockResults) (ethtypes.Bloom, error) + GetBlockByNumber(ctx context.Context, blockNum types.BlockNumber, fullTx bool) (map[string]interface{}, error) + HeaderByNumber(ctx context.Context, blockNum types.BlockNumber) (*ethtypes.Header, error) + HeaderByHash(ctx context.Context, blockHash common.Hash) (*ethtypes.Header, error) + CometBlockByHash(ctx context.Context, hash common.Hash) (*coretypes.ResultBlock, error) + CometBlockResultByNumber(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) + GetLogs(ctx context.Context, blockHash common.Hash) ([][]*ethtypes.Log, error) + GetLogsByHeight(ctx context.Context, height *int64) ([][]*ethtypes.Log, error) + BlockBloomFromCometBlock(ctx context.Context, blockRes *coretypes.ResultBlockResults) (ethtypes.Bloom, error) BloomStatus() (uint64, uint64) @@ -221,7 +225,9 @@ func (api *PublicFilterAPI) NewFilter(criteria filters.FilterCriteria) (rpc.ID, // GetLogs returns logs matching the given argument that are stored within the state. // // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs -func (api *PublicFilterAPI) GetLogs(ctx context.Context, crit filters.FilterCriteria) ([]*ethtypes.Log, error) { +func (api *PublicFilterAPI) GetLogs(ctx context.Context, crit filters.FilterCriteria) (_ []*ethtypes.Log, err error) { + ctx, span := tracer.Start(ctx, "GetLogs") + defer func() { evmtrace.EndSpanErr(span, err) }() var filter *Filter if crit.BlockHash != nil { // Block filter requested, construct a single-shot filter @@ -272,7 +278,9 @@ func (api *PublicFilterAPI) UninstallFilter(id rpc.ID) bool { // If the filter could not be found an empty array of logs is returned. // // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterlogs -func (api *PublicFilterAPI) GetFilterLogs(ctx context.Context, id rpc.ID) ([]*ethtypes.Log, error) { +func (api *PublicFilterAPI) GetFilterLogs(ctx context.Context, id rpc.ID) (_ []*ethtypes.Log, err error) { + ctx, span := tracer.Start(ctx, "GetFilterLogs") + defer func() { evmtrace.EndSpanErr(span, err) }() api.filtersMu.Lock() f, found := api.filters[id] api.filtersMu.Unlock() diff --git a/rpc/namespaces/ethereum/eth/filters/filters.go b/rpc/namespaces/ethereum/eth/filters/filters.go index 05066f082..d1ecf7aa9 100644 --- a/rpc/namespaces/ethereum/eth/filters/filters.go +++ b/rpc/namespaces/ethereum/eth/filters/filters.go @@ -17,6 +17,7 @@ import ( "github.com/cosmos/evm/rpc/backend" "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" "cosmossdk.io/log" ) @@ -90,25 +91,27 @@ func newFilter(logger log.Logger, backend Backend, criteria filters.FilterCriter // Logs searches the blockchain for matching log entries, returning all from the // first block that contains matches, updating the start of the filter accordingly. -func (f *Filter) Logs(_ context.Context, logLimit int, blockLimit int64) (logs []*ethtypes.Log, err error) { +func (f *Filter) Logs(ctx context.Context, logLimit int, blockLimit int64) (logs []*ethtypes.Log, err error) { + ctx, span := tracer.Start(ctx, "Filter.Logs") + defer func() { evmtrace.EndSpanErr(span, err) }() if blockLimit == 0 { return nil, nil } // If we're doing singleton block filtering, execute and return if f.criteria.BlockHash != nil && *f.criteria.BlockHash != (common.Hash{}) { - resBlock, err := f.backend.CometBlockByHash(*f.criteria.BlockHash) + resBlock, err := f.backend.CometBlockByHash(ctx, *f.criteria.BlockHash) if err != nil { return nil, fmt.Errorf("failed to fetch header by hash %s: %w", f.criteria.BlockHash, err) } - blockRes, err := f.backend.CometBlockResultByNumber(&resBlock.Block.Height) + blockRes, err := f.backend.CometBlockResultByNumber(ctx, &resBlock.Block.Height) if err != nil { f.logger.Debug("failed to fetch block result from CometBFT", "height", resBlock.Block.Height, "error", err.Error()) return nil, err } - bloom, err := f.backend.BlockBloomFromCometBlock(blockRes) + bloom, err := f.backend.BlockBloomFromCometBlock(ctx, blockRes) if err != nil { return nil, err } @@ -122,7 +125,7 @@ func (f *Filter) Logs(_ context.Context, logLimit int, blockLimit int64) (logs [ } // Figure out the limits of the filter range - header, err := f.backend.HeaderByNumber(types.EthLatestBlockNumber) + header, err := f.backend.HeaderByNumber(ctx, types.EthLatestBlockNumber) if err != nil { return nil, fmt.Errorf("failed to fetch header by number (latest): %w", err) } @@ -171,13 +174,13 @@ func (f *Filter) Logs(_ context.Context, logLimit int, blockLimit int64) (logs [ for height := from; height <= to; height++ { h := int64(height) //#nosec G115 - blockRes, err := f.backend.CometBlockResultByNumber(&h) + blockRes, err := f.backend.CometBlockResultByNumber(ctx, &h) if err != nil { f.logger.Debug("failed to fetch block result from CometBFT", "height", height, "error", err.Error()) return nil, fmt.Errorf("failed to fetch block result from CometBFT: %w", err) } - bloom, err := f.backend.BlockBloomFromCometBlock(blockRes) + bloom, err := f.backend.BlockBloomFromCometBlock(ctx, blockRes) if err != nil { return nil, fmt.Errorf("failed to query block bloom filter from block results: %w", err) } diff --git a/rpc/namespaces/ethereum/miner/api.go b/rpc/namespaces/ethereum/miner/api.go index b8e60d3d9..09bde9918 100644 --- a/rpc/namespaces/ethereum/miner/api.go +++ b/rpc/namespaces/ethereum/miner/api.go @@ -1,8 +1,11 @@ package miner import ( + "context" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "go.opentelemetry.io/otel" "github.com/cosmos/evm/rpc/backend" @@ -11,6 +14,10 @@ import ( "github.com/cosmos/cosmos-sdk/server" ) +var ( + tracer = otel.Tracer("evm/rpc/namespaces/ethereum/miner") +) + // API is the private miner prefixed set of APIs in the Miner JSON-RPC spec. type API struct { ctx *server.Context @@ -33,11 +40,15 @@ func NewPrivateAPI( // SetEtherbase sets the etherbase of the miner func (api *API) SetEtherbase(etherbase common.Address) bool { api.logger.Debug("miner_setEtherbase") - return api.backend.SetEtherbase(etherbase) + ctx, span := tracer.Start(context.Background(), "miner_setEtherbase") + defer span.End() + return api.backend.SetEtherbase(ctx, etherbase) } // SetGasPrice sets the minimum accepted gas price for the miner. func (api *API) SetGasPrice(gasPrice hexutil.Big) bool { api.logger.Info(api.ctx.Viper.ConfigFileUsed()) - return api.backend.SetGasPrice(gasPrice) + ctx, span := tracer.Start(context.Background(), "miner_setGasPrice") + defer span.End() + return api.backend.SetGasPrice(ctx, gasPrice) } diff --git a/rpc/namespaces/ethereum/net/api.go b/rpc/namespaces/ethereum/net/api.go index d1c8f39ff..4b0446f84 100644 --- a/rpc/namespaces/ethereum/net/api.go +++ b/rpc/namespaces/ethereum/net/api.go @@ -5,6 +5,7 @@ import ( "fmt" rpcclient "github.com/cometbft/cometbft/rpc/client" + "go.opentelemetry.io/otel" "github.com/cosmos/evm/server/config" @@ -12,6 +13,10 @@ import ( "github.com/cosmos/cosmos-sdk/server" ) +var ( + tracer = otel.Tracer("evm/rpc/namespaces/ethereum/net") +) + // PublicAPI is the eth_ prefixed set of APIs in the Web3 JSON-RPC spec. type PublicAPI struct { networkVersion uint64 @@ -37,7 +42,8 @@ func (s *PublicAPI) Version() string { // Listening returns if client is actively listening for network connections. func (s *PublicAPI) Listening() bool { - ctx := context.Background() + ctx, span := tracer.Start(context.Background(), "Listening") + defer span.End() netInfo, err := s.tmClient.NetInfo(ctx) if err != nil { return false @@ -47,7 +53,8 @@ func (s *PublicAPI) Listening() bool { // PeerCount returns the number of peers currently connected to the client. func (s *PublicAPI) PeerCount() int { - ctx := context.Background() + ctx, span := tracer.Start(context.Background(), "PeerCount") + defer span.End() netInfo, err := s.tmClient.NetInfo(ctx) if err != nil { return 0 diff --git a/rpc/namespaces/ethereum/personal/api.go b/rpc/namespaces/ethereum/personal/api.go index 51a5b73c6..af8fb28f1 100644 --- a/rpc/namespaces/ethereum/personal/api.go +++ b/rpc/namespaces/ethereum/personal/api.go @@ -10,9 +10,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" + "go.opentelemetry.io/otel" "github.com/cosmos/evm/crypto/hd" "github.com/cosmos/evm/rpc/backend" + evmtrace "github.com/cosmos/evm/trace" evmtypes "github.com/cosmos/evm/x/vm/types" "cosmossdk.io/log" @@ -21,6 +23,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) +var ( + tracer = otel.Tracer("evm/rpc/namespaces/ethereum/personal") +) + // PrivateAccountAPI is the personal_ prefixed set of APIs in the Web3 JSON-RPC spec. type PrivateAccountAPI struct { backend backend.EVMBackend @@ -110,9 +116,11 @@ func (api *PrivateAccountAPI) UnlockAccount(_ context.Context, addr common.Addre // SendTransaction will create a transaction from the given arguments and // tries to sign it with the key associated with args.To. If the given password isn't // able to decrypt the key it fails. -func (api *PrivateAccountAPI) SendTransaction(_ context.Context, args evmtypes.TransactionArgs, _ string) (common.Hash, error) { +func (api *PrivateAccountAPI) SendTransaction(ctx context.Context, args evmtypes.TransactionArgs, _ string) (_ common.Hash, err error) { api.logger.Debug("personal_sendTransaction", "address", args.To.String()) - return api.backend.SendTransaction(args) + ctx, span := tracer.Start(ctx, "SendTransaction") + defer func() { evmtrace.EndSpanErr(span, err) }() + return api.backend.SendTransaction(ctx, args) } // Sign calculates an Ethereum ECDSA signature for: @@ -124,7 +132,7 @@ func (api *PrivateAccountAPI) SendTransaction(_ context.Context, args evmtypes.T // The key used to calculate the signature is decrypted with the given password. // // https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_sign -func (api *PrivateAccountAPI) Sign(_ context.Context, data hexutil.Bytes, addr common.Address, _ string) (hexutil.Bytes, error) { +func (api *PrivateAccountAPI) Sign(ctx context.Context, data hexutil.Bytes, addr common.Address, _ string) (hexutil.Bytes, error) { api.logger.Debug("personal_sign", "data", data, "address", addr.String()) return api.backend.Sign(addr, data) } @@ -139,8 +147,10 @@ func (api *PrivateAccountAPI) Sign(_ context.Context, data hexutil.Bytes, addr c // the V value must be 27 or 28 for legacy reasons. // // https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_ecRecove -func (api *PrivateAccountAPI) EcRecover(_ context.Context, data, sig hexutil.Bytes) (common.Address, error) { +func (api *PrivateAccountAPI) EcRecover(ctx context.Context, data, sig hexutil.Bytes) (_ common.Address, err error) { api.logger.Debug("personal_ecRecover", "data", data, "sig", sig) + _, span := tracer.Start(ctx, "EcRecover") + defer func() { evmtrace.EndSpanErr(span, err) }() if len(sig) != crypto.SignatureLength { return common.Address{}, fmt.Errorf("signature must be %d bytes long", crypto.SignatureLength) diff --git a/rpc/namespaces/ethereum/txpool/api.go b/rpc/namespaces/ethereum/txpool/api.go index ec041865a..8cdfda2cc 100644 --- a/rpc/namespaces/ethereum/txpool/api.go +++ b/rpc/namespaces/ethereum/txpool/api.go @@ -1,15 +1,23 @@ package txpool import ( + "context" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" "github.com/cosmos/evm/rpc/backend" "github.com/cosmos/evm/rpc/types" + evmtrace "github.com/cosmos/evm/trace" "cosmossdk.io/log" ) +var tracer = otel.Tracer("evm/rpc/namespaces/ethereum/txpool") + // PublicAPI offers and API for the transaction pool. It only operates on data that is non-confidential. // NOTE: For more info about the current status of this endpoints see https://github.com/evmos/ethermint/issues/124 type PublicAPI struct { @@ -26,25 +34,33 @@ func NewPublicAPI(logger log.Logger, backend backend.EVMBackend) *PublicAPI { } // Content returns the transactions contained within the transaction pool -func (api *PublicAPI) Content() (map[string]map[string]map[string]*types.RPCTransaction, error) { +func (api *PublicAPI) Content() (_ map[string]map[string]map[string]*types.RPCTransaction, err error) { api.logger.Debug("txpool_content") - return api.backend.Content() + ctx, span := tracer.Start(context.Background(), "Content") + defer func() { evmtrace.EndSpanErr(span, err) }() + return api.backend.Content(ctx) } // ContentFrom returns the transactions contained within the transaction pool -func (api *PublicAPI) ContentFrom(address common.Address) (map[string]map[string]*types.RPCTransaction, error) { +func (api *PublicAPI) ContentFrom(address common.Address) (_ map[string]map[string]*types.RPCTransaction, err error) { api.logger.Debug("txpool_contentFrom") - return api.backend.ContentFrom(address) + ctx, span := tracer.Start(context.Background(), "ContentFrom", trace.WithAttributes(attribute.String("address", address.Hex()))) + defer func() { evmtrace.EndSpanErr(span, err) }() + return api.backend.ContentFrom(ctx, address) } // Inspect returns the content of the transaction pool and flattens it into an easily inspectable list -func (api *PublicAPI) Inspect() (map[string]map[string]map[string]string, error) { +func (api *PublicAPI) Inspect() (_ map[string]map[string]map[string]string, err error) { api.logger.Debug("txpool_inspect") - return api.backend.Inspect() + ctx, span := tracer.Start(context.Background(), "Inspect") + defer func() { evmtrace.EndSpanErr(span, err) }() + return api.backend.Inspect(ctx) } // Status returns the number of pending and queued transaction in the pool -func (api *PublicAPI) Status() (map[string]hexutil.Uint, error) { +func (api *PublicAPI) Status() (_ map[string]hexutil.Uint, err error) { api.logger.Debug("txpool_status") - return api.backend.Status() + ctx, span := tracer.Start(context.Background(), "Status") + defer func() { evmtrace.EndSpanErr(span, err) }() + return api.backend.Status(ctx) } diff --git a/rpc/types/block.go b/rpc/types/block.go index 3f34bf393..b57e80a9f 100644 --- a/rpc/types/block.go +++ b/rpc/types/block.go @@ -48,15 +48,23 @@ func NewBlockNumber(n *big.Int) BlockNumber { return BlockNumber(n.Int64()) } -// ContextWithHeight wraps a context with the a gRPC block height header. If the provided height is -// 0, it will return an empty context and the gRPC query will use the latest block height for querying. -// Note that all metadata is processed and removed by the CometBFT layer, so it won't be accessible at gRPC server level. -func ContextWithHeight(height int64) context.Context { +// ContextWithHeight wraps a context with the GRPCBlockHeightHeader set. +// If height == 0, the original context is returned unmodified. +func ContextWithHeight(ctx context.Context, height int64) context.Context { if height == 0 { - return context.Background() + return ctx } + return metadata.AppendToOutgoingContext(ctx, grpctypes.GRPCBlockHeightHeader, fmt.Sprintf("%d", height)) +} - return metadata.AppendToOutgoingContext(context.Background(), grpctypes.GRPCBlockHeightHeader, fmt.Sprintf("%d", height)) +// NewContextWithHeight wraps a new background context with the gRPC block height header. If the provided height is +// 0, it will return an empty context and the gRPC query will use the latest block height for querying. +func NewContextWithHeight(height int64) context.Context { + ctx := context.Background() + if height == 0 { + return ctx + } + return metadata.AppendToOutgoingContext(ctx, grpctypes.GRPCBlockHeightHeader, fmt.Sprintf("%d", height)) } // UnmarshalJSON parses the given JSON fragment into a BlockNumber. It supports: diff --git a/rpc/types/utils.go b/rpc/types/utils.go index d2554f7be..2ff8e2538 100644 --- a/rpc/types/utils.go +++ b/rpc/types/utils.go @@ -6,12 +6,14 @@ import ( "math/big" "strings" + evmtrace "github.com/cosmos/evm/trace" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/consensus/misc/eip1559" ethtypes "github.com/ethereum/go-ethereum/core/types" ethparams "github.com/ethereum/go-ethereum/params" "github.com/pkg/errors" + "go.opentelemetry.io/otel" abci "github.com/cometbft/cometbft/abci/types" cmtrpcclient "github.com/cometbft/cometbft/rpc/client" @@ -97,8 +99,13 @@ func EthHeaderFromComet(header cmttypes.Header, bloom ethtypes.Bloom, baseFee *b } } +var tracer = otel.Tracer("evm/rpc/types") + // BlockMaxGasFromConsensusParams returns the gas limit for the current block from the chain consensus params. -func BlockMaxGasFromConsensusParams(goCtx context.Context, clientCtx client.Context, blockHeight int64) (int64, error) { +func BlockMaxGasFromConsensusParams(goCtx context.Context, clientCtx client.Context, blockHeight int64) (_ int64, err error) { + goCtx, span := tracer.Start(goCtx, "BlockMaxGasFromConsensusParams") + defer func() { evmtrace.EndSpanErr(span, err) }() + cmtrpcclient, ok := clientCtx.Client.(cmtrpcclient.Client) if !ok { panic("incorrect tm rpc client") diff --git a/server/start.go b/server/start.go index d48690b53..902e47b75 100644 --- a/server/start.go +++ b/server/start.go @@ -11,6 +11,7 @@ import ( ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp" "github.com/spf13/cobra" + "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" "golang.org/x/sync/errgroup" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -667,6 +668,7 @@ func startGrpcServer( grpc.MaxCallRecvMsgSize(maxRecvMsgSize), grpc.MaxCallSendMsgSize(maxSendMsgSize), ), + grpc.WithStatsHandler(otelgrpc.NewClientHandler()), ) if err != nil { return nil, clientCtx, err diff --git a/tests/integration/rpc/backend/test_account_info.go b/tests/integration/rpc/backend/test_account_info.go index 8afaf045b..0a4868e32 100644 --- a/tests/integration/rpc/backend/test_account_info.go +++ b/tests/integration/rpc/backend/test_account_info.go @@ -67,7 +67,7 @@ func (s *TestSuite) TestGetCode() { s.SetupTest() // reset tc.registerMock(tc.addr) - code, err := s.backend.GetCode(tc.addr, tc.blockNrOrHash) + code, err := s.backend.GetCode(s.Ctx(), tc.addr, tc.blockNrOrHash) if tc.expPass { s.Require().NoError(err) s.Require().Equal(tc.expCode, code) @@ -128,7 +128,7 @@ func (s *TestSuite) TestGetProof() { rpctypes.BlockNumberOrHash{BlockNumber: &blockNr}, func(bn rpctypes.BlockNumber, addr common.Address) { height := bn.Int64() - s.backend.Ctx = rpctypes.ContextWithHeight(height) + // Context is now passed to methods directly, not stored in backend client := s.backend.ClientCtx.Client.(*mocks.Client) RegisterHeader(client, &height, nil) QueryClient := s.backend.QueryClient.QueryClient.(*mocks.EVMQueryClient) @@ -175,7 +175,7 @@ func (s *TestSuite) TestGetProof() { rpctypes.BlockNumberOrHash{BlockNumber: &blockNrZero}, func(bn rpctypes.BlockNumber, addr common.Address) { height := int64(4) - s.backend.Ctx = rpctypes.ContextWithHeight(height) + // Context is now passed to methods directly, not stored in backend client := s.backend.ClientCtx.Client.(*mocks.Client) RegisterHeader(client, &height, nil) queryClient := s.backend.QueryClient.QueryClient.(*mocks.EVMQueryClient) @@ -223,7 +223,7 @@ func (s *TestSuite) TestGetProof() { s.SetupTest() tc.registerMock(*tc.blockNrOrHash.BlockNumber, tc.addr) - accRes, err := s.backend.GetProof(tc.addr, tc.storageKeys, tc.blockNrOrHash) + accRes, err := s.backend.GetProof(s.Ctx(), tc.addr, tc.storageKeys, tc.blockNrOrHash) if tc.expPass { s.Require().NoError(err) @@ -286,7 +286,7 @@ func (s *TestSuite) TestGetStorageAt() { s.SetupTest() tc.registerMock(tc.addr, tc.key, tc.expStorage.String()) - storage, err := s.backend.GetStorageAt(tc.addr, tc.key, tc.blockNrOrHash) + storage, err := s.backend.GetStorageAt(s.Ctx(), tc.addr, tc.key, tc.blockNrOrHash) if tc.expPass { s.Require().NoError(err) s.Require().Equal(tc.expStorage, storage) @@ -395,7 +395,7 @@ func (s *TestSuite) TestGetBalance() { tc.registerMock(*tc.blockNrOrHash.BlockNumber, tc.addr) } - balance, err := s.backend.GetBalance(tc.addr, tc.blockNrOrHash) + balance, err := s.backend.GetBalance(s.Ctx(), tc.addr, tc.blockNrOrHash) if tc.expPass { s.Require().NoError(err) s.Require().Equal(tc.expBalance, balance) @@ -472,7 +472,7 @@ func (s *TestSuite) TestGetTransactionCount() { tc.registerMock(addr, tc.blockNum) - txCount, err := s.backend.GetTransactionCount(addr, tc.blockNum) + txCount, err := s.backend.GetTransactionCount(s.Ctx(), addr, tc.blockNum) if tc.expPass { s.Require().NoError(err) s.Require().Equal(tc.expTxCount, *txCount) diff --git a/tests/integration/rpc/backend/test_backend_suite.go b/tests/integration/rpc/backend/test_backend_suite.go index c056d6d6a..c204faa8c 100644 --- a/tests/integration/rpc/backend/test_backend_suite.go +++ b/tests/integration/rpc/backend/test_backend_suite.go @@ -2,6 +2,7 @@ package backend import ( "bufio" + "context" "math/big" "os" "path/filepath" @@ -102,12 +103,16 @@ func (s *TestSuite) SetupTest() { s.backend.Cfg.EVM.EVMChainID = ChainID.EVMChainID s.backend.QueryClient.QueryClient = mocks.NewEVMQueryClient(s.T()) s.backend.QueryClient.FeeMarket = mocks.NewFeeMarketQueryClient(s.T()) - s.backend.Ctx = rpctypes.ContextWithHeight(1) // Add codec s.backend.ClientCtx.Codec = encodingConfig.Codec } +// Ctx returns a context with height set for testing +func (s *TestSuite) Ctx() context.Context { + return rpctypes.NewContextWithHeight(1) +} + // buildEthereumTx returns an example legacy Ethereum transaction func (s *TestSuite) buildEthereumTx() (*evmtypes.MsgEthereumTx, []byte) { ethTxParams := evmtypes.EvmTxArgs{ @@ -193,7 +198,7 @@ func (s *TestSuite) buildEthBlock( // 1) Gas limit from consensus params // if failed to query consensus params, default gasLimit is applied. - gasLimit, _ := rpctypes.BlockMaxGasFromConsensusParams(rpctypes.ContextWithHeight(cmtHeader.Height), s.backend.ClientCtx, cmtHeader.Height) + gasLimit, _ := rpctypes.BlockMaxGasFromConsensusParams(rpctypes.NewContextWithHeight(cmtHeader.Height), s.backend.ClientCtx, cmtHeader.Height) // 2) Miner from provided validator miner := common.BytesToAddress(validator.Bytes()) @@ -208,7 +213,7 @@ func (s *TestSuite) buildEthBlock( } // 5) Build receipts - receipts, err := s.backend.ReceiptsFromCometBlock(resBlock, blockRes, msgs) + receipts, err := s.backend.ReceiptsFromCometBlock(s.Ctx(), resBlock, blockRes, msgs) s.Require().NoError(err) // 6) Gas used diff --git a/tests/integration/rpc/backend/test_blocks.go b/tests/integration/rpc/backend/test_blocks.go index e8fb30c5e..6cbbddfd9 100644 --- a/tests/integration/rpc/backend/test_blocks.go +++ b/tests/integration/rpc/backend/test_blocks.go @@ -72,7 +72,7 @@ func (s *TestSuite) TestBlockNumber() { s.SetupTest() // reset test and queries tc.registerMock() - blockNumber, err := s.backend.BlockNumber() + blockNumber, err := s.backend.BlockNumber(s.Ctx()) if tc.expPass { s.Require().NoError(err) @@ -217,7 +217,7 @@ func (s *TestSuite) TestGetBlockByNumber() { s.SetupTest() // reset test and queries tc.registerMock(tc.blockNumber, math.NewIntFromBigInt(tc.baseFee), tc.validator, tc.txBz) - block, err := s.backend.GetBlockByNumber(tc.blockNumber, tc.fullTx) + block, err := s.backend.GetBlockByNumber(s.Ctx(), tc.blockNumber, tc.fullTx) if tc.expPass { s.Require().NoError(err) @@ -381,7 +381,7 @@ func (s *TestSuite) TestGetBlockByHash() { s.SetupTest() // reset test and queries tc.registerMock(tc.hash, math.NewIntFromBigInt(tc.baseFee), tc.validator, tc.txBz) - block, err := s.backend.GetBlockByHash(tc.hash, tc.fullTx) + block, err := s.backend.GetBlockByHash(s.Ctx(), tc.hash, tc.fullTx) if tc.expPass { if tc.expNoop { @@ -471,7 +471,7 @@ func (s *TestSuite) TestGetBlockTransactionCountByHash() { s.SetupTest() // reset test and queries tc.registerMock(tc.hash) - count := s.backend.GetBlockTransactionCountByHash(tc.hash) + count := s.backend.GetBlockTransactionCountByHash(s.Ctx(), tc.hash) if tc.expPass { s.Require().Equal(tc.expCount, *count) } else { @@ -547,7 +547,7 @@ func (s *TestSuite) TestGetBlockTransactionCountByNumber() { s.SetupTest() // reset test and queries tc.registerMock(tc.blockNum) - count := s.backend.GetBlockTransactionCountByNumber(tc.blockNum) + count := s.backend.GetBlockTransactionCountByNumber(s.Ctx(), tc.blockNum) if tc.expPass { s.Require().Equal(tc.expCount, *count) } else { @@ -645,7 +645,7 @@ func (s *TestSuite) TestCometBlockByNumber() { s.SetupTest() // reset test and queries tc.registerMock(tc.blockNumber) - resultBlock, err := s.backend.CometBlockByNumber(tc.blockNumber) + resultBlock, err := s.backend.CometBlockByNumber(s.Ctx(), tc.blockNumber) if tc.expPass { s.Require().NoError(err) @@ -701,7 +701,7 @@ func (s *TestSuite) TestCometBlockResultByNumber() { tc.registerMock(tc.blockNumber) client := s.backend.ClientCtx.Client.(*mocks.Client) - blockRes, err := client.BlockResults(s.backend.Ctx, &tc.blockNumber) //#nosec G601 -- fine for tests + blockRes, err := client.BlockResults(s.Ctx(), &tc.blockNumber) //#nosec G601 -- fine for tests if tc.expPass { s.Require().NoError(err) @@ -773,7 +773,7 @@ func (s *TestSuite) TestBlockNumberFromComet() { } tc.registerMock(tc.hash) - blockNum, err := s.backend.BlockNumberFromComet(blockNrOrHash) + blockNum, err := s.backend.BlockNumberFromComet(s.Ctx(), blockNrOrHash) if tc.expPass { s.Require().NoError(err) @@ -836,7 +836,7 @@ func (s *TestSuite) TestBlockNumberFromCometByHash() { s.SetupTest() // reset test and queries tc.registerMock(tc.hash) - blockNum, err := s.backend.BlockNumberFromCometByHash(tc.hash) + blockNum, err := s.backend.BlockNumberFromCometByHash(s.Ctx(), tc.hash) if tc.expPass { expHeight := big.NewInt(resHeader.Header.Height) s.Require().NoError(err) @@ -902,7 +902,7 @@ func (s *TestSuite) TestBlockBloomFromCometBlock() { } for _, tc := range testCases { s.Run(fmt.Sprintf("Case %s", tc.name), func() { - blockBloom, err := s.backend.BlockBloomFromCometBlock(tc.blockRes) + blockBloom, err := s.backend.BlockBloomFromCometBlock(s.Ctx(), tc.blockRes) if tc.expPass { s.Require().NoError(err) @@ -1124,7 +1124,7 @@ func (s *TestSuite) TestGetEthBlockFromComet() { err := s.backend.Indexer.IndexBlock(tc.resBlock.Block, tc.blockRes.TxsResults) s.Require().NoError(err) } - block, err := s.backend.RPCBlockFromCometBlock(tc.resBlock, tc.blockRes, tc.fullTx) + block, err := s.backend.RPCBlockFromCometBlock(s.Ctx(), tc.resBlock, tc.blockRes, tc.fullTx) var tx *evmtypes.MsgEthereumTx if tc.expTxs { @@ -1200,7 +1200,7 @@ func (s *TestSuite) TestEthMsgsFromCometBlock() { s.Run(fmt.Sprintf("Case %s", tc.name), func() { s.SetupTest() // reset test and queries - msgs := s.backend.EthMsgsFromCometBlock(tc.resBlock, tc.blockRes) + msgs := s.backend.EthMsgsFromCometBlock(s.Ctx(), tc.resBlock, tc.blockRes) for i, expMsg := range tc.expMsgs { expBytes, err := json.Marshal(expMsg) s.Require().Nil(err) @@ -1345,10 +1345,10 @@ func (s *TestSuite) TestHeaderByNumber() { s.SetupTest() // reset test and queries tc.registerMock(tc.blockNumber, math.NewIntFromBigInt(tc.baseFee)) - header, err := s.backend.HeaderByNumber(tc.blockNumber) + header, err := s.backend.HeaderByNumber(s.Ctx(), tc.blockNumber) if tc.expPass { - msgs := s.backend.EthMsgsFromCometBlock(resBlock, blockRes) + msgs := s.backend.EthMsgsFromCometBlock(s.Ctx(), resBlock, blockRes) expHeader := s.buildEthBlock(blockRes, resBlock, msgs, validator, tc.baseFee).Header() s.Require().NoError(err) @@ -1467,10 +1467,10 @@ func (s *TestSuite) TestHeaderByHash() { s.SetupTest() // reset test and queries tc.registerMock(tc.hash, math.NewIntFromBigInt(tc.baseFee)) - header, err := s.backend.HeaderByHash(tc.hash) + header, err := s.backend.HeaderByHash(s.Ctx(), tc.hash) if tc.expPass { - msgs := s.backend.EthMsgsFromCometBlock(resBlock, blockRes) + msgs := s.backend.EthMsgsFromCometBlock(s.Ctx(), resBlock, blockRes) expHeader := s.buildEthBlock(blockRes, resBlock, msgs, validator, tc.baseFee).Header() s.Require().NoError(err) @@ -1567,12 +1567,12 @@ func (s *TestSuite) TestEthBlockByNumber() { s.SetupTest() // reset test and queries tc.registerMock(tc.blockNumber) - ethBlock, err := s.backend.EthBlockByNumber(tc.blockNumber) + ethBlock, err := s.backend.EthBlockByNumber(s.Ctx(), tc.blockNumber) if tc.expPass { s.Require().NoError(err) - msgs := s.backend.EthMsgsFromCometBlock(resBlock, blockRes) + msgs := s.backend.EthMsgsFromCometBlock(s.Ctx(), resBlock, blockRes) txs := make([]*ethtypes.Transaction, len(msgs)) for i, m := range msgs { txs[i] = m.AsTransaction() @@ -1681,12 +1681,12 @@ func (s *TestSuite) TestEthBlockFromCometBlock() { s.Require().NoError(s.backend.Indexer.IndexBlock(tc.resBlock.Block, tc.blockRes.TxsResults)) } - ethBlock, err := s.backend.EthBlockFromCometBlock(tc.resBlock, tc.blockRes) + ethBlock, err := s.backend.EthBlockFromCometBlock(s.Ctx(), tc.resBlock, tc.blockRes) if tc.expPass { s.Require().NoError(err) - msgs := s.backend.EthMsgsFromCometBlock(tc.resBlock, tc.blockRes) + msgs := s.backend.EthMsgsFromCometBlock(s.Ctx(), tc.resBlock, tc.blockRes) txs := make([]*ethtypes.Transaction, len(msgs)) for i, m := range msgs { txs[i] = m.AsTransaction() diff --git a/tests/integration/rpc/backend/test_call_tx.go b/tests/integration/rpc/backend/test_call_tx.go index 5679894f8..e8fa75889 100644 --- a/tests/integration/rpc/backend/test_call_tx.go +++ b/tests/integration/rpc/backend/test_call_tx.go @@ -281,7 +281,7 @@ func (s *TestSuite) TestResend() { s.SetupTest() // reset test and queries tc.registerMock() - hash, err := s.backend.Resend(tc.args, tc.gasPrice, tc.gasLimit) + hash, err := s.backend.Resend(s.Ctx(), tc.args, tc.gasPrice, tc.gasLimit) if tc.expPass { s.Require().Equal(tc.expHash, hash) @@ -402,7 +402,7 @@ func (s *TestSuite) TestSendRawTransaction() { s.SetupTest() // reset test and queries tc.registerMock() - hash, err := s.backend.SendRawTransaction(tc.rawTx()) + hash, err := s.backend.SendRawTransaction(s.Ctx(), tc.rawTx()) if tc.expPass { s.Require().Equal(tc.expHash, hash) @@ -553,7 +553,7 @@ func (s *TestSuite) TestDoCall() { s.SetupTest() // reset test and queries tc.registerMock() - msgEthTx, err := s.backend.DoCall(tc.callArgs, tc.blockNum, tc.overrides) + msgEthTx, err := s.backend.DoCall(s.Ctx(), tc.callArgs, tc.blockNum, tc.overrides) if tc.expPass { s.Require().NoError(err) @@ -618,7 +618,7 @@ func (s *TestSuite) TestGasPrice() { s.SetupTest() // reset test and queries tc.registerMock() - gasPrice, err := s.backend.GasPrice() + gasPrice, err := s.backend.GasPrice(s.Ctx()) if tc.expPass { s.Require().Equal(tc.expGas, gasPrice) } else { @@ -763,7 +763,7 @@ func (s *TestSuite) TestEstimateGas() { blockNum := rpctypes.BlockNumber(1) blockNrOrHash := rpctypes.BlockNumberOrHash{BlockNumber: &blockNum} - gas, err := s.backend.EstimateGas(tc.callArgs, &blockNrOrHash, tc.overrides) + gas, err := s.backend.EstimateGas(s.Ctx(), tc.callArgs, &blockNrOrHash, tc.overrides) if tc.expPass { s.Require().NoError(err) diff --git a/tests/integration/rpc/backend/test_chain_info.go b/tests/integration/rpc/backend/test_chain_info.go index 631aedd46..05d3028b8 100644 --- a/tests/integration/rpc/backend/test_chain_info.go +++ b/tests/integration/rpc/backend/test_chain_info.go @@ -1,6 +1,7 @@ package backend import ( + "context" "fmt" "math/big" @@ -143,7 +144,7 @@ func (s *TestSuite) TestBaseFee() { s.SetupTest() // reset test and queries tc.registerMock() - baseFee, err := s.backend.BaseFee(tc.blockRes) + baseFee, err := s.backend.BaseFee(s.Ctx(), tc.blockRes) if tc.expPass { s.Require().NoError(err) @@ -180,7 +181,7 @@ func (s *TestSuite) TestChainID() { s.SetupTest() // reset test and queries tc.registerMock() - chainID, err := s.backend.ChainID() + chainID, err := s.backend.ChainID(s.Ctx()) if tc.expPass { s.Require().NoError(err) s.Require().Equal(tc.expChainID, chainID) @@ -237,7 +238,7 @@ func (s *TestSuite) TestGetCoinbase() { s.SetupTest() // reset test and queries tc.registerMock() - accAddr, err := s.backend.GetCoinbase() + accAddr, err := s.backend.GetCoinbase(s.Ctx()) if tc.expPass { s.Require().Equal(tc.accAddr, accAddr) @@ -277,7 +278,7 @@ func (s *TestSuite) TestSuggestGasTipCap() { s.SetupTest() // reset test and queries tc.registerMock() - maxDelta, err := s.backend.SuggestGasTipCap(tc.baseFee) + maxDelta, err := s.backend.SuggestGasTipCap(s.Ctx(), tc.baseFee) if tc.expPass { s.Require().Equal(tc.expGasTipCap, maxDelta) @@ -311,7 +312,7 @@ func (s *TestSuite) TestGlobalMinGasPrice() { s.SetupTest() // reset test and queries tc.registerMock() - globalMinGasPrice, err := s.backend.GlobalMinGasPrice() + globalMinGasPrice, err := s.backend.GlobalMinGasPrice(s.Ctx()) if tc.expPass { s.Require().Equal(tc.expMinGasPrice, globalMinGasPrice) @@ -577,13 +578,14 @@ func (s *TestSuite) TestFeeHistory() { called := 0 if len(tc.targetNewBaseFees) > 0 { s.backend.ProcessBlocker = func( + ctx context.Context, cometBlock *cmtrpctypes.ResultBlock, ethBlock *map[string]interface{}, rewardPercentiles []float64, cometBlockResult *cmtrpctypes.ResultBlockResults, targetOneFeeHistory *rpc.OneFeeHistory, ) error { - err := s.backend.ProcessBlock(cometBlock, ethBlock, rewardPercentiles, cometBlockResult, targetOneFeeHistory) + err := s.backend.ProcessBlock(ctx, cometBlock, ethBlock, rewardPercentiles, cometBlockResult, targetOneFeeHistory) s.Require().NoError(err) targetOneFeeHistory.NextBaseFee = tc.targetNewBaseFees[called] called++ @@ -591,7 +593,7 @@ func (s *TestSuite) TestFeeHistory() { } } - feeHistory, err := s.backend.FeeHistory(tc.userBlockCount, tc.latestBlock, []float64{25, 50, 75, 100}) + feeHistory, err := s.backend.FeeHistory(s.Ctx(), tc.userBlockCount, tc.latestBlock, []float64{25, 50, 75, 100}) if tc.expPass { s.Require().NoError(err) s.Require().Equal(feeHistory, tc.expFeeHistory) diff --git a/tests/integration/rpc/backend/test_client.go b/tests/integration/rpc/backend/test_client.go index f9af73be9..f6e21f904 100644 --- a/tests/integration/rpc/backend/test_client.go +++ b/tests/integration/rpc/backend/test_client.go @@ -40,17 +40,17 @@ var _ cmtrpcclient.Client = &mocks.Client{} func RegisterTxSearch(client *mocks.Client, query string, txBz []byte) { resulTxs := []*cmtrpctypes.ResultTx{{Tx: txBz}} - client.On("TxSearch", rpc.ContextWithHeight(1), query, false, (*int)(nil), (*int)(nil), ""). + client.On("TxSearch", rpc.NewContextWithHeight(1), query, false, (*int)(nil), (*int)(nil), ""). Return(&cmtrpctypes.ResultTxSearch{Txs: resulTxs, TotalCount: 1}, nil) } func RegisterTxSearchEmpty(client *mocks.Client, query string) { - client.On("TxSearch", rpc.ContextWithHeight(1), query, false, (*int)(nil), (*int)(nil), ""). + client.On("TxSearch", rpc.NewContextWithHeight(1), query, false, (*int)(nil), (*int)(nil), ""). Return(&cmtrpctypes.ResultTxSearch{}, nil) } func RegisterTxSearchError(client *mocks.Client, query string) { - client.On("TxSearch", rpc.ContextWithHeight(1), query, false, (*int)(nil), (*int)(nil), ""). + client.On("TxSearch", rpc.NewContextWithHeight(1), query, false, (*int)(nil), (*int)(nil), ""). Return(nil, errortypes.ErrInvalidRequest) } @@ -69,31 +69,31 @@ func RegisterBroadcastTxError(client *mocks.Client, tx types.Tx) { // Unconfirmed Transactions func RegisterUnconfirmedTxs(client *mocks.Client, limit *int, txs []types.Tx) { - client.On("UnconfirmedTxs", rpc.ContextWithHeight(1), limit). + client.On("UnconfirmedTxs", rpc.NewContextWithHeight(1), limit). Return(&cmtrpctypes.ResultUnconfirmedTxs{Txs: txs}, nil) } func RegisterUnconfirmedTxsEmpty(client *mocks.Client, limit *int) { - client.On("UnconfirmedTxs", rpc.ContextWithHeight(1), limit). + client.On("UnconfirmedTxs", rpc.NewContextWithHeight(1), limit). Return(&cmtrpctypes.ResultUnconfirmedTxs{ Txs: make([]types.Tx, 2), }, nil) } func RegisterUnconfirmedTxsError(client *mocks.Client, limit *int) { - client.On("UnconfirmedTxs", rpc.ContextWithHeight(1), limit). + client.On("UnconfirmedTxs", rpc.NewContextWithHeight(1), limit). Return(nil, errortypes.ErrInvalidRequest) } // Status func RegisterStatus(client *mocks.Client) { - client.On("Status", rpc.ContextWithHeight(1)). + client.On("Status", rpc.NewContextWithHeight(1)). Return(&cmtrpctypes.ResultStatus{}, nil) } func RegisterStatusError(client *mocks.Client) { - client.On("Status", rpc.ContextWithHeight(1)). + client.On("Status", rpc.NewContextWithHeight(1)). Return(nil, errortypes.ErrInvalidRequest) } @@ -107,7 +107,7 @@ func RegisterBlockMultipleTxs( block := types.MakeBlock(height, txs, nil, nil) block.ChainID = ChainID.ChainID resBlock := &cmtrpctypes.ResultBlock{Block: block} - client.On("Block", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")).Return(resBlock, nil) + client.On("Block", rpc.NewContextWithHeight(height), mock.AnythingOfType("*int64")).Return(resBlock, nil) return resBlock } @@ -121,7 +121,7 @@ func RegisterBlock( emptyBlock := types.MakeBlock(height, []types.Tx{}, nil, nil) emptyBlock.ChainID = ChainID.ChainID resBlock := &cmtrpctypes.ResultBlock{Block: emptyBlock} - client.On("Block", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")).Return(resBlock, nil) + client.On("Block", rpc.NewContextWithHeight(height), mock.AnythingOfType("*int64")).Return(resBlock, nil) return resBlock } @@ -129,14 +129,14 @@ func RegisterBlock( block := types.MakeBlock(height, []types.Tx{tx}, nil, nil) block.ChainID = ChainID.ChainID resBlock := &cmtrpctypes.ResultBlock{Block: block} - client.On("Block", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")).Return(resBlock, nil) + client.On("Block", rpc.NewContextWithHeight(height), mock.AnythingOfType("*int64")).Return(resBlock, nil) return resBlock } // Block returns error func RegisterBlockError(client *mocks.Client, height int64) { - client.On("Block", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")). + client.On("Block", rpc.NewContextWithHeight(height), mock.AnythingOfType("*int64")). Return(nil, errortypes.ErrInvalidRequest) } @@ -146,7 +146,7 @@ func RegisterBlockNotFound( client *mocks.Client, height int64, ) *cmtrpctypes.ResultBlock { - client.On("Block", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")). + client.On("Block", rpc.NewContextWithHeight(height), mock.AnythingOfType("*int64")). Return(&cmtrpctypes.ResultBlock{Block: nil}, nil) return &cmtrpctypes.ResultBlock{Block: nil} @@ -155,7 +155,7 @@ func RegisterBlockNotFound( // Block panic func RegisterBlockPanic(client *mocks.Client, height int64) { - client.On("Block", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")). + client.On("Block", rpc.NewContextWithHeight(height), mock.AnythingOfType("*int64")). Return(func(context.Context, *int64) *cmtrpctypes.ResultBlock { panic("Block call panic") }, nil) @@ -166,7 +166,7 @@ func TestRegisterBlock(t *testing.T) { height := rpc.BlockNumber(1).Int64() RegisterBlock(client, height, nil) - res, err := client.Block(rpc.ContextWithHeight(height), &height) + res, err := client.Block(rpc.NewContextWithHeight(height), &height) emptyBlock := types.MakeBlock(height, []types.Tx{}, nil, nil) emptyBlock.ChainID = ChainID.ChainID @@ -179,12 +179,12 @@ func TestRegisterBlock(t *testing.T) { func RegisterConsensusParams(client *mocks.Client, height int64) { consensusParams := types.DefaultConsensusParams() - client.On("ConsensusParams", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")). + client.On("ConsensusParams", rpc.NewContextWithHeight(height), mock.AnythingOfType("*int64")). Return(&cmtrpctypes.ResultConsensusParams{ConsensusParams: *consensusParams}, nil) } func RegisterConsensusParamsError(client *mocks.Client, height int64) { - client.On("ConsensusParams", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")). + client.On("ConsensusParams", rpc.NewContextWithHeight(height), mock.AnythingOfType("*int64")). Return(nil, errortypes.ErrInvalidRequest) } @@ -193,7 +193,7 @@ func TestRegisterConsensusParams(t *testing.T) { height := int64(1) RegisterConsensusParams(client, height) - res, err := client.ConsensusParams(rpc.ContextWithHeight(height), &height) + res, err := client.ConsensusParams(rpc.NewContextWithHeight(height), &height) consensusParams := types.DefaultConsensusParams() require.Equal(t, &cmtrpctypes.ResultConsensusParams{ConsensusParams: *consensusParams}, res) require.NoError(t, err) @@ -219,7 +219,7 @@ func RegisterBlockResultsWithEventLog(client *mocks.Client, height int64) (*cmtr {Code: 0, GasUsed: 0, Data: data}, }, } - client.On("BlockResults", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")). + client.On("BlockResults", rpc.NewContextWithHeight(height), mock.AnythingOfType("*int64")). Return(res, nil) return res, nil } @@ -240,13 +240,13 @@ func RegisterBlockResultsWithTxs( Height: height, TxsResults: txsResults, } - client.On("BlockResults", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")). + client.On("BlockResults", rpc.NewContextWithHeight(height), mock.AnythingOfType("*int64")). Return(res, nil) return res } func RegisterBlockResultsError(client *mocks.Client, height int64) { - client.On("BlockResults", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")). + client.On("BlockResults", rpc.NewContextWithHeight(height), mock.AnythingOfType("*int64")). Return(nil, errortypes.ErrInvalidRequest) } @@ -255,7 +255,7 @@ func TestRegisterBlockResults(t *testing.T) { height := int64(1) RegisterBlockResults(client, height) - res, err := client.BlockResults(rpc.ContextWithHeight(height), &height) + res, err := client.BlockResults(rpc.NewContextWithHeight(height), &height) expRes := &cmtrpctypes.ResultBlockResults{ Height: height, TxsResults: []*abci.ExecTxResult{{Code: 0, GasUsed: 0}}, @@ -274,18 +274,18 @@ func RegisterBlockByHash( block := types.MakeBlock(1, []types.Tx{tx}, nil, nil) resBlock := &cmtrpctypes.ResultBlock{Block: block} - client.On("BlockByHash", rpc.ContextWithHeight(1), []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}). + client.On("BlockByHash", rpc.NewContextWithHeight(1), []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}). Return(resBlock, nil) return resBlock } func RegisterBlockByHashError(client *mocks.Client, _ common.Hash, _ []byte) { - client.On("BlockByHash", rpc.ContextWithHeight(1), []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}). + client.On("BlockByHash", rpc.NewContextWithHeight(1), []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}). Return(nil, errortypes.ErrInvalidRequest) } func RegisterBlockByHashNotFound(client *mocks.Client, _ common.Hash, _ []byte) { - client.On("BlockByHash", rpc.ContextWithHeight(1), []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}). + client.On("BlockByHash", rpc.NewContextWithHeight(1), []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}). Return(nil, nil) } @@ -304,18 +304,18 @@ func RegisterHeaderByHash( Header: header, } - client.On("HeaderByHash", rpc.ContextWithHeight(1), bytes.HexBytes{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}). + client.On("HeaderByHash", rpc.NewContextWithHeight(1), bytes.HexBytes{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}). Return(resHeader, nil) return resHeader } func RegisterHeaderByHashError(client *mocks.Client, _ common.Hash, _ []byte) { - client.On("HeaderByHash", rpc.ContextWithHeight(1), bytes.HexBytes{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}). + client.On("HeaderByHash", rpc.NewContextWithHeight(1), bytes.HexBytes{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}). Return(nil, errortypes.ErrInvalidRequest) } func RegisterHeaderByHashNotFound(client *mocks.Client, hash common.Hash, tx []byte) { - client.On("HeaderByHash", rpc.ContextWithHeight(1), bytes.HexBytes(hash.Bytes())). + client.On("HeaderByHash", rpc.NewContextWithHeight(1), bytes.HexBytes(hash.Bytes())). Return(&coretypes.ResultHeader{Header: nil}, nil) } @@ -324,18 +324,18 @@ func RegisterHeaderByHashNotFound(client *mocks.Client, hash common.Hash, tx []b func RegisterHeader(client *mocks.Client, height *int64, tx []byte) *coretypes.ResultHeader { block := types.MakeBlock(*height, []types.Tx{tx}, nil, nil) resHeader := &coretypes.ResultHeader{Header: &block.Header} - client.On("Header", rpc.ContextWithHeight(*height), mock.AnythingOfType("*int64")).Return(resHeader, nil) + client.On("Header", rpc.NewContextWithHeight(*height), mock.AnythingOfType("*int64")).Return(resHeader, nil) return resHeader } func RegisterHeaderError(client *mocks.Client, height *int64) { - client.On("Header", rpc.ContextWithHeight(*height), height).Return(nil, errortypes.ErrInvalidRequest) + client.On("Header", rpc.NewContextWithHeight(*height), height).Return(nil, errortypes.ErrInvalidRequest) } // Header not found func RegisterHeaderNotFound(client *mocks.Client, height int64) { - client.On("Header", rpc.ContextWithHeight(height), mock.MatchedBy(func(arg *int64) bool { + client.On("Header", rpc.NewContextWithHeight(height), mock.MatchedBy(func(arg *int64) bool { return arg != nil && height == *arg })).Return(&coretypes.ResultHeader{Header: nil}, nil) } diff --git a/tests/integration/rpc/backend/test_evm_query_client.go b/tests/integration/rpc/backend/test_evm_query_client.go index be7f1ed9a..b93f63dba 100644 --- a/tests/integration/rpc/backend/test_evm_query_client.go +++ b/tests/integration/rpc/backend/test_evm_query_client.go @@ -55,57 +55,57 @@ var _ evmtypes.QueryClient = &mocks.EVMQueryClient{} // TraceTransaction func RegisterTraceTransactionWithPredecessors(queryClient *mocks.EVMQueryClient, msgEthTx *evmtypes.MsgEthereumTx, predecessors []*evmtypes.MsgEthereumTx) { data := []byte{0x7b, 0x22, 0x74, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x22, 0x7d} - queryClient.On("TraceTx", rpc.ContextWithHeight(1), + queryClient.On("TraceTx", rpc.NewContextWithHeight(1), MatchByProto(&evmtypes.QueryTraceTxRequest{Msg: msgEthTx, BlockNumber: 1, Predecessors: predecessors, ChainId: int64(constants.ExampleChainID.EVMChainID), BlockMaxGas: -1})). //nolint:gosec // G115 Return(&evmtypes.QueryTraceTxResponse{Data: data}, nil) } func RegisterTraceTransaction(queryClient *mocks.EVMQueryClient, msgEthTx *evmtypes.MsgEthereumTx) { data := []byte{0x7b, 0x22, 0x74, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x22, 0x7d} - queryClient.On("TraceTx", rpc.ContextWithHeight(1), MatchByProto(&evmtypes.QueryTraceTxRequest{Msg: msgEthTx, BlockNumber: 1, ChainId: int64(constants.ExampleChainID.EVMChainID), BlockMaxGas: -1})). //nolint:gosec // G115 - Return(&evmtypes.QueryTraceTxResponse{Data: data}, nil) + queryClient.On("TraceTx", rpc.NewContextWithHeight(1), MatchByProto(&evmtypes.QueryTraceTxRequest{Msg: msgEthTx, BlockNumber: 1, ChainId: int64(constants.ExampleChainID.EVMChainID), BlockMaxGas: -1})). //nolint:gosec // G115 + Return(&evmtypes.QueryTraceTxResponse{Data: data}, nil) } func RegisterTraceTransactionError(queryClient *mocks.EVMQueryClient, msgEthTx *evmtypes.MsgEthereumTx) { - queryClient.On("TraceTx", rpc.ContextWithHeight(1), MatchByProto(&evmtypes.QueryTraceTxRequest{Msg: msgEthTx, BlockNumber: 1, ChainId: int64(constants.ExampleChainID.EVMChainID)})). //nolint:gosec // G115 - Return(nil, errortypes.ErrInvalidRequest) + queryClient.On("TraceTx", rpc.NewContextWithHeight(1), MatchByProto(&evmtypes.QueryTraceTxRequest{Msg: msgEthTx, BlockNumber: 1, ChainId: int64(constants.ExampleChainID.EVMChainID)})). //nolint:gosec // G115 + Return(nil, errortypes.ErrInvalidRequest) } // TraceBlock func RegisterTraceBlock(queryClient *mocks.EVMQueryClient, txs []*evmtypes.MsgEthereumTx) { data := []byte{0x7b, 0x22, 0x74, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x22, 0x7d} - queryClient.On("TraceBlock", rpc.ContextWithHeight(1), + queryClient.On("TraceBlock", rpc.NewContextWithHeight(1), MatchByProto(&evmtypes.QueryTraceBlockRequest{Txs: txs, BlockNumber: 1, TraceConfig: &evmtypes.TraceConfig{}, ChainId: int64(constants.ExampleChainID.EVMChainID), BlockMaxGas: -1})). //nolint:gosec // G115 Return(&evmtypes.QueryTraceBlockResponse{Data: data}, nil) } func RegisterTraceBlockError(queryClient *mocks.EVMQueryClient) { - queryClient.On("TraceBlock", rpc.ContextWithHeight(1), &evmtypes.QueryTraceBlockRequest{}). + queryClient.On("TraceBlock", rpc.NewContextWithHeight(1), &evmtypes.QueryTraceBlockRequest{}). Return(nil, errortypes.ErrInvalidRequest) } // TraceCall func RegisterTraceCall(queryClient *mocks.EVMQueryClient, msgEthTx *evmtypes.MsgEthereumTx) { data := []byte{0x7b, 0x22, 0x74, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x22, 0x7d} // {"test": "trace_call"} - queryClient.On("TraceCall", rpc.ContextWithHeight(1), mock.AnythingOfType("*types.QueryTraceCallRequest")). + queryClient.On("TraceCall", rpc.NewContextWithHeight(1), mock.AnythingOfType("*types.QueryTraceCallRequest")). Return(&evmtypes.QueryTraceCallResponse{Data: data}, nil) } func RegisterTraceCallWithTracer(queryClient *mocks.EVMQueryClient, msgEthTx *evmtypes.MsgEthereumTx, tracer string) { data := []byte{0x7b, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x43, 0x41, 0x4c, 0x4c, 0x22, 0x7d} // {"type": "CALL"} - queryClient.On("TraceCall", rpc.ContextWithHeight(1), mock.MatchedBy(func(req *evmtypes.QueryTraceCallRequest) bool { + queryClient.On("TraceCall", rpc.NewContextWithHeight(1), mock.MatchedBy(func(req *evmtypes.QueryTraceCallRequest) bool { return req.TraceConfig != nil && req.TraceConfig.Tracer == tracer })).Return(&evmtypes.QueryTraceCallResponse{Data: data}, nil) } func RegisterTraceCallError(queryClient *mocks.EVMQueryClient) { - queryClient.On("TraceCall", rpc.ContextWithHeight(1), mock.AnythingOfType("*types.QueryTraceCallRequest")). + queryClient.On("TraceCall", rpc.NewContextWithHeight(1), mock.AnythingOfType("*types.QueryTraceCallRequest")). Return(nil, errortypes.ErrInvalidRequest) } // Params func RegisterParams(queryClient *mocks.EVMQueryClient, header *metadata.MD, height int64) { - queryClient.On("Params", rpc.ContextWithHeight(height), &evmtypes.QueryParamsRequest{}, grpc.Header(header)). + queryClient.On("Params", rpc.NewContextWithHeight(height), &evmtypes.QueryParamsRequest{}, grpc.Header(header)). Return(&evmtypes.QueryParamsResponse{}, nil). Run(func(args mock.Arguments) { // If Params call is successful, also update the header height @@ -117,12 +117,12 @@ func RegisterParams(queryClient *mocks.EVMQueryClient, header *metadata.MD, heig } func RegisterParamsWithoutHeader(queryClient *mocks.EVMQueryClient, height int64) { - queryClient.On("Params", rpc.ContextWithHeight(height), &evmtypes.QueryParamsRequest{}). + queryClient.On("Params", rpc.NewContextWithHeight(height), &evmtypes.QueryParamsRequest{}). Return(&evmtypes.QueryParamsResponse{Params: evmtypes.DefaultParams()}, nil) } func RegisterParamsInvalidHeader(queryClient *mocks.EVMQueryClient, header *metadata.MD, height int64) { - queryClient.On("Params", rpc.ContextWithHeight(height), &evmtypes.QueryParamsRequest{}, grpc.Header(header)). + queryClient.On("Params", rpc.NewContextWithHeight(height), &evmtypes.QueryParamsRequest{}, grpc.Header(header)). Return(&evmtypes.QueryParamsResponse{}, nil). Run(func(args mock.Arguments) { // If Params call is successful, also update the header height @@ -133,7 +133,7 @@ func RegisterParamsInvalidHeader(queryClient *mocks.EVMQueryClient, header *meta } func RegisterParamsInvalidHeight(queryClient *mocks.EVMQueryClient, header *metadata.MD, height int64) { - queryClient.On("Params", rpc.ContextWithHeight(height), &evmtypes.QueryParamsRequest{}, grpc.Header(header)). + queryClient.On("Params", rpc.NewContextWithHeight(height), &evmtypes.QueryParamsRequest{}, grpc.Header(header)). Return(&evmtypes.QueryParamsResponse{}, nil). Run(func(args mock.Arguments) { // If Params call is successful, also update the header height @@ -145,13 +145,13 @@ func RegisterParamsInvalidHeight(queryClient *mocks.EVMQueryClient, header *meta } func RegisterParamsWithoutHeaderError(queryClient *mocks.EVMQueryClient, height int64) { - queryClient.On("Params", rpc.ContextWithHeight(height), &evmtypes.QueryParamsRequest{}). + queryClient.On("Params", rpc.NewContextWithHeight(height), &evmtypes.QueryParamsRequest{}). Return(nil, errortypes.ErrInvalidRequest) } // Params returns error func RegisterParamsError(queryClient *mocks.EVMQueryClient, header *metadata.MD, height int64) { - queryClient.On("Params", rpc.ContextWithHeight(height), &evmtypes.QueryParamsRequest{}, grpc.Header(header)). + queryClient.On("Params", rpc.NewContextWithHeight(height), &evmtypes.QueryParamsRequest{}, grpc.Header(header)). Return(nil, errortypes.ErrInvalidRequest) } @@ -162,7 +162,7 @@ func TestRegisterParams(t *testing.T) { height := int64(1) RegisterParams(queryClient, &header, height) - _, err := queryClient.Params(rpc.ContextWithHeight(height), &evmtypes.QueryParamsRequest{}, grpc.Header(&header)) + _, err := queryClient.Params(rpc.NewContextWithHeight(height), &evmtypes.QueryParamsRequest{}, grpc.Header(&header)) require.NoError(t, err) blockHeightHeader := header.Get(grpctypes.GRPCBlockHeightHeader) headerHeight, err := strconv.ParseInt(blockHeightHeader[0], 10, 64) @@ -173,19 +173,19 @@ func TestRegisterParams(t *testing.T) { func TestRegisterParamsError(t *testing.T) { queryClient := mocks.NewEVMQueryClient(t) RegisterBaseFeeError(queryClient) - _, err := queryClient.BaseFee(rpc.ContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}) + _, err := queryClient.BaseFee(rpc.NewContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}) require.Error(t, err) } // ETH Call func RegisterEthCall(queryClient *mocks.EVMQueryClient, request *evmtypes.EthCallRequest) { - ctx, _ := context.WithCancel(rpc.ContextWithHeight(1)) //nolint + ctx, _ := context.WithCancel(rpc.NewContextWithHeight(1)) //nolint queryClient.On("EthCall", ctx, request). Return(&evmtypes.MsgEthereumTxResponse{}, nil) } func RegisterEthCallError(queryClient *mocks.EVMQueryClient, request *evmtypes.EthCallRequest) { - ctx, _ := context.WithCancel(rpc.ContextWithHeight(1)) //nolint + ctx, _ := context.WithCancel(rpc.NewContextWithHeight(1)) //nolint queryClient.On("EthCall", ctx, request). Return(nil, errortypes.ErrInvalidRequest) } @@ -193,35 +193,35 @@ func RegisterEthCallError(queryClient *mocks.EVMQueryClient, request *evmtypes.E // Estimate Gas func RegisterEstimateGas(queryClient *mocks.EVMQueryClient, args evmtypes.TransactionArgs) { bz, _ := json.Marshal(args) - queryClient.On("EstimateGas", rpc.ContextWithHeight(1), &evmtypes.EthCallRequest{Args: bz, ChainId: args.ChainID.ToInt().Int64()}). + queryClient.On("EstimateGas", rpc.NewContextWithHeight(1), &evmtypes.EthCallRequest{Args: bz, ChainId: args.ChainID.ToInt().Int64()}). Return(&evmtypes.EstimateGasResponse{Gas: 21000}, nil) } func RegisterEstimateGasError(queryClient *mocks.EVMQueryClient, req *evmtypes.EthCallRequest) { - queryClient.On("EstimateGas", rpc.ContextWithHeight(1), req). + queryClient.On("EstimateGas", rpc.NewContextWithHeight(1), req). Return(nil, errortypes.ErrInvalidRequest) } func RegisterEstimateGasWithOverrides(queryClient *mocks.EVMQueryClient, req *evmtypes.EthCallRequest) { - queryClient.On("EstimateGas", rpc.ContextWithHeight(1), req). + queryClient.On("EstimateGas", rpc.NewContextWithHeight(1), req). Return(&evmtypes.EstimateGasResponse{Gas: 21000}, nil) } // BaseFee func RegisterBaseFee(queryClient *mocks.EVMQueryClient, baseFee math.Int) { - queryClient.On("BaseFee", rpc.ContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}). + queryClient.On("BaseFee", rpc.NewContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}). Return(&evmtypes.QueryBaseFeeResponse{BaseFee: &baseFee}, nil) } // Base fee returns error func RegisterBaseFeeError(queryClient *mocks.EVMQueryClient) { - queryClient.On("BaseFee", rpc.ContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}). + queryClient.On("BaseFee", rpc.NewContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}). Return(&evmtypes.QueryBaseFeeResponse{}, evmtypes.ErrInvalidBaseFee) } // Base fee not enabled func RegisterBaseFeeDisabled(queryClient *mocks.EVMQueryClient) { - queryClient.On("BaseFee", rpc.ContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}). + queryClient.On("BaseFee", rpc.NewContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}). Return(&evmtypes.QueryBaseFeeResponse{}, nil) } @@ -229,7 +229,7 @@ func TestRegisterBaseFee(t *testing.T) { baseFee := math.NewInt(1) queryClient := mocks.NewEVMQueryClient(t) RegisterBaseFee(queryClient, baseFee) - res, err := queryClient.BaseFee(rpc.ContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}) + res, err := queryClient.BaseFee(rpc.NewContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}) require.Equal(t, &evmtypes.QueryBaseFeeResponse{BaseFee: &baseFee}, res) require.NoError(t, err) } @@ -237,7 +237,7 @@ func TestRegisterBaseFee(t *testing.T) { func TestRegisterBaseFeeError(t *testing.T) { queryClient := mocks.NewEVMQueryClient(t) RegisterBaseFeeError(queryClient) - res, err := queryClient.BaseFee(rpc.ContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}) + res, err := queryClient.BaseFee(rpc.NewContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}) require.Equal(t, &evmtypes.QueryBaseFeeResponse{}, res) require.Error(t, err) } @@ -245,19 +245,19 @@ func TestRegisterBaseFeeError(t *testing.T) { func TestRegisterBaseFeeDisabled(t *testing.T) { queryClient := mocks.NewEVMQueryClient(t) RegisterBaseFeeDisabled(queryClient) - res, err := queryClient.BaseFee(rpc.ContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}) + res, err := queryClient.BaseFee(rpc.NewContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}) require.Equal(t, &evmtypes.QueryBaseFeeResponse{}, res) require.NoError(t, err) } // ValidatorAccount func RegisterValidatorAccount(queryClient *mocks.EVMQueryClient, validator sdk.AccAddress) { - queryClient.On("ValidatorAccount", rpc.ContextWithHeight(1), &evmtypes.QueryValidatorAccountRequest{}). + queryClient.On("ValidatorAccount", rpc.NewContextWithHeight(1), &evmtypes.QueryValidatorAccountRequest{}). Return(&evmtypes.QueryValidatorAccountResponse{AccountAddress: validator.String()}, nil) } func RegisterValidatorAccountError(queryClient *mocks.EVMQueryClient) { - queryClient.On("ValidatorAccount", rpc.ContextWithHeight(1), &evmtypes.QueryValidatorAccountRequest{}). + queryClient.On("ValidatorAccount", rpc.NewContextWithHeight(1), &evmtypes.QueryValidatorAccountRequest{}). Return(nil, status.Error(codes.InvalidArgument, "empty request")) } @@ -266,35 +266,35 @@ func TestRegisterValidatorAccount(t *testing.T) { validator := sdk.AccAddress(utiltx.GenerateAddress().Bytes()) RegisterValidatorAccount(queryClient, validator) - res, err := queryClient.ValidatorAccount(rpc.ContextWithHeight(1), &evmtypes.QueryValidatorAccountRequest{}) + res, err := queryClient.ValidatorAccount(rpc.NewContextWithHeight(1), &evmtypes.QueryValidatorAccountRequest{}) require.Equal(t, &evmtypes.QueryValidatorAccountResponse{AccountAddress: validator.String()}, res) require.NoError(t, err) } // Code func RegisterCode(queryClient *mocks.EVMQueryClient, addr common.Address, code []byte) { - queryClient.On("Code", rpc.ContextWithHeight(1), &evmtypes.QueryCodeRequest{Address: addr.String()}). + queryClient.On("Code", rpc.NewContextWithHeight(1), &evmtypes.QueryCodeRequest{Address: addr.String()}). Return(&evmtypes.QueryCodeResponse{Code: code}, nil) } func RegisterCodeError(queryClient *mocks.EVMQueryClient, addr common.Address) { - queryClient.On("Code", rpc.ContextWithHeight(1), &evmtypes.QueryCodeRequest{Address: addr.String()}). + queryClient.On("Code", rpc.NewContextWithHeight(1), &evmtypes.QueryCodeRequest{Address: addr.String()}). Return(nil, errortypes.ErrInvalidRequest) } // Storage func RegisterStorageAt(queryClient *mocks.EVMQueryClient, addr common.Address, key string, storage string) { - queryClient.On("Storage", rpc.ContextWithHeight(1), &evmtypes.QueryStorageRequest{Address: addr.String(), Key: key}). + queryClient.On("Storage", rpc.NewContextWithHeight(1), &evmtypes.QueryStorageRequest{Address: addr.String(), Key: key}). Return(&evmtypes.QueryStorageResponse{Value: storage}, nil) } func RegisterStorageAtError(queryClient *mocks.EVMQueryClient, addr common.Address, key string) { - queryClient.On("Storage", rpc.ContextWithHeight(1), &evmtypes.QueryStorageRequest{Address: addr.String(), Key: key}). + queryClient.On("Storage", rpc.NewContextWithHeight(1), &evmtypes.QueryStorageRequest{Address: addr.String(), Key: key}). Return(nil, errortypes.ErrInvalidRequest) } func RegisterAccount(queryClient *mocks.EVMQueryClient, addr common.Address, height int64) { - queryClient.On("Account", rpc.ContextWithHeight(height), &evmtypes.QueryAccountRequest{Address: addr.String()}). + queryClient.On("Account", rpc.NewContextWithHeight(height), &evmtypes.QueryAccountRequest{Address: addr.String()}). Return(&evmtypes.QueryAccountResponse{ Balance: "0", CodeHash: "", @@ -306,27 +306,27 @@ func RegisterAccount(queryClient *mocks.EVMQueryClient, addr common.Address, hei // Balance func RegisterBalance(queryClient *mocks.EVMQueryClient, addr common.Address, height int64) { - queryClient.On("Balance", rpc.ContextWithHeight(height), &evmtypes.QueryBalanceRequest{Address: addr.String()}). + queryClient.On("Balance", rpc.NewContextWithHeight(height), &evmtypes.QueryBalanceRequest{Address: addr.String()}). Return(&evmtypes.QueryBalanceResponse{Balance: "1"}, nil) } func RegisterBalanceInvalid(queryClient *mocks.EVMQueryClient, addr common.Address, height int64) { - queryClient.On("Balance", rpc.ContextWithHeight(height), &evmtypes.QueryBalanceRequest{Address: addr.String()}). + queryClient.On("Balance", rpc.NewContextWithHeight(height), &evmtypes.QueryBalanceRequest{Address: addr.String()}). Return(&evmtypes.QueryBalanceResponse{Balance: "invalid"}, nil) } func RegisterBalanceNegative(queryClient *mocks.EVMQueryClient, addr common.Address, height int64) { - queryClient.On("Balance", rpc.ContextWithHeight(height), &evmtypes.QueryBalanceRequest{Address: addr.String()}). + queryClient.On("Balance", rpc.NewContextWithHeight(height), &evmtypes.QueryBalanceRequest{Address: addr.String()}). Return(&evmtypes.QueryBalanceResponse{Balance: "-1"}, nil) } func RegisterBalanceError(queryClient *mocks.EVMQueryClient, addr common.Address, height int64) { - queryClient.On("Balance", rpc.ContextWithHeight(height), &evmtypes.QueryBalanceRequest{Address: addr.String()}). + queryClient.On("Balance", rpc.NewContextWithHeight(height), &evmtypes.QueryBalanceRequest{Address: addr.String()}). Return(nil, errortypes.ErrInvalidRequest) } // GlobalMinGasPrice func RegisterGlobalMinGasPrice(queryClient *mocks.EVMQueryClient, height int64) { - queryClient.On("GlobalMinGasPrice", rpc.ContextWithHeight(height), &evmtypes.QueryGlobalMinGasPriceRequest{}). + queryClient.On("GlobalMinGasPrice", rpc.NewContextWithHeight(height), &evmtypes.QueryGlobalMinGasPriceRequest{}). Return(&evmtypes.QueryGlobalMinGasPriceResponse{MinGasPrice: math.OneInt()}, nil) } diff --git a/tests/integration/rpc/backend/test_feemarket_query_client.go b/tests/integration/rpc/backend/test_feemarket_query_client.go index 47e961ac3..352cbd432 100644 --- a/tests/integration/rpc/backend/test_feemarket_query_client.go +++ b/tests/integration/rpc/backend/test_feemarket_query_client.go @@ -12,11 +12,11 @@ var _ feemarkettypes.QueryClient = &mocks.FeeMarketQueryClient{} // Params func RegisterFeeMarketParams(feeMarketClient *mocks.FeeMarketQueryClient, height int64) { - feeMarketClient.On("Params", rpc.ContextWithHeight(height), &feemarkettypes.QueryParamsRequest{}). + feeMarketClient.On("Params", rpc.NewContextWithHeight(height), &feemarkettypes.QueryParamsRequest{}). Return(&feemarkettypes.QueryParamsResponse{Params: feemarkettypes.DefaultParams()}, nil) } func RegisterFeeMarketParamsError(feeMarketClient *mocks.FeeMarketQueryClient, height int64) { - feeMarketClient.On("Params", rpc.ContextWithHeight(height), &feemarkettypes.QueryParamsRequest{}). + feeMarketClient.On("Params", rpc.NewContextWithHeight(height), &feemarkettypes.QueryParamsRequest{}). Return(nil, sdkerrors.ErrInvalidRequest) } diff --git a/tests/integration/rpc/backend/test_filters.go b/tests/integration/rpc/backend/test_filters.go index 503116995..b1a6ef4a7 100644 --- a/tests/integration/rpc/backend/test_filters.go +++ b/tests/integration/rpc/backend/test_filters.go @@ -78,7 +78,7 @@ func (s *TestSuite) TestGetLogs() { s.SetupTest() tc.registerMock(tc.blockHash) - logs, err := s.backend.GetLogs(tc.blockHash) + logs, err := s.backend.GetLogs(s.Ctx(), tc.blockHash) if tc.expPass { s.Require().NoError(err) diff --git a/tests/integration/rpc/backend/test_node_info.go b/tests/integration/rpc/backend/test_node_info.go index 270a3c8a1..eb55f956e 100644 --- a/tests/integration/rpc/backend/test_node_info.go +++ b/tests/integration/rpc/backend/test_node_info.go @@ -122,7 +122,7 @@ func (s *TestSuite) TestListAccounts() { s.SetupTest() // reset test and queries tc.registerMock() - output, err := s.backend.ListAccounts() + output, err := s.backend.ListAccounts(s.Ctx()) if tc.expPass { s.Require().NoError(err) @@ -196,7 +196,7 @@ func (s *TestSuite) TestSyncing() { func() { client := s.backend.ClientCtx.Client.(*mocks.Client) RegisterStatus(client) - status, _ := client.Status(s.backend.Ctx) + status, _ := client.Status(s.Ctx()) status.SyncInfo.CatchingUp = true }, map[string]interface{}{ @@ -212,7 +212,7 @@ func (s *TestSuite) TestSyncing() { s.SetupTest() // reset test and queries tc.registerMock() - output, err := s.backend.Syncing() + output, err := s.backend.Syncing(s.Ctx()) if tc.expPass { s.Require().NoError(err) @@ -262,7 +262,7 @@ func (s *TestSuite) TestSetEtherbase() { RegisterParams(QueryClient, &header, 1) c := sdk.NewDecCoin(constants.ExampleAttoDenom, math.NewIntFromBigInt(big.NewInt(1))) s.backend.Cfg.SetMinGasPrices(sdk.DecCoins{c}) - delAddr, _ := s.backend.GetCoinbase() + delAddr, _ := s.backend.GetCoinbase(s.Ctx()) // account, _ := s.backend.ClientCtx.AccountRetriever.GetAccount(s.backend.ClientCtx, delAddr) delCommonAddr := common.BytesToAddress(delAddr.Bytes()) request := &authtypes.QueryAccountRequest{Address: sdk.AccAddress(delCommonAddr.Bytes()).String()} @@ -309,7 +309,7 @@ func (s *TestSuite) TestSetEtherbase() { s.SetupTest() // reset test and queries tc.registerMock() - output := s.backend.SetEtherbase(tc.etherbase) + output := s.backend.SetEtherbase(s.Ctx(), tc.etherbase) s.Require().Equal(tc.expResult, output) }) @@ -352,7 +352,7 @@ func (s *TestSuite) TestImportRawKey() { s.SetupTest() // reset test and queries tc.registerMock() - output, err := s.backend.ImportRawKey(tc.privKey, tc.password) + output, err := s.backend.ImportRawKey(s.Ctx(), tc.privKey, tc.password) if tc.expPass { s.Require().NoError(err) s.Require().Equal(tc.expAddr, output) diff --git a/tests/integration/rpc/backend/test_sign_tx.go b/tests/integration/rpc/backend/test_sign_tx.go index a0f2d3f14..99ee64783 100644 --- a/tests/integration/rpc/backend/test_sign_tx.go +++ b/tests/integration/rpc/backend/test_sign_tx.go @@ -135,7 +135,7 @@ func (s *TestSuite) TestSendTransaction() { s.Require().NoError(err) tc.expHash = msg.AsTransaction().Hash() } - responseHash, err := s.backend.SendTransaction(tc.args) + responseHash, err := s.backend.SendTransaction(s.Ctx(), tc.args) if tc.expPass { s.Require().NoError(err) s.Require().Equal(tc.expHash, responseHash) diff --git a/tests/integration/rpc/backend/test_tracing.go b/tests/integration/rpc/backend/test_tracing.go index eefbaf818..bb132585a 100644 --- a/tests/integration/rpc/backend/test_tracing.go +++ b/tests/integration/rpc/backend/test_tracing.go @@ -196,7 +196,7 @@ func (s *TestSuite) TestTraceTransaction() { err := s.backend.Indexer.IndexBlock(tc.block, tc.responseBlock) s.Require().NoError(err) - txResult, err := s.backend.TraceTransaction(txHash, nil) + txResult, err := s.backend.TraceTransaction(s.Ctx(), txHash, nil) if tc.expPass { s.Require().NoError(err) @@ -369,7 +369,7 @@ func (s *TestSuite) TestTraceCall() { s.SetupTest() // reset test and queries tc.registerMock() - result, err := s.backend.TraceCall(tc.args, tc.blockNrOrHash, tc.config) + result, err := s.backend.TraceCall(s.Ctx(), tc.args, tc.blockNrOrHash, tc.config) if tc.expPass { s.Require().NoError(err) @@ -457,7 +457,7 @@ func (s *TestSuite) TestTraceBlock() { s.SetupTest() // reset test and queries tc.registerMock() - traceResults, err := s.backend.TraceBlock(1, tc.config, tc.resBlock) + traceResults, err := s.backend.TraceBlock(s.Ctx(), 1, tc.config, tc.resBlock) if tc.expPass { s.Require().NoError(err) diff --git a/tests/integration/rpc/backend/test_tx_info.go b/tests/integration/rpc/backend/test_tx_info.go index 0d6efea5f..38ab1127f 100644 --- a/tests/integration/rpc/backend/test_tx_info.go +++ b/tests/integration/rpc/backend/test_tx_info.go @@ -115,7 +115,7 @@ func (s *TestSuite) TestGetTransactionByHash() { err := s.backend.Indexer.IndexBlock(block, responseDeliver) s.Require().NoError(err) - rpcTx, err := s.backend.GetTransactionByHash(tc.tx.Hash()) + rpcTx, err := s.backend.GetTransactionByHash(s.Ctx(), tc.tx.Hash()) if tc.expPass { s.Require().NoError(err) @@ -175,7 +175,7 @@ func (s *TestSuite) TestGetTransactionsByHashPending() { s.SetupTest() // reset tc.registerMock() - rpcTx, err := s.backend.GetTransactionByHashPending(tc.tx.Hash()) + rpcTx, err := s.backend.GetTransactionByHashPending(s.Ctx(), tc.tx.Hash()) if tc.expPass { s.Require().NoError(err) @@ -217,7 +217,7 @@ func (s *TestSuite) TestGetTxByEthHash() { s.SetupTest() // reset tc.registerMock() - rpcTx, err := s.backend.GetTxByEthHash(tc.tx.Hash()) + rpcTx, err := s.backend.GetTxByEthHash(s.Ctx(), tc.tx.Hash()) if tc.expPass { s.Require().NoError(err) @@ -267,7 +267,7 @@ func (s *TestSuite) TestGetTransactionByBlockHashAndIndex() { s.SetupTest() // reset tc.registerMock() - rpcTx, err := s.backend.GetTransactionByBlockHashAndIndex(tc.blockHash, 1) + rpcTx, err := s.backend.GetTransactionByBlockHashAndIndex(s.Ctx(), tc.blockHash, 1) if tc.expPass { s.Require().NoError(err) @@ -380,7 +380,7 @@ func (s *TestSuite) TestGetTransactionByBlockAndIndex() { s.SetupTest() // reset tc.registerMock() - rpcTx, err := s.backend.GetTransactionByBlockAndIndex(tc.block, tc.idx) + rpcTx, err := s.backend.GetTransactionByBlockAndIndex(s.Ctx(), tc.block, tc.idx) if tc.expPass { s.Require().NoError(err) @@ -445,7 +445,7 @@ func (s *TestSuite) TestGetTransactionByBlockNumberAndIndex() { s.SetupTest() // reset tc.registerMock() - rpcTx, err := s.backend.GetTransactionByBlockNumberAndIndex(tc.blockNum, tc.idx) + rpcTx, err := s.backend.GetTransactionByBlockNumberAndIndex(s.Ctx(), tc.blockNum, tc.idx) if tc.expPass { s.Require().NoError(err) s.Require().Equal(rpcTx, tc.expRPCTx) @@ -486,7 +486,7 @@ func (s *TestSuite) TestGetTransactionByTxIndex() { s.SetupTest() // reset tc.registerMock() - txResults, err := s.backend.GetTxByTxIndex(tc.height, tc.index) + txResults, err := s.backend.GetTxByTxIndex(s.Ctx(), tc.height, tc.index) if tc.expPass { s.Require().NoError(err) @@ -527,7 +527,7 @@ func (s *TestSuite) TestQueryCometTxIndexer() { s.SetupTest() // reset tc.registerMock() - txResults, err := s.backend.QueryCometTxIndexer(tc.query, tc.txGetter) + txResults, err := s.backend.QueryCometTxIndexer(s.Ctx(), tc.query, tc.txGetter) if tc.expPass { s.Require().NoError(err) @@ -685,7 +685,7 @@ func (s *TestSuite) TestGetTransactionReceipt() { err := s.backend.Indexer.IndexBlock(tc.block, tc.blockResult) s.Require().NoError(err) - res, err := s.backend.GetTransactionReceipt(tc.tx.Hash()) + res, err := s.backend.GetTransactionReceipt(s.Ctx(), tc.tx.Hash()) if tc.expPass { s.Require().Equal(res["transactionHash"], tc.tx.Hash()) s.Require().Equal(res["blockNumber"], hexutil.Uint64(tc.block.Height)) //nolint: gosec // G115 diff --git a/tests/speedtest/go.mod b/tests/speedtest/go.mod index df081ab33..0bc282c6a 100644 --- a/tests/speedtest/go.mod +++ b/tests/speedtest/go.mod @@ -1,6 +1,6 @@ module github.com/cosmos/evm/tests/speedtest -go 1.25.0 +go 1.25.5 replace ( github.com/cosmos/evm => ../../ @@ -13,7 +13,7 @@ replace ( require ( cosmossdk.io/log v1.6.1 github.com/cosmos/cosmos-db v1.1.3 - github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251119151455-2667feb5154b + github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa github.com/cosmos/evm v0.2.0 github.com/cosmos/evm/evmd v0.0.0-20251112193856-d450ea1d6bd0 github.com/ethereum/go-ethereum v1.16.5 @@ -82,6 +82,7 @@ require ( github.com/bytedance/sonic v1.14.2 // indirect github.com/bytedance/sonic/loader v0.4.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cloudwego/base64x v0.1.6 // indirect @@ -117,6 +118,7 @@ require ( github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect + github.com/ebitengine/purego v0.8.4 // indirect github.com/emicklei/dot v1.8.0 // indirect github.com/envoyproxy/go-control-plane/envoy v1.35.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect @@ -154,8 +156,10 @@ require ( github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect + github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -184,6 +188,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.10.3 // indirect + github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -207,9 +212,11 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.67.3 // indirect + github.com/prometheus/common v0.67.4 // indirect + github.com/prometheus/otlptranslator v0.0.2 // indirect github.com/prometheus/procfs v0.17.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect github.com/rivo/uniseg v0.2.0 // indirect @@ -219,6 +226,7 @@ require ( github.com/sagikazarmark/locafero v0.11.0 // indirect github.com/sasha-s/go-deadlock v0.3.6 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect + github.com/shirou/gopsutil/v4 v4.25.7 // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect @@ -248,12 +256,31 @@ require ( go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/detectors/gcp v1.38.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect + go.opentelemetry.io/contrib/instrumentation/host v0.63.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect + go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0 // indirect + go.opentelemetry.io/contrib/otelconf v0.18.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.37.0 // indirect + go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 // indirect go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.60.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 // indirect + go.opentelemetry.io/otel/log v0.14.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect go.opentelemetry.io/otel/sdk v1.38.0 // indirect + go.opentelemetry.io/otel/sdk/log v0.14.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.38.0 // indirect go.opentelemetry.io/otel/trace v1.38.0 // indirect + go.opentelemetry.io/proto/otlp v1.7.1 // indirect go.uber.org/mock v0.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect diff --git a/tests/speedtest/go.sum b/tests/speedtest/go.sum index 0065fd841..720a60700 100644 --- a/tests/speedtest/go.sum +++ b/tests/speedtest/go.sum @@ -196,6 +196,8 @@ github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= 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/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= @@ -266,8 +268,8 @@ github.com/cosmos/cosmos-db v1.1.3 h1:7QNT77+vkefostcKkhrzDK9uoIEryzFrU9eoMeaQOP github.com/cosmos/cosmos-db v1.1.3/go.mod h1:kN+wGsnwUJZYn8Sy5Q2O0vCYA99MJllkKASbs6Unb9U= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251119151455-2667feb5154b h1:7NGmZys36hEWxNROw3Glzm9r4dpFu8rlvaqt5pmwt0s= -github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251119151455-2667feb5154b/go.mod h1:ASeglQApCId0j9w12IfYJEvwWC5mY6/cu4AhXG9xffw= +github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa h1:/V1l4snedPDF0D02n4RcBGIc7Zh+AVUGDmdsfShIt/0= +github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa/go.mod h1:zLaCSzfwEXz3whgptvaqfiYweilHL0K9qRoEFwQQvEg= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/go-ethereum v1.16.2-cosmos-1 h1:QIaIS6HIdPSBdTvpFhxswhMLUJgcr4irbd2o9ZKldAI= @@ -342,6 +344,8 @@ github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw= +github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/emicklei/dot v1.8.0 h1:HnD60yAKFAevNeT+TPYr9pb8VB9bqdeSo0nzwIW6IOI= github.com/emicklei/dot v1.8.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= @@ -528,6 +532,8 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc h1:GN2Lv3MGO7AS6PrRoT6yV5+wkrOpcszoIsO4+4ds248= +github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc/go.mod h1:+JKpmjMGhpgPL+rXZ5nsZieVzvarn86asRlBg4uNGnk= github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -538,6 +544,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 h1:81+kWbE1yErFBMjME0I5k3x3kojjKsWtPYHEAutoPow= @@ -676,6 +684,8 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.10.3 h1:0laII9AQ6kFxo5SjhdTfSh9EgF20piD6TMHK6YuDm+4= github.com/linxGnu/grocksdb v1.10.3/go.mod h1:OLQKZwiKwaJiAVCsOzWKvwiLwfZ5Vz8Md5TYR7t7pM8= +github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54 h1:mFWunSatvkQQDhpdyuFAYwyAan3hzCuma+Pz8sqvOfg= +github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= @@ -823,6 +833,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -847,8 +859,10 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.67.3 h1:shd26MlnwTw5jksTDhC7rTQIteBxy+ZZDr3t7F2xN2Q= -github.com/prometheus/common v0.67.3/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI= +github.com/prometheus/common v0.67.4 h1:yR3NqWO1/UyO1w2PhUvXlGQs/PtFmoveVO0KZ4+Lvsc= +github.com/prometheus/common v0.67.4/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI= +github.com/prometheus/otlptranslator v0.0.2 h1:+1CdeLVrRQ6Psmhnobldo0kTp96Rj80DRXRd5OSnMEQ= +github.com/prometheus/otlptranslator v0.0.2/go.mod h1:P8AwMgdD7XEr6QRUJ2QWLpiAZTgTE2UYgjlu3svompI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -890,6 +904,8 @@ github.com/sasha-s/go-deadlock v0.3.6/go.mod h1:CUqNyyvMxTyjFqDT7MRg9mb4Dv/btmGT github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v4 v4.25.7 h1:bNb2JuqKuAu3tRlPv5piSmBZyMfecwQ+t/ILq+1JqVM= +github.com/shirou/gopsutil/v4 v4.25.7/go.mod h1:XV/egmwJtd3ZQjBpJVY5kndsiOO4IRqy9TQnmm6VP7U= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -1008,21 +1024,59 @@ go.opentelemetry.io/contrib/detectors/gcp v1.38.0 h1:ZoYbqX7OaA/TAikspPl3ozPI6iY go.opentelemetry.io/contrib/detectors/gcp v1.38.0/go.mod h1:SU+iU7nu5ud4oCb3LQOhIZ3nRLj6FNVrKgtflbaf2ts= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= +go.opentelemetry.io/contrib/instrumentation/host v0.63.0 h1:zsaUrWypCf0NtYSUby+/BS6QqhXVNxMQD5w4dLczKCQ= +go.opentelemetry.io/contrib/instrumentation/host v0.63.0/go.mod h1:Ru+kuFO+ToZqBKwI59rCStOhW6LWrbGisYrFaX61bJk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 h1:Hf9xI/XLML9ElpiHVDNwvqI0hIFlzV8dgIr35kV1kRU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0/go.mod h1:NfchwuyNoMcZ5MLHwPrODwUF1HWCXWrL31s8gSAdIKY= +go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0 h1:PeBoRj6af6xMI7qCupwFvTbbnd49V7n5YpG6pg8iDYQ= +go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0/go.mod h1:ingqBCtMCe8I4vpz/UVzCW6sxoqgZB37nao91mLQ3Bw= +go.opentelemetry.io/contrib/otelconf v0.18.0 h1:ciF2Gf00BWs0DnexKFZXcxg9kJ8r3SUW1LOzW3CsKA8= +go.opentelemetry.io/contrib/otelconf v0.18.0/go.mod h1:FcP7k+JLwBLdOxS6qY6VQ/4b5VBntI6L6o80IMwhAeI= +go.opentelemetry.io/contrib/propagators/b3 v1.37.0 h1:0aGKdIuVhy5l4GClAjl72ntkZJhijf2wg1S7b5oLoYA= +go.opentelemetry.io/contrib/propagators/b3 v1.37.0/go.mod h1:nhyrxEJEOQdwR15zXrCKI6+cJK60PXAkJ/jRyfhr2mg= +go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 h1:pW+qDVo0jB0rLsNeaP85xLuz20cvsECUcN7TE+D8YTM= +go.opentelemetry.io/contrib/propagators/jaeger v1.37.0/go.mod h1:x7bd+t034hxLTve1hF9Yn9qQJlO/pP8H5pWIt7+gsFM= go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0 h1:OMqPldHt79PqWKOMYIAQs3CxAi7RLgPxwfFSwr4ZxtM= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0/go.mod h1:1biG4qiqTxKiUCtoWDPpL3fB3KxVwCiGw81j3nKMuHE= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0 h1:QQqYw3lkrzwVsoEX0w//EhH/TCnpRdEenKBOOEIMjWc= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0/go.mod h1:gSVQcr17jk2ig4jqJ2DX30IdWH251JcNAecvrqTxH1s= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0 h1:vl9obrcoWVKp/lwl8tRE33853I8Xru9HFbw/skNeLs8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0/go.mod h1:GAXRxmLJcVM3u22IjTg74zWBrRCKq8BnOqUVLodpcpw= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0 h1:Oe2z/BCg5q7k4iXC3cqJxKYg0ieRiOqF0cecFYdPTwk= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0/go.mod h1:ZQM5lAJpOsKnYagGg/zV2krVqTtaVdYdDkhMoX6Oalg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 h1:lwI4Dc5leUqENgGuQImwLo4WnuXFPetmPpkLi2IrX54= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0/go.mod h1:Kz/oCE7z5wuyhPxsXDuaPteSWqjSBD5YaSdbxZYGbGk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 h1:aTL7F04bJHUlztTsNGJ2l+6he8c+y/b//eR0jjjemT4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4= +go.opentelemetry.io/otel/exporters/prometheus v0.60.0 h1:cGtQxGvZbnrWdC2GyjZi0PDKVSLWP/Jocix3QWfXtbo= +go.opentelemetry.io/otel/exporters/prometheus v0.60.0/go.mod h1:hkd1EekxNo69PTV4OWFGZcKQiIqg0RfuWExcPKFvepk= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0 h1:B/g+qde6Mkzxbry5ZZag0l7QrQBCtVm7lVjaLgmpje8= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0/go.mod h1:mOJK8eMmgW6ocDJn6Bn11CcZ05gi3P8GylBXEkZtbgA= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0 h1:wm/Q0GAAykXv83wzcKzGGqAnnfLFyFe7RslekZuv+VI= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0/go.mod h1:ra3Pa40+oKjvYh+ZD3EdxFZZB0xdMfuileHAm4nNN7w= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 h1:kJxSDN4SgWWTjG/hPp3O7LCGLcHXFlvS2/FFOrwL+SE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0/go.mod h1:mgIOzS7iZeKJdeB8/NYHrJ48fdGc71Llo5bJ1J4DWUE= +go.opentelemetry.io/otel/log v0.14.0 h1:2rzJ+pOAZ8qmZ3DDHg73NEKzSZkhkGIua9gXtxNGgrM= +go.opentelemetry.io/otel/log v0.14.0/go.mod h1:5jRG92fEAgx0SU/vFPxmJvhIuDU9E1SUnEQrMlJpOno= go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/log v0.14.0 h1:JU/U3O7N6fsAXj0+CXz21Czg532dW2V4gG1HE/e8Zrg= +go.opentelemetry.io/otel/sdk/log v0.14.0/go.mod h1:imQvII+0ZylXfKU7/wtOND8Hn4OpT3YUoIgqJVksUkM= +go.opentelemetry.io/otel/sdk/log/logtest v0.14.0 h1:Ijbtz+JKXl8T2MngiwqBlPaHqc4YCaP/i13Qrow6gAM= +go.opentelemetry.io/otel/sdk/log/logtest v0.14.0/go.mod h1:dCU8aEL6q+L9cYTqcVOk8rM9Tp8WdnHOPLiBgp0SGOA= go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= +go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1173,6 +1227,7 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/tests/systemtests/go.mod b/tests/systemtests/go.mod index 5c7a8aca6..e7622c9bb 100644 --- a/tests/systemtests/go.mod +++ b/tests/systemtests/go.mod @@ -1,12 +1,12 @@ module github.com/cosmos/evm/tests/systemtests -go 1.25.0 +go 1.25.5 require ( cosmossdk.io/math v1.5.3 cosmossdk.io/systemtests v1.4.0 github.com/cometbft/cometbft v0.39.0-beta.2 - github.com/cosmos/cosmos-sdk v0.54.0-beta.0 + github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa github.com/cosmos/evm v0.5.0-rc.0 github.com/ethereum/go-ethereum v1.16.5 github.com/holiman/uint256 v1.3.2 @@ -37,11 +37,12 @@ require ( github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.2.0 // indirect - github.com/bits-and-blooms/bitset v1.24.3 // indirect + github.com/bits-and-blooms/bitset v1.24.4 // indirect github.com/bytedance/gopkg v0.1.3 // indirect github.com/bytedance/sonic v1.14.2 // indirect github.com/bytedance/sonic/loader v0.4.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cloudwego/base64x v0.1.6 // indirect github.com/cockroachdb/errors v1.12.0 // indirect @@ -74,6 +75,7 @@ require ( github.com/dgraph-io/ristretto/v2 v2.1.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect + github.com/ebitengine/purego v0.8.4 // indirect github.com/emicklei/dot v1.8.0 // indirect github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect github.com/ethereum/go-verkle v0.2.2 // indirect @@ -101,11 +103,14 @@ require ( github.com/google/go-cmp v0.7.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect + github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect @@ -127,6 +132,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.10.3 // indirect + github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect @@ -143,9 +149,11 @@ require ( github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.67.1 // indirect + github.com/prometheus/common v0.67.4 // indirect + github.com/prometheus/otlptranslator v0.0.2 // indirect github.com/prometheus/procfs v0.17.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect github.com/rivo/uniseg v0.2.0 // indirect @@ -155,6 +163,7 @@ require ( github.com/sagikazarmark/locafero v0.11.0 // indirect github.com/sasha-s/go-deadlock v0.3.6 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect + github.com/shirou/gopsutil/v4 v4.25.7 // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect @@ -177,10 +186,32 @@ require ( github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v1.0.1 // indirect go.etcd.io/bbolt v1.4.0 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect + go.opentelemetry.io/contrib/instrumentation/host v0.63.0 // indirect + go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0 // indirect + go.opentelemetry.io/contrib/otelconf v0.18.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.37.0 // indirect + go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 // indirect go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.60.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 // indirect + go.opentelemetry.io/otel/log v0.14.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect + go.opentelemetry.io/otel/sdk v1.38.0 // indirect + go.opentelemetry.io/otel/sdk/log v0.14.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.38.0 // indirect go.opentelemetry.io/otel/trace v1.38.0 // indirect + go.opentelemetry.io/proto/otlp v1.7.1 // indirect go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect @@ -196,9 +227,9 @@ require ( golang.org/x/text v0.31.0 // indirect golang.org/x/tools v0.38.0 // indirect google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect - google.golang.org/grpc v1.76.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 // indirect + google.golang.org/grpc v1.77.0 // indirect google.golang.org/protobuf v1.36.10 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/tests/systemtests/go.sum b/tests/systemtests/go.sum index d6f7c1c7a..50b662899 100644 --- a/tests/systemtests/go.sum +++ b/tests/systemtests/go.sum @@ -9,8 +9,8 @@ cloud.google.com/go/auth v0.16.5/go.mod h1:utzRfHMP+Vv0mpOkTRQoWD2q3BatTOoWbA7gC cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= cloud.google.com/go/compute v1.38.0 h1:MilCLYQW2m7Dku8hRIIKo4r0oKastlD74sSu16riYKs= -cloud.google.com/go/compute/metadata v0.8.0 h1:HxMRIbao8w17ZX6wBnjhcDkW6lTFpgcaobyVfZWqRLA= -cloud.google.com/go/compute/metadata v0.8.0/go.mod h1:sYOGTp851OV9bOFJ9CH7elVvyzopvWQFNNghtDQ/Biw= +cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= +cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8= cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE= cloud.google.com/go/monitoring v1.24.2 h1:5OTsoJ1dXYIiMiuL+sYscLc9BumrL3CarVLL7dd7lHM= @@ -61,8 +61,8 @@ github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bp github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.7 h1:ybO8RBeh29qrxIhCA9E8gKY6xfONU9T6G6aP9DTKfLE= github.com/DataDog/zstd v1.5.7/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0 h1:UQUsRi8WTzhZntp5313l+CHIAT95ojUI2lpP/ExlZa4= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0/go.mod h1:Cz6ft6Dkn3Et6l2v2a9/RpN7epQ1GtDlO6lj8bEcOvw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 h1:sBEjpZlNHzK1voKq9695PJSX2o5NEXl7/OL3coiIY0c= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 h1:owcC2UnmsZycprQ5RfRgjydWhuoxg71LUfyiQdijZuM= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0/go.mod h1:ZPpqegjbE99EPKsu3iUWV22A04wzGPcAY/ziSIQEEgs= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 h1:Ron4zCA/yk6U7WOBXhTJcDpsUBG9npumK6xw2auFltQ= @@ -145,8 +145,8 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.24.3 h1:Bte86SlO3lwPQqww+7BE9ZuUCKIjfqnG5jtEyqA9y9Y= -github.com/bits-and-blooms/bitset v1.24.3/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.24.4 h1:95H15Og1clikBrKr/DuzMXkQzECs1M6hhoGXLwLQOZE= +github.com/bits-and-blooms/bitset v1.24.4/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd v0.24.2 h1:aLmxPguqxza+4ag8R1I2nnJjSu2iFn/kqtHTIImswcY= github.com/btcsuite/btcd v0.24.2/go.mod h1:5C8ChTkl5ejr3WHj8tkQSCmydiMEPB0ZhQhehpq7Dgg= github.com/btcsuite/btcd/btcec/v2 v2.3.5 h1:dpAlnAwmT1yIBm3exhT1/8iUSD98RDJM5vqJVQDQLiU= @@ -169,6 +169,8 @@ github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= 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/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -192,8 +194,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= -github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f h1:Y8xYupdHxryycyPlc9Y+bSQAYZnetRJ70VMVKm5CKI0= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f/go.mod h1:HlzOvOjVBOfTGSRXRyY0OiCS/3J1akRGQQpRO/7zyF4= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -230,8 +232,8 @@ github.com/cosmos/cosmos-db v1.1.3 h1:7QNT77+vkefostcKkhrzDK9uoIEryzFrU9eoMeaQOP github.com/cosmos/cosmos-db v1.1.3/go.mod h1:kN+wGsnwUJZYn8Sy5Q2O0vCYA99MJllkKASbs6Unb9U= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.54.0-beta.0 h1:KOyM1CjuriSxMm2CNhceGfEc2LbRWuImKw7L9yp3+SM= -github.com/cosmos/cosmos-sdk v0.54.0-beta.0/go.mod h1:VBGchDTNoLW3xNy5mPNlnDFZiEjgRN/06vwSkXuBQdg= +github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa h1:/V1l4snedPDF0D02n4RcBGIc7Zh+AVUGDmdsfShIt/0= +github.com/cosmos/cosmos-sdk v0.54.0-rc.1.0.20251203182402-86d6325417fa/go.mod h1:zLaCSzfwEXz3whgptvaqfiYweilHL0K9qRoEFwQQvEg= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/go-ethereum v1.16.2-cosmos-1 h1:QIaIS6HIdPSBdTvpFhxswhMLUJgcr4irbd2o9ZKldAI= @@ -294,6 +296,8 @@ github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw= +github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/emicklei/dot v1.8.0 h1:HnD60yAKFAevNeT+TPYr9pb8VB9bqdeSo0nzwIW6IOI= github.com/emicklei/dot v1.8.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= @@ -304,9 +308,9 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M= -github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A= -github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= +github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329 h1:K+fnvUM0VZ7ZFJf0n4L/BRlnsb9pL/GuDG6FqaH+PwM= +github.com/envoyproxy/go-control-plane/envoy v1.35.0 h1:ixjkELDE+ru6idPxcHLj8LBVc2bFP7iBytj353BoHUo= +github.com/envoyproxy/go-control-plane/envoy v1.35.0/go.mod h1:09qwbGVuSWWAyN5t/b3iyVfz5+z8QWGrzkoqm/8SbEs= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= @@ -342,8 +346,8 @@ github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwv github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v4 v4.1.2 h1:TK/7NqRQZfgAh+Td8AlsrvtPoUyiHh0LqVvokh+1vHI= -github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo= +github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= +github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -472,6 +476,8 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc h1:GN2Lv3MGO7AS6PrRoT6yV5+wkrOpcszoIsO4+4ds248= +github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc/go.mod h1:+JKpmjMGhpgPL+rXZ5nsZieVzvarn86asRlBg4uNGnk= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -480,6 +486,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 h1:81+kWbE1yErFBMjME0I5k3x3kojjKsWtPYHEAutoPow= @@ -605,6 +613,8 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.10.3 h1:0laII9AQ6kFxo5SjhdTfSh9EgF20piD6TMHK6YuDm+4= github.com/linxGnu/grocksdb v1.10.3/go.mod h1:OLQKZwiKwaJiAVCsOzWKvwiLwfZ5Vz8Md5TYR7t7pM8= +github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54 h1:mFWunSatvkQQDhpdyuFAYwyAan3hzCuma+Pz8sqvOfg= +github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= @@ -749,6 +759,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= 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.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -775,8 +787,10 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.67.1 h1:OTSON1P4DNxzTg4hmKCc37o4ZAZDv0cfXLkOt0oEowI= -github.com/prometheus/common v0.67.1/go.mod h1:RpmT9v35q2Y+lsieQsdOh5sXZ6ajUGC8NjZAmr8vb0Q= +github.com/prometheus/common v0.67.4 h1:yR3NqWO1/UyO1w2PhUvXlGQs/PtFmoveVO0KZ4+Lvsc= +github.com/prometheus/common v0.67.4/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI= +github.com/prometheus/otlptranslator v0.0.2 h1:+1CdeLVrRQ6Psmhnobldo0kTp96Rj80DRXRd5OSnMEQ= +github.com/prometheus/otlptranslator v0.0.2/go.mod h1:P8AwMgdD7XEr6QRUJ2QWLpiAZTgTE2UYgjlu3svompI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -817,6 +831,8 @@ github.com/sasha-s/go-deadlock v0.3.6/go.mod h1:CUqNyyvMxTyjFqDT7MRg9mb4Dv/btmGT github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v4 v4.25.7 h1:bNb2JuqKuAu3tRlPv5piSmBZyMfecwQ+t/ILq+1JqVM= +github.com/shirou/gopsutil/v4 v4.25.7/go.mod h1:XV/egmwJtd3ZQjBpJVY5kndsiOO4IRqy9TQnmm6VP7U= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -844,8 +860,8 @@ github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= -github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= -github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= +github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo= +github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -915,8 +931,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= -github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= github.com/zondax/golem v0.27.0 h1:IbBjGIXF3SoGOZHsILJvIM/F/ylwJzMcHAcggiqniPw= github.com/zondax/golem v0.27.0/go.mod h1:AmorCgJPt00L8xN1VrMBe13PSifoZksnQ1Ge906bu4A= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= @@ -930,25 +944,65 @@ go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mI go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/detectors/gcp v1.36.0 h1:F7q2tNlCaHY9nMKHR6XH9/qkp8FktLnIcy6jJNyOCQw= -go.opentelemetry.io/contrib/detectors/gcp v1.36.0/go.mod h1:IbBN8uAIIx734PTonTPxAxnjc2pQTxWNkwfstZ+6H2k= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/detectors/gcp v1.38.0 h1:ZoYbqX7OaA/TAikspPl3ozPI6iY6LiIY9I8cUfm+pJs= +go.opentelemetry.io/contrib/detectors/gcp v1.38.0/go.mod h1:SU+iU7nu5ud4oCb3LQOhIZ3nRLj6FNVrKgtflbaf2ts= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= +go.opentelemetry.io/contrib/instrumentation/host v0.63.0 h1:zsaUrWypCf0NtYSUby+/BS6QqhXVNxMQD5w4dLczKCQ= +go.opentelemetry.io/contrib/instrumentation/host v0.63.0/go.mod h1:Ru+kuFO+ToZqBKwI59rCStOhW6LWrbGisYrFaX61bJk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 h1:Hf9xI/XLML9ElpiHVDNwvqI0hIFlzV8dgIr35kV1kRU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0/go.mod h1:NfchwuyNoMcZ5MLHwPrODwUF1HWCXWrL31s8gSAdIKY= +go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0 h1:PeBoRj6af6xMI7qCupwFvTbbnd49V7n5YpG6pg8iDYQ= +go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0/go.mod h1:ingqBCtMCe8I4vpz/UVzCW6sxoqgZB37nao91mLQ3Bw= +go.opentelemetry.io/contrib/otelconf v0.18.0 h1:ciF2Gf00BWs0DnexKFZXcxg9kJ8r3SUW1LOzW3CsKA8= +go.opentelemetry.io/contrib/otelconf v0.18.0/go.mod h1:FcP7k+JLwBLdOxS6qY6VQ/4b5VBntI6L6o80IMwhAeI= +go.opentelemetry.io/contrib/propagators/b3 v1.37.0 h1:0aGKdIuVhy5l4GClAjl72ntkZJhijf2wg1S7b5oLoYA= +go.opentelemetry.io/contrib/propagators/b3 v1.37.0/go.mod h1:nhyrxEJEOQdwR15zXrCKI6+cJK60PXAkJ/jRyfhr2mg= +go.opentelemetry.io/contrib/propagators/jaeger v1.37.0 h1:pW+qDVo0jB0rLsNeaP85xLuz20cvsECUcN7TE+D8YTM= +go.opentelemetry.io/contrib/propagators/jaeger v1.37.0/go.mod h1:x7bd+t034hxLTve1hF9Yn9qQJlO/pP8H5pWIt7+gsFM= go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0 h1:OMqPldHt79PqWKOMYIAQs3CxAi7RLgPxwfFSwr4ZxtM= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0/go.mod h1:1biG4qiqTxKiUCtoWDPpL3fB3KxVwCiGw81j3nKMuHE= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0 h1:QQqYw3lkrzwVsoEX0w//EhH/TCnpRdEenKBOOEIMjWc= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0/go.mod h1:gSVQcr17jk2ig4jqJ2DX30IdWH251JcNAecvrqTxH1s= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0 h1:vl9obrcoWVKp/lwl8tRE33853I8Xru9HFbw/skNeLs8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.38.0/go.mod h1:GAXRxmLJcVM3u22IjTg74zWBrRCKq8BnOqUVLodpcpw= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0 h1:Oe2z/BCg5q7k4iXC3cqJxKYg0ieRiOqF0cecFYdPTwk= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.38.0/go.mod h1:ZQM5lAJpOsKnYagGg/zV2krVqTtaVdYdDkhMoX6Oalg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 h1:lwI4Dc5leUqENgGuQImwLo4WnuXFPetmPpkLi2IrX54= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0/go.mod h1:Kz/oCE7z5wuyhPxsXDuaPteSWqjSBD5YaSdbxZYGbGk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 h1:aTL7F04bJHUlztTsNGJ2l+6he8c+y/b//eR0jjjemT4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4= +go.opentelemetry.io/otel/exporters/prometheus v0.60.0 h1:cGtQxGvZbnrWdC2GyjZi0PDKVSLWP/Jocix3QWfXtbo= +go.opentelemetry.io/otel/exporters/prometheus v0.60.0/go.mod h1:hkd1EekxNo69PTV4OWFGZcKQiIqg0RfuWExcPKFvepk= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0 h1:B/g+qde6Mkzxbry5ZZag0l7QrQBCtVm7lVjaLgmpje8= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.14.0/go.mod h1:mOJK8eMmgW6ocDJn6Bn11CcZ05gi3P8GylBXEkZtbgA= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0 h1:wm/Q0GAAykXv83wzcKzGGqAnnfLFyFe7RslekZuv+VI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0/go.mod h1:ra3Pa40+oKjvYh+ZD3EdxFZZB0xdMfuileHAm4nNN7w= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0 h1:kJxSDN4SgWWTjG/hPp3O7LCGLcHXFlvS2/FFOrwL+SE= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.38.0/go.mod h1:mgIOzS7iZeKJdeB8/NYHrJ48fdGc71Llo5bJ1J4DWUE= +go.opentelemetry.io/otel/log v0.14.0 h1:2rzJ+pOAZ8qmZ3DDHg73NEKzSZkhkGIua9gXtxNGgrM= +go.opentelemetry.io/otel/log v0.14.0/go.mod h1:5jRG92fEAgx0SU/vFPxmJvhIuDU9E1SUnEQrMlJpOno= go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/log v0.14.0 h1:JU/U3O7N6fsAXj0+CXz21Czg532dW2V4gG1HE/e8Zrg= +go.opentelemetry.io/otel/sdk/log v0.14.0/go.mod h1:imQvII+0ZylXfKU7/wtOND8Hn4OpT3YUoIgqJVksUkM= +go.opentelemetry.io/otel/sdk/log/logtest v0.14.0 h1:Ijbtz+JKXl8T2MngiwqBlPaHqc4YCaP/i13Qrow6gAM= +go.opentelemetry.io/otel/sdk/log/logtest v0.14.0/go.mod h1:dCU8aEL6q+L9cYTqcVOk8rM9Tp8WdnHOPLiBgp0SGOA= go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= +go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1037,8 +1091,8 @@ golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo= -golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= +golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1082,6 +1136,7 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1172,10 +1227,10 @@ google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4= google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s= -google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 h1:BIRfGDEjiHRrk0QKZe3Xv2ieMhtgRGeLcZQ0mIVn4EY= -google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5/go.mod h1:j3QtIyytwqGr1JUDtYXwtMXWPKsEa5LtzIFN1Wn5WvE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 h1:eaY8u2EuxbRv7c3NiGK0/NedzVsCcV6hDuU5qPX5EGE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc= +google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 h1:mepRgnBZa07I4TRuomDE4sTIYieg/osKmzIf4USdWS4= +google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 h1:M1rk8KBnUsBDg1oPGHNCxG4vc1f49epmTO7xscSajMk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1193,8 +1248,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A= -google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= +google.golang.org/grpc v1.77.0 h1:wVVY6/8cGA6vvffn+wWK5ToddbgdU3d8MNENr4evgXM= +google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/trace/span.go b/trace/span.go new file mode 100644 index 000000000..996d99fe3 --- /dev/null +++ b/trace/span.go @@ -0,0 +1,25 @@ +package trace + +import ( + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace" +) + +// EndSpanErr records the error to the span if not nil, and then ends the span. +// NOTE: This should be called like so: +// +// defer func() { EndSpanErr(span, err) } +// +// and not like this: +// +// defer EndSpanErr(span, err) +// +// This is due to the fact that the latter captures the error value at the point in time of the defer line, +// whilst the former will capture the final error value at the very end of the function. +func EndSpanErr(span trace.Span, err error) { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, err.Error()) + } + span.End() +} diff --git a/x/vm/client/cli/query.go b/x/vm/client/cli/query.go index e3ecc752b..8395e444b 100644 --- a/x/vm/client/cli/query.go +++ b/x/vm/client/cli/query.go @@ -70,7 +70,7 @@ func GetStorageCmd() *cobra.Command { Key: key, } - res, err := queryClient.Storage(rpctypes.ContextWithHeight(clientCtx.Height), req) + res, err := queryClient.Storage(rpctypes.NewContextWithHeight(clientCtx.Height), req) if err != nil { return err } @@ -107,7 +107,7 @@ func GetCodeCmd() *cobra.Command { Address: address, } - res, err := queryClient.Code(rpctypes.ContextWithHeight(clientCtx.Height), req) + res, err := queryClient.Code(rpctypes.NewContextWithHeight(clientCtx.Height), req) if err != nil { return err } @@ -144,7 +144,7 @@ func GetAccountCmd() *cobra.Command { Address: address, } - res, err := queryClient.Account(rpctypes.ContextWithHeight(clientCtx.Height), req) + res, err := queryClient.Account(rpctypes.NewContextWithHeight(clientCtx.Height), req) if err != nil { return err }