From 03e9d9e161e0daff5536b4d1dbfb602612ecfa8d Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Fri, 12 Jan 2024 17:18:55 -0600 Subject: [PATCH] bump libocr; add context --- go.mod | 44 ++++++------ go.sum | 95 +++++++++++++------------ integration-tests/go.mod | 14 ++-- integration-tests/go.sum | 28 ++++---- pkg/monitoring/source_envelope.go | 2 +- pkg/solana/cmd/chainlink-solana/main.go | 2 +- pkg/solana/config_digester.go | 7 +- pkg/solana/config_digester_test.go | 6 +- pkg/solana/config_tracker.go | 6 +- pkg/solana/monitor/balance.go | 4 +- pkg/solana/relay.go | 65 +++++++++-------- pkg/solana/report.go | 7 +- pkg/solana/report_fuzz_test.go | 9 ++- pkg/solana/report_test.go | 25 ++++--- pkg/solana/transmitter.go | 2 +- pkg/solana/txm/txm.go | 42 +++++------ 16 files changed, 185 insertions(+), 173 deletions(-) diff --git a/go.mod b/go.mod index 608cd0786..b4c779797 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/smartcontractkit/chainlink-solana go 1.21.6 +replace github.com/smartcontractkit/libocr => github.com/jmank88/libocr v0.0.0-20240730201038-dd02ae81cc0a + require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/gagliardetto/binary v0.7.7 @@ -14,11 +16,11 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/pelletier/go-toml/v2 v2.2.0 github.com/prometheus/client_golang v1.17.0 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712101200-5b11e6cc6e86 + github.com/smartcontractkit/chainlink-common v0.2.2-0.20240801162700-d8ba1275f696 github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e github.com/stretchr/testify v1.9.0 - go.uber.org/zap v1.26.0 - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa + go.uber.org/zap v1.27.0 + golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7 golang.org/x/sync v0.7.0 golang.org/x/text v0.16.0 ) @@ -34,13 +36,13 @@ require ( github.com/buger/goterm v0.0.0-20200322175922-2f3e71b85129 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/confluentinc/confluent-kafka-go/v2 v2.3.0 // indirect github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 // indirect github.com/fatih/color v1.14.1 // indirect github.com/fxamacker/cbor/v2 v2.5.0 // indirect github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect @@ -82,7 +84,7 @@ require ( github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.2.0 // indirect - github.com/shopspring/decimal v1.3.1 // indirect + github.com/shopspring/decimal v1.4.0 // indirect github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 // indirect @@ -94,24 +96,24 @@ require ( go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/sdk v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/term v0.22.0 // indirect golang.org/x/time v0.3.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/grpc v1.64.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect + google.golang.org/grpc v1.65.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 8da3053c1..a44f34b03 100644 --- a/go.sum +++ b/go.sum @@ -74,8 +74,8 @@ github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK3 github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -147,8 +147,8 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -263,6 +263,8 @@ github.com/invopop/jsonschema v0.12.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uO github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/jmank88/libocr v0.0.0-20240730201038-dd02ae81cc0a h1:7RUf8Kl/GJ5ePLmY8kA/BzuQ2N9tw3ELuvjQG6u6CQg= +github.com/jmank88/libocr v0.0.0-20240730201038-dd02ae81cc0a/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= @@ -416,20 +418,19 @@ github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H github.com/santhosh-tekuri/jsonschema/v5 v5.2.0 h1:WCcC4vZDS1tYNxjWlwRJZQy28r8CMoggKnxNzxsVDMQ= github.com/santhosh-tekuri/jsonschema/v5 v5.2.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= 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.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712101200-5b11e6cc6e86 h1:TYALsn6Jue7xCIcXMel+Ow0SuudVfOUAz6iups946Yw= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712101200-5b11e6cc6e86/go.mod h1:fh9eBbrReCmv31bfz52ENCAMa7nTKQbdhb2B3+S2VGo= +github.com/smartcontractkit/chainlink-common v0.2.2-0.20240801162700-d8ba1275f696 h1:iMHuXAXvo2MrqDJxHIox9+MdP3eYzYbdQVHzjA7rq+8= +github.com/smartcontractkit/chainlink-common v0.2.2-0.20240801162700-d8ba1275f696/go.mod h1:9y9QkenuRx6hCNN15ZlTreYV0N0LE5jQBYrrGTM7KYk= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= -github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e h1:9ypZ/8aW8Vm497i1gXHcT96oNLiu88jbg9QdX+IUE3E= -github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -509,20 +510,20 @@ go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -544,8 +545,8 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -556,8 +557,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -568,8 +569,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7 h1:wDLEX9a7YQoKdKNQt88rtydkqDxeGaBUTnIYc3iG/mA= +golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -592,8 +593,8 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -624,8 +625,8 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -689,13 +690,13 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -750,8 +751,8 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -795,10 +796,10 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d h1:kHjw/5UfflP/L5EbledDrcG4C2597RtymmGRZvHiCuY= +google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d/go.mod h1:mw8MG/Qz5wfgYr6VqVCiZcHe/GJEfI+oGGDCohaVgB0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d h1:JU0iKnSg02Gmb5ZdV8nYsKEKsP6o/FGVWTrw4i1DA9A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -812,8 +813,8 @@ google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/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= @@ -825,8 +826,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index b376c77be..bba7739d1 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -14,11 +14,11 @@ require ( github.com/lib/pq v1.10.9 github.com/pelletier/go-toml/v2 v2.2.2 github.com/rs/zerolog v1.31.0 - github.com/smartcontractkit/chainlink-common v0.2.2-0.20240731121127-5ae22cf04996 + github.com/smartcontractkit/chainlink-common v0.2.2-0.20240801162700-d8ba1275f696 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e github.com/smartcontractkit/chainlink-testing-framework v1.33.0 - github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731214442-94aa60db8f38 - github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731214442-94aa60db8f38 + github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731133518-628ac00c4800 + github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731133518-628ac00c4800 github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7 github.com/smartcontractkit/seth v1.0.12 github.com/stretchr/testify v1.9.0 @@ -357,10 +357,10 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/slack-go/slack v0.12.2 // indirect github.com/smartcontractkit/chain-selectors v1.0.10 // indirect - github.com/smartcontractkit/chainlink-automation v1.0.4 // indirect + github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240730204921-f38254c5b66f // indirect github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 // indirect - github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240718160222-2dc0c8136bfa // indirect - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 // indirect + github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240731133302-5fd73267ba3e // indirect + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240731133359-f2fc25580082 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 // indirect github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect @@ -369,7 +369,7 @@ require ( github.com/smartcontractkit/wsrpc v0.8.1 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/sony/gobreaker v0.5.0 // indirect - github.com/spf13/afero v1.9.5 // indirect + github.com/spf13/afero v1.10.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 338213857..ffecd6deb 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1360,26 +1360,26 @@ github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCqR1LNS7aI3jT0V+xGrg= github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= -github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= -github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.2.2-0.20240731121127-5ae22cf04996 h1:6s4cTIE3NbATxWLrD5JLCq097PC5Y4GKK/Kk4fhURpY= -github.com/smartcontractkit/chainlink-common v0.2.2-0.20240731121127-5ae22cf04996/go.mod h1:Jg1sCTsbxg76YByI8ifpFby3FvVqISStHT8ypy9ocmY= +github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240730204921-f38254c5b66f h1:ucwZwP4JTlwIQ5Ad4ihnLEBOIEzeXIbAgjvNb75oREg= +github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240730204921-f38254c5b66f/go.mod h1:6NLIddgZJsBN9Y31jYP7mMLOy/iq1A8IUSTUINfBEOc= +github.com/smartcontractkit/chainlink-common v0.2.2-0.20240801162700-d8ba1275f696 h1:iMHuXAXvo2MrqDJxHIox9+MdP3eYzYbdQVHzjA7rq+8= +github.com/smartcontractkit/chainlink-common v0.2.2-0.20240801162700-d8ba1275f696/go.mod h1:9y9QkenuRx6hCNN15ZlTreYV0N0LE5jQBYrrGTM7KYk= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 h1:NBQLtqk8zsyY4qTJs+NElI3aDFTcAo83JHvqD04EvB0= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45/go.mod h1:LV0h7QBQUpoC2UUi6TcUvcIFm1xjP/DtEcqV8+qeLUs= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240718160222-2dc0c8136bfa h1:g75H8oh2ws52s8BekwvGQ9XvBVu3E7WM1rfiA0PN0zk= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240718160222-2dc0c8136bfa/go.mod h1:wZvLHX/Sd9hskN51016cTFcT3G62KXVa6xbVDS7tRjc= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h1:BCHu4pNP6arrcHLEWx61XjLaonOd2coQNyL0NTUcaMc= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827/go.mod h1:OPX+wC2TWQsyLNpR7daMt2vMpmsNcoBxbZyGTHr6tiA= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240731133302-5fd73267ba3e h1:AHT7l+UAVfn00jXAPicBwIckgYOg6ZzzoQ1rzOtGHhc= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240731133302-5fd73267ba3e/go.mod h1:cAULRiVmGiuGHEfYAf4yol6w4pw+lZ034bfO1bJUEfU= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240731133359-f2fc25580082 h1:VuB5Q1eJ/Xa14wd3rQECLuGiIsrjY6ZIChFM0WPwFqw= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240731133359-f2fc25580082/go.mod h1:IRJkCV3rC28KYhbh9n2rhc3H04dnNVxSJrhkasYGPoA= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU= github.com/smartcontractkit/chainlink-testing-framework v1.33.0 h1:vHQODEdsq5AIbRiyZZ30de6uwJUNFXLYvCr+Odr8TIs= github.com/smartcontractkit/chainlink-testing-framework v1.33.0/go.mod h1:GrhHthZ5AmceF82+Ypw6Fov1EvB05JJbb1T0EKyO1x0= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 h1:Kk5OVlx/5g9q3Z3lhxytZS4/f8ds1MiNM8yaHgK3Oe8= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= -github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731214442-94aa60db8f38 h1:wMvFfYblC2mME2HzBVI96UJDI2gSNdPgRLxSZsK9p1I= -github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731214442-94aa60db8f38/go.mod h1:O95Ni59NPkOe82lAjeRUwU30zkOA+0cdeGN+9NPhQF4= -github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731214442-94aa60db8f38 h1:QDJq+3l1EdxUJJ1zpW2UkcyzcZU/S33h/a1945+qYPU= -github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731214442-94aa60db8f38/go.mod h1:yEWlmvPXqpG9FbY4OwvpLbmQUELz7KQ0ThRKMy6x0vY= +github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731133518-628ac00c4800 h1:38OKTAfZcGSyyO/egz1IDQ+clFkbRoGG7d1y2kNrZLU= +github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731133518-628ac00c4800/go.mod h1:x+dm0zKrJ5J/PHrbi1WxelptmUtTJsM5ffvbmxEcj+Q= +github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731133518-628ac00c4800 h1:b/fxzMbxx/pLmc5liWX+WFUmFPw5WLeRfXHJJ3GBTCk= +github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731133518-628ac00c4800/go.mod h1:jIk1yaSyaM7CGhFX2r+vFTvQvN7XYdxt1egs7C6ChRc= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= @@ -1407,8 +1407,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= +github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= diff --git a/pkg/monitoring/source_envelope.go b/pkg/monitoring/source_envelope.go index 8c2380d7d..853f69760 100644 --- a/pkg/monitoring/source_envelope.go +++ b/pkg/monitoring/source_envelope.go @@ -64,7 +64,7 @@ func (s *envelopeSource) Fetch(ctx context.Context) (interface{}, error) { if err != nil { return nil, fmt.Errorf("failed to fetch state from on-chain: %w", err) } - contractConfig, err := pkgSolana.ConfigFromState(state) + contractConfig, err := pkgSolana.ConfigFromState(ctx, state) if err != nil { return nil, fmt.Errorf("failed to decode ContractConfig from on-chain state: %w", err) } diff --git a/pkg/solana/cmd/chainlink-solana/main.go b/pkg/solana/cmd/chainlink-solana/main.go index 08893e7de..a653aa7de 100644 --- a/pkg/solana/cmd/chainlink-solana/main.go +++ b/pkg/solana/cmd/chainlink-solana/main.go @@ -70,7 +70,7 @@ func (c *pluginRelayer) NewRelayer(ctx context.Context, config string, keystore if err != nil { return nil, fmt.Errorf("failed to create chain: %w", err) } - ra := &loop.RelayerAdapter{Relayer: solana.NewRelayer(c.Logger, chain, capRegistry), RelayerExt: chain} + ra := solana.NewRelayer(c.Logger, chain, capRegistry) c.SubService(ra) diff --git a/pkg/solana/config_digester.go b/pkg/solana/config_digester.go index 17c70e04a..b1753e79f 100644 --- a/pkg/solana/config_digester.go +++ b/pkg/solana/config_digester.go @@ -1,6 +1,7 @@ package solana import ( + "context" "crypto/sha256" "encoding/binary" "fmt" @@ -20,7 +21,7 @@ type OffchainConfigDigester struct { } // ConfigDigest is meant to do the same thing as config_digest_from_data from the program. -func (d OffchainConfigDigester) ConfigDigest(cfg types.ContractConfig) (types.ConfigDigest, error) { +func (d OffchainConfigDigester) ConfigDigest(ctx context.Context, cfg types.ContractConfig) (types.ConfigDigest, error) { digest := types.ConfigDigest{} buf := sha256.New() @@ -85,7 +86,7 @@ func (d OffchainConfigDigester) ConfigDigest(cfg types.ContractConfig) (types.Co return digest, fmt.Errorf("incorrect hash size %d, expected %d", n, len(digest)) } - pre, err := d.ConfigDigestPrefix() + pre, err := d.ConfigDigestPrefix(ctx) if err != nil { return digest, err } @@ -95,6 +96,6 @@ func (d OffchainConfigDigester) ConfigDigest(cfg types.ContractConfig) (types.Co } // This should return the same constant value on every invocation -func (OffchainConfigDigester) ConfigDigestPrefix() (types.ConfigDigestPrefix, error) { +func (OffchainConfigDigester) ConfigDigestPrefix(ctx context.Context) (types.ConfigDigestPrefix, error) { return types.ConfigDigestPrefixSolana, nil } diff --git a/pkg/solana/config_digester_test.go b/pkg/solana/config_digester_test.go index 9719d627b..eaab12003 100644 --- a/pkg/solana/config_digester_test.go +++ b/pkg/solana/config_digester_test.go @@ -6,6 +6,8 @@ import ( bin "github.com/gagliardetto/binary" "github.com/gagliardetto/solana-go" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestConfigDigester(t *testing.T) { @@ -22,10 +24,10 @@ func TestConfigDigester(t *testing.T) { var state State err = bin.NewBorshDecoder(mockState.Raw).Decode(&state) require.NoError(t, err) - config, err := ConfigFromState(state) + config, err := ConfigFromState(tests.Context(t), state) require.NoError(t, err) - actualDigest, err := digester.ConfigDigest(config) + actualDigest, err := digester.ConfigDigest(tests.Context(t), config) require.NoError(t, err) expectedDigest := mockState.ConfigDigestHex diff --git a/pkg/solana/config_tracker.go b/pkg/solana/config_tracker.go index 3287aa115..a04450edd 100644 --- a/pkg/solana/config_tracker.go +++ b/pkg/solana/config_tracker.go @@ -25,7 +25,7 @@ func (c *ConfigTracker) LatestConfigDetails(ctx context.Context) (changedInBlock return state.Config.LatestConfigBlockNumber, state.Config.LatestConfigDigest, err } -func ConfigFromState(state State) (types.ContractConfig, error) { +func ConfigFromState(ctx context.Context, state State) (types.ContractConfig, error) { pubKeys := []types.OnchainPublicKey{} accounts := []types.Account{} oracles, err := state.Oracles.Data() @@ -43,7 +43,7 @@ func ConfigFromState(state State) (types.ContractConfig, error) { Max: state.Config.MaxAnswer.BigInt(), } - onchainConfig, err := median.StandardOnchainConfigCodec{}.Encode(onchainConfigStruct) + onchainConfig, err := median.StandardOnchainConfigCodec{}.Encode(ctx, onchainConfigStruct) if err != nil { return types.ContractConfig{}, err } @@ -70,7 +70,7 @@ func (c *ConfigTracker) LatestConfig(ctx context.Context, changedInBlock uint64) if err != nil { return types.ContractConfig{}, err } - return ConfigFromState(state) + return ConfigFromState(ctx, state) } // LatestBlockHeight returns the height of the most recent block in the chain. diff --git a/pkg/solana/monitor/balance.go b/pkg/solana/monitor/balance.go index 00f873488..5c7c88f5d 100644 --- a/pkg/solana/monitor/balance.go +++ b/pkg/solana/monitor/balance.go @@ -64,14 +64,14 @@ func (b *balanceMonitor) Name() string { } func (b *balanceMonitor) Start(context.Context) error { - return b.StartOnce("SolanaBalanceMonitor", func() error { + return b.StartOnce("BalanceMonitor", func() error { go b.monitor() return nil }) } func (b *balanceMonitor) Close() error { - return b.StopOnce("SolanaBalanceMonitor", func() error { + return b.StopOnce("BalanceMonitor", func() error { close(b.stop) <-b.done return nil diff --git a/pkg/solana/relay.go b/pkg/solana/relay.go index a272f15ea..2b3372327 100644 --- a/pkg/solana/relay.go +++ b/pkg/solana/relay.go @@ -5,6 +5,7 @@ import ( "encoding/json" "errors" "fmt" + "math/big" "github.com/gagliardetto/solana-go" @@ -29,17 +30,15 @@ type TxManager interface { var _ relaytypes.Relayer = &Relayer{} //nolint:staticcheck type Relayer struct { - lggr logger.Logger - chain Chain - stopCh services.StopChan + lggr logger.Logger + chain Chain } // Note: constructed in core -func NewRelayer(lggr logger.Logger, chain Chain, capabilitiesRegistry core.CapabilitiesRegistry) *Relayer { +func NewRelayer(lggr logger.Logger, chain Chain, _ core.CapabilitiesRegistry) *Relayer { return &Relayer{ - lggr: lggr, - chain: chain, - stopCh: make(chan struct{}), + lggr: logger.Named(lggr, "Relayer"), + chain: chain, } } @@ -48,50 +47,58 @@ func (r *Relayer) Name() string { } // Start starts the relayer respecting the given context. -func (r *Relayer) Start(context.Context) error { +func (r *Relayer) Start(ctx context.Context) error { // No subservices started on relay start, but when the first job is started if r.chain == nil { return errors.New("Solana unavailable") } - return nil + return r.chain.Start(ctx) } // Close will close all open subservices -func (r *Relayer) Close() error { - close(r.stopCh) - return nil -} +func (r *Relayer) Close() error { return r.chain.Close() } func (r *Relayer) Ready() error { return r.chain.Ready() } -// Healthy only if all subservices are healthy func (r *Relayer) Healthy() error { return nil } func (r *Relayer) HealthReport() map[string]error { - return map[string]error{r.Name(): r.Healthy()} + hp := map[string]error{r.Name(): r.Healthy()} + services.CopyHealth(hp, r.chain.HealthReport()) + return hp +} + +func (r *Relayer) GetChainStatus(ctx context.Context) (relaytypes.ChainStatus, error) { + return r.chain.GetChainStatus(ctx) +} + +func (r *Relayer) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []relaytypes.NodeStatus, nextPageToken string, total int, err error) { + return r.chain.ListNodeStatuses(ctx, pageSize, pageToken) +} + +func (r *Relayer) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error { + return r.chain.Transact(ctx, from, to, amount, balanceCheck) } -func (r *Relayer) NewMercuryProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MercuryProvider, error) { +func (r *Relayer) NewMercuryProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MercuryProvider, error) { return nil, errors.New("mercury is not supported for solana") } -func (r *Relayer) NewLLOProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.LLOProvider, error) { +func (r *Relayer) NewLLOProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.LLOProvider, error) { return nil, errors.New("data streams is not supported for solana") } -func (r *Relayer) NewCCIPCommitProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.CCIPCommitProvider, error) { +func (r *Relayer) NewCCIPCommitProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.CCIPCommitProvider, error) { return nil, errors.New("ccip.commit is not supported for solana") } -func (r *Relayer) NewCCIPExecProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.CCIPExecProvider, error) { +func (r *Relayer) NewCCIPExecProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.CCIPExecProvider, error) { return nil, errors.New("ccip.exec is not supported for solana") } -func (r *Relayer) NewConfigProvider(args relaytypes.RelayArgs) (relaytypes.ConfigProvider, error) { - ctx, cancel := r.stopCh.NewCtx() - defer cancel() +func (r *Relayer) NewConfigProvider(ctx context.Context, args relaytypes.RelayArgs) (relaytypes.ConfigProvider, error) { configWatcher, err := newConfigProvider(ctx, r.lggr, r.chain, args) if err != nil { // Never return (*configProvider)(nil) @@ -104,13 +111,11 @@ func (r *Relayer) NewChainWriter(_ context.Context, _ []byte) (relaytypes.ChainW return nil, errors.New("chain writer is not supported for solana") } -func (r *Relayer) NewContractReader(_ []byte) (relaytypes.ContractReader, error) { +func (r *Relayer) NewContractReader(ctx context.Context, _ []byte) (relaytypes.ContractReader, error) { return nil, errors.New("contract reader is not supported for solana") } -func (r *Relayer) NewMedianProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MedianProvider, error) { - ctx, cancel := r.stopCh.NewCtx() - defer cancel() +func (r *Relayer) NewMedianProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MedianProvider, error) { lggr := logger.Named(r.lggr, "MedianProvider") configWatcher, err := newConfigProvider(ctx, lggr, r.chain, rargs) if err != nil { @@ -158,11 +163,11 @@ func (r *Relayer) NewMedianProvider(rargs relaytypes.RelayArgs, pargs relaytypes }, nil } -func (r *Relayer) NewFunctionsProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.FunctionsProvider, error) { +func (r *Relayer) NewFunctionsProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.FunctionsProvider, error) { return nil, errors.New("functions are not supported for solana") } -func (r *Relayer) NewAutomationProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.AutomationProvider, error) { +func (r *Relayer) NewAutomationProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.AutomationProvider, error) { return nil, errors.New("automation is not supported for solana") } @@ -307,10 +312,10 @@ func (p *medianProvider) Codec() relaytypes.Codec { return nil } -func (r *Relayer) NewPluginProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.PluginProvider, error) { +func (r *Relayer) NewPluginProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.PluginProvider, error) { return nil, errors.New("plugin provider is not supported for solana") } -func (r *Relayer) NewOCR3CapabilityProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.OCR3CapabilityProvider, error) { +func (r *Relayer) NewOCR3CapabilityProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.OCR3CapabilityProvider, error) { return nil, errors.New("ocr3 capability provider is not supported for solana") } diff --git a/pkg/solana/report.go b/pkg/solana/report.go index 572ac6023..99c949b5b 100644 --- a/pkg/solana/report.go +++ b/pkg/solana/report.go @@ -1,6 +1,7 @@ package solana import ( + "context" "encoding/binary" "fmt" "math/big" @@ -15,7 +16,7 @@ var _ median.ReportCodec = (*ReportCodec)(nil) type ReportCodec struct{} -func (c ReportCodec) BuildReport(oo []median.ParsedAttributedObservation) (types.Report, error) { +func (c ReportCodec) BuildReport(ctx context.Context, oo []median.ParsedAttributedObservation) (types.Report, error) { n := len(oo) if n == 0 { return nil, fmt.Errorf("cannot build report from empty attributed observations") @@ -78,7 +79,7 @@ func (c ReportCodec) BuildReport(oo []median.ParsedAttributedObservation) (types return types.Report(report), nil } -func (c ReportCodec) MedianFromReport(report types.Report) (*big.Int, error) { +func (c ReportCodec) MedianFromReport(ctx context.Context, report types.Report) (*big.Int, error) { // report should contain timestamp + observers + median + juels per eth if len(report) != int(ReportLen) { return nil, fmt.Errorf("report length mismatch: %d (received), %d (expected)", len(report), ReportLen) @@ -91,7 +92,7 @@ func (c ReportCodec) MedianFromReport(report types.Report) (*big.Int, error) { return bigbigendian.DeserializeSigned(int(MedianLen), median) } -func (c ReportCodec) MaxReportLength(n int) (int, error) { +func (c ReportCodec) MaxReportLength(ctx context.Context, n int) (int, error) { return int(ReportLen), nil } diff --git a/pkg/solana/report_fuzz_test.go b/pkg/solana/report_fuzz_test.go index 5aaa1cb19..34027d476 100644 --- a/pkg/solana/report_fuzz_test.go +++ b/pkg/solana/report_fuzz_test.go @@ -11,13 +11,15 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) // Ensure your env is using go 1.18 then in pkg/solana: // go test -tags=go1.18 -fuzz ./... func FuzzReportCodecMedianFromReport(f *testing.F) { cdc := ReportCodec{} - report, err := cdc.BuildReport([]median.ParsedAttributedObservation{ + report, err := cdc.BuildReport(tests.Context(f), []median.ParsedAttributedObservation{ {Timestamp: uint32(time.Now().Unix()), Value: big.NewInt(10), JuelsPerFeeCoin: big.NewInt(100000)}, {Timestamp: uint32(time.Now().Unix()), Value: big.NewInt(10), JuelsPerFeeCoin: big.NewInt(200000)}, {Timestamp: uint32(time.Now().Unix()), Value: big.NewInt(11), JuelsPerFeeCoin: big.NewInt(300000)}}) @@ -26,11 +28,12 @@ func FuzzReportCodecMedianFromReport(f *testing.F) { // Seed with valid report f.Add([]byte(report)) f.Fuzz(func(t *testing.T, report []byte) { - med, err := cdc.MedianFromReport(report) + ctx := tests.Context(t) + med, err := cdc.MedianFromReport(ctx, report) if err == nil { // Should always be able to build a report from the medians extracted // Note however that juelsPerFeeCoin is only 8 bytes, so we can use the median for it - _, err = cdc.BuildReport([]median.ParsedAttributedObservation{{Timestamp: uint32(time.Now().Unix()), Value: med, JuelsPerFeeCoin: big.NewInt(100000)}}) + _, err = cdc.BuildReport(ctx, []median.ParsedAttributedObservation{{Timestamp: uint32(time.Now().Unix()), Value: med, JuelsPerFeeCoin: big.NewInt(100000)}}) require.NoError(t, err) } }) diff --git a/pkg/solana/report_test.go b/pkg/solana/report_test.go index 4f4b38bdd..84452dada 100644 --- a/pkg/solana/report_test.go +++ b/pkg/solana/report_test.go @@ -16,9 +16,11 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestBuildReport(t *testing.T) { + ctx := tests.Context(t) c := ReportCodec{} oo := []median.ParsedAttributedObservation{} @@ -40,7 +42,7 @@ func TestBuildReport(t *testing.T) { observers[i] = uint8(i) } - report, err := c.BuildReport(oo) + report, err := c.BuildReport(ctx, oo) assert.NoError(t, err) // validate length @@ -75,7 +77,7 @@ func TestMedianFromOnChainReport(t *testing.T) { 13, 224, 182, 179, 167, 100, 0, 0, // juels per luna (1 with 18 decimal places) } - res, err := c.MedianFromReport(report) + res, err := c.MedianFromReport(tests.Context(t), report) assert.NoError(t, err) assert.Equal(t, "1234567890", res.String()) } @@ -89,7 +91,7 @@ type medianTest struct { func TestMedianFromReport(t *testing.T) { cdc := ReportCodec{} // Requires at least one obs - _, err := cdc.BuildReport(nil) + _, err := cdc.BuildReport(tests.Context(t), nil) require.Error(t, err) var tt = []medianTest{ { @@ -143,6 +145,7 @@ func TestMedianFromReport(t *testing.T) { for _, tc := range tt { tc := tc t.Run(tc.name, func(t *testing.T) { + ctx := tests.Context(t) var pos []median.ParsedAttributedObservation for i, obs := range tc.obs { pos = append(pos, median.ParsedAttributedObservation{ @@ -151,12 +154,12 @@ func TestMedianFromReport(t *testing.T) { Observer: commontypes.OracleID(uint8(i))}, ) } - report, err := cdc.BuildReport(pos) + report, err := cdc.BuildReport(ctx, pos) require.NoError(t, err) - max, err := cdc.MaxReportLength(len(tc.obs)) + max, err := cdc.MaxReportLength(ctx, len(tc.obs)) require.NoError(t, err) assert.Equal(t, len(report), max) - med, err := cdc.MedianFromReport(report) + med, err := cdc.MedianFromReport(ctx, report) require.NoError(t, err) assert.Equal(t, tc.expectedMedian.String(), med.String()) count, err := cdc.ObserversCountFromReport(report) @@ -202,6 +205,7 @@ func TestHashReport(t *testing.T) { } func TestNegativeMedianValue(t *testing.T) { + ctx := tests.Context(t) c := ReportCodec{} oo := []median.ParsedAttributedObservation{ median.ParsedAttributedObservation{ @@ -213,7 +217,7 @@ func TestNegativeMedianValue(t *testing.T) { } // create report - report, err := c.BuildReport(oo) + report, err := c.BuildReport(ctx, oo) assert.NoError(t, err) // check report properly encoded negative number @@ -229,12 +233,13 @@ func TestNegativeMedianValue(t *testing.T) { assert.True(t, oo[0].Value.Cmp(medianFromRaw.BigInt()) == 0, "median observation in raw report does not match") // check report can be parsed properly with a negative number - res, err := c.MedianFromReport(report) + res, err := c.MedianFromReport(ctx, report) assert.NoError(t, err) assert.True(t, oo[0].Value.Cmp(res) == 0) } func TestReportHandleOverflow(t *testing.T) { + ctx := tests.Context(t) // too large observation should not cause panic c := ReportCodec{} oo := []median.ParsedAttributedObservation{ @@ -245,7 +250,7 @@ func TestReportHandleOverflow(t *testing.T) { Observer: commontypes.OracleID(0), }, } - _, err := c.BuildReport(oo) + _, err := c.BuildReport(ctx, oo) assert.Error(t, err) // too large juelsPerFeeCoin should not cause panic @@ -257,6 +262,6 @@ func TestReportHandleOverflow(t *testing.T) { Observer: commontypes.OracleID(0), }, } - _, err = c.BuildReport(oo) + _, err = c.BuildReport(ctx, oo) assert.Error(t, err) } diff --git a/pkg/solana/transmitter.go b/pkg/solana/transmitter.go index e524470d5..ca5a55dc9 100644 --- a/pkg/solana/transmitter.go +++ b/pkg/solana/transmitter.go @@ -101,6 +101,6 @@ func (c *Transmitter) LatestConfigDigestAndEpoch( return state.Config.LatestConfigDigest, state.Config.Epoch, err } -func (c *Transmitter) FromAccount() (types.Account, error) { +func (c *Transmitter) FromAccount(ctx context.Context) (types.Account, error) { return types.Account(c.transmissionSigner.String()), nil } diff --git a/pkg/solana/txm/txm.go b/pkg/solana/txm/txm.go index a5700bd8b..b5aa8ba14 100644 --- a/pkg/solana/txm/txm.go +++ b/pkg/solana/txm/txm.go @@ -37,17 +37,17 @@ type SimpleKeystore interface { // Txm manages transactions for the solana blockchain. // simple implementation with no persistently stored txs type Txm struct { - starter services.StateMachine - lggr logger.Logger - chSend chan pendingTx - chSim chan pendingTx - chStop services.StopChan - done sync.WaitGroup - cfg config.Config - txs PendingTxContext - ks SimpleKeystore - client *utils.LazyLoad[client.ReaderWriter] - fee fees.Estimator + services.StateMachine + lggr logger.Logger + chSend chan pendingTx + chSim chan pendingTx + chStop services.StopChan + done sync.WaitGroup + cfg config.Config + txs PendingTxContext + ks SimpleKeystore + client *utils.LazyLoad[client.ReaderWriter] + fee fees.Estimator } type pendingTx struct { @@ -60,7 +60,7 @@ type pendingTx struct { // NewTxm creates a txm. Uses simulation so should only be used to send txes to trusted contracts i.e. OCR. func NewTxm(chainID string, tc func() (client.ReaderWriter, error), cfg config.Config, ks SimpleKeystore, lggr logger.Logger) *Txm { return &Txm{ - lggr: lggr, + lggr: logger.Named(lggr, "Txm"), chSend: make(chan pendingTx, MaxQueueLen), // queue can support 1000 pending txs chSim: make(chan pendingTx, MaxQueueLen), // queue can support 1000 pending txs chStop: make(chan struct{}), @@ -73,7 +73,7 @@ func NewTxm(chainID string, tc func() (client.ReaderWriter, error), cfg config.C // Start subscribes to queuing channel and processes them. func (txm *Txm) Start(ctx context.Context) error { - return txm.starter.StartOnce("solana_txm", func() error { + return txm.StartOnce("Txm", func() error { // determine estimator type var estimator fees.Estimator var err error @@ -541,22 +541,14 @@ func (txm *Txm) InflightTxs() int { // Close close service func (txm *Txm) Close() error { - return txm.starter.StopOnce("solanatxm", func() error { + return txm.StopOnce("Txm", func() error { close(txm.chStop) txm.done.Wait() return txm.fee.Close() }) } -func (txm *Txm) Name() string { return "solanatxm" } +func (txm *Txm) Name() string { return txm.lggr.Name() } -// Healthy service is healthy -func (txm *Txm) Healthy() error { - return nil +func (txm *Txm) HealthReport() map[string]error { + return map[string]error{txm.Name(): txm.Healthy()} } - -// Ready service is ready -func (txm *Txm) Ready() error { - return nil -} - -func (txm *Txm) HealthReport() map[string]error { return map[string]error{txm.Name(): txm.Healthy()} }