From 4e1d0ae8315a0a0abe828ffddf4a45884349f183 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Thu, 10 Oct 2024 09:09:36 -0500 Subject: [PATCH] add context (#567) --- go.mod | 4 +- go.sum | 8 +-- integration-tests/go.mod | 41 +++++++------ integration-tests/go.sum | 76 +++++++++++++++---------- integration-tests/solclient/ocr2.go | 6 +- 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 | 60 +++++++++++-------- 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 | 40 +++++-------- 17 files changed, 174 insertions(+), 131 deletions(-) diff --git a/go.mod b/go.mod index 06402b2bd..4083942c3 100644 --- a/go.mod +++ b/go.mod @@ -17,8 +17,8 @@ require ( github.com/jpillora/backoff v1.0.0 github.com/pelletier/go-toml/v2 v2.2.0 github.com/prometheus/client_golang v1.17.0 - github.com/smartcontractkit/chainlink-common v0.2.3-0.20240926180110-0784a13b2536 - github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e + github.com/smartcontractkit/chainlink-common v0.3.0 + github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12 github.com/stretchr/testify v1.9.0 go.uber.org/zap v1.27.0 golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 diff --git a/go.sum b/go.sum index 9e8bacb8e..e085c562c 100644 --- a/go.sum +++ b/go.sum @@ -435,12 +435,12 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV 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.2.3-0.20240926180110-0784a13b2536 h1:k6DLMavlqxr7cnZN1DOZLwxeiZfCK2UHeCJ0tyXSuw4= -github.com/smartcontractkit/chainlink-common v0.2.3-0.20240926180110-0784a13b2536/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g= +github.com/smartcontractkit/chainlink-common v0.3.0 h1:mUXHBzzw2qPKyw6gPAC8JhO+ryT8maY+rBi9NFtqEy0= +github.com/smartcontractkit/chainlink-common v0.3.0/go.mod h1:tsGgeEJc5SUSlfVGSX0wR0EkRU3pM58D6SKF97V68ko= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= -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/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12 h1:NzZGjaqez21I3DU7objl3xExTH4fxYvzTqar8DC6360= +github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12/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= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 509753a3a..e552350f6 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -1,6 +1,8 @@ module github.com/smartcontractkit/chainlink-solana/integration-tests -go 1.22.5 +go 1.22.7 + +toolchain go1.23.2 replace github.com/smartcontractkit/chainlink-solana => ../ @@ -14,13 +16,13 @@ require ( github.com/lib/pq v1.10.9 github.com/pelletier/go-toml/v2 v2.2.2 github.com/rs/zerolog v1.33.0 - github.com/smartcontractkit/chainlink-common v0.2.3-0.20240926180110-0784a13b2536 - github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240911182932-3c609a6ac664 + github.com/smartcontractkit/chainlink-common v0.3.0 + github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241009122043-0270b7483530 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.9 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.1 - github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240924233109-8b37da54ea01 - github.com/smartcontractkit/chainlink/v2 v2.14.0-mercury-20240807.0.20240924233109-8b37da54ea01 - github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7 + github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20241010121659-f4c9b9edec10 + github.com/smartcontractkit/chainlink/v2 v2.14.0-mercury-20240807.0.20241010121659-f4c9b9edec10 + github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12 github.com/stretchr/testify v1.9.0 github.com/testcontainers/testcontainers-go v0.28.0 golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 @@ -63,8 +65,10 @@ require ( github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/XSAM/otelsql v0.27.0 // indirect github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect + github.com/andybalholm/brotli v1.1.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect + github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c // indirect github.com/avast/retry-go v3.0.0+incompatible // indirect github.com/avast/retry-go/v4 v4.6.0 // indirect github.com/awalterschulze/gographviz v2.0.3+incompatible // indirect @@ -94,6 +98,7 @@ require ( github.com/blendle/zapdriver v1.3.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/buger/jsonparser v1.1.1 // indirect + github.com/bytecodealliance/wasmtime-go/v23 v23.0.0 // indirect github.com/bytedance/sonic v1.10.1 // indirect github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b // indirect github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 // indirect @@ -117,7 +122,6 @@ require ( github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/containerd/containerd v1.7.18 // indirect - github.com/containerd/continuity v0.4.3 // indirect github.com/containerd/errdefs v0.1.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/coreos/go-semver v0.3.1 // indirect @@ -199,6 +203,7 @@ require ( github.com/go-webauthn/webauthn v0.9.4 // indirect github.com/go-webauthn/x v0.1.5 // indirect github.com/goccy/go-json v0.10.2 // indirect + github.com/goccy/go-yaml v1.12.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/googleapis v1.4.1 // indirect @@ -265,6 +270,7 @@ require ( github.com/huandu/skiplist v1.2.0 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/huin/goupnp v1.3.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/invopop/jsonschema v0.12.0 // indirect @@ -335,7 +341,6 @@ require ( github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/opencontainers/runc v1.1.10 // indirect github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e // indirect github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect @@ -364,6 +369,7 @@ require ( github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sanity-io/litter v1.5.5 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect @@ -377,17 +383,17 @@ 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.23 // indirect - github.com/smartcontractkit/chainlink-automation v1.0.4 // indirect - github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 // indirect - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 // indirect - github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240916152957-433914114bd2 // indirect - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240910155501-42f20443189f // indirect - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240911194142-506bc469d8ae // indirect + github.com/smartcontractkit/chainlink-automation v1.0.5-0.20241009152924-78acf196c332 // indirect + github.com/smartcontractkit/chainlink-ccip v0.0.0-20241010120731-ae3e8f4935a0 // indirect + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20241008135525-d75be72f25bb // indirect + github.com/smartcontractkit/chainlink-data-streams v0.1.0 // indirect + github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20241009122052-5e3515805bca // indirect github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 // indirect github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.0 // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect - github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect - github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect + github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect + github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de // indirect github.com/smartcontractkit/wsrpc v0.8.2 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/sony/gobreaker v0.5.0 // indirect @@ -410,7 +416,7 @@ require ( github.com/tidwall/btree v1.6.0 // indirect github.com/tidwall/gjson v1.17.0 // indirect github.com/tidwall/match v1.1.1 // indirect - github.com/tidwall/pretty v1.2.0 // indirect + github.com/tidwall/pretty v1.2.1 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect @@ -471,6 +477,7 @@ require ( golang.org/x/term v0.24.0 // indirect golang.org/x/time v0.6.0 // indirect golang.org/x/tools v0.25.0 // indirect + golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect gonum.org/v1/gonum v0.15.0 // indirect google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 55f790540..92609f6d2 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -179,6 +179,8 @@ github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2uc github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -192,6 +194,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c h1:cxQVoh6kY+c4b0HUchHjGWBI8288VhH50qxKG3hdEg0= +github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c/go.mod h1:3XzxudkrYVUvbduN/uI2fl4lSrMSzU0+3RCu2mpnfx8= github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/avast/retry-go/v4 v4.6.0 h1:K9xNA+KeB8HHc2aWFuLb25Offp+0iVRXEvFx8IinRJA= @@ -259,8 +263,8 @@ github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= -github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= +github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.3 h1:SDlJ7bAm4ewvrmZtR0DaiYbQGdKPeaaIm7bM+qRhFeU= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.3/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= @@ -269,6 +273,8 @@ github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMU github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bxcodec/faker v2.0.1+incompatible h1:P0KUpUw5w6WJXwrPfv35oc91i4d8nf40Nwln+M/+faA= github.com/bxcodec/faker v2.0.1+incompatible/go.mod h1:BNzfpVdTwnFJ6GtfYTcQu6l6rHShT+veBxNCnjCx5XM= +github.com/bytecodealliance/wasmtime-go/v23 v23.0.0 h1:NJvU4S8KEk1GnF6+FvlnzMD/8wXTj/mYJSG6Q4yu3Pw= +github.com/bytecodealliance/wasmtime-go/v23 v23.0.0/go.mod h1:5YIL+Ouiww2zpO7u+iZ1U1G5NvmwQYaXdmCZQGjQM0U= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= github.com/bytedance/sonic v1.10.1 h1:7a1wuFXL1cMy7a3f7/VFcEtriuXQnUBhtoVfOZiaysc= @@ -409,6 +415,7 @@ github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuA github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/danielkov/gin-helmet v0.0.0-20171108135313-1387e224435e h1:5jVSh2l/ho6ajWhSPNN84eHEdq3dp0T7+f6r3Tc6hsk= github.com/danielkov/gin-helmet v0.0.0-20171108135313-1387e224435e/go.mod h1:IJgIiGUARc4aOr4bOQ85klmjsShkEEfiRc6q/yBSfo8= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -658,6 +665,8 @@ github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/V github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-yaml v1.12.0 h1:/1WHjnMsI1dlIBQutrvSMGZRQufVO3asrHfTwfACoPM= +github.com/goccy/go-yaml v1.12.0/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -779,8 +788,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfF github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= -github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= +github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= +github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -937,6 +946,8 @@ github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -1282,6 +1293,7 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1348,6 +1360,8 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= +github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= @@ -1390,20 +1404,20 @@ 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.23 h1:D2Eaex4Cw/O7Lg3tX6WklOqnjjIQAEBnutCtksPzVDY= github.com/smartcontractkit/chain-selectors v1.0.23/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-ccip v0.0.0-20240924115754-8858b0423283 h1:f0vdqcOL9kJZwfmWE76roIyEuiZx/R82js0IfXNAvXg= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283/go.mod h1:KP82vFCqm+M1G1t6Vos5CewGUGYJkxxCEdxnta4uLlE= -github.com/smartcontractkit/chainlink-common v0.2.3-0.20240926180110-0784a13b2536 h1:k6DLMavlqxr7cnZN1DOZLwxeiZfCK2UHeCJ0tyXSuw4= -github.com/smartcontractkit/chainlink-common v0.2.3-0.20240926180110-0784a13b2536/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 h1:lTGIOQYLk1Ufn++X/AvZnt6VOcuhste5yp+C157No/Q= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7/go.mod h1:BMYE1vC/pGmdFSsOJdPrAA0/4gZ0Xo0SxTMdGspBtRo= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240916152957-433914114bd2 h1:yRk4ektpx/UxwarqAfgxUXLrsYXlaNeP1NOwzHGrK2Q= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240916152957-433914114bd2/go.mod h1:rNhNSrrRMvkgAm5SA6bNTdh2340bTQQZdUVNtZ2o2bk= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240910155501-42f20443189f h1:p4p3jBT91EQyLuAMvHD+zNJsuAYI/QjJbzuGUJ7wIgg= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240910155501-42f20443189f/go.mod h1:FLlWBt2hwiMVgt9AcSo6wBJYIRd/nsc8ENbV1Wir1bw= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240911194142-506bc469d8ae h1:d+B8y2Nd/PrnPMNoaSPn3eDgUgxcVcIqAxGrvYu/gGw= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240911194142-506bc469d8ae/go.mod h1:ec/a20UZ7YRK4oxJcnTBFzp1+DBcJcwqEaerUMsktMs= +github.com/smartcontractkit/chainlink-automation v1.0.5-0.20241009152924-78acf196c332 h1:PA8owz52v9CPdHMYUxHAqfHgo+QgZqP6kOBgioJeRno= +github.com/smartcontractkit/chainlink-automation v1.0.5-0.20241009152924-78acf196c332/go.mod h1:74ly9zfnQ9EwBtHZH46sIAbxQdOnX56fFjjvSQvn53k= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241010120731-ae3e8f4935a0 h1:nKfjG9fufMQspKO0hFGK2B9ICL+tgajwP+nAXYP0LPc= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241010120731-ae3e8f4935a0/go.mod h1:DjyfH0AGcqctKB6DaRUpRL6GJ2SbrpiaBkA4h24/oMY= +github.com/smartcontractkit/chainlink-common v0.3.0 h1:mUXHBzzw2qPKyw6gPAC8JhO+ryT8maY+rBi9NFtqEy0= +github.com/smartcontractkit/chainlink-common v0.3.0/go.mod h1:tsGgeEJc5SUSlfVGSX0wR0EkRU3pM58D6SKF97V68ko= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20241008135525-d75be72f25bb h1:9XiAPwKjs4iFRwrS0FyfL51EqbEa3e6HaK5nyNDBbEU= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20241008135525-d75be72f25bb/go.mod h1:y2S8FHoI38zslLu17kKe2jNbvI/D/F76nmOF2/A+INE= +github.com/smartcontractkit/chainlink-data-streams v0.1.0 h1:wcRJRm7eqfbgN+Na+GjAe0/IUn6XwmSagFHqIWHHBGk= +github.com/smartcontractkit/chainlink-data-streams v0.1.0/go.mod h1:lmdRVjg49Do+5tkk9V5iAhi+Jm2kXhjZXWAbzh7xg7o= +github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= +github.com/smartcontractkit/chainlink-feeds v0.1.1/go.mod h1:55EZ94HlKCfAsUiKUTNI7QlE/3d3IwTlsU3YNa/nBb4= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20241009122052-5e3515805bca h1:tKqIrp7iyyRRkf7KQNL+7FmgipbS8ZW8Awz5F439t9M= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20241009122052-5e3515805bca/go.mod h1:iGSdkBJP38WEgpnAB09xG4Jor0GzZ+4U2ZhwwIdLVgA= github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.9 h1:/2kAb6y854viKigkdFMWDNNbaz3zD0gAkbZoSHC8Rrg= github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.9/go.mod h1:7R5wGWWJi0dr5Y5cXbLQ4vSeIj0ElvhBaymcfvqqUmo= github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 h1:VIxK8u0Jd0Q/VuhmsNm6Bls6Tb31H/sA3A/rbc5hnhg= @@ -1412,18 +1426,18 @@ github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.1 h1:2OxnPfvj github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.1/go.mod h1:afY3QmNgeR/VI1pRbGH8g3YXGy7C2RrFOwUzEFvL3L8= github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.0 h1:gfhfTn7HkbUHNooSF3c9vzQyN8meWJVGt6G/pNUbpYk= github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.0/go.mod h1:tqajhpUJA/9OaMCLitghBXjAgqYO4i27St0F4TUO3+M= -github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240924233109-8b37da54ea01 h1:UWorvRQoLSXcUpd9l86NMukrvOIecEQzUdBv6jqsVsY= -github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240924233109-8b37da54ea01/go.mod h1:C88WPhGG4MGJ1c1w5G5suEkxyqqkf9yqIBE/L3zXpu8= -github.com/smartcontractkit/chainlink/v2 v2.14.0-mercury-20240807.0.20240924233109-8b37da54ea01 h1:JLav4sr7cvfRTUiQDkRJk954wR8kEJLr5rRRYQYB/yA= -github.com/smartcontractkit/chainlink/v2 v2.14.0-mercury-20240807.0.20240924233109-8b37da54ea01/go.mod h1:YSzPgNWJ8oM489tXQPdwAgNRhlvEjicfONRVsObwo3w= +github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20241010121659-f4c9b9edec10 h1:uUK1KMFMFcf1vAdRZneuQRMUs6ndAoNjQHCzP/6vW1A= +github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20241010121659-f4c9b9edec10/go.mod h1:RkygC5/TnCHNG53/CYW/Npsr6Rbgko/zJa0rjtCVNRc= +github.com/smartcontractkit/chainlink/v2 v2.14.0-mercury-20240807.0.20241010121659-f4c9b9edec10 h1:DPxJaQ4W8J+2PRDzEVmIaNFKOYuwdVD5B6bLDK701ow= +github.com/smartcontractkit/chainlink/v2 v2.14.0-mercury-20240807.0.20241010121659-f4c9b9edec10/go.mod h1:FHbp4U77ODNWbttd7/HcFuMLCnws/zqtOHTVUXp8wC8= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= -github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7 h1:e38V5FYE7DA1JfKXeD5Buo/7lczALuVXlJ8YNTAUxcw= -github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= -github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE= -github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg= -github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ= -github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw= +github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12 h1:NzZGjaqez21I3DU7objl3xExTH4fxYvzTqar8DC6360= +github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= +github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de h1:n0w0rKF+SVM+S3WNlup6uabXj2zFlFNfrlsKCMMb/co= +github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de/go.mod h1:Sl2MF/Fp3fgJIVzhdGhmZZX2BlnM0oUUyBP4s4xYb6o= +github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de h1:66VQxXx3lvTaAZrMBkIcdH9VEjujUEvmBQdnyOJnkOc= +github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de/go.mod h1:NSc7hgOQbXG3DAwkOdWnZzLTZENXSwDJ7Va1nBp0YU0= github.com/smartcontractkit/wsrpc v0.8.2 h1:XB/xcn/MMseHW+8JE8+a/rceA86ck7Ur6cEa9LiUC8M= github.com/smartcontractkit/wsrpc v0.8.2/go.mod h1:2u/wfnhl5R4RlSXseN4n6HHIWk8w1Am3AT6gWftQbNg= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1470,6 +1484,7 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1509,8 +1524,9 @@ github.com/tidwall/gjson v1.17.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vl github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -2032,6 +2048,8 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= diff --git a/integration-tests/solclient/ocr2.go b/integration-tests/solclient/ocr2.go index 747494645..2a343df89 100644 --- a/integration-tests/solclient/ocr2.go +++ b/integration-tests/solclient/ocr2.go @@ -10,10 +10,11 @@ import ( "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" "github.com/rs/zerolog/log" - "github.com/smartcontractkit/chainlink/integration-tests/contracts" "github.com/smartcontractkit/libocr/offchainreporting2/confighelper" - ocr_2 "github.com/smartcontractkit/chainlink-solana/contracts/generated/ocr_2" + "github.com/smartcontractkit/chainlink/integration-tests/contracts" + + "github.com/smartcontractkit/chainlink-solana/contracts/generated/ocr_2" "github.com/smartcontractkit/chainlink-solana/integration-tests/utils" ) @@ -254,6 +255,7 @@ func (m *OCRv2) Configure(cfg contracts.OffChainAggregatorV2Config) error { cfg.S, cfg.Oracles, cfg.ReportingPluginConfig, + nil, cfg.MaxDurationQuery.Duration(), cfg.MaxDurationObservation.Duration(), cfg.MaxDurationReport.Duration(), diff --git a/pkg/monitoring/source_envelope.go b/pkg/monitoring/source_envelope.go index 7a475bed7..631548523 100644 --- a/pkg/monitoring/source_envelope.go +++ b/pkg/monitoring/source_envelope.go @@ -83,7 +83,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 d65f6cbc9..09656cf87 100644 --- a/pkg/solana/cmd/chainlink-solana/main.go +++ b/pkg/solana/cmd/chainlink-solana/main.go @@ -72,7 +72,7 @@ func (c *pluginRelayer) NewRelayer(ctx context.Context, config string, keystore 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 289a20416..74884437b 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 ec7aec9f5..d53e7de47 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" @@ -36,11 +37,11 @@ type Relayer struct { } // 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, + lggr: logger.Named(lggr, "Relayer"), chain: chain, - stopCh: make(chan struct{}), + stopCh: make(services.StopChan), } } @@ -49,13 +50,13 @@ 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 { return r.StartOnce("SolanaRelayer", func() 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) }) } @@ -63,7 +64,7 @@ func (r *Relayer) Start(context.Context) error { func (r *Relayer) Close() error { return r.StopOnce("SolanaRelayer", func() error { close(r.stopCh) - return nil + return r.chain.Close() }) } @@ -71,32 +72,47 @@ 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) NewMercuryProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MercuryProvider, error) { +func (r *Relayer) LatestHead(ctx context.Context) (relaytypes.Head, error) { + return r.chain.LatestHead(ctx) +} + +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(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) @@ -109,13 +125,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 { @@ -163,11 +177,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") } @@ -312,10 +326,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 35d384de7..c89af9fc7 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 87861fd83..3eceb8df3 100644 --- a/pkg/solana/txm/txm.go +++ b/pkg/solana/txm/txm.go @@ -41,17 +41,17 @@ var _ loop.Keystore = (SimpleKeystore)(nil) // 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 TxConfig struct { @@ -76,7 +76,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{}), @@ -89,7 +89,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 @@ -574,23 +574,13 @@ 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" } - -// Healthy service is healthy -func (txm *Txm) Healthy() error { - return nil -} - -// Ready service is ready -func (txm *Txm) Ready() error { - return txm.starter.Ready() -} +func (txm *Txm) Name() string { return txm.lggr.Name() } func (txm *Txm) HealthReport() map[string]error { return map[string]error{txm.Name(): txm.Healthy()} }