From 3d0eb7a57491e3facf465b6830a8959ffca1a7b8 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Tue, 31 Oct 2023 16:29:51 -0500 Subject: [PATCH] pkg/cosmos: move tx and chain from core --- go.mod | 69 ++- go.sum | 214 +++++-- integration-tests/go.mod | 34 +- integration-tests/go.sum | 104 ++-- .../adapters/cosmwasm/contract_transmitter.go | 3 +- pkg/cosmos/adapters/injective/transmitter.go | 5 +- pkg/cosmos/adapters/tx_manager.go | 6 +- pkg/cosmos/chain.go | 299 ++++++++++ pkg/cosmos/relay.go | 27 +- pkg/cosmos/txm/helpers_test.go | 15 + pkg/cosmos/txm/key_wrapper.go | 62 ++ pkg/cosmos/txm/keystore_adapter.go | 129 +++++ pkg/cosmos/txm/main_test.go | 17 + pkg/cosmos/txm/orm.go | 135 +++++ pkg/cosmos/txm/orm_test.go | 79 +++ pkg/cosmos/txm/txm.go | 540 ++++++++++++++++++ pkg/cosmos/txm/txm_internal_test.go | 452 +++++++++++++++ pkg/cosmos/txm/txm_test.go | 121 ++++ pkg/monitoring/source_envelope_test.go | 5 +- 19 files changed, 2143 insertions(+), 173 deletions(-) create mode 100644 pkg/cosmos/chain.go create mode 100644 pkg/cosmos/txm/helpers_test.go create mode 100644 pkg/cosmos/txm/key_wrapper.go create mode 100644 pkg/cosmos/txm/keystore_adapter.go create mode 100644 pkg/cosmos/txm/main_test.go create mode 100644 pkg/cosmos/txm/orm.go create mode 100644 pkg/cosmos/txm/orm_test.go create mode 100644 pkg/cosmos/txm/txm.go create mode 100644 pkg/cosmos/txm/txm_internal_test.go create mode 100644 pkg/cosmos/txm/txm_test.go diff --git a/go.mod b/go.mod index e6a4a57a5..d70b9b20b 100644 --- a/go.mod +++ b/go.mod @@ -11,19 +11,23 @@ require ( github.com/cosmos/cosmos-sdk v0.47.4 github.com/cosmos/go-bip39 v1.0.0 github.com/gogo/protobuf v1.3.3 + github.com/google/uuid v1.3.1 github.com/pelletier/go-toml v1.9.5 - github.com/pelletier/go-toml/v2 v2.0.8 + github.com/pelletier/go-toml/v2 v2.1.0 + github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.17.0 github.com/shopspring/decimal v1.3.1 - github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231025072319-8d438ef4dd0f + github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231031114820-e9826d481111 github.com/smartcontractkit/libocr v0.0.0-20230925165524-ffa38fe11ef8 + github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb github.com/stretchr/testify v1.8.4 - github.com/tidwall/gjson v1.14.4 + github.com/tidwall/gjson v1.16.0 go.uber.org/multierr v1.11.0 go.uber.org/ratelimit v0.2.0 go.uber.org/zap v1.26.0 golang.org/x/crypto v0.13.0 - google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 + google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 google.golang.org/grpc v1.58.3 google.golang.org/protobuf v1.31.0 ) @@ -39,12 +43,12 @@ require ( github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/CosmWasm/wasmvm v1.2.4 // indirect github.com/OneOfOne/xxhash v1.2.5 // indirect - github.com/VictoriaMetrics/fastcache v1.10.0 // indirect github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cometbft/cometbft-db v0.7.0 // indirect @@ -58,20 +62,24 @@ require ( github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab // indirect github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/deckarep/golang-set v1.8.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/deckarep/golang-set/v2 v2.3.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/ethereum/go-ethereum v1.10.26 // indirect + github.com/ethereum/go-ethereum v1.12.0 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/getsentry/sentry-go v0.19.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect @@ -80,43 +88,53 @@ require ( github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.5.9 // indirect - github.com/google/uuid v1.3.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-uuid v1.0.2 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/holiman/uint256 v1.2.2 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.3 // indirect + github.com/jmoiron/sqlx v1.3.5 // indirect + github.com/jpillora/backoff v1.0.0 // indirect + github.com/klauspost/compress v1.16.7 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linkedin/goavro/v2 v2.12.0 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/onsi/gomega v1.23.0 // indirect + github.com/mwitkow/grpc-proxy v0.0.0-20230212185441-f345521cb9c9 // indirect + github.com/oklog/run v1.1.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/procfs v0.11.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/riferrei/srclient v0.5.4 // indirect - github.com/rjeczalik/notify v0.9.2 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.1.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect @@ -134,20 +152,27 @@ require ( github.com/tidwall/btree v1.6.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/tklauser/go-sysconf v0.3.10 // indirect - github.com/tklauser/numcpus v0.5.0 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect - golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/sdk v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/proto/otlp v1.0.0 // indirect golang.org/x/net v0.15.0 // indirect golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.12.0 // indirect golang.org/x/term v0.12.0 // indirect golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 3a9233449..d7edc01cb 100644 --- a/go.sum +++ b/go.sum @@ -75,11 +75,13 @@ github.com/CosmWasm/wasmd v0.40.1/go.mod h1:6EOwnv7MpuFaEqxcUOdFV9i4yvrdOciaY6VQ github.com/CosmWasm/wasmvm v1.2.4 h1:6OfeZuEcEH/9iqwrg2pkeVtDCkMoj9U6PpKtcrCyVrQ= github.com/CosmWasm/wasmvm v1.2.4/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= +github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/VictoriaMetrics/fastcache v1.10.0 h1:5hDJnLsKLpnUEToub7ETuRu8RCkb40woBZAUiKonXzY= -github.com/VictoriaMetrics/fastcache v1.10.0/go.mod h1:tjiYeEfYXCqacuvYw/7UoDIeJaNxq6132xHICNP77w8= +github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= +github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/actgardner/gogen-avro/v10 v10.1.0/go.mod h1:o+ybmVjEa27AAr35FRqU98DJu1fXES56uXniYFv4yDA= @@ -91,7 +93,6 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= @@ -115,7 +116,8 @@ github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJ github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -124,7 +126,6 @@ github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -142,10 +143,20 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/apd/v3 v3.1.0/go.mod h1:6qgPBMXjATAdD/VefbRP9NoSLKjbB4LCoA7gN4LpHs4= +github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= +github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoGMWEhDvS3zToKcDpRsLuRolQJBVGdozk= +github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= +github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= +github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= @@ -194,14 +205,15 @@ github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2Eoh github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= -github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set/v2 v2.3.0 h1:qs18EKUfHm2X9fA50Mr/M5hccg2tNnVqsiBImnyDs0g= +github.com/deckarep/golang-set/v2 v2.3.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= @@ -219,8 +231,6 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -229,14 +239,19 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.10.26 h1:i/7d9RBBwiXCEuyduBQzJw/mKmnvzsN14jqBmytw72s= -github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/ethereum/go-ethereum v1.12.0 h1:bdnhLPtqETd4m3mS8BGMNvBTf36bO5bx/hxE2zljOa0= +github.com/ethereum/go-ethereum v1.12.0/go.mod h1:/oo2X/dZLJjf2mJ6YT9wcWxa4nNJDBKDBU6sFIpx1Gs= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -252,6 +267,10 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= +github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/getsentry/sentry-go v0.19.0 h1:BcCH3CN5tXt5aML+gwmbFwVptLLQA+eT866fCO9wVOM= +github.com/getsentry/sentry-go v0.19.0/go.mod h1:y3+lGEFEFexZtpbG1GUE2WD/f9zGyKYwpEqryTOC/nE= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -266,14 +285,23 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= 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/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gofrs/uuid v4.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -311,6 +339,7 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -380,8 +409,14 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 h1:f4tggROQKKcnh4eItay6z/HbHLqghBxS8g7pyMhmDio= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0/go.mod h1:hKAkSgNkL0FII46ZkJcpVEAai4KV+swlIWCKfekd1pA= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 h1:o95KDiV/b1xdkumY5YbLR0/n2+wBxUpgf3HgfKgTyLI= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3/go.mod h1:hTxjzRcX49ogbTGVJ1sM5mz5s+SSgiGIyL3jjPxl32E= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= @@ -395,6 +430,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -408,22 +445,26 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= +github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce h1:7UnVY3T/ZnHUrfviiAgIUjg2PXxsQfs5bphsG8F7Keo= +github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/heetch/avro v0.3.1/go.mod h1:4xn38Oz/+hiEUTpbVfGVLfvOg0yKLlRP7Q9+gJJILgA= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c h1:DZfsyhDK1hnSS5lH8l+JggqzEleHteTYfutAiVlSUM8= -github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/holiman/uint256 v1.2.2 h1:TXKcSGc2WaxPD2+bmzAsVthL4+pEN0YwXcL5qED83vk= +github.com/holiman/uint256 v1.2.2/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= +github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= 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= @@ -435,15 +476,25 @@ github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/invopop/jsonschema v0.4.0/go.mod h1:O9uiLokuu0+MGFlyiaqtWxwqJm41/+8Nj0lD7A36YH0= +github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= +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/go-plugin v0.0.0-20230604120638-7bb12ec27e75 h1:KYTOmcwuezD27O7vNF15lj8H7imCBMXCq1RzCdj4e3A= +github.com/jmank88/go-plugin v0.0.0-20230604120638-7bb12ec27e75/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= +github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -455,8 +506,8 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= -github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -469,8 +520,11 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= -github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/linkedin/goavro v2.1.0+incompatible/go.mod h1:bBCwI2eGYpUI/4820s67MElg9tdeLbINjLjiM2xZFYM= @@ -485,12 +539,20 @@ github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0V github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= +github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -520,6 +582,8 @@ github.com/nrwiersma/avro-benchmarks v0.0.0-20210913175520-21aec48c8f76/go.mod h github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -532,8 +596,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= -github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= +github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -542,8 +606,8 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= @@ -576,8 +640,6 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= -github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= @@ -588,10 +650,6 @@ github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5 github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/riferrei/srclient v0.5.4 h1:dfwyR5u23QF7beuVl2WemUY2KXh5+Sc4DHKyPXBNYuc= github.com/riferrei/srclient v0.5.4/go.mod h1:vbkLmWcgYa7JgfPvuy/+K8fTS0p1bApqadxrxi/S1MI= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= -github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= github.com/rogpeppe/clock v0.0.0-20190514195947-2896927a307a/go.mod h1:4r5QyqhjIWCcK8DO4KMclc5Iknq5qVBAlbYYzAbUScQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -616,10 +674,14 @@ github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5g github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231025072319-8d438ef4dd0f h1:Fh+6dIv1gGDTsr15nWdZjYA7VlE72VJyU0A0RMRmlbk= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231025072319-8d438ef4dd0f/go.mod h1:M9U1JV7IQi8Sfj4JR1qSi1tIh6omgW78W/8SHN/8BUQ= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231031114820-e9826d481111 h1:CElKhWq0WIa9Rmg5Ssajs5Hp3m3u/nYIQdXtpj2gbcc= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231031114820-e9826d481111/go.mod h1:M9U1JV7IQi8Sfj4JR1qSi1tIh6omgW78W/8SHN/8BUQ= +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-20230925165524-ffa38fe11ef8 h1:R9NkVN+1fooUJFsN9zj9gDY1B+zv54zNO785RQZRVfE= github.com/smartcontractkit/libocr v0.0.0-20230925165524-ffa38fe11ef8/go.mod h1:2lyRkw/qLQgUWlrWWmq5nj0y90rWeO6Y+v+fCakRgb0= +github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb h1:OMaBUb4X9IFPLbGbCHsMU+kw/BPCrewaVwWGIBc0I4A= +github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb/go.mod h1:HNUu4cJekUdsJbwRBCiOybtkPJEfGRELQPe2tkoDEyk= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -641,6 +703,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= +github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -657,7 +721,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= @@ -670,18 +733,19 @@ github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2l github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= -github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.16.0 h1:SyXa+dsSPpUlcwEDuKuEBJEz5vzTvOea+9rjyYodQFg= +github.com/tidwall/gjson v1.16.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= 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.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= -github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= -github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= -github.com/tklauser/numcpus v0.5.0 h1:ooe7gN0fg6myJ0EKoTAf5hebTZrH52px3New/D9iJ+A= -github.com/tklauser/numcpus v0.5.0/go.mod h1:OGzpTxpcIMNGYQdit2BYL1pvk/dSOaJWjKoflh+RQjo= +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= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= +github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -690,8 +754,8 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= @@ -706,7 +770,23 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 h1:RsQi0qJ2imFfCvZabqzM9cNXBG8k6gXMv1A0cXRmH6A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0 h1:IAtl+7gua134xcV3NieDhJHjjOVeJhXAnYf/0hswjUY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0/go.mod h1:w+pXobnBzh95MNIkeIuAKcHe/Uu/CX2PKIvBP6ipKRA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0 h1:yE32ay7mJG2leczfREEhoW3VfSZIvHaB+gvVo1o8DQ8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0/go.mod h1:G17FHPDLt74bCI7tJ4CMitEk4BXTYG4FW6XUpkPBXa4= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= @@ -744,8 +824,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-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= 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= @@ -805,7 +885,10 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +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-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -820,6 +903,7 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -838,7 +922,6 @@ golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -859,6 +942,7 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -879,22 +963,28 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1034,6 +1124,7 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1042,13 +1133,14 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20220503193339-ba3ae3f07e29/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 h1:+VoAg+OKmWaommL56xmZSE2sUK8A7m6SUO7X89F2tbw= +google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753/go.mod h1:iqkVr8IRpZ53gx1dEnWlCUIEwDWqWARWrbzpasaTNYM= +google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1:lCbbUxUDD+DiXx9Q6F/ttL0aAu7N2pz8XnmMm8ZW4NE= +google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= 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= @@ -1067,10 +1159,13 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= 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= @@ -1131,6 +1226,7 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index b29327860..015f8ad06 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -10,13 +10,13 @@ require ( github.com/google/uuid v1.3.1 github.com/lib/pq v1.10.9 github.com/rs/zerolog v1.29.1 - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230811192642-2299ce672665 + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230913032705-f924d753cc47 github.com/smartcontractkit/chainlink-cosmos/ops v0.0.0-20230615043323-5fe39e28b7ee github.com/smartcontractkit/chainlink-env v0.36.0 - github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231025072319-8d438ef4dd0f + github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231031114820-e9826d481111 github.com/smartcontractkit/chainlink-testing-framework v1.15.3 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20230818010150-dc7e03125cd0 - github.com/smartcontractkit/chainlink/v2 v2.2.1-0.20230814120914-9c95732370e5 + github.com/smartcontractkit/chainlink/v2 v2.6.0 github.com/smartcontractkit/libocr v0.0.0-20230925165524-ffa38fe11ef8 github.com/stretchr/testify v1.8.4 gopkg.in/guregu/null.v4 v4.0.0 @@ -136,12 +136,14 @@ require ( github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/gopacket v1.1.19 // indirect - github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 // indirect + github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gorilla/context v1.1.1 // indirect github.com/gorilla/securecookie v1.1.1 // indirect github.com/gorilla/sessions v1.2.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect + github.com/grafana/pyroscope-go v1.0.2 // indirect + github.com/grafana/pyroscope-go/godeltaprof v0.1.3 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 // indirect @@ -164,7 +166,7 @@ require ( github.com/holiman/uint256 v1.2.2 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/huin/goupnp v1.0.3 // indirect - github.com/imdario/mergo v0.3.15 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ipfs/go-cid v0.0.7 // indirect github.com/ipfs/go-datastore v0.4.5 // indirect @@ -173,7 +175,7 @@ require ( github.com/ipfs/go-log v1.0.4 // indirect github.com/ipfs/go-log/v2 v2.1.1 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.14.0 // indirect + github.com/jackc/pgconn v1.14.1 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgproto3/v2 v2.3.2 // indirect @@ -189,7 +191,7 @@ require ( github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kelseyhightower/envconfig v1.4.0 // indirect - github.com/klauspost/compress v1.16.3 // indirect + github.com/klauspost/compress v1.16.7 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/koron/go-ssdp v0.0.2 // indirect github.com/kr/pretty v0.3.1 // indirect @@ -274,7 +276,7 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.9 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -284,17 +286,15 @@ require ( github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/procfs v0.11.1 // indirect - github.com/pyroscope-io/client v0.7.1 // indirect - github.com/pyroscope-io/godeltaprof v0.1.2 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/russross/blackfriday v1.6.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/shirou/gopsutil/v3 v3.22.12 // indirect + github.com/shirou/gopsutil/v3 v3.23.8 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect @@ -316,10 +316,10 @@ require ( github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 // indirect github.com/theodesp/go-heaps v0.0.0-20190520121037-88e35354fe0a // indirect github.com/tidwall/btree v1.6.0 // indirect - github.com/tidwall/gjson v1.14.4 // indirect + github.com/tidwall/gjson v1.16.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/tklauser/go-sysconf v0.3.11 // 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 github.com/tyler-smith/go-bip39 v1.1.0 // indirect @@ -364,9 +364,9 @@ require ( gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect gonum.org/v1/gonum v0.13.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect google.golang.org/grpc v1.58.3 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index d0ada3c01..26c5a80d9 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -138,8 +138,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= 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.3.4 h1:pHLkL7jvCvP317I8Ge+Km2Yhntv3SdkJm7uekkqbKhM= -github.com/avast/retry-go/v4 v4.3.4/go.mod h1:rv+Nla6Vk3/ilU0H51VHddWHiwimzX66yZ0JT6T+UvE= +github.com/avast/retry-go/v4 v4.5.0 h1:QoRAZZ90cj5oni2Lsgl2GW8mNTnUCnmpx/iKpwVisHg= +github.com/avast/retry-go/v4 v4.5.0/go.mod h1:7hLEXp0oku2Nir2xBAsg0PTphp9z71bN5Aq1fboC3+I= github.com/aws/aws-sdk-go v1.22.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.276 h1:ywPlx9C5Yc482dUgAZ9bHpQ6onVvJvYE9FJWsNDCEy0= @@ -360,6 +360,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/esote/minmaxheap v1.0.0 h1:rgA7StnXXpZG6qlM0S7pUmEv1KpWe32rYT4x8J8ntaA= +github.com/esote/minmaxheap v1.0.0/go.mod h1:Ln8+i7fS1k3PLgZI2JAo0iA1as95QnIYiGCrqSJ5FZk= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/go-ethereum v1.12.0 h1:bdnhLPtqETd4m3mS8BGMNvBTf36bO5bx/hxE2zljOa0= github.com/ethereum/go-ethereum v1.12.0/go.mod h1:/oo2X/dZLJjf2mJ6YT9wcWxa4nNJDBKDBU6sFIpx1Gs= @@ -601,8 +603,8 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 h1:hR7/MlvK23p6+lIw9SN1TigNLn9ZnF3W4SYRKq2gAHs= -github.com/google/pprof v0.0.0-20230602150820-91b7bce49751/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA= +github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA= +github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= @@ -636,6 +638,10 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grafana/pyroscope-go v1.0.2 h1:dEFgO9VbhYTwuwpCC5coTpuW0JjISEWDZtvRAW9v5Tw= +github.com/grafana/pyroscope-go v1.0.2/go.mod h1:bShDKsVZdzxq+Ol6no0JKigU9y5FTWUcFditMXaH09o= +github.com/grafana/pyroscope-go/godeltaprof v0.1.3 h1:eunWpv1B3Z7ZK9o4499EmQGlY+CsDmSZ4FbxjRx37uk= +github.com/grafana/pyroscope-go/godeltaprof v0.1.3/go.mod h1:1HSPtjU8vLG0jE9JrTdzjgFqdJ/VgN7fvxBNq3luJko= github.com/graph-gophers/dataloader v5.0.0+incompatible h1:R+yjsbrNq1Mo3aPG+Z/EKYrXrXXUNJHOgbRt+U6jOug= github.com/graph-gophers/dataloader v5.0.0+incompatible/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= @@ -733,8 +739,8 @@ github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3 github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= 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.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= -github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= @@ -799,8 +805,9 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= +github.com/jackc/pgconn v1.14.1 h1:smbxIaZA08n6YuxEX1sDyjV/qkbtUtkH20qLkR9MUR4= +github.com/jackc/pgconn v1.14.1/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -898,8 +905,8 @@ github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= -github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -1363,8 +1370,8 @@ github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTK github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= -github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= @@ -1383,8 +1390,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/pressly/goose/v3 v3.5.3 h1:lIQIIXVbdO2RuQtJBS1e7MZjKEk0demVWt6i0YPiOrg= -github.com/pressly/goose/v3 v3.5.3/go.mod h1:IL4NNMdXx9O6hHpGbNB5l1hkVe/Avoz4gBDE5g7rQNg= +github.com/pressly/goose/v3 v3.15.0 h1:6tY5aDqFknY6VZkorFGgZtWygodZQxfmmEF4rqyJW9k= +github.com/pressly/goose/v3 v3.15.0/go.mod h1:LlIo3zGccjb/YUgG+Svdb9Er14vefRdlDI7URCDrwYo= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1397,12 +1404,8 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/prometheus/prometheus v0.45.0 h1:O/uG+Nw4kNxx/jDPxmjsSDd+9Ohql6E7ZSY1x5x/0KI= -github.com/prometheus/prometheus v0.45.0/go.mod h1:jC5hyO8ItJBnDWGecbEucMyXjzxGv9cxsxsjS9u5s1w= -github.com/pyroscope-io/client v0.7.1 h1:yFRhj3vbgjBxehvxQmedmUWJQ4CAfCHhn+itPsuWsHw= -github.com/pyroscope-io/client v0.7.1/go.mod h1:4h21iOU4pUOq0prKyDlvYRL+SCKsBc5wKiEtV+rJGqU= -github.com/pyroscope-io/godeltaprof v0.1.2 h1:MdlEmYELd5w+lvIzmZvXGNMVzW2Qc9jDMuJaPOR75g4= -github.com/pyroscope-io/godeltaprof v0.1.2/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE= +github.com/prometheus/prometheus v0.46.0 h1:9JSdXnsuT6YsbODEhSQMwxNkGwPExfmzqG73vCMk/Kw= +github.com/prometheus/prometheus v0.46.0/go.mod h1:10L5IJE5CEsjee1FnOcVswYXlPIscDWWt3IJ2UDYrz4= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= @@ -1422,8 +1425,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -1452,8 +1455,10 @@ github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.22.12 h1:oG0ns6poeUSxf78JtOsfygNWuEHYYz8hnnNg7P04TJs= -github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= +github.com/shirou/gopsutil/v3 v3.23.8 h1:xnATPiybo6GgdRoC4YoGnxXZFRc3dqQTGi73oLvvBrE= +github.com/shirou/gopsutil/v3 v3.23.8/go.mod h1:7hmCaBn+2ZwaZOr6jmPBZDfawwMGuo1id3C6aM8EDqQ= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= @@ -1468,30 +1473,30 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= github.com/smartcontractkit/chainlink-env v0.36.0 h1:CFOjs0c0y3lrHi/fl5qseCH9EQa5W/6CFyOvmhe2VnA= github.com/smartcontractkit/chainlink-env v0.36.0/go.mod h1:NbRExHmJGnKSYXmvNuJx5VErSx26GtE1AEN/CRzYOg8= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231025072319-8d438ef4dd0f h1:Fh+6dIv1gGDTsr15nWdZjYA7VlE72VJyU0A0RMRmlbk= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231025072319-8d438ef4dd0f/go.mod h1:M9U1JV7IQi8Sfj4JR1qSi1tIh6omgW78W/8SHN/8BUQ= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230802143301-165000751a85 h1:/fm02hYSUdhbSh7xPn7os9yHj7dnl8aLs2+nFXPiB4g= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230802143301-165000751a85/go.mod h1:H3/j2l84FsxYevCLNERdVasI7FVr+t2mkpv+BCJLSVw= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230802150127-d2c95679d61a h1:b3rjvZLpTV45TmCV+ALX+EDDslf91pnDUugP54Lu9FA= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230802150127-d2c95679d61a/go.mod h1:LL+FLf10gOUHrF3aUsRGEZlT/w8DaW5T/eEo/54W68c= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231031114820-e9826d481111 h1:CElKhWq0WIa9Rmg5Ssajs5Hp3m3u/nYIQdXtpj2gbcc= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20231031114820-e9826d481111/go.mod h1:M9U1JV7IQi8Sfj4JR1qSi1tIh6omgW78W/8SHN/8BUQ= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca/go.mod h1:RIUJXn7EVp24TL2p4FW79dYjyno23x5mjt1nKN+5WEk= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918/go.mod h1:/yp/sqD8Iz5GU5fcercjrw0ivJF7HDcupYg+Gjr7EPg= github.com/smartcontractkit/chainlink-testing-framework v1.15.3 h1:phuO4wpbT3GR2ZFIzgwQ3DjfLaZwtHOvJkuEJOC8vxk= github.com/smartcontractkit/chainlink-testing-framework v1.15.3/go.mod h1:m9p6TzNHs4SXfsS3MJHjTk2vF8jsqHb2ipSSYkjT6zs= github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20230818010150-dc7e03125cd0 h1:VqHqVlZ+QdqfXTbY5k1dAtM21EWpMEHoa/rBbcW67mY= github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20230818010150-dc7e03125cd0/go.mod h1:5wdmUtlP7Dkjn8YvZDnOcv8/cXIiS7XwayOhexe1U5Y= -github.com/smartcontractkit/chainlink/v2 v2.2.1-0.20230814120914-9c95732370e5 h1:y3I3vbN0KlHByL+P+dk5lm/PhNqtgkLpJW/MYzo29O0= -github.com/smartcontractkit/chainlink/v2 v2.2.1-0.20230814120914-9c95732370e5/go.mod h1:X5WiSgCYlJ0kNGTr8Zja6DtOCA6/dAyESf7Ix8iYg9E= +github.com/smartcontractkit/chainlink/v2 v2.6.0 h1:zxVaOTP9hV6IZoC1DmZrOjDfQCCa9OZbDigOKW51/+w= +github.com/smartcontractkit/chainlink/v2 v2.6.0/go.mod h1:Sa3rES3SkfZXEWPM2mZN6kVlIa1976o0YurAbsTxrOU= github.com/smartcontractkit/libocr v0.0.0-20230925165524-ffa38fe11ef8 h1:R9NkVN+1fooUJFsN9zj9gDY1B+zv54zNO785RQZRVfE= github.com/smartcontractkit/libocr v0.0.0-20230925165524-ffa38fe11ef8/go.mod h1:2lyRkw/qLQgUWlrWWmq5nj0y90rWeO6Y+v+fCakRgb0= -github.com/smartcontractkit/ocr2keepers v0.7.10 h1:v0DsX13gAxtTbhcAlPvM0fjR9BlT7n4BkHJ6S8HAquQ= -github.com/smartcontractkit/ocr2keepers v0.7.10/go.mod h1:y5QUa8sHmrqz/LYIueB5RL8aeO71kh4F9BfaJ8rZHt0= +github.com/smartcontractkit/ocr2keepers v0.7.27 h1:kwqMrzmEdq6gH4yqNuLQCbdlED0KaIjwZzu3FF+Gves= +github.com/smartcontractkit/ocr2keepers v0.7.27/go.mod h1:1QGzJURnoWpysguPowOe2bshV0hNp1YX10HHlhDEsas= github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687 h1:NwC3SOc25noBTe1KUQjt45fyTIuInhoE2UfgcHAdihM= github.com/smartcontractkit/ocr2vrf v0.0.0-20230804151440-2f1eb1e20687/go.mod h1:YYZq52t4wcHoMQeITksYsorD+tZcOyuVU5+lvot3VFM= github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb h1:OMaBUb4X9IFPLbGbCHsMU+kw/BPCrewaVwWGIBc0I4A= github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb/go.mod h1:HNUu4cJekUdsJbwRBCiOybtkPJEfGRELQPe2tkoDEyk= -github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230808152300-d34f9201db27 h1:AQsTWhkwF/a9Dbv2Y4U4Xi5Go1sflttB0rHL6+8TD6c= -github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230808152300-d34f9201db27/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg= -github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230808152300-d34f9201db27 h1:azEVb1iB0gClMoakc3DMlWXM6j/hgzH2gWUCB8H16VA= -github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230808152300-d34f9201db27/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw= +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/wsrpc v0.7.2 h1:iBXzMeg7vc5YoezIQBq896y25BARw7OKbhrb6vPbtRQ= github.com/smartcontractkit/wsrpc v0.7.2/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1566,15 +1571,14 @@ github.com/theodesp/go-heaps v0.0.0-20190520121037-88e35354fe0a/go.mod h1:/sfW47 github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tidwall/gjson v1.9.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= -github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.16.0 h1:SyXa+dsSPpUlcwEDuKuEBJEz5vzTvOea+9rjyYodQFg= +github.com/tidwall/gjson v1.16.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= 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.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= -github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= -github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= +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= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -1636,7 +1640,6 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= @@ -1973,11 +1976,10 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -2164,12 +2166,12 @@ google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 h1:+VoAg+OKmWaommL56xmZSE2sUK8A7m6SUO7X89F2tbw= +google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753/go.mod h1:iqkVr8IRpZ53gx1dEnWlCUIEwDWqWARWrbzpasaTNYM= +google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1:lCbbUxUDD+DiXx9Q6F/ttL0aAu7N2pz8XnmMm8ZW4NE= +google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= diff --git a/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go b/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go index ab357f9ba..024c518ba 100644 --- a/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go +++ b/pkg/cosmos/adapters/cosmwasm/contract_transmitter.go @@ -6,6 +6,7 @@ import ( wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" cosmosSDK "github.com/cosmos/cosmos-sdk/types" + "github.com/smartcontractkit/chainlink-relay/pkg/logger" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters" @@ -74,7 +75,7 @@ func (ct *ContractTransmitter) Transmit( Msg: msgBytes, Funds: cosmosSDK.Coins{}, } - _, err = ct.msgEnqueuer.Enqueue(ct.contract.String(), m) + _, err = ct.msgEnqueuer.Enqueue(ctx, ct.contract.String(), m) return err } diff --git a/pkg/cosmos/adapters/injective/transmitter.go b/pkg/cosmos/adapters/injective/transmitter.go index a63ca6154..94dd52dbf 100644 --- a/pkg/cosmos/adapters/injective/transmitter.go +++ b/pkg/cosmos/adapters/injective/transmitter.go @@ -4,9 +4,10 @@ import ( "context" cosmosSDK "github.com/cosmos/cosmos-sdk/types" - "github.com/smartcontractkit/chainlink-relay/pkg/logger" "github.com/smartcontractkit/libocr/offchainreporting2/types" + "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters/injective/median_report" chaintypes "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters/injective/types" @@ -71,7 +72,7 @@ func (c *CosmosModuleTransmitter) Transmit( msgTransmit.Signatures = append(msgTransmit.Signatures, sig.Signature) } - _, err = c.msgEnqueuer.Enqueue(c.feedID, msgTransmit) + _, err = c.msgEnqueuer.Enqueue(ctx, c.feedID, msgTransmit) return err } diff --git a/pkg/cosmos/adapters/tx_manager.go b/pkg/cosmos/adapters/tx_manager.go index 53440dbeb..7440020a9 100644 --- a/pkg/cosmos/adapters/tx_manager.go +++ b/pkg/cosmos/adapters/tx_manager.go @@ -1,6 +1,8 @@ package adapters import ( + "context" + cosmosSDK "github.com/cosmos/cosmos-sdk/types" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client" @@ -38,7 +40,7 @@ func (tms Msgs) GetIDs() []int64 { type MsgEnqueuer interface { // Enqueue enqueues msg for broadcast and returns its id. // Returns ErrMsgUnsupported for unsupported message types. - Enqueue(contractID string, msg cosmosSDK.Msg) (int64, error) + Enqueue(ctx context.Context, contractID string, msg cosmosSDK.Msg) (int64, error) } // TxManager manages txs composed of batches of queued messages. @@ -46,7 +48,7 @@ type TxManager interface { MsgEnqueuer // GetMsgs returns any messages matching ids. - GetMsgs(ids ...int64) (Msgs, error) + GetMsgs(ctx context.Context, ids ...int64) (Msgs, error) // GasPrice returns the gas price in ucosm. GasPrice() (cosmosSDK.DecCoin, error) } diff --git a/pkg/cosmos/chain.go b/pkg/cosmos/chain.go new file mode 100644 index 000000000..765024e56 --- /dev/null +++ b/pkg/cosmos/chain.go @@ -0,0 +1,299 @@ +package cosmos + +import ( + "context" + "crypto/rand" + "fmt" + "math/big" + "time" + + "github.com/pelletier/go-toml/v2" + "github.com/pkg/errors" + "go.uber.org/multierr" + + sdk "github.com/cosmos/cosmos-sdk/types" + bank "github.com/cosmos/cosmos-sdk/x/bank/types" + + "github.com/smartcontractkit/sqlx" + + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/txm" + + "github.com/smartcontractkit/chainlink-relay/pkg/chains" + "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-relay/pkg/loop" + "github.com/smartcontractkit/chainlink-relay/pkg/services" + "github.com/smartcontractkit/chainlink-relay/pkg/types" +) + +// defaultRequestTimeout is the default Cosmos client timeout. +// Note that while the cosmos node is processing a heavy block, +// requests can be delayed significantly (https://github.com/tendermint/tendermint/issues/6899), +// however there's nothing we can do but wait until the block is processed. +// So we set a fairly high timeout here. +// TODO(BCI-979): Remove this, or make this configurable with the updated client. +const defaultRequestTimeout = 30 * time.Second + +// Chain is a wrap for easy use in other places in the core node +type Chain = adapters.Chain + +// ChainOpts holds options for configuring a Chain. +type ChainOpts struct { + Logger logger.Logger + DB *sqlx.DB + KeyStore loop.Keystore +} + +func (o *ChainOpts) Validate() (err error) { + required := func(s string) error { + return fmt.Errorf("%s is required", s) + } + if o.Logger == nil { + err = multierr.Append(err, required("Logger'")) + } + if o.DB == nil { + err = multierr.Append(err, required("DB")) + } + if o.KeyStore == nil { + err = multierr.Append(err, required("KeyStore")) + } + return +} + +func NewChain(cfg *config.TOMLConfig, opts ChainOpts) (adapters.Chain, error) { + if !cfg.IsEnabled() { + return nil, fmt.Errorf("cannot create new chain with ID %s, the chain is disabled", *cfg.ChainID) + } + c, err := newChain(*cfg.ChainID, cfg, opts.DB, opts.KeyStore, opts.Logger) + if err != nil { + return nil, err + } + return c, nil +} + +var _ adapters.Chain = (*chain)(nil) + +type chain struct { + services.StateMachine + id string + cfg *config.TOMLConfig + txm *txm.Txm + lggr logger.Logger +} + +func newChain(id string, cfg *config.TOMLConfig, db *sqlx.DB, ks loop.Keystore, lggr logger.Logger) (*chain, error) { + lggr = logger.With(lggr, "cosmosChainID", id) + var ch = chain{ + id: id, + cfg: cfg, + lggr: logger.Named(lggr, "Chain"), + } + tc := func() (client.ReaderWriter, error) { + return ch.getClient("") + } + gpe := client.NewMustGasPriceEstimator([]client.GasPricesEstimator{ + client.NewClosureGasPriceEstimator(func() (map[string]sdk.DecCoin, error) { + return map[string]sdk.DecCoin{ + cfg.GasToken(): sdk.NewDecCoinFromDec(cfg.GasToken(), cfg.FallbackGasPrice()), + }, nil + }), + }, lggr) + ch.txm = txm.NewTxm(db, tc, *gpe, ch.id, cfg, ks, lggr) + + return &ch, nil +} + +func (c *chain) Name() string { + return c.lggr.Name() +} + +func (c *chain) ID() string { + return c.id +} + +func (c *chain) ChainID() string { + return c.id +} + +func (c *chain) Config() config.Config { + return c.cfg +} + +func (c *chain) TxManager() adapters.TxManager { + return c.txm +} + +func (c *chain) Reader(name string) (client.Reader, error) { + return c.getClient(name) +} + +// getClient returns a client, optionally requiring a specific node by name. +func (c *chain) getClient(name string) (client.ReaderWriter, error) { + var node db.Node + if name == "" { // Any node + nodes, err := c.cfg.ListNodes() + if err != nil { + return nil, fmt.Errorf("failed to list nodes: %w", err) + } + if len(nodes) == 0 { + return nil, errors.New("no nodes available") + } + nodeIndex, err := rand.Int(rand.Reader, big.NewInt(int64(len(nodes)))) + if err != nil { + return nil, fmt.Errorf("could not generate a random node index: %w", err) + } + node = nodes[nodeIndex.Int64()] + } else { // Named node + var err error + node, err = c.cfg.GetNode(name) + if err != nil { + return nil, fmt.Errorf("failed to get node named %s: %w", name, err) + } + if node.CosmosChainID != c.id { + return nil, fmt.Errorf("failed to create client for chain %s with node %s: wrong chain id %s", c.id, name, node.CosmosChainID) + } + } + client, err := client.NewClient(c.id, node.TendermintURL, defaultRequestTimeout, logger.Named(c.lggr, "Client."+name)) + if err != nil { + return nil, fmt.Errorf("failed to create client: %w", err) + } + c.lggr.Debugw("Created client", "name", node.Name, "tendermint-url", node.TendermintURL) + return client, nil +} + +// Start starts cosmos chain. +func (c *chain) Start(ctx context.Context) error { + return c.StartOnce("Chain", func() error { + c.lggr.Debug("Starting") + return c.txm.Start(ctx) + }) +} + +func (c *chain) Close() error { + return c.StopOnce("Chain", func() error { + c.lggr.Debug("Stopping") + return c.txm.Close() + }) +} + +func (c *chain) Ready() error { + return multierr.Combine( + c.StateMachine.Ready(), + c.txm.Ready(), + ) +} + +func (c *chain) HealthReport() map[string]error { + m := map[string]error{c.Name(): c.Healthy()} + services.CopyHealth(m, c.txm.HealthReport()) + return m +} + +// ChainService interface +func (c *chain) GetChainStatus(ctx context.Context) (types.ChainStatus, error) { + toml, err := c.cfg.TOMLString() + if err != nil { + return types.ChainStatus{}, err + } + return types.ChainStatus{ + ID: c.id, + Enabled: *c.cfg.Enabled, + Config: toml, + }, nil +} +func (c *chain) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []types.NodeStatus, nextPageToken string, total int, err error) { + return chains.ListNodeStatuses(int(pageSize), pageToken, c.listNodeStatuses) +} + +func (c *chain) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error { + fromAcc, err := sdk.AccAddressFromBech32(from) + if err != nil { + return fmt.Errorf("failed to parse from account: %s", fromAcc) + } + toAcc, err := sdk.AccAddressFromBech32(to) + if err != nil { + return fmt.Errorf("failed to parse from account: %s", toAcc) + } + coin := sdk.Coin{Amount: sdk.NewIntFromBigInt(amount), Denom: c.Config().GasToken()} + + txm := c.TxManager() + + if balanceCheck { + var reader client.Reader + reader, err = c.Reader("") + if err != nil { + return fmt.Errorf("chain unreachable: %v", err) + } + gasPrice, err2 := txm.GasPrice() + if err2 != nil { + return fmt.Errorf("gas price unavailable: %v", err2) + } + + err = validateBalance(reader, gasPrice, fromAcc, coin) + if err != nil { + return fmt.Errorf("failed to validate balance: %v", err) + } + } + + sendMsg := bank.NewMsgSend(fromAcc, toAcc, sdk.Coins{coin}) + _, err = txm.Enqueue(ctx, "", sendMsg) + if err != nil { + return fmt.Errorf("failed to enqueue tx: %w", err) + } + return nil +} + +// TODO BCF-2602 statuses are static for non-evm chain and should be dynamic +func (c *chain) listNodeStatuses(start, end int) ([]types.NodeStatus, int, error) { + stats := make([]types.NodeStatus, 0) + total := len(c.cfg.Nodes) + if start >= total { + return stats, total, chains.ErrOutOfRange + } + if end > total { + end = total + } + nodes := c.cfg.Nodes[start:end] + for _, node := range nodes { + stat, err := nodeStatus(node, c.ChainID()) + if err != nil { + return stats, total, err + } + stats = append(stats, stat) + } + return stats, total, nil +} + +func nodeStatus(n *config.Node, id string) (types.NodeStatus, error) { + var s types.NodeStatus + s.ChainID = id + s.Name = *n.Name + b, err := toml.Marshal(n) + if err != nil { + return types.NodeStatus{}, err + } + s.Config = string(b) + return s, nil +} + +// maxGasUsedTransfer is an upper bound on how much gas we expect a MsgSend for a single coin to use. +const maxGasUsedTransfer = 100_000 + +// validateBalance validates that fromAddr's balance can cover coin, including fees at gasPrice. +func validateBalance(reader client.Reader, gasPrice sdk.DecCoin, fromAddr sdk.AccAddress, coin sdk.Coin) error { + balance, err := reader.Balance(fromAddr, coin.GetDenom()) + if err != nil { + return err + } + + fee := gasPrice.Amount.MulInt64(maxGasUsedTransfer).RoundInt() + need := coin.Amount.Add(fee) + + if balance.Amount.LT(need) { + return errors.Errorf("balance %q is too low for this transaction to be executed: need %s total, including %s fee", balance, need, fee) + } + return nil +} diff --git a/pkg/cosmos/relay.go b/pkg/cosmos/relay.go index 33fa6cb4a..8bb7590ac 100644 --- a/pkg/cosmos/relay.go +++ b/pkg/cosmos/relay.go @@ -3,17 +3,15 @@ package cosmos import ( "context" "errors" - "fmt" - - cosmosSDK "github.com/cosmos/cosmos-sdk/types" "github.com/smartcontractkit/chainlink-relay/pkg/logger" - relaytypes "github.com/smartcontractkit/chainlink-relay/pkg/types" + "github.com/smartcontractkit/chainlink-relay/pkg/types" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters/cosmwasm" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters/injective" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/params" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/txm" ) const ( @@ -21,15 +19,10 @@ const ( ) // ErrMsgUnsupported is returned when an unsupported type of message is encountered. -type ErrMsgUnsupported struct { - Msg cosmosSDK.Msg -} - -func (e *ErrMsgUnsupported) Error() string { - return fmt.Sprintf("unsupported message type %T: %s", e.Msg, e.Msg) -} +// Deprecated: use txm.ErrMsgUnsupported +type ErrMsgUnsupported = txm.ErrMsgUnsupported -var _ relaytypes.Relayer = &Relayer{} //nolint:staticcheck +var _ types.Relayer = &Relayer{} //nolint:staticcheck type Relayer struct { lggr logger.Logger @@ -82,16 +75,16 @@ func (r *Relayer) HealthReport() map[string]error { return r.chain.HealthReport() } -func (r *Relayer) NewMercuryProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MercuryProvider, error) { +func (r *Relayer) NewMercuryProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.MercuryProvider, error) { return nil, errors.New("mercury is not supported for cosmos") } -func (r *Relayer) NewFunctionsProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.FunctionsProvider, error) { +func (r *Relayer) NewFunctionsProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.FunctionsProvider, error) { return nil, errors.New("functions are not supported for cosmos") } -func (r *Relayer) NewConfigProvider(args relaytypes.RelayArgs) (relaytypes.ConfigProvider, error) { - var configProvider relaytypes.ConfigProvider +func (r *Relayer) NewConfigProvider(args types.RelayArgs) (types.ConfigProvider, error) { + var configProvider types.ConfigProvider var err error if r.chain.Config().Bech32Prefix() == InjectivePrefix { configProvider, err = injective.NewConfigProvider(r.ctx, r.lggr, r.chain, args) @@ -106,7 +99,7 @@ func (r *Relayer) NewConfigProvider(args relaytypes.RelayArgs) (relaytypes.Confi return configProvider, err } -func (r *Relayer) NewMedianProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MedianProvider, error) { +func (r *Relayer) NewMedianProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.MedianProvider, error) { configProvider, err := cosmwasm.NewMedianProvider(r.ctx, r.lggr, r.chain, rargs, pargs) if err != nil { return nil, err diff --git a/pkg/cosmos/txm/helpers_test.go b/pkg/cosmos/txm/helpers_test.go new file mode 100644 index 000000000..eac916d7f --- /dev/null +++ b/pkg/cosmos/txm/helpers_test.go @@ -0,0 +1,15 @@ +package txm + +import "golang.org/x/exp/maps" + +func (ka *keystoreAdapter) Accounts() ([]string, error) { + ka.mutex.Lock() + defer ka.mutex.Unlock() + err := ka.updateMappingLocked() + if err != nil { + return nil, err + } + addresses := maps.Keys(ka.addressToPubKey) + + return addresses, nil +} diff --git a/pkg/cosmos/txm/key_wrapper.go b/pkg/cosmos/txm/key_wrapper.go new file mode 100644 index 000000000..fd8263974 --- /dev/null +++ b/pkg/cosmos/txm/key_wrapper.go @@ -0,0 +1,62 @@ +package txm + +import ( + "bytes" + "context" + + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" +) + +// KeyWrapper uses a keystoreAdapter to implement the cosmos-sdk PrivKey interface for a specific key. +type KeyWrapper struct { + adapter *keystoreAdapter + account string +} + +var _ cryptotypes.PrivKey = &KeyWrapper{} + +func NewKeyWrapper(adapter *keystoreAdapter, account string) *KeyWrapper { + return &KeyWrapper{ + adapter: adapter, + account: account, + } +} + +func (a *KeyWrapper) Bytes() []byte { + // don't expose the private key. + return nil +} + +func (a *KeyWrapper) Sign(msg []byte) ([]byte, error) { + return a.adapter.Sign(context.Background(), a.account, msg) +} + +func (a *KeyWrapper) PubKey() cryptotypes.PubKey { + pubKey, err := a.adapter.PubKey(a.account) + if err != nil { + // return an empty pubkey if it's not found. + return &secp256k1.PubKey{Key: []byte{}} + } + return pubKey +} + +func (a *KeyWrapper) Equals(other cryptotypes.LedgerPrivKey) bool { + return bytes.Equal(a.PubKey().Bytes(), other.PubKey().Bytes()) +} + +func (a *KeyWrapper) Type() string { + return "secp256k1" +} + +func (a *KeyWrapper) Reset() { + // no-op +} + +func (a *KeyWrapper) String() string { + return "" +} + +func (a *KeyWrapper) ProtoMessage() { + // no-op +} diff --git a/pkg/cosmos/txm/keystore_adapter.go b/pkg/cosmos/txm/keystore_adapter.go new file mode 100644 index 000000000..5b6d5116e --- /dev/null +++ b/pkg/cosmos/txm/keystore_adapter.go @@ -0,0 +1,129 @@ +package txm + +import ( + "context" + "crypto/sha256" + "encoding/hex" + "sync" + + "github.com/cometbft/cometbft/crypto" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/types/bech32" + "github.com/pkg/errors" + "golang.org/x/crypto/ripemd160" //nolint: staticcheck + + "github.com/smartcontractkit/chainlink-relay/pkg/loop" +) + +type accountInfo struct { + Account string + PubKey *secp256k1.PubKey +} + +// keystoreAdapter adapts a Cosmos loop.Keystore to translate public keys into bech32-prefixed account addresses. +type keystoreAdapter struct { + keystore loop.Keystore + accountPrefix string + mutex sync.RWMutex + addressToPubKey map[string]*accountInfo +} + +func newKeystoreAdapter(keystore loop.Keystore, accountPrefix string) *keystoreAdapter { + return &keystoreAdapter{ + keystore: keystore, + accountPrefix: accountPrefix, + addressToPubKey: make(map[string]*accountInfo), + } +} + +func (ka *keystoreAdapter) updateMappingLocked() error { + accounts, err := ka.keystore.Accounts(context.Background()) + if err != nil { + return err + } + + // similar to cosmos-sdk, cache and re-use calculated bech32 addresses to prevent duplicated work. + // ref: https://github.com/cosmos/cosmos-sdk/blob/3b509c187e1643757f5ef8a0b5ae3decca0c7719/types/address.go#L705 + + type cacheEntry struct { + bech32Addr string + accountInfo *accountInfo + } + accountCache := make(map[string]cacheEntry, len(ka.addressToPubKey)) + for bech32Addr, accountInfo := range ka.addressToPubKey { + accountCache[accountInfo.Account] = cacheEntry{bech32Addr: bech32Addr, accountInfo: accountInfo} + } + + addressToPubKey := make(map[string]*accountInfo, len(accounts)) + for _, account := range accounts { + if prevEntry, ok := accountCache[account]; ok { + addressToPubKey[prevEntry.bech32Addr] = prevEntry.accountInfo + continue + } + pubKeyBytes, err := hex.DecodeString(account) + if err != nil { + return err + } + + if len(pubKeyBytes) != secp256k1.PubKeySize { + return errors.New("length of pubkey is incorrect") + } + + sha := sha256.Sum256(pubKeyBytes) + hasherRIPEMD160 := ripemd160.New() + _, _ = hasherRIPEMD160.Write(sha[:]) + address := crypto.Address(hasherRIPEMD160.Sum(nil)) + + bech32Addr, err := bech32.ConvertAndEncode(ka.accountPrefix, address) + if err != nil { + return err + } + + addressToPubKey[bech32Addr] = &accountInfo{ + Account: account, + PubKey: &secp256k1.PubKey{Key: pubKeyBytes}, + } + } + + ka.addressToPubKey = addressToPubKey + return nil +} + +func (ka *keystoreAdapter) lookup(id string) (*accountInfo, error) { + ka.mutex.RLock() + ai, ok := ka.addressToPubKey[id] + ka.mutex.RUnlock() + if !ok { + // try updating the mapping once, incase there was an update on the keystore. + ka.mutex.Lock() + err := ka.updateMappingLocked() + if err != nil { + ka.mutex.Unlock() + return nil, err + } + ai, ok = ka.addressToPubKey[id] + ka.mutex.Unlock() + if !ok { + return nil, errors.New("No such id") + } + } + return ai, nil +} + +func (ka *keystoreAdapter) Sign(ctx context.Context, id string, hash []byte) ([]byte, error) { + accountInfo, err := ka.lookup(id) + if err != nil { + return nil, err + } + return ka.keystore.Sign(ctx, accountInfo.Account, hash) +} + +// Returns the cosmos PubKey associated with the prefixed address. +func (ka *keystoreAdapter) PubKey(address string) (cryptotypes.PubKey, error) { + accountInfo, err := ka.lookup(address) + if err != nil { + return nil, err + } + return accountInfo.PubKey, nil +} diff --git a/pkg/cosmos/txm/main_test.go b/pkg/cosmos/txm/main_test.go new file mode 100644 index 000000000..bf472d9a5 --- /dev/null +++ b/pkg/cosmos/txm/main_test.go @@ -0,0 +1,17 @@ +package txm + +import ( + "os" + "testing" + + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/params" +) + +func TestMain(m *testing.M) { + params.InitCosmosSdk( + /* bech32Prefix= */ "wasm", + /* token= */ "cosm", + ) + code := m.Run() + os.Exit(code) +} diff --git a/pkg/cosmos/txm/orm.go b/pkg/cosmos/txm/orm.go new file mode 100644 index 000000000..eaac4e030 --- /dev/null +++ b/pkg/cosmos/txm/orm.go @@ -0,0 +1,135 @@ +package txm + +import ( + "context" + "database/sql" + "errors" + "fmt" + + "github.com/smartcontractkit/sqlx" + + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" +) + +type DB interface { + BeginTxx(context.Context, *sql.TxOptions) (*sqlx.Tx, error) +} + +type Queryer interface { + GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error + ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) + SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error +} + +// ORM manages the data model for cosmos tx management. +type ORM struct { + chainID string + db Queryer +} + +// NewORM creates an ORM scoped to chainID. +func NewORM(chainID string, db Queryer) *ORM { + return &ORM{ + chainID: chainID, + db: db, + } +} + +// TODO this is a simplified version of https://github.com/smartcontractkit/chainlink/blob/5c0ac3879bef46b828d460960702c1587f730909/core/services/pg/transaction.go#L88 +// we should have a common shared impl instead, maybe in relay/pkg/db +// TODO make generic +func (o *ORM) Transaction(ctx context.Context, fn func(*ORM) error) (err error) { + db, ok := o.db.(DB) + if !ok { + return fn(NewORM(o.chainID, o.db)) + } + tx, err := db.BeginTxx(ctx, nil) + if err != nil { + return err + } + defer func() { + if p := recover(); p != nil { + _ = tx.Rollback() + panic(p) + } else if err != nil { + if err2 := tx.Rollback(); err2 != nil { + err = errors.Join(err, err2) + } + return + } + err = tx.Commit() + }() + // TODO set timeouts? + err = fn(NewORM(o.chainID, tx)) + return +} + +// InsertMsg inserts a cosmos msg, assumed to be a serialized cosmos ExecuteContractMsg. +func (o *ORM) InsertMsg(ctx context.Context, contractID, typeURL string, msg []byte) (int64, error) { + var tm adapters.Msg + + err := o.db.GetContext(ctx, &tm, `INSERT INTO cosmos_msgs (contract_id, type, raw, state, cosmos_chain_id, created_at, updated_at) + VALUES ($1, $2, $3, $4, $5, NOW(), NOW()) RETURNING *`, contractID, typeURL, msg, db.Unstarted, o.chainID) + if err != nil { + return 0, err + } + return tm.ID, nil +} + +// UpdateMsgsContract updates messages for the given contract. +func (o *ORM) UpdateMsgsContract(ctx context.Context, contractID string, from, to db.State) error { + _, err := o.db.ExecContext(ctx, `UPDATE cosmos_msgs SET state = $1, updated_at = NOW() + WHERE cosmos_chain_id = $2 AND contract_id = $3 AND state = $4`, to, o.chainID, contractID, from) + if err != nil { + return err + } + return nil +} + +// GetMsgsState returns the oldest messages with a given state up to limit. +func (o *ORM) GetMsgsState(ctx context.Context, state db.State, limit int64) (adapters.Msgs, error) { + if limit < 1 { + return adapters.Msgs{}, errors.New("limit must be greater than 0") + } + var msgs adapters.Msgs + if err := o.db.SelectContext(ctx, &msgs, `SELECT * FROM cosmos_msgs WHERE state = $1 AND cosmos_chain_id = $2 ORDER BY id ASC LIMIT $3`, state, o.chainID, limit); err != nil { + return nil, err + } + return msgs, nil +} + +// GetMsgs returns any messages matching ids. +func (o *ORM) GetMsgs(ctx context.Context, ids ...int64) (adapters.Msgs, error) { + var msgs adapters.Msgs + if err := o.db.SelectContext(ctx, &msgs, `SELECT * FROM cosmos_msgs WHERE id = ANY($1)`, ids); err != nil { + return nil, err + } + return msgs, nil +} + +// UpdateMsgs updates msgs with the given ids. +// Note state transitions are validated at the db level. +func (o *ORM) UpdateMsgs(ctx context.Context, ids []int64, state db.State, txHash *string) error { + if state == db.Broadcasted && txHash == nil { + return errors.New("txHash is required when updating to broadcasted") + } + var res sql.Result + var err error + if state == db.Broadcasted { + res, err = o.db.ExecContext(ctx, `UPDATE cosmos_msgs SET state = $1, updated_at = NOW(), tx_hash = $2 WHERE id = ANY($3)`, state, *txHash, ids) + } else { + res, err = o.db.ExecContext(ctx, `UPDATE cosmos_msgs SET state = $1, updated_at = NOW() WHERE id = ANY($2)`, state, ids) + } + if err != nil { + return err + } + count, err := res.RowsAffected() + if err != nil { + return err + } + if int(count) != len(ids) { + return fmt.Errorf("expected %d records updated, got %d", len(ids), count) + } + return nil +} diff --git a/pkg/cosmos/txm/orm_test.go b/pkg/cosmos/txm/orm_test.go new file mode 100644 index 000000000..51221f6f6 --- /dev/null +++ b/pkg/cosmos/txm/orm_test.go @@ -0,0 +1,79 @@ +package txm + +import ( + "testing" + + "github.com/smartcontractkit/sqlx" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + cosmosdb "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" + "github.com/smartcontractkit/chainlink-relay/pkg/utils/tests" +) + +func TestORM(t *testing.T) { + ctx := tests.Context(t) + chainID := RandomChainID() + db := NewDB(t) + o := NewORM(chainID, db) + + // Create + mid, err := o.InsertMsg(ctx, "0x123", "", []byte("hello")) + require.NoError(t, err) + assert.NotEqual(t, 0, int(mid)) + + // Read + unstarted, err := o.GetMsgsState(ctx, cosmosdb.Unstarted, 5) + require.NoError(t, err) + require.Equal(t, 1, len(unstarted)) + assert.Equal(t, "hello", string(unstarted[0].Raw)) + assert.Equal(t, chainID, unstarted[0].ChainID) + t.Log(unstarted[0].UpdatedAt, unstarted[0].CreatedAt) + + // Limit + unstarted, err = o.GetMsgsState(ctx, cosmosdb.Unstarted, 0) + assert.Error(t, err) + assert.Empty(t, unstarted) + unstarted, err = o.GetMsgsState(ctx, cosmosdb.Unstarted, -1) + assert.Error(t, err) + assert.Empty(t, unstarted) + mid2, err := o.InsertMsg(ctx, "0xabc", "", []byte("test")) + require.NoError(t, err) + assert.NotEqual(t, 0, int(mid2)) + unstarted, err = o.GetMsgsState(ctx, cosmosdb.Unstarted, 1) + require.NoError(t, err) + require.Equal(t, 1, len(unstarted)) + assert.Equal(t, "hello", string(unstarted[0].Raw)) + assert.Equal(t, chainID, unstarted[0].ChainID) + unstarted, err = o.GetMsgsState(ctx, cosmosdb.Unstarted, 2) + require.NoError(t, err) + require.Equal(t, 2, len(unstarted)) + assert.Equal(t, "test", string(unstarted[1].Raw)) + assert.Equal(t, chainID, unstarted[1].ChainID) + + // Update + txHash := "123" + err = o.UpdateMsgs(ctx, []int64{mid}, cosmosdb.Started, &txHash) + require.NoError(t, err) + err = o.UpdateMsgs(ctx, []int64{mid}, cosmosdb.Broadcasted, &txHash) + require.NoError(t, err) + broadcasted, err := o.GetMsgsState(ctx, cosmosdb.Broadcasted, 5) + require.NoError(t, err) + require.Equal(t, 1, len(broadcasted)) + assert.Equal(t, broadcasted[0].Raw, unstarted[0].Raw) + require.NotNil(t, broadcasted[0].TxHash) + assert.Equal(t, *broadcasted[0].TxHash, txHash) + assert.Equal(t, chainID, broadcasted[0].ChainID) + + err = o.UpdateMsgs(ctx, []int64{mid}, cosmosdb.Confirmed, nil) + require.NoError(t, err) + confirmed, err := o.GetMsgsState(ctx, cosmosdb.Confirmed, 5) + require.NoError(t, err) + require.Equal(t, 1, len(confirmed)) +} + +func NewDB(t *testing.T) *sqlx.DB { + t.Skip("DB unimplemented") + //TODO testcontainer? + return nil +} diff --git a/pkg/cosmos/txm/txm.go b/pkg/cosmos/txm/txm.go new file mode 100644 index 000000000..f94569d83 --- /dev/null +++ b/pkg/cosmos/txm/txm.go @@ -0,0 +1,540 @@ +package txm + +import ( + "cmp" + "context" + "encoding/hex" + "fmt" + "slices" + "strings" + "time" + + "github.com/gogo/protobuf/proto" + "github.com/pkg/errors" + "github.com/smartcontractkit/sqlx" + + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/cometbft/cometbft/crypto/tmhash" + sdk "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/x/bank/types" + + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" + + "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-relay/pkg/loop" + "github.com/smartcontractkit/chainlink-relay/pkg/services" + "github.com/smartcontractkit/chainlink-relay/pkg/utils" +) + +var ( + _ services.Service = (*Txm)(nil) + _ adapters.TxManager = (*Txm)(nil) +) + +// Txm manages transactions for the cosmos blockchain. +type Txm struct { + services.StateMachine + newMsgs chan struct{} + orm *ORM + lggr logger.Logger + tc func() (client.ReaderWriter, error) + keystoreAdapter *keystoreAdapter + stop, done chan struct{} + cfg config.Config + gpe client.ComposedGasPriceEstimator +} + +// NewTxm creates a txm. Uses simulation so should only be used to send txes to trusted contracts i.e. OCR. +func NewTxm(db *sqlx.DB, tc func() (client.ReaderWriter, error), gpe client.ComposedGasPriceEstimator, chainID string, cfg config.Config, ks loop.Keystore, lggr logger.Logger) *Txm { + lggr = logger.Named(lggr, "Txm") + keystoreAdapter := newKeystoreAdapter(ks, cfg.Bech32Prefix()) + return &Txm{ + newMsgs: make(chan struct{}, 1), // buffered to hold one pending request while unblocking callers + orm: NewORM(chainID, db), + lggr: lggr, + tc: tc, + keystoreAdapter: keystoreAdapter, + stop: make(chan struct{}), + done: make(chan struct{}), + cfg: cfg, + gpe: gpe, + } +} + +// Start subscribes to pg notifications about cosmos msg inserts and processes them. +func (txm *Txm) Start(context.Context) error { + return txm.StartOnce("Txm", func() error { + go txm.run() + return nil + }) +} + +func (txm *Txm) Name() string { return txm.lggr.Name() } + +func (txm *Txm) HealthReport() map[string]error { return map[string]error{txm.Name(): txm.Healthy()} } + +func (txm *Txm) confirmAnyUnconfirmed(ctx context.Context) { + // Confirm any broadcasted but not confirmed txes. + // This is an edge case if we crash after having broadcasted but before we confirm. + for { + broadcasted, err := txm.orm.GetMsgsState(ctx, db.Broadcasted, txm.cfg.MaxMsgsPerBatch()) + if err != nil { + // Should never happen but if so, theoretically can retry with a reboot + logger.Criticalw(txm.lggr, "unable to look for broadcasted but unconfirmed txes", "err", err) + return + } + if len(broadcasted) == 0 { + return + } + tc, err := txm.tc() + if err != nil { + logger.Criticalw(txm.lggr, "unable to get client for handling broadcasted but unconfirmed txes", "count", len(broadcasted), "err", err) + return + } + msgsByTxHash := make(map[string]adapters.Msgs) + for _, msg := range broadcasted { + msgsByTxHash[*msg.TxHash] = append(msgsByTxHash[*msg.TxHash], msg) + } + for txHash, msgs := range msgsByTxHash { + maxPolls, pollPeriod := txm.confirmPollConfig() + err := txm.confirmTx(ctx, tc, txHash, msgs.GetIDs(), maxPolls, pollPeriod) + if err != nil { + txm.lggr.Errorw("unable to confirm broadcasted but unconfirmed txes", "err", err, "txhash", txHash) + if ctx.Err() != nil { + return + } + } + } + } +} + +func (txm *Txm) run() { + defer close(txm.done) + ctx, cancel := utils.ContextFromChan(txm.stop) + defer cancel() + txm.confirmAnyUnconfirmed(ctx) + // Jitter in case we have multiple cosmos chains each with their own client. + tick := time.After(utils.WithJitter(txm.cfg.BlockRate())) + for { + select { + case <-txm.newMsgs: + txm.sendMsgBatch(ctx) + case <-tick: + txm.sendMsgBatch(ctx) + tick = time.After(utils.WithJitter(txm.cfg.BlockRate())) + case <-txm.stop: + return + } + } +} + +var ( + typeMsgSend = sdk.MsgTypeURL(&types.MsgSend{}) + typeMsgExecuteContract = sdk.MsgTypeURL(&wasmtypes.MsgExecuteContract{}) +) + +func unmarshalMsg(msgType string, raw []byte) (sdk.Msg, string, error) { + switch msgType { + case typeMsgSend: + var ms types.MsgSend + err := ms.Unmarshal(raw) + if err != nil { + return nil, "", err + } + return &ms, ms.FromAddress, nil + case typeMsgExecuteContract: + var ms wasmtypes.MsgExecuteContract + err := ms.Unmarshal(raw) + if err != nil { + return nil, "", err + } + return &ms, ms.Sender, nil + } + return nil, "", errors.Errorf("unrecognized message type: %s", msgType) +} + +type msgValidator struct { + cutoff time.Time + expired, valid adapters.Msgs +} + +func (e *msgValidator) add(msg adapters.Msg) { + if msg.CreatedAt.Before(e.cutoff) { + e.expired = append(e.expired, msg) + } else { + e.valid = append(e.valid, msg) + } +} + +func (e *msgValidator) sortValid() { + slices.SortFunc(e.valid, func(a, b adapters.Msg) int { + ac, bc := a.CreatedAt, b.CreatedAt + if ac.Equal(bc) { + return cmp.Compare(a.ID, b.ID) + } + if ac.After(bc) { + return 1 + } + return -1 // ac.Before(bc) + }) +} + +func (txm *Txm) sendMsgBatch(ctx context.Context) { + msgs := msgValidator{cutoff: time.Now().Add(-txm.cfg.TxMsgTimeout())} + err := txm.orm.Transaction(ctx, func(orm *ORM) error { + // There may be leftover Started messages after a crash or failed send attempt. + started, err := orm.GetMsgsState(ctx, db.Started, txm.cfg.MaxMsgsPerBatch()) + if err != nil { + txm.lggr.Errorw("unable to read unstarted msgs", "err", err) + return err + } + if limit := txm.cfg.MaxMsgsPerBatch() - int64(len(started)); limit > 0 { + // Use the remaining batch budget for Unstarted + unstarted, err := orm.GetMsgsState(ctx, db.Unstarted, limit) //nolint + if err != nil { + txm.lggr.Errorw("unable to read unstarted msgs", "err", err) + return err + } + for _, msg := range unstarted { + msgs.add(msg) + } + // Update valid, Unstarted messages to Started + err = orm.UpdateMsgs(ctx, msgs.valid.GetIDs(), db.Started, nil) + if err != nil { + // Assume transient db error retry + txm.lggr.Errorw("unable to mark unstarted txes as started", "err", err) + return err + } + } + for _, msg := range started { + msgs.add(msg) + } + // Update expired messages (Unstarted or Started) to Errored + err = orm.UpdateMsgs(ctx, msgs.expired.GetIDs(), db.Errored, nil) + if err != nil { + // Assume transient db error retry + txm.lggr.Errorw("unable to mark expired txes as errored", "err", err) + return err + } + return nil + }) + if err != nil { + return + } + if len(msgs.valid) == 0 { + return + } + msgs.sortValid() + txm.lggr.Debugw("building a batch", "not expired", msgs.valid, "marked expired", msgs.expired) + var msgsByFrom = make(map[string]adapters.Msgs) + for _, m := range msgs.valid { + msg, sender, err2 := unmarshalMsg(m.Type, m.Raw) + if err2 != nil { + // Should be impossible given the check in Enqueue + logger.Criticalw(txm.lggr, "Failed to unmarshal msg, skipping", "err", err2, "msg", m) + continue + } + m.DecodedMsg = msg + _, err2 = sdk.AccAddressFromBech32(sender) + if err2 != nil { + // Should never happen, we parse sender on Enqueue + logger.Criticalw(txm.lggr, "Unable to parse sender", "err", err2, "sender", sender) + continue + } + msgsByFrom[sender] = append(msgsByFrom[sender], m) + } + + txm.lggr.Debugw("msgsByFrom", "msgsByFrom", msgsByFrom) + gasPrice, err := txm.GasPrice() + if err != nil { + // Should be impossible + logger.Criticalw(txm.lggr, "Failed to get gas price", "err", err) + return + } + for s, msgs := range msgsByFrom { + sender, _ := sdk.AccAddressFromBech32(s) // Already checked validity above + err := txm.sendMsgBatchFromAddress(ctx, gasPrice, sender, msgs) + if err != nil { + txm.lggr.Errorw("Could not send message batch", "err", err, "from", sender.String()) + continue + } + if ctx.Err() != nil { + return + } + } + +} + +func (txm *Txm) sendMsgBatchFromAddress(ctx context.Context, gasPrice sdk.DecCoin, sender sdk.AccAddress, msgs adapters.Msgs) error { + tc, err := txm.tc() + if err != nil { + logger.Criticalw(txm.lggr, "unable to get client", "err", err) + return err + } + an, sn, err := tc.Account(sender) + if err != nil { + txm.lggr.Warnw("unable to read account", "err", err, "from", sender.String()) + // If we can't read the account, assume transient api issues and leave msgs unstarted + // to retry on next poll. + return err + } + + txm.lggr.Debugw("simulating batch", "from", sender, "msgs", msgs, "seqnum", sn) + simResults, err := tc.BatchSimulateUnsigned(msgs.GetSimMsgs(), sn) + if err != nil { + txm.lggr.Warnw("unable to simulate", "err", err, "from", sender.String()) + // If we can't simulate assume transient api issue and retry on next poll. + // Note one rare scenario in which this can happen: the cosmos node misbehaves + // in that it confirms a txhash is present but still gives an old seq num. + // This is benign as the next retry will succeeds. + return err + } + txm.lggr.Debugw("simulation results", "from", sender, "succeeded", simResults.Succeeded, "failed", simResults.Failed) + err = txm.orm.UpdateMsgs(ctx, simResults.Failed.GetSimMsgsIDs(), db.Errored, nil) + if err != nil { + txm.lggr.Errorw("unable to mark failed sim txes as errored", "err", err, "from", sender.String()) + // If we can't mark them as failed retry on next poll. Presumably same ones will fail. + return err + } + + // Continue if there are no successful txes + if len(simResults.Succeeded) == 0 { + txm.lggr.Warnw("all sim msgs errored, not sending tx", "from", sender.String()) + return errors.New("all sim msgs errored") + } + // Get the gas limit for the successful batch + s, err := tc.SimulateUnsigned(simResults.Succeeded.GetMsgs(), sn) + if err != nil { + // In the OCR context this should only happen upon stale report + txm.lggr.Warnw("unexpected failure after successful simulation", "err", err) + return err + } + gasLimit := s.GasInfo.GasUsed + + lb, err := tc.LatestBlock() + if err != nil { + txm.lggr.Warnw("unable to get latest block", "err", err, "from", sender.String()) + // Assume transient api issue and retry. + return err + } + header, timeout := lb.SdkBlock.Header.Height, txm.cfg.BlocksUntilTxTimeout() + if header < 0 { + return fmt.Errorf("invalid negative header height: %d", header) + } else if timeout < 0 { + return fmt.Errorf("invalid negative blocks until tx timeout: %d", timeout) + } + timeoutHeight := uint64(header) + uint64(timeout) + signedTx, err := tc.CreateAndSign(simResults.Succeeded.GetMsgs(), an, sn, gasLimit, txm.cfg.GasLimitMultiplier(), + gasPrice, NewKeyWrapper(txm.keystoreAdapter, sender.String()), timeoutHeight) + if err != nil { + txm.lggr.Errorw("unable to sign tx", "err", err, "from", sender.String()) + return err + } + + // We need to ensure that we either broadcast successfully and mark the tx as + // broadcasted OR we do not broadcast successfully and we do not mark it as broadcasted. + // We do this by first marking it broadcasted then rolling back if the broadcast api call fails. + // There is still a small chance of network failure or node/db crash after broadcasting but before committing the tx, + // in which case the msgs would be picked up again and re-broadcast, ensuring at-least once delivery. + var resp *txtypes.BroadcastTxResponse + err = txm.orm.Transaction(ctx, func(orm *ORM) error { + txHash := strings.ToUpper(hex.EncodeToString(tmhash.Sum(signedTx))) + err = orm.UpdateMsgs(ctx, simResults.Succeeded.GetSimMsgsIDs(), db.Broadcasted, &txHash) + if err != nil { + return err + } + + txm.lggr.Infow("broadcasting tx", "from", sender, "msgs", simResults.Succeeded, "gasLimit", gasLimit, "gasPrice", gasPrice.String(), "timeoutHeight", timeoutHeight, "hash", txHash) + resp, err = tc.Broadcast(signedTx, txtypes.BroadcastMode_BROADCAST_MODE_SYNC) + if err != nil { + // Rollback marking as broadcasted + // Note can happen if the node's mempool is full, where we expect errCode 20. + return err + } + if resp.TxResponse == nil { + // Rollback marking as broadcasted + return errors.New("unexpected nil tx response") + } + if resp.TxResponse.TxHash != txHash { + // Should never happen + logger.Criticalw(txm.lggr, "txhash mismatch", "got", resp.TxResponse.TxHash, "want", txHash) + } + return nil + }) + if err != nil { + txm.lggr.Errorw("error broadcasting tx", "err", err, "from", sender.String()) + // Was unable to broadcast, retry on next poll + return err + } + + maxPolls, pollPeriod := txm.confirmPollConfig() + if err := txm.confirmTx(ctx, tc, resp.TxResponse.TxHash, simResults.Succeeded.GetSimMsgsIDs(), maxPolls, pollPeriod); err != nil { + txm.lggr.Errorw("error confirming tx", "err", err, "hash", resp.TxResponse.TxHash) + return err + } + + return nil +} + +func (txm *Txm) confirmPollConfig() (maxPolls int, pollPeriod time.Duration) { + blocks := txm.cfg.BlocksUntilTxTimeout() + blockPeriod := txm.cfg.BlockRate() + pollPeriod = txm.cfg.ConfirmPollPeriod() + if pollPeriod == 0 { + // don't divide by zero + maxPolls = 1 + } else { + maxPolls = int((time.Duration(blocks) * blockPeriod) / pollPeriod) + } + return +} + +func (txm *Txm) confirmTx(ctx context.Context, tc client.Reader, txHash string, broadcasted []int64, maxPolls int, pollPeriod time.Duration) error { + // We either mark these broadcasted txes as confirmed or errored. + // Confirmed: we see the txhash onchain. There are no reorgs in cosmos chains. + // Errored: we do not see the txhash onchain after waiting for N blocks worth + // of time (plus a small buffer to account for block time variance) where N + // is TimeoutHeight - HeightAtBroadcast. In other words, if we wait for that long + // and the tx is not confirmed, we know it has timed out. + for tries := 0; tries < maxPolls; tries++ { + // Jitter in-case we're confirming multiple txes in parallel for different keys + select { + case <-ctx.Done(): + return ctx.Err() + case <-time.After(utils.WithJitter(pollPeriod)): + } + // Confirm that this tx is onchain, ensuring the sequence number has incremented + // so we can build a new batch + tx, err := tc.Tx(txHash) + if err != nil { + if strings.Contains(err.Error(), "not found") { + txm.lggr.Infow("txhash not found yet, still confirming", "hash", txHash) + } else { + txm.lggr.Errorw("error looking for hash of tx", "err", err, "hash", txHash) + } + continue + } + // Sanity check + if tx.TxResponse == nil || tx.TxResponse.TxHash != txHash { + txm.lggr.Errorw("error looking for hash of tx, unexpected response", "tx", tx, "hash", txHash) + continue + } + + txm.lggr.Infow("successfully sent batch", "hash", txHash, "msgs", broadcasted) + // If confirmed mark these as completed. + err = txm.orm.UpdateMsgs(ctx, broadcasted, db.Confirmed, nil) + if err != nil { + return err + } + return nil + } + txm.lggr.Errorw("unable to confirm tx after timeout period, marking errored", "hash", txHash) + // If we are unable to confirm the tx after the timeout period + // mark these msgs as errored + err := txm.orm.UpdateMsgs(ctx, broadcasted, db.Errored, nil) + if err != nil { + txm.lggr.Errorw("unable to mark timed out txes as errored", "err", err, "txes", broadcasted, "num", len(broadcasted)) + return err + } + return nil +} + +// Enqueue enqueue a msg destined for the cosmos chain. +func (txm *Txm) Enqueue(ctx context.Context, contractID string, msg sdk.Msg) (int64, error) { + typeURL, raw, err := txm.marshalMsg(msg) + if err != nil { + return 0, err + } + + // We could consider simulating here too, but that would + // introduce another network call and essentially double + // the enqueue time. Enqueue is used in the context of OCRs Transmit + // and must be fast, so we do the minimum. + + var id int64 + err = txm.orm.Transaction(ctx, func(orm *ORM) (err error) { + // cancel any unstarted msgs (normally just one) + err = txm.orm.UpdateMsgsContract(ctx, contractID, db.Unstarted, db.Errored) + if err != nil { + return err + } + id, err = txm.orm.InsertMsg(ctx, contractID, typeURL, raw) + return err + }) + + txm.triggerNewMsg() + + return id, err +} + +func (txm *Txm) triggerNewMsg() { + select { + case <-txm.newMsgs: + default: + // request is already queued + } +} + +// ErrMsgUnsupported is returned when an unsupported type of message is encountered. +type ErrMsgUnsupported struct { + Msg sdk.Msg +} + +func (e *ErrMsgUnsupported) Error() string { + return fmt.Sprintf("unsupported message type %T: %s", e.Msg, e.Msg) +} + +func (txm *Txm) marshalMsg(msg sdk.Msg) (string, []byte, error) { + switch ms := msg.(type) { + case *wasmtypes.MsgExecuteContract: + _, err := sdk.AccAddressFromBech32(ms.Sender) + if err != nil { + txm.lggr.Errorw("failed to parse sender, skipping", "err", err, "sender", ms.Sender) + return "", nil, err + } + + case *types.MsgSend: + _, err := sdk.AccAddressFromBech32(ms.FromAddress) + if err != nil { + txm.lggr.Errorw("failed to parse sender, skipping", "err", err, "sender", ms.FromAddress) + return "", nil, err + } + + default: + return "", nil, &ErrMsgUnsupported{Msg: msg} + } + typeURL := sdk.MsgTypeURL(msg) + raw, err := proto.Marshal(msg) + if err != nil { + txm.lggr.Errorw("failed to marshal msg, skipping", "err", err, "msg", msg) + return "", nil, err + } + return typeURL, raw, nil +} + +// GetMsgs returns any messages matching ids. +func (txm *Txm) GetMsgs(ctx context.Context, ids ...int64) (adapters.Msgs, error) { + return txm.orm.GetMsgs(ctx, ids...) +} + +// GasPrice returns the gas price from the estimator in the configured fee token. +func (txm *Txm) GasPrice() (sdk.DecCoin, error) { + prices := txm.gpe.GasPrices() + gasPrice, ok := prices[txm.cfg.GasToken()] + if !ok { + return sdk.DecCoin{}, errors.New("unexpected empty gas price") + } + return gasPrice, nil +} + +func (txm *Txm) Close() error { + return txm.StopOnce("Txm", func() error { + close(txm.stop) + <-txm.done + return nil + }) +} diff --git a/pkg/cosmos/txm/txm_internal_test.go b/pkg/cosmos/txm/txm_internal_test.go new file mode 100644 index 000000000..999f80b1d --- /dev/null +++ b/pkg/cosmos/txm/txm_internal_test.go @@ -0,0 +1,452 @@ +package txm + +import ( + "context" + "fmt" + "slices" + "testing" + "time" + + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + tmservicetypes "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cosmostypes "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/google/uuid" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-relay/pkg/logger" + "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "github.com/smartcontractkit/chainlink-relay/pkg/utils/tests" + + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/client/mocks" + "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" + cosmosdb "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" +) + +func generateExecuteMsg(msg []byte, from, to cosmostypes.AccAddress) cosmostypes.Msg { + return &wasmtypes.MsgExecuteContract{ + Sender: from.String(), + Contract: to.String(), + Msg: msg, + Funds: cosmostypes.Coins{}, + } +} + +func newReaderWriterMock(t *testing.T) *mocks.ReaderWriter { + tc := new(mocks.ReaderWriter) + tc.Test(t) + t.Cleanup(func() { tc.AssertExpectations(t) }) + return tc +} + +func TestTxm(t *testing.T) { + lggr := logger.Test(t) + db := NewDB(t) + ks := newKeystore(4) + + adapter := newKeystoreAdapter(ks, "wasm") + accounts, err := adapter.Accounts() + require.NoError(t, err) + require.Equal(t, len(accounts), 4) + + sender1, err := cosmostypes.AccAddressFromBech32(accounts[0]) + require.NoError(t, err) + sender2, err := cosmostypes.AccAddressFromBech32(accounts[1]) + require.NoError(t, err) + contract, err := cosmostypes.AccAddressFromBech32(accounts[2]) + require.NoError(t, err) + contract2, err := cosmostypes.AccAddressFromBech32(accounts[3]) + require.NoError(t, err) + + chainID := RandomChainID() + two := int64(2) + gasToken := "ucosm" + cfg := &config.TOMLConfig{Chain: config.Chain{ + MaxMsgsPerBatch: &two, + GasToken: &gasToken, + }} + cfg.SetDefaults() + gpe := client.NewMustGasPriceEstimator([]client.GasPricesEstimator{ + client.NewFixedGasPriceEstimator(map[string]cosmostypes.DecCoin{ + cfg.GasToken(): cosmostypes.NewDecCoinFromDec(cfg.GasToken(), cosmostypes.MustNewDecFromStr("0.01")), + }, + lggr.(logger.SugaredLogger), + ), + }, lggr) + + t.Run("single msg", func(t *testing.T) { + ctx := tests.Context(t) + tc := newReaderWriterMock(t) + tcFn := func() (client.ReaderWriter, error) { return tc, nil } + loopKs := newKeystore(1) + txm := NewTxm(db, tcFn, *gpe, chainID, cfg, loopKs, lggr) + + // Enqueue a single msg, then send it in a batch + id1, err := txm.Enqueue(ctx, contract.String(), generateExecuteMsg([]byte(`1`), sender1, contract)) + require.NoError(t, err) + tc.On("Account", mock.Anything).Return(uint64(0), uint64(0), nil) + tc.On("BatchSimulateUnsigned", mock.Anything, mock.Anything).Return(&client.BatchSimResults{ + Failed: nil, + Succeeded: client.SimMsgs{{ID: id1, Msg: &wasmtypes.MsgExecuteContract{ + Sender: sender1.String(), + Msg: []byte(`1`), + }}}, + }, nil) + tc.On("SimulateUnsigned", mock.Anything, mock.Anything).Return(&txtypes.SimulateResponse{GasInfo: &cosmostypes.GasInfo{ + GasUsed: 1_000_000, + }}, nil) + tc.On("LatestBlock").Return(&tmservicetypes.GetLatestBlockResponse{SdkBlock: &tmservicetypes.Block{ + Header: tmservicetypes.Header{Height: 1}, + }}, nil) + tc.On("CreateAndSign", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]byte{0x01}, nil) + + txResp := &cosmostypes.TxResponse{TxHash: "4BF5122F344554C53BDE2EBB8CD2B7E3D1600AD631C385A5D7CCE23C7785459A"} + tc.On("Broadcast", mock.Anything, mock.Anything).Return(&txtypes.BroadcastTxResponse{TxResponse: txResp}, nil) + tc.On("Tx", mock.Anything).Return(&txtypes.GetTxResponse{Tx: &txtypes.Tx{}, TxResponse: txResp}, nil) + txm.sendMsgBatch(tests.Context(t)) + + // Should be in completed state + completed, err := txm.orm.GetMsgs(ctx, id1) + require.NoError(t, err) + require.Equal(t, 1, len(completed)) + assert.Equal(t, completed[0].State, cosmosdb.Confirmed) + }) + + t.Run("two msgs different accounts", func(t *testing.T) { + ctx := tests.Context(t) + tc := newReaderWriterMock(t) + tcFn := func() (client.ReaderWriter, error) { return tc, nil } + loopKs := newKeystore(1) + txm := NewTxm(db, tcFn, *gpe, chainID, cfg, loopKs, lggr) + + id1, err := txm.Enqueue(ctx, contract.String(), generateExecuteMsg([]byte(`0`), sender1, contract)) + require.NoError(t, err) + id2, err := txm.Enqueue(ctx, contract.String(), generateExecuteMsg([]byte(`1`), sender2, contract)) + require.NoError(t, err) + + tc.On("Account", mock.Anything).Return(uint64(0), uint64(0), nil).Once() + // Note this must be arg dependent, we don't know which order + // the procesing will happen in (map iteration by from address). + tc.On("BatchSimulateUnsigned", client.SimMsgs{ + { + ID: id2, + Msg: &wasmtypes.MsgExecuteContract{ + Sender: sender2.String(), + Msg: []byte(`1`), + Contract: contract.String(), + }, + }, + }, mock.Anything).Return(&client.BatchSimResults{ + Failed: nil, + Succeeded: client.SimMsgs{ + { + ID: id2, + Msg: &wasmtypes.MsgExecuteContract{ + Sender: sender2.String(), + Msg: []byte(`1`), + Contract: contract.String(), + }, + }, + }, + }, nil).Once() + tc.On("SimulateUnsigned", mock.Anything, mock.Anything).Return(&txtypes.SimulateResponse{GasInfo: &cosmostypes.GasInfo{ + GasUsed: 1_000_000, + }}, nil).Once() + tc.On("LatestBlock").Return(&tmservicetypes.GetLatestBlockResponse{SdkBlock: &tmservicetypes.Block{ + Header: tmservicetypes.Header{Height: 1}, + }}, nil).Once() + tc.On("CreateAndSign", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]byte{0x01}, nil).Once() + txResp := &cosmostypes.TxResponse{TxHash: "4BF5122F344554C53BDE2EBB8CD2B7E3D1600AD631C385A5D7CCE23C7785459A"} + tc.On("Broadcast", mock.Anything, mock.Anything).Return(&txtypes.BroadcastTxResponse{TxResponse: txResp}, nil).Once() + tc.On("Tx", mock.Anything).Return(&txtypes.GetTxResponse{Tx: &txtypes.Tx{}, TxResponse: txResp}, nil).Once() + txm.sendMsgBatch(tests.Context(t)) + + // Should be in completed state + completed, err := txm.orm.GetMsgs(ctx, id1, id2) + require.NoError(t, err) + require.Equal(t, 2, len(completed)) + assert.Equal(t, cosmosdb.Errored, completed[0].State) // cancelled + assert.Equal(t, cosmosdb.Confirmed, completed[1].State) + }) + + t.Run("two msgs different contracts", func(t *testing.T) { + ctx := tests.Context(t) + tc := newReaderWriterMock(t) + tcFn := func() (client.ReaderWriter, error) { return tc, nil } + loopKs := newKeystore(1) + txm := NewTxm(db, tcFn, *gpe, chainID, cfg, loopKs, lggr) + + id1, err := txm.Enqueue(ctx, contract.String(), generateExecuteMsg([]byte(`0`), sender1, contract)) + require.NoError(t, err) + id2, err := txm.Enqueue(ctx, contract2.String(), generateExecuteMsg([]byte(`1`), sender2, contract2)) + require.NoError(t, err) + ids := []int64{id1, id2} + senders := []string{sender1.String(), sender2.String()} + contracts := []string{contract.String(), contract2.String()} + for i := 0; i < 2; i++ { + tc.On("Account", mock.Anything).Return(uint64(0), uint64(0), nil).Once() + // Note this must be arg dependent, we don't know which order + // the procesing will happen in (map iteration by from address). + tc.On("BatchSimulateUnsigned", client.SimMsgs{ + { + ID: ids[i], + Msg: &wasmtypes.MsgExecuteContract{ + Sender: senders[i], + Msg: []byte(fmt.Sprintf(`%d`, i)), + Contract: contracts[i], + }, + }, + }, mock.Anything).Return(&client.BatchSimResults{ + Failed: nil, + Succeeded: client.SimMsgs{ + { + ID: ids[i], + Msg: &wasmtypes.MsgExecuteContract{ + Sender: senders[i], + Msg: []byte(fmt.Sprintf(`%d`, i)), + Contract: contracts[i], + }, + }, + }, + }, nil).Once() + tc.On("SimulateUnsigned", mock.Anything, mock.Anything).Return(&txtypes.SimulateResponse{GasInfo: &cosmostypes.GasInfo{ + GasUsed: 1_000_000, + }}, nil).Once() + tc.On("LatestBlock").Return(&tmservicetypes.GetLatestBlockResponse{SdkBlock: &tmservicetypes.Block{ + Header: tmservicetypes.Header{Height: 1}, + }}, nil).Once() + tc.On("CreateAndSign", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]byte{0x01}, nil).Once() + } + txResp := &cosmostypes.TxResponse{TxHash: "4BF5122F344554C53BDE2EBB8CD2B7E3D1600AD631C385A5D7CCE23C7785459A"} + tc.On("Broadcast", mock.Anything, mock.Anything).Return(&txtypes.BroadcastTxResponse{TxResponse: txResp}, nil).Twice() + tc.On("Tx", mock.Anything).Return(&txtypes.GetTxResponse{Tx: &txtypes.Tx{}, TxResponse: txResp}, nil).Twice() + txm.sendMsgBatch(tests.Context(t)) + + // Should be in completed state + completed, err := txm.orm.GetMsgs(ctx, id1, id2) + require.NoError(t, err) + require.Equal(t, 2, len(completed)) + assert.Equal(t, cosmosdb.Confirmed, completed[0].State) + assert.Equal(t, cosmosdb.Confirmed, completed[1].State) + }) + + t.Run("failed to confirm", func(t *testing.T) { + ctx := tests.Context(t) + tc := newReaderWriterMock(t) + tc.On("Tx", mock.Anything).Return(&txtypes.GetTxResponse{ + Tx: &txtypes.Tx{}, + TxResponse: &cosmostypes.TxResponse{TxHash: "0x123"}, + }, errors.New("not found")).Twice() + tcFn := func() (client.ReaderWriter, error) { return tc, nil } + loopKs := newKeystore(1) + txm := NewTxm(db, tcFn, *gpe, chainID, cfg, loopKs, lggr) + i, err := txm.orm.InsertMsg(ctx, "blah", "", []byte{0x01}) + require.NoError(t, err) + txh := "0x123" + require.NoError(t, txm.orm.UpdateMsgs(ctx, []int64{i}, cosmosdb.Started, &txh)) + require.NoError(t, txm.orm.UpdateMsgs(ctx, []int64{i}, cosmosdb.Broadcasted, &txh)) + err = txm.confirmTx(tests.Context(t), tc, txh, []int64{i}, 2, 1*time.Millisecond) + require.NoError(t, err) + m, err := txm.orm.GetMsgs(ctx, i) + require.NoError(t, err) + require.Equal(t, 1, len(m)) + assert.Equal(t, cosmosdb.Errored, m[0].State) + }) + + t.Run("confirm any unconfirmed", func(t *testing.T) { + ctx := tests.Context(t) + require.Equal(t, int64(2), cfg.MaxMsgsPerBatch()) + txHash1 := "0x1234" + txHash2 := "0x1235" + txHash3 := "0xabcd" + tc := newReaderWriterMock(t) + tc.On("Tx", txHash1).Return(&txtypes.GetTxResponse{ + TxResponse: &cosmostypes.TxResponse{TxHash: txHash1}, + }, nil).Once() + tc.On("Tx", txHash2).Return(&txtypes.GetTxResponse{ + TxResponse: &cosmostypes.TxResponse{TxHash: txHash2}, + }, nil).Once() + tc.On("Tx", txHash3).Return(&txtypes.GetTxResponse{ + TxResponse: &cosmostypes.TxResponse{TxHash: txHash3}, + }, nil).Once() + tcFn := func() (client.ReaderWriter, error) { return tc, nil } + loopKs := newKeystore(1) + txm := NewTxm(db, tcFn, *gpe, chainID, cfg, loopKs, lggr) + + // Insert and broadcast 3 msgs with different txhashes. + id1, err := txm.orm.InsertMsg(ctx, "blah", "", []byte{0x01}) + require.NoError(t, err) + id2, err := txm.orm.InsertMsg(ctx, "blah", "", []byte{0x02}) + require.NoError(t, err) + id3, err := txm.orm.InsertMsg(ctx, "blah", "", []byte{0x03}) + require.NoError(t, err) + err = txm.orm.UpdateMsgs(ctx, []int64{id1}, cosmosdb.Started, &txHash1) + require.NoError(t, err) + err = txm.orm.UpdateMsgs(ctx, []int64{id2}, cosmosdb.Started, &txHash2) + require.NoError(t, err) + err = txm.orm.UpdateMsgs(ctx, []int64{id3}, cosmosdb.Started, &txHash3) + require.NoError(t, err) + err = txm.orm.UpdateMsgs(ctx, []int64{id1}, cosmosdb.Broadcasted, &txHash1) + require.NoError(t, err) + err = txm.orm.UpdateMsgs(ctx, []int64{id2}, cosmosdb.Broadcasted, &txHash2) + require.NoError(t, err) + err = txm.orm.UpdateMsgs(ctx, []int64{id3}, cosmosdb.Broadcasted, &txHash3) + require.NoError(t, err) + + // Confirm them as in a restart while confirming scenario + txm.confirmAnyUnconfirmed(ctx) + msgs, err := txm.orm.GetMsgs(ctx, id1, id2, id3) + require.NoError(t, err) + require.Equal(t, 3, len(msgs)) + assert.Equal(t, cosmosdb.Confirmed, msgs[0].State) + assert.Equal(t, cosmosdb.Confirmed, msgs[1].State) + assert.Equal(t, cosmosdb.Confirmed, msgs[2].State) + }) + + t.Run("expired msgs", func(t *testing.T) { + ctx := tests.Context(t) + tc := new(mocks.ReaderWriter) + timeout, err := utils.NewDuration(1 * time.Millisecond) + require.NoError(t, err) + tcFn := func() (client.ReaderWriter, error) { return tc, nil } + two := int64(2) + cfgShortExpiry := &config.TOMLConfig{Chain: config.Chain{ + MaxMsgsPerBatch: &two, + TxMsgTimeout: &timeout, + }} + cfgShortExpiry.SetDefaults() + loopKs := newKeystore(1) + txm := NewTxm(db, tcFn, *gpe, chainID, cfgShortExpiry, loopKs, lggr) + + // Send a single one expired + id1, err := txm.orm.InsertMsg(ctx, "blah", "", []byte{0x03}) + require.NoError(t, err) + time.Sleep(1 * time.Millisecond) + txm.sendMsgBatch(tests.Context(t)) + // Should be marked errored + m, err := txm.orm.GetMsgs(ctx, id1) + require.NoError(t, err) + assert.Equal(t, cosmosdb.Errored, m[0].State) + + // Send a batch which is all expired + id2, err := txm.orm.InsertMsg(ctx, "blah", "", []byte{0x03}) + require.NoError(t, err) + id3, err := txm.orm.InsertMsg(ctx, "blah", "", []byte{0x03}) + require.NoError(t, err) + time.Sleep(1 * time.Millisecond) + txm.sendMsgBatch(tests.Context(t)) + require.NoError(t, err) + ms, err := txm.orm.GetMsgs(ctx, id2, id3) + require.NoError(t, err) + assert.Equal(t, cosmosdb.Errored, ms[0].State) + assert.Equal(t, cosmosdb.Errored, ms[1].State) + }) + + t.Run("started msgs", func(t *testing.T) { + ctx := tests.Context(t) + tc := new(mocks.ReaderWriter) + tc.On("Account", mock.Anything).Return(uint64(0), uint64(0), nil) + tc.On("SimulateUnsigned", mock.Anything, mock.Anything).Return(&txtypes.SimulateResponse{GasInfo: &cosmostypes.GasInfo{ + GasUsed: 1_000_000, + }}, nil) + tc.On("LatestBlock").Return(&tmservicetypes.GetLatestBlockResponse{SdkBlock: &tmservicetypes.Block{ + Header: tmservicetypes.Header{Height: 1}, + }}, nil) + tc.On("CreateAndSign", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return([]byte{0x01}, nil) + txResp := &cosmostypes.TxResponse{TxHash: "4BF5122F344554C53BDE2EBB8CD2B7E3D1600AD631C385A5D7CCE23C7785459A"} + tc.On("Broadcast", mock.Anything, mock.Anything).Return(&txtypes.BroadcastTxResponse{TxResponse: txResp}, nil) + tc.On("Tx", mock.Anything).Return(&txtypes.GetTxResponse{Tx: &txtypes.Tx{}, TxResponse: txResp}, nil) + tcFn := func() (client.ReaderWriter, error) { return tc, nil } + two := int64(2) + cfgMaxMsgs := &config.TOMLConfig{Chain: config.Chain{ + MaxMsgsPerBatch: &two, + }} + cfgMaxMsgs.SetDefaults() + loopKs := newKeystore(1) + txm := NewTxm(db, tcFn, *gpe, chainID, cfgMaxMsgs, loopKs, lggr) + + // Leftover started is processed + msg1 := generateExecuteMsg([]byte{0x03}, sender1, contract) + id1 := mustInsertMsg(t, txm, contract.String(), msg1) + require.NoError(t, txm.orm.UpdateMsgs(ctx, []int64{id1}, cosmosdb.Started, nil)) + msgs := client.SimMsgs{{ID: id1, Msg: &wasmtypes.MsgExecuteContract{ + Sender: sender1.String(), + Msg: []byte{0x03}, + Contract: contract.String(), + }}} + tc.On("BatchSimulateUnsigned", msgs, mock.Anything). + Return(&client.BatchSimResults{Failed: nil, Succeeded: msgs}, nil).Once() + time.Sleep(1 * time.Millisecond) + txm.sendMsgBatch(tests.Context(t)) + m, err := txm.orm.GetMsgs(ctx, id1) + require.NoError(t, err) + assert.Equal(t, cosmosdb.Confirmed, m[0].State) + + // Leftover started is not cancelled + msg2 := generateExecuteMsg([]byte{0x04}, sender1, contract) + msg3 := generateExecuteMsg([]byte{0x05}, sender1, contract) + id2 := mustInsertMsg(t, txm, contract.String(), msg2) + require.NoError(t, txm.orm.UpdateMsgs(ctx, []int64{id2}, cosmosdb.Started, nil)) + time.Sleep(time.Millisecond) // ensure != CreatedAt + id3 := mustInsertMsg(t, txm, contract.String(), msg3) + msgs = client.SimMsgs{{ID: id2, Msg: &wasmtypes.MsgExecuteContract{ + Sender: sender1.String(), + Msg: []byte{0x04}, + Contract: contract.String(), + }}, {ID: id3, Msg: &wasmtypes.MsgExecuteContract{ + Sender: sender1.String(), + Msg: []byte{0x05}, + Contract: contract.String(), + }}} + tc.On("BatchSimulateUnsigned", msgs, mock.Anything). + Return(&client.BatchSimResults{Failed: nil, Succeeded: msgs}, nil).Once() + time.Sleep(1 * time.Millisecond) + txm.sendMsgBatch(tests.Context(t)) + require.NoError(t, err) + ms, err := txm.orm.GetMsgs(ctx, id2, id3) + require.NoError(t, err) + assert.Equal(t, cosmosdb.Confirmed, ms[0].State) + assert.Equal(t, cosmosdb.Confirmed, ms[1].State) + }) +} + +func mustInsertMsg(t *testing.T, txm *Txm, contractID string, msg cosmostypes.Msg) int64 { + typeURL, raw, err := txm.marshalMsg(msg) + require.NoError(t, err) + id, err := txm.orm.InsertMsg(tests.Context(t), contractID, typeURL, raw) + require.NoError(t, err) + return id +} + +// RandomChainID returns a random chain id for testing. Use this instead of a constant to prevent DB collisions. +func RandomChainID() string { + return fmt.Sprintf("Chainlinktest-%s", uuid.New()) +} + +type keystore struct { + accounts []string +} + +func newKeystore(count int) *keystore { + accounts := make([]string, count) + for i := 0; i < count; i++ { + accounts[i] = cosmostypes.AccAddress(secp256k1.GenPrivKey().PubKey().Address().Bytes()).String() + } + return &keystore{accounts} +} + +func (k *keystore) Accounts(ctx context.Context) (accounts []string, err error) { + return k.accounts, nil +} + +func (k *keystore) Sign(ctx context.Context, account string, data []byte) (signed []byte, err error) { + if slices.Index(k.accounts, account) == -1 { + return nil, fmt.Errorf("account not found: %s", account) + } + return data, nil +} diff --git a/pkg/cosmos/txm/txm_test.go b/pkg/cosmos/txm/txm_test.go new file mode 100644 index 000000000..7a8f7ebbc --- /dev/null +++ b/pkg/cosmos/txm/txm_test.go @@ -0,0 +1,121 @@ +//go:build integration + +package txm_test + +// TestTxm_Integration is disabled in order to be moved to chainlink-cosmos before DB testing is available +//func TestTxm_Integration(t *testing.T) { +// chainID := cosmostest.RandomChainID() +// cosmosChain := coscfg.Chain{} +// cosmosChain.SetDefaults() +// fallbackGasPrice := sdk.NewDecCoinFromDec(*cosmosChain.GasToken, sdk.MustNewDecFromStr("0.01")) +// chainConfig := cosmos.CosmosConfig{ChainID: &chainID, Enabled: ptr(true), Chain: cosmosChain} +// cfg, db := heavyweight.FullTestDBNoFixturesV2(t, "cosmos_txm", func(c *chainlink.Config, s *chainlink.Secrets) { +// c.Cosmos = cosmos.CosmosConfigs{&chainConfig} +// }) +// lggr := logger.TestLogger(t) +// logCfg := pgtest.NewQConfig(true) +// gpe := cosmosclient.NewMustGasPriceEstimator([]cosmosclient.GasPricesEstimator{ +// cosmosclient.NewFixedGasPriceEstimator(map[string]sdk.DecCoin{ +// *cosmosChain.GasToken: fallbackGasPrice, +// }, +// lggr.(logger.SugaredLogger), +// ), +// }, lggr) +// orm := cosmostxm.NewORM(chainID, db, lggr, logCfg) +// eb := pg.NewEventBroadcaster(cfg.Database().URL(), 0, 0, lggr, uuid.New()) +// require.NoError(t, eb.Start(testutils.Context(t))) +// t.Cleanup(func() { require.NoError(t, eb.Close()) }) +// ks := keystore.NewInMemory(db, utils.FastScryptParams, lggr, pgtest.NewQConfig(true)) +// zeConfig := sdk.GetConfig() +// fmt.Println(zeConfig) +// accounts, testdir, tendermintURL := cosmosclient.SetupLocalCosmosNode(t, chainID, *cosmosChain.GasToken) +// tc, err := cosmosclient.NewClient(chainID, tendermintURL, 0, lggr) +// require.NoError(t, err) +// +// loopKs := &keystore.CosmosLoopKeystore{Cosmos: ks.Cosmos()} +// keystoreAdapter := cosmostxm.NewKeystoreAdapter(loopKs, *cosmosChain.Bech32Prefix) +// +// // First create a transmitter key and fund it with 1k native tokens +// require.NoError(t, ks.Unlock("blah")) +// err = ks.Cosmos().EnsureKey() +// require.NoError(t, err) +// ksAccounts, err := keystoreAdapter.Accounts() +// require.NoError(t, err) +// transmitterAddress := ksAccounts[0] +// transmitterID, err := sdk.AccAddressFromBech32(transmitterAddress) +// require.NoError(t, err) +// an, sn, err := tc.Account(accounts[0].Address) +// require.NoError(t, err) +// resp, err := tc.SignAndBroadcast([]sdk.Msg{banktypes.NewMsgSend(accounts[0].Address, transmitterID, sdk.NewCoins(sdk.NewInt64Coin(*cosmosChain.GasToken, 100000)))}, +// an, sn, gpe.GasPrices()[*cosmosChain.GasToken], accounts[0].PrivateKey, txtypes.BroadcastMode_BROADCAST_MODE_SYNC) +// tx, success := cosmosclient.AwaitTxCommitted(t, tc, resp.TxResponse.TxHash) +// require.True(t, success) +// require.Equal(t, types.CodeTypeOK, tx.TxResponse.Code) +// require.NoError(t, err) +// +// // TODO: find a way to pull this test artifact from +// // the chainlink-cosmos repo instead of copying it to cores testdata +// contractID := cosmosclient.DeployTestContract(t, tendermintURL, chainID, *cosmosChain.GasToken, accounts[0], cosmosclient.Account{ +// Name: "transmitter", +// PrivateKey: cosmostxm.NewKeyWrapper(keystoreAdapter, transmitterAddress), +// Address: transmitterID, +// }, tc, testdir, "../../../testdata/cosmos/my_first_contract.wasm") +// +// tcFn := func() (cosmosclient.ReaderWriter, error) { return tc, nil } +// // Start txm +// txm := cosmostxm.NewTxm(db, tcFn, *gpe, chainID, &chainConfig, loopKs, lggr, pgtest.NewQConfig(true), eb) +// require.NoError(t, txm.Start(testutils.Context(t))) +// +// // Change the contract state +// setMsg := &wasmtypes.MsgExecuteContract{ +// Sender: transmitterID.String(), +// Contract: contractID.String(), +// Msg: []byte(`{"reset":{"count":5}}`), +// Funds: sdk.Coins{}, +// } +// _, err = txm.Enqueue(contractID.String(), setMsg) +// require.NoError(t, err) +// +// // Observe the counter gets set eventually +// gomega.NewWithT(t).Eventually(func() bool { +// d, err := tc.ContractState(contractID, []byte(`{"get_count":{}}`)) +// require.NoError(t, err) +// t.Log("contract value", string(d)) +// return string(d) == `{"count":5}` +// }, 20*time.Second, time.Second).Should(gomega.BeTrue()) +// // Ensure messages are completed +// gomega.NewWithT(t).Eventually(func() bool { +// msgs, err := orm.GetMsgsState(Confirmed, 5) +// require.NoError(t, err) +// return 1 == len(msgs) +// }, 5*time.Second, time.Second).Should(gomega.BeTrue()) +// +// // Ensure invalid msgs are marked as errored +// invalidMsg := &wasmtypes.MsgExecuteContract{ +// Sender: transmitterID.String(), +// Contract: contractID.String(), +// Msg: []byte(`{"blah":{"blah":5}}`), +// Funds: sdk.Coins{}, +// } +// _, err = txm.Enqueue(contractID.String(), invalidMsg) +// require.NoError(t, err) +// _, err = txm.Enqueue(contractID.String(), invalidMsg) +// require.NoError(t, err) +// _, err = txm.Enqueue(contractID.String(), setMsg) +// require.NoError(t, err) +// +// // Ensure messages are completed +// gomega.NewWithT(t).Eventually(func() bool { +// succeeded, err := orm.GetMsgsState(Confirmed, 5) +// require.NoError(t, err) +// errored, err := orm.GetMsgsState(Errored, 5) +// require.NoError(t, err) +// t.Log("errored", len(errored), "succeeded", len(succeeded)) +// return 2 == len(succeeded) && 2 == len(errored) +// }, 20*time.Second, time.Second).Should(gomega.BeTrue()) +// +// // Observe the messages have been marked as completed +// require.NoError(t, txm.Close()) +//} +// +//func ptr[T any](t T) *T { return &t } diff --git a/pkg/monitoring/source_envelope_test.go b/pkg/monitoring/source_envelope_test.go index 009a9221c..cb31e8432 100644 --- a/pkg/monitoring/source_envelope_test.go +++ b/pkg/monitoring/source_envelope_test.go @@ -10,11 +10,12 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" ocr2types "github.com/smartcontractkit/libocr/offchainreporting2/types" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring" + "github.com/smartcontractkit/chainlink-cosmos/pkg/monitoring/fcdclient" fcdclientmocks "github.com/smartcontractkit/chainlink-cosmos/pkg/monitoring/fcdclient/mocks" "github.com/smartcontractkit/chainlink-cosmos/pkg/monitoring/mocks" @@ -44,7 +45,7 @@ func TestEnvelopeSource(t *testing.T) { chainConfig := generateChainConfig() // Setup mocks. - rpcClient := new(mocks.ChainReader) + rpcClient := mocks.NewChainReader(t) fcdClient := new(fcdclientmocks.Client) // Transmission fcdClient.On("GetTxList",