diff --git a/core/capabilities/integration_tests/mock_libocr.go b/core/capabilities/integration_tests/mock_libocr.go
index 14ccdce6000..c1eb20fcb16 100644
--- a/core/capabilities/integration_tests/mock_libocr.go
+++ b/core/capabilities/integration_tests/mock_libocr.go
@@ -121,7 +121,7 @@ func (m *mockLibOCR) simulateProtocolRound(ctx context.Context) error {
var outcomes []ocr3types.Outcome
for _, node := range m.nodes {
- outcome, err2 := node.Outcome(m.outcomeCtx, query, observations)
+ outcome, err2 := node.Outcome(ctx, m.outcomeCtx, query, observations)
if err2 != nil {
return fmt.Errorf("failed to get outcome: %w", err)
}
@@ -140,7 +140,7 @@ func (m *mockLibOCR) simulateProtocolRound(ctx context.Context) error {
}
}
- reports, err := leader.Reports(0, outcomes[0])
+ reports, err := leader.Reports(ctx, 0, outcomes[0])
if err != nil {
return fmt.Errorf("failed to get reports: %w", err)
}
diff --git a/core/capabilities/integration_tests/setup.go b/core/capabilities/integration_tests/setup.go
index 69b8c3eaa0a..dae87d47c5f 100644
--- a/core/capabilities/integration_tests/setup.go
+++ b/core/capabilities/integration_tests/setup.go
@@ -20,14 +20,16 @@ import (
"github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types"
ocrTypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types"
- "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/feeds_consumer"
-
commoncap "github.com/smartcontractkit/chainlink-common/pkg/capabilities"
"github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3"
"github.com/smartcontractkit/chainlink-common/pkg/capabilities/datastreams"
"github.com/smartcontractkit/chainlink-common/pkg/services/servicetest"
coretypes "github.com/smartcontractkit/chainlink-common/pkg/types/core"
v3 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v3"
+ "github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
+
+ "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/feeds_consumer"
+
"github.com/smartcontractkit/chainlink/v2/core/capabilities"
remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets"
@@ -168,7 +170,7 @@ func createDons(ctx context.Context, t *testing.T, lggr logger.Logger, reportsSi
repConfig := ocr3types.ReportingPluginConfig{
F: int(workflowDon.F),
}
- plugin, _, err := pluginFactory.NewReportingPlugin(repConfig)
+ plugin, _, err := pluginFactory.NewReportingPlugin(ctx, repConfig)
require.NoError(t, err)
transmitter := ocr3.NewContractTransmitter(lggr, capabilityRegistry, "")
@@ -330,8 +332,9 @@ func newFeedID(t *testing.T) string {
}
func newReport(t *testing.T, feedID [32]byte, price *big.Int, timestamp int64) []byte {
+ ctx := tests.Context(t)
v3Codec := reportcodec.NewReportCodec(feedID, logger.TestLogger(t))
- raw, err := v3Codec.BuildReport(v3.ReportFields{
+ raw, err := v3Codec.BuildReport(ctx, v3.ReportFields{
BenchmarkPrice: price,
Timestamp: uint32(timestamp),
Bid: big.NewInt(0),
diff --git a/core/capabilities/streams/codec_test.go b/core/capabilities/streams/codec_test.go
index e3ada731e43..3913792a17b 100644
--- a/core/capabilities/streams/codec_test.go
+++ b/core/capabilities/streams/codec_test.go
@@ -14,6 +14,7 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/capabilities/datastreams"
v3 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v3"
+ "github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
"github.com/smartcontractkit/chainlink-common/pkg/values"
"github.com/smartcontractkit/chainlink/v2/core/capabilities/streams"
"github.com/smartcontractkit/chainlink/v2/core/logger"
@@ -95,8 +96,9 @@ func newFeedID(t *testing.T) ([32]byte, string) {
}
func newReport(t *testing.T, feedID [32]byte, price *big.Int, timestamp int64) []byte {
+ ctx := tests.Context(t)
v3Codec := reportcodec.NewReportCodec(feedID, logger.TestLogger(t))
- raw, err := v3Codec.BuildReport(v3.ReportFields{
+ raw, err := v3Codec.BuildReport(ctx, v3.ReportFields{
BenchmarkPrice: price,
Timestamp: uint32(timestamp),
ValidFromTimestamp: uint32(timestamp),
diff --git a/core/chains/evm/log/helpers_test.go b/core/chains/evm/log/helpers_test.go
index df0d54680cd..45248b83947 100644
--- a/core/chains/evm/log/helpers_test.go
+++ b/core/chains/evm/log/helpers_test.go
@@ -97,7 +97,7 @@ func newBroadcasterHelperWithEthClient(t *testing.T, ethClient evmclient.Client,
lb := log.NewTestBroadcaster(orm, ethClient, config.EVM(), lggr, highestSeenHead, mailMon)
kst := cltest.NewKeyStore(t, db)
- cc := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{
+ chainsAndConfig := evmtest.NewLegacyChainsAndConfig(t, evmtest.TestChainOpts{
Client: ethClient,
GeneralConfig: globalConfig,
DB: db,
@@ -107,10 +107,11 @@ func newBroadcasterHelperWithEthClient(t *testing.T, ethClient evmclient.Client,
})
m := make(map[string]legacyevm.Chain)
- for _, r := range cc.Slice() {
- m[r.Chain().ID().String()] = r.Chain()
+ for _, r := range chainsAndConfig.Slice() {
+ m[r.ID().String()] = r
}
- legacyChains := legacyevm.NewLegacyChains(m, cc.AppConfig().EVMConfigs())
+
+ legacyChains := chainsAndConfig.NewLegacyChains()
pipelineHelper := cltest.NewJobPipelineV2(t, globalConfig.WebServer(), globalConfig.JobPipeline(), legacyChains, db, kst, nil, nil)
return &broadcasterHelper{
diff --git a/core/chains/legacyevm/chain.go b/core/chains/legacyevm/chain.go
index 129c0318820..ddd58b8277d 100644
--- a/core/chains/legacyevm/chain.go
+++ b/core/chains/legacyevm/chain.go
@@ -130,27 +130,12 @@ type AppConfig interface {
toml.HasEVMConfigs
}
-type ChainRelayExtenderConfig struct {
+type ChainRelayOpts struct {
Logger logger.Logger
KeyStore keystore.Eth
ChainOpts
}
-func (c ChainRelayExtenderConfig) Validate() error {
- err := c.ChainOpts.Validate()
- if c.Logger == nil {
- err = errors.Join(err, errors.New("nil Logger"))
- }
- if c.KeyStore == nil {
- err = errors.Join(err, errors.New("nil Keystore"))
- }
-
- if err != nil {
- err = fmt.Errorf("invalid ChainRelayerExtenderConfig: %w", err)
- }
- return err
-}
-
type ChainOpts struct {
AppConfig AppConfig
@@ -187,7 +172,7 @@ func (o ChainOpts) Validate() error {
return err
}
-func NewTOMLChain(ctx context.Context, chain *toml.EVMConfig, opts ChainRelayExtenderConfig) (Chain, error) {
+func NewTOMLChain(ctx context.Context, chain *toml.EVMConfig, opts ChainRelayOpts) (Chain, error) {
err := opts.Validate()
if err != nil {
return nil, err
@@ -202,7 +187,7 @@ func NewTOMLChain(ctx context.Context, chain *toml.EVMConfig, opts ChainRelayExt
return newChain(ctx, cfg, chain.Nodes, opts)
}
-func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Node, opts ChainRelayExtenderConfig) (*chain, error) {
+func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Node, opts ChainRelayOpts) (*chain, error) {
chainID := cfg.EVM().ChainID()
l := opts.Logger
var client evmclient.Client
diff --git a/core/chains/legacyevm/evm_txm.go b/core/chains/legacyevm/evm_txm.go
index cecfd4ffafe..fec556282ec 100644
--- a/core/chains/legacyevm/evm_txm.go
+++ b/core/chains/legacyevm/evm_txm.go
@@ -21,7 +21,7 @@ func newEvmTxm(
client evmclient.Client,
lggr logger.Logger,
logPoller logpoller.LogPoller,
- opts ChainRelayExtenderConfig,
+ opts ChainRelayOpts,
) (txm txmgr.TxManager,
estimator gas.EvmFeeEstimator,
err error,
diff --git a/core/cmd/shell_local_test.go b/core/cmd/shell_local_test.go
index 60545269e29..cdaf63472f9 100644
--- a/core/cmd/shell_local_test.go
+++ b/core/cmd/shell_local_test.go
@@ -43,7 +43,7 @@ import (
"github.com/urfave/cli"
)
-func genTestEVMRelayers(t *testing.T, opts legacyevm.ChainRelayExtenderConfig, ks evmrelayer.CSAETHKeystore) *chainlink.CoreRelayerChainInteroperators {
+func genTestEVMRelayers(t *testing.T, opts legacyevm.ChainRelayOpts, ks evmrelayer.CSAETHKeystore) *chainlink.CoreRelayerChainInteroperators {
f := chainlink.RelayerFactory{
Logger: opts.Logger,
LoopRegistry: plugins.NewLoopRegistry(opts.Logger, opts.AppConfig.Tracing()),
@@ -87,7 +87,7 @@ func TestShell_RunNodeWithPasswords(t *testing.T) {
lggr := logger.TestLogger(t)
- opts := legacyevm.ChainRelayExtenderConfig{
+ opts := legacyevm.ChainRelayOpts{
Logger: lggr,
KeyStore: keyStore.Eth(),
ChainOpts: legacyevm.ChainOpts{
@@ -191,7 +191,7 @@ func TestShell_RunNodeWithAPICredentialsFile(t *testing.T) {
ethClient.On("BalanceAt", mock.Anything, mock.Anything, mock.Anything).Return(big.NewInt(10), nil).Maybe()
lggr := logger.TestLogger(t)
- opts := legacyevm.ChainRelayExtenderConfig{
+ opts := legacyevm.ChainRelayOpts{
Logger: lggr,
KeyStore: keyStore.Eth(),
ChainOpts: legacyevm.ChainOpts{
diff --git a/core/internal/features/features_test.go b/core/internal/features/features_test.go
index 046f21b7f7d..0d40683dd0d 100644
--- a/core/internal/features/features_test.go
+++ b/core/internal/features/features_test.go
@@ -69,7 +69,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/services/webhook"
"github.com/smartcontractkit/chainlink/v2/core/static"
"github.com/smartcontractkit/chainlink/v2/core/store/models"
@@ -1270,7 +1269,7 @@ func TestIntegration_BlockHistoryEstimator(t *testing.T) {
kst := cltest.NewKeyStore(t, db)
require.NoError(t, kst.Unlock(ctx, cltest.Password))
- cc := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, KeyStore: kst.Eth(), Client: ethClient, GeneralConfig: cfg})
+ chainsAndConfig := evmtest.NewLegacyChainsAndConfig(t, evmtest.TestChainOpts{DB: db, KeyStore: kst.Eth(), Client: ethClient, GeneralConfig: cfg})
b41 := evmtypes.Block{
Number: 41,
@@ -1326,8 +1325,7 @@ func TestIntegration_BlockHistoryEstimator(t *testing.T) {
ethClient.On("HeadByHash", mock.Anything, h41.Hash).Return(&h41, nil).Maybe()
ethClient.On("HeadByHash", mock.Anything, h42.Hash).Return(&h42, nil).Maybe()
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(cc)
- for _, re := range cc.Slice() {
+ for _, re := range chainsAndConfig.Slice() {
servicetest.Run(t, re)
}
var newHeads evmtestutils.RawSub[*evmtypes.Head]
@@ -1337,6 +1335,7 @@ func TestIntegration_BlockHistoryEstimator(t *testing.T) {
t.Fatal("timed out waiting for app to subscribe")
}
+ legacyChains := chainsAndConfig.NewLegacyChains()
chain := evmtest.MustGetDefaultChain(t, legacyChains)
estimator := chain.GasEstimator()
gasPrice, gasLimit, err := estimator.GetFee(testutils.Context(t), nil, 500_000, maxGasPrice)
diff --git a/core/internal/testutils/evmtest/evmtest.go b/core/internal/testutils/evmtest/evmtest.go
index 40f5eee994f..5d8a110cdd3 100644
--- a/core/internal/testutils/evmtest/evmtest.go
+++ b/core/internal/testutils/evmtest/evmtest.go
@@ -64,19 +64,26 @@ type TestChainOpts struct {
GasEstimator gas.EvmFeeEstimator
}
-// NewChainRelayExtenders returns a simple chain collection with one chain and
+// NewLegacyChainsAndConfig returns a simple chain collection with one chain and
// allows to mock client/config on that chain
-func NewChainRelayExtenders(t testing.TB, testopts TestChainOpts) *evmrelay.ChainRelayerExtenders {
- opts := NewChainRelayExtOpts(t, testopts)
- cc, err := evmrelay.NewChainRelayerExtenders(testutils.Context(t), opts)
+func NewLegacyChainsAndConfig(t testing.TB, testopts TestChainOpts) *evmrelay.LegacyChainsAndConfig {
+ opts := NewChainOpts(t, testopts)
+ cc, err := evmrelay.NewLegacyChainsAndConfig(testutils.Context(t), opts)
require.NoError(t, err)
return cc
}
-func NewChainRelayExtOpts(t testing.TB, testopts TestChainOpts) legacyevm.ChainRelayExtenderConfig {
+func NewLegacyChains(t testing.TB, testopts TestChainOpts) *legacyevm.LegacyChains {
+ opts := NewChainOpts(t, testopts)
+ cc, err := evmrelay.NewLegacyChainsAndConfig(testutils.Context(t), opts)
+ require.NoError(t, err)
+ return cc.NewLegacyChains()
+}
+
+func NewChainOpts(t testing.TB, testopts TestChainOpts) legacyevm.ChainRelayOpts {
require.NotNil(t, testopts.KeyStore)
lggr := logger.TestLogger(t)
- opts := legacyevm.ChainRelayExtenderConfig{
+ opts := legacyevm.ChainRelayOpts{
Logger: lggr,
KeyStore: testopts.KeyStore,
ChainOpts: legacyevm.ChainOpts{
diff --git a/core/scripts/go.mod b/core/scripts/go.mod
index fe4ee2c9748..f31c9789a49 100644
--- a/core/scripts/go.mod
+++ b/core/scripts/go.mod
@@ -7,7 +7,7 @@ replace github.com/smartcontractkit/chainlink/v2 => ../../
require (
github.com/docker/docker v24.0.7+incompatible
- github.com/docker/go-connections v0.4.0
+ github.com/docker/go-connections v0.5.0
github.com/ethereum/go-ethereum v1.13.8
github.com/gkampitakis/go-snaps v0.5.4
github.com/google/go-cmp v0.6.0
@@ -21,10 +21,10 @@ require (
github.com/pelletier/go-toml/v2 v2.2.0
github.com/prometheus/client_golang v1.17.0
github.com/shopspring/decimal v1.4.0
- github.com/smartcontractkit/chainlink-automation v1.0.4
- github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c
+ github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965
+ github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
- github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7
+ github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.15.0
github.com/stretchr/testify v1.9.0
@@ -270,15 +270,15 @@ require (
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/shirou/gopsutil/v3 v3.24.3 // indirect
github.com/smartcontractkit/chain-selectors v1.0.10 // indirect
- github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 // indirect
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f // indirect
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 // indirect
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e // indirect
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 // indirect
- github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
- github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect
+ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7 // indirect
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d // indirect
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411 // indirect
+ github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0 // indirect
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d // indirect
+ github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79 // indirect
+ github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79 // indirect
github.com/smartcontractkit/wsrpc v0.7.3 // indirect
- github.com/spf13/afero v1.9.5 // indirect
+ github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
diff --git a/core/scripts/go.sum b/core/scripts/go.sum
index 76eaf615279..17e7cf9861f 100644
--- a/core/scripts/go.sum
+++ b/core/scripts/go.sum
@@ -359,8 +359,8 @@ github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m3
github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM=
github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
-github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
+github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
+github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/dominikbraun/graph v0.23.0 h1:TdZB4pPqCLFxYhdyMFb1TBdFxp8XLcJfTTBQucVPgCo=
@@ -642,12 +642,12 @@ github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ=
-github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
+github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs=
+github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
-github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas=
-github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
+github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA=
+github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E=
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
@@ -1182,30 +1182,30 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCqR1LNS7aI3jT0V+xGrg=
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
-github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
-github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
-github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c h1:3apUsez/6Pkp1ckXzSwIhzPRuWjDGjzMjKapEKi0Fcw=
-github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c/go.mod h1:Jg1sCTsbxg76YByI8ifpFby3FvVqISStHT8ypy9ocmY=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 h1:NBQLtqk8zsyY4qTJs+NElI3aDFTcAo83JHvqD04EvB0=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45/go.mod h1:LV0h7QBQUpoC2UUi6TcUvcIFm1xjP/DtEcqV8+qeLUs=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f h1:I9fTBJpHkeldFplXUy71eLIn6A6GxuR4xrABoUeD+CM=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f/go.mod h1:V/86loaFSH0dqqUEHqyXVbyNqDRSjvcf9BRomWFTljU=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h1:BCHu4pNP6arrcHLEWx61XjLaonOd2coQNyL0NTUcaMc=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827/go.mod h1:OPX+wC2TWQsyLNpR7daMt2vMpmsNcoBxbZyGTHr6tiA=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e h1:PzwzlHNv1YbJ6ZIdl/pIFRoOuOS4V4WLvjZvFUnZFL4=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e/go.mod h1:hsFhop+SlQHKD+DEFjZrMJmbauT1A/wvtZIeeo4PxFU=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU=
+github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965 h1:bKm1AJK9vhYoDdyF+cJb5zg8HRxP30qcOubMrhOJjYI=
+github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965/go.mod h1:WG3DV9T+o+c2BNYAy0fTJwENUdnplgIwBk+6wjhOohY=
+github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49 h1:7h7F8oQrFlRFPI0kQxI4O5UTESwuA8p5n2Ea1ALxNfg=
+github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49/go.mod h1:D7yrE2bf5xdz/qDeFNvPNMIAk6eR/GtqIJOpylKSgOA=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7 h1:CNC76ehoHML5Utz45ORMKOuwbuUt1blZwIwdBcpUT48=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7/go.mod h1:+6tPLOlhS76DyU2CFGESfelmDWWajPQn7QEUCW+MQlY=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d h1:qCNroDe/TUJr7XceNLZyf5D+fTAI2KPKP9R6TKiySEM=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d/go.mod h1:sPzJDIYAPMTPRhyu4qgdG5QeMHH1GwaHCXAsw28q84Q=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411 h1:oCj5ZPpP8hn/skgYTNnv3YQrhPail7sfH1TqUL1HodY=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411/go.mod h1:UT7xiG4ObmPypyPzHYx4NJ2gyx7er/SLYKGwmPYbOfI=
+github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0 h1:C5pWGVg+PEFs2o2vs8wLvkKUXIdAnSbYFnEj9uCSYyM=
+github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0/go.mod h1:4qzRB1+tKH34AEf51xXZvXhBUifQ/6GNzX9XTFriiw4=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d h1:Yt6YgwuG4oMGBXRTo9S3RWUSAKBiKOpPD2CIuuheIrg=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d/go.mod h1:bWpuaCFKvueRhRI0RmY/VGrdVSMhC3kRfiKbj8nRWjo=
github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo=
github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0=
-github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7 h1:e38V5FYE7DA1JfKXeD5Buo/7lczALuVXlJ8YNTAUxcw=
-github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
-github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE=
-github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg=
-github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ=
-github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw=
+github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177 h1:bt/70PIgLcJe4arjbhIMxmI+DQJBTyhfiTcpUQ5FwwI=
+github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
+github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79 h1:TNb1CroCwjZ92s+ILmbwuO0CT/VqpcyjbxChdN2q//s=
+github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79/go.mod h1:0y3aCUlAUevgzvGHGQ7qDDhjOHOR9OWED+oIk3aSBwo=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79 h1:p7mVwRlLkRlxVat3GOWd/e740VJazR8k6QOipD2LHkk=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79/go.mod h1:JjP0TZ026rjAlFuj3SMcC/WO93SBV5vbMr8wTbFpaIg=
github.com/smartcontractkit/wsrpc v0.7.3 h1:CKYZfawZShZGfvsQep1F9oBansnFk9ByZPCdTMpLphw=
github.com/smartcontractkit/wsrpc v0.7.3/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
@@ -1215,8 +1215,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
-github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
-github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
+github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=
+github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
diff --git a/core/services/blockhashstore/bhs_test.go b/core/services/blockhashstore/bhs_test.go
index b2e978293df..7e395da74c0 100644
--- a/core/services/blockhashstore/bhs_test.go
+++ b/core/services/blockhashstore/bhs_test.go
@@ -19,7 +19,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/blockhashstore"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/utils"
)
@@ -30,8 +29,7 @@ func TestStoreRotatesFromAddresses(t *testing.T) {
cfg := configtest.NewTestGeneralConfig(t)
kst := cltest.NewKeyStore(t, db)
require.NoError(t, kst.Unlock(ctx, cltest.Password))
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, KeyStore: kst.Eth(), GeneralConfig: cfg, Client: ethClient})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, KeyStore: kst.Eth(), GeneralConfig: cfg, Client: ethClient})
chain, err := legacyChains.Get(cltest.FixtureChainID.String())
require.NoError(t, err)
lggr := logger.TestLogger(t)
diff --git a/core/services/blockhashstore/delegate_test.go b/core/services/blockhashstore/delegate_test.go
index 6bc93546605..0beaff9249d 100644
--- a/core/services/blockhashstore/delegate_test.go
+++ b/core/services/blockhashstore/delegate_test.go
@@ -26,7 +26,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/job"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
)
func TestDelegate_JobType(t *testing.T) {
@@ -61,7 +60,7 @@ func createTestDelegate(t *testing.T) (*blockhashstore.Delegate, *testData) {
lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil)
lp.On("LatestBlock", mock.Anything).Return(logpoller.LogPollerBlock{}, nil)
- relayExtenders := evmtest.NewChainRelayExtenders(
+ legacyChains := evmtest.NewLegacyChains(
t,
evmtest.TestChainOpts{
DB: db,
@@ -71,7 +70,6 @@ func createTestDelegate(t *testing.T) (*blockhashstore.Delegate, *testData) {
LogPoller: lp,
},
)
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
return blockhashstore.NewDelegate(cfg, lggr, legacyChains, kst), &testData{
ethClient: ethClient,
ethKeyStore: kst,
diff --git a/core/services/chainlink/relayer_chain_interoperators.go b/core/services/chainlink/relayer_chain_interoperators.go
index 60381c0d479..08b54f2e19a 100644
--- a/core/services/chainlink/relayer_chain_interoperators.go
+++ b/core/services/chainlink/relayer_chain_interoperators.go
@@ -8,10 +8,10 @@ import (
"sync"
"github.com/smartcontractkit/chainlink-common/pkg/loop"
- relay "github.com/smartcontractkit/chainlink-common/pkg/loop/adapters/relay"
"github.com/smartcontractkit/chainlink-common/pkg/types"
"github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos"
"github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/adapters"
+ "github.com/smartcontractkit/chainlink/v2/core/services/relay"
"github.com/smartcontractkit/chainlink/v2/core/chains"
"github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm"
@@ -140,7 +140,6 @@ func InitCosmos(ctx context.Context, factory RelayerFactory, config CosmosFactor
return fmt.Errorf("failed to setup Cosmos relayer: %w", err2)
}
legacyMap := make(map[string]cosmos.Chain)
-
for id, a := range adapters {
op.srvs = append(op.srvs, a)
op.loopRelayers[id] = a
@@ -403,25 +402,24 @@ func NewLegacyCosmos(m map[string]adapters.Chain) *LegacyCosmos {
return chains.NewChainsKV[adapters.Chain](m)
}
-type CosmosLoopRelayerChainer interface {
+type LOOPRelayAdapter interface {
loop.Relayer
Chain() adapters.Chain
}
-type CosmosLoopRelayerChain struct {
+type loopRelayAdapter struct {
loop.Relayer
chain adapters.Chain
}
-func NewCosmosLoopRelayerChain(r *cosmos.Relayer, s adapters.Chain) *CosmosLoopRelayerChain {
- ra := relay.NewServerAdapter(r, s)
- return &CosmosLoopRelayerChain{
- Relayer: ra,
- chain: s,
+func NewCosmosLOOPRelayerChain(r *cosmos.Relayer) *loopRelayAdapter {
+ return &loopRelayAdapter{
+ Relayer: relay.NewServerAdapter(r),
+ chain: r.Chain(),
}
}
-func (r *CosmosLoopRelayerChain) Chain() adapters.Chain {
+func (r *loopRelayAdapter) Chain() adapters.Chain {
return r.chain
}
-var _ CosmosLoopRelayerChainer = &CosmosLoopRelayerChain{}
+var _ LOOPRelayAdapter = &loopRelayAdapter{}
diff --git a/core/services/chainlink/relayer_factory.go b/core/services/chainlink/relayer_factory.go
index 849964f9bec..475b23803be 100644
--- a/core/services/chainlink/relayer_factory.go
+++ b/core/services/chainlink/relayer_factory.go
@@ -8,7 +8,6 @@ import (
"github.com/pelletier/go-toml/v2"
"github.com/smartcontractkit/chainlink-common/pkg/loop"
- "github.com/smartcontractkit/chainlink-common/pkg/loop/adapters/relay"
"github.com/smartcontractkit/chainlink-common/pkg/sqlutil"
"github.com/smartcontractkit/chainlink-common/pkg/types"
coretypes "github.com/smartcontractkit/chainlink-common/pkg/types/core"
@@ -19,12 +18,13 @@ import (
pkgstarknet "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink"
starkchain "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/chain"
"github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config"
+
"github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm"
coreconfig "github.com/smartcontractkit/chainlink/v2/core/config"
"github.com/smartcontractkit/chainlink/v2/core/config/env"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore"
- corerelay "github.com/smartcontractkit/chainlink/v2/core/services/relay"
+ "github.com/smartcontractkit/chainlink/v2/core/services/relay"
"github.com/smartcontractkit/chainlink/v2/core/services/relay/dummy"
evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc"
@@ -53,31 +53,27 @@ type EVMFactoryConfig struct {
coreconfig.MercuryTransmitter
}
-func (r *RelayerFactory) NewEVM(ctx context.Context, config EVMFactoryConfig) (map[types.RelayID]evmrelay.LoopRelayAdapter, error) {
+func (r *RelayerFactory) NewEVM(ctx context.Context, config EVMFactoryConfig) (map[types.RelayID]evmrelay.LOOPRelayAdapter, error) {
// TODO impl EVM loop. For now always 'fallback' to an adapter and embedded chain
- relayers := make(map[types.RelayID]evmrelay.LoopRelayAdapter)
+ relayers := make(map[types.RelayID]evmrelay.LOOPRelayAdapter)
lggr := r.Logger.Named("EVM")
// override some common opts with the factory values. this seems weird... maybe other signatures should change, or this should take a different type...
- ccOpts := legacyevm.ChainRelayExtenderConfig{
+ ccOpts := legacyevm.ChainRelayOpts{
Logger: lggr,
KeyStore: config.CSAETHKeystore.Eth(),
ChainOpts: config.ChainOpts,
}
- evmRelayExtenders, err := evmrelay.NewChainRelayerExtenders(ctx, ccOpts)
+ legacyChains, err := evmrelay.NewLegacyChains(ctx, ccOpts)
if err != nil {
return nil, err
}
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(evmRelayExtenders)
- for _, ext := range evmRelayExtenders.Slice() {
- relayID := types.RelayID{Network: corerelay.NetworkEVM, ChainID: ext.Chain().ID().String()}
- chain, err2 := legacyChains.Get(relayID.ChainID)
- if err2 != nil {
- return nil, err2
- }
+ for _, chain := range legacyChains {
+ relayID := types.RelayID{Network: relay.NetworkEVM, ChainID: chain.ID().String()}
+ chain := chain
relayerOpts := evmrelay.RelayerOpts{
DS: ccOpts.DS,
@@ -92,7 +88,7 @@ func (r *RelayerFactory) NewEVM(ctx context.Context, config EVMFactoryConfig) (m
continue
}
- relayers[relayID] = evmrelay.NewLoopRelayServerAdapter(relayer, ext)
+ relayers[relayID] = evmrelay.NewLOOPRelayAdapter(relayer)
}
// always return err because it is accumulating individual errors
@@ -114,7 +110,7 @@ func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solcfg.TOMLConf
unique := make(map[string]struct{})
// create one relayer per chain id
for _, chainCfg := range chainCfgs {
- relayID := types.RelayID{Network: corerelay.NetworkSolana, ChainID: *chainCfg.ChainID}
+ relayID := types.RelayID{Network: relay.NetworkSolana, ChainID: *chainCfg.ChainID}
_, alreadyExists := unique[relayID.Name()]
if alreadyExists {
return nil, fmt.Errorf("duplicate chain definitions for %s", relayID.Name())
@@ -163,7 +159,7 @@ func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solcfg.TOMLConf
if err != nil {
return nil, err
}
- solanaRelayers[relayID] = relay.NewServerAdapter(solana.NewRelayer(lggr, chain, r.CapabilitiesRegistry), chain)
+ solanaRelayers[relayID] = relay.NewServerAdapter(solana.NewRelayer(lggr, chain, r.CapabilitiesRegistry))
}
}
return solanaRelayers, nil
@@ -187,7 +183,7 @@ func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs config.TOML
unique := make(map[string]struct{})
// create one relayer per chain id
for _, chainCfg := range chainCfgs {
- relayID := types.RelayID{Network: corerelay.NetworkStarkNet, ChainID: *chainCfg.ChainID}
+ relayID := types.RelayID{Network: relay.NetworkStarkNet, ChainID: *chainCfg.ChainID}
_, alreadyExists := unique[relayID.Name()]
if alreadyExists {
return nil, fmt.Errorf("duplicate chain definitions for %s", relayID.Name())
@@ -238,7 +234,7 @@ func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs config.TOML
return nil, err
}
- starknetRelayers[relayID] = relay.NewServerAdapter(pkgstarknet.NewRelayer(lggr, chain, r.CapabilitiesRegistry), chain)
+ starknetRelayers[relayID] = relay.NewServerAdapter(pkgstarknet.NewRelayer(lggr, chain, r.CapabilitiesRegistry))
}
}
return starknetRelayers, nil
@@ -268,12 +264,12 @@ func (c CosmosFactoryConfig) Validate() error {
return err
}
-func (r *RelayerFactory) NewCosmos(config CosmosFactoryConfig) (map[types.RelayID]CosmosLoopRelayerChainer, error) {
+func (r *RelayerFactory) NewCosmos(config CosmosFactoryConfig) (map[types.RelayID]LOOPRelayAdapter, error) {
err := config.Validate()
if err != nil {
return nil, fmt.Errorf("cannot create Cosmos relayer: %w", err)
}
- relayers := make(map[types.RelayID]CosmosLoopRelayerChainer)
+ relayers := make(map[types.RelayID]LOOPRelayAdapter)
var (
cosmosLggr = r.Logger.Named("Cosmos")
@@ -282,7 +278,7 @@ func (r *RelayerFactory) NewCosmos(config CosmosFactoryConfig) (map[types.RelayI
// create one relayer per chain id
for _, chainCfg := range config.TOMLConfigs {
- relayID := types.RelayID{Network: corerelay.NetworkCosmos, ChainID: *chainCfg.ChainID}
+ relayID := types.RelayID{Network: relay.NetworkCosmos, ChainID: *chainCfg.ChainID}
lggr := cosmosLggr.Named(relayID.ChainID)
@@ -297,7 +293,7 @@ func (r *RelayerFactory) NewCosmos(config CosmosFactoryConfig) (map[types.RelayI
return nil, fmt.Errorf("failed to load Cosmos chain %q: %w", relayID, err)
}
- relayers[relayID] = NewCosmosLoopRelayerChain(cosmos.NewRelayer(lggr, chain), chain)
+ relayers[relayID] = NewCosmosLOOPRelayerChain(cosmos.NewRelayer(lggr, chain))
}
return relayers, nil
}
diff --git a/core/services/directrequest/delegate_test.go b/core/services/directrequest/delegate_test.go
index 0876031fb9a..cb66dcdb349 100644
--- a/core/services/directrequest/delegate_test.go
+++ b/core/services/directrequest/delegate_test.go
@@ -34,7 +34,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/job"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
pipeline_mocks "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/mocks"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
)
func TestDelegate_ServicesForSpec(t *testing.T) {
@@ -46,10 +45,9 @@ func TestDelegate_ServicesForSpec(t *testing.T) {
})
keyStore := cltest.NewKeyStore(t, db)
mailMon := servicetest.Run(t, mailboxtest.NewMonitor(t))
- relayerExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, Client: ethClient, MailMon: mailMon, KeyStore: keyStore.Eth()})
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, Client: ethClient, MailMon: mailMon, KeyStore: keyStore.Eth()})
lggr := logger.TestLogger(t)
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayerExtenders)
delegate := directrequest.NewDelegate(lggr, runner, nil, legacyChains, mailMon)
t.Run("Spec without DirectRequestSpec", func(t *testing.T) {
@@ -86,12 +84,11 @@ func NewDirectRequestUniverseWithConfig(t *testing.T, cfg chainlink.GeneralConfi
db := pgtest.NewSqlxDB(t)
keyStore := cltest.NewKeyStore(t, db)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, Client: ethClient, LogBroadcaster: broadcaster, MailMon: mailMon, KeyStore: keyStore.Eth()})
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, Client: ethClient, LogBroadcaster: broadcaster, MailMon: mailMon, KeyStore: keyStore.Eth()})
lggr := logger.TestLogger(t)
orm := pipeline.NewORM(db, lggr, cfg.JobPipeline().MaxSuccessfulRuns())
btORM := bridges.NewORM(db)
jobORM := job.NewORM(db, orm, btORM, keyStore, lggr)
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
delegate := directrequest.NewDelegate(lggr, runner, orm, legacyChains, mailMon)
jb := cltest.MakeDirectRequestJobSpec(t)
diff --git a/core/services/feeds/orm_test.go b/core/services/feeds/orm_test.go
index c4c9ced2ce3..84d1eba2563 100644
--- a/core/services/feeds/orm_test.go
+++ b/core/services/feeds/orm_test.go
@@ -23,7 +23,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/job"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs"
"github.com/smartcontractkit/chainlink/v2/core/utils/crypto"
)
@@ -1698,12 +1697,12 @@ func createJob(t *testing.T, db *sqlx.DB, externalJobID uuid.UUID) *job.Job {
ctx := testutils.Context(t)
var (
- config = configtest.NewGeneralConfig(t, nil)
- keyStore = cltest.NewKeyStore(t, db)
- lggr = logger.TestLogger(t)
- pipelineORM = pipeline.NewORM(db, lggr, config.JobPipeline().MaxSuccessfulRuns())
- bridgeORM = bridges.NewORM(db)
- relayExtenders = evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
+ config = configtest.NewGeneralConfig(t, nil)
+ keyStore = cltest.NewKeyStore(t, db)
+ lggr = logger.TestLogger(t)
+ pipelineORM = pipeline.NewORM(db, lggr, config.JobPipeline().MaxSuccessfulRuns())
+ bridgeORM = bridges.NewORM(db)
+ legacyChains = evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
)
orm := job.NewORM(db, pipelineORM, bridgeORM, keyStore, lggr)
require.NoError(t, keyStore.OCR().Add(ctx, cltest.DefaultOCRKey))
@@ -1715,7 +1714,6 @@ func createJob(t *testing.T, db *sqlx.DB, externalJobID uuid.UUID) *job.Job {
_, bridge2 := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{})
_, address := cltest.MustInsertRandomKey(t, keyStore.Eth())
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains,
testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
JobID: externalJobID.String(),
diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go
index 3ee7adc0d70..dc9210157d3 100644
--- a/core/services/feeds/service_test.go
+++ b/core/services/feeds/service_test.go
@@ -40,7 +40,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey"
ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/services/versioning"
"github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs"
"github.com/smartcontractkit/chainlink/v2/core/utils/crypto"
@@ -186,9 +185,8 @@ func setupTestServiceCfg(t *testing.T, overrideCfg func(c *chainlink.Config, s *
gcfg := configtest.NewGeneralConfig(t, overrideCfg)
keyStore := new(ksmocks.Master)
ethKeyStore := cltest.NewKeyStore(t, db).Eth()
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: gcfg,
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: gcfg,
HeadTracker: headtracker.NullTracker, KeyStore: ethKeyStore})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
keyStore.On("Eth").Return(ethKeyStore)
keyStore.On("CSA").Return(csaKeystore)
keyStore.On("P2P").Return(p2pKeystore)
diff --git a/core/services/functions/listener_test.go b/core/services/functions/listener_test.go
index a1a29bf2500..b04c5c130e7 100644
--- a/core/services/functions/listener_test.go
+++ b/core/services/functions/listener_test.go
@@ -37,7 +37,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/config"
threshold_mocks "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/threshold/mocks"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types"
evmrelay_mocks "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types/mocks"
s4_mocks "github.com/smartcontractkit/chainlink/v2/core/services/s4/mocks"
@@ -86,8 +85,7 @@ func NewFunctionsListenerUniverse(t *testing.T, timeoutSec int, pruneFrequencySe
db := pgtest.NewSqlxDB(t)
kst := cltest.NewKeyStore(t, db)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, Client: ethClient, KeyStore: kst.Eth(), LogBroadcaster: broadcaster, MailMon: mailMon})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, Client: ethClient, KeyStore: kst.Eth(), LogBroadcaster: broadcaster, MailMon: mailMon})
chain := legacyChains.Slice()[0]
lggr := logger.TestLogger(t)
diff --git a/core/services/job/helpers_test.go b/core/services/job/helpers_test.go
index 6f9bee66a0c..f801a684643 100644
--- a/core/services/job/helpers_test.go
+++ b/core/services/job/helpers_test.go
@@ -24,7 +24,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/keystore"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/store/models"
)
@@ -211,8 +210,7 @@ func makeMinimalHTTPOracleSpec(t *testing.T, db *sqlx.DB, cfg chainlink.GeneralC
}
s := fmt.Sprintf(minimalNonBootstrapTemplate, contractAddress, transmitterAddress, keyBundle, fetchUrl, timeout)
keyStore := cltest.NewKeyStore(t, db)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, Client: evmtest.NewEthClientMockWithDefaultChain(t), GeneralConfig: cfg, KeyStore: keyStore.Eth()})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, Client: evmtest.NewEthClientMockWithDefaultChain(t), GeneralConfig: cfg, KeyStore: keyStore.Eth()})
_, err := ocr.ValidatedOracleSpecToml(cfg, legacyChains, s)
require.NoError(t, err)
err = toml.Unmarshal([]byte(s), &os)
diff --git a/core/services/job/job_orm_test.go b/core/services/job/job_orm_test.go
index 6defdeeb614..953c5d0c922 100644
--- a/core/services/job/job_orm_test.go
+++ b/core/services/job/job_orm_test.go
@@ -44,7 +44,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/ocrbootstrap"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
"github.com/smartcontractkit/chainlink/v2/core/services/relay"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrfcommon"
"github.com/smartcontractkit/chainlink/v2/core/services/webhook"
"github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs"
@@ -374,8 +373,7 @@ func TestORM_DeleteJob_DeletesAssociatedRecords(t *testing.T) {
_, bridge2 := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{})
_, address := cltest.MustInsertRandomKey(t, keyStore.Eth())
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
TransmitterAddress: address.Hex(),
DS1BridgeName: bridge.Name.String(),
@@ -782,8 +780,7 @@ func TestORM_CreateJob_OCR_DuplicatedContractAddress(t *testing.T) {
TransmitterAddress: address.Hex(),
JobID: externalJobID.UUID.String(),
})
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, spec.Toml())
require.NoError(t, err)
@@ -1041,8 +1038,7 @@ func Test_FindJobs(t *testing.T) {
_, bridge2 := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{})
_, address := cltest.MustInsertRandomKey(t, keyStore.Eth())
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
jb1, err := ocr.ValidatedOracleSpecToml(config, legacyChains,
testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
JobID: uuid.New().String(),
@@ -1126,8 +1122,7 @@ func Test_FindJob(t *testing.T) {
// Must uniquely name the OCR Specs to properly insert a new job in the job table.
externalJobID := uuid.New()
_, address := cltest.MustInsertRandomKey(t, keyStore.Eth())
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
job, err := ocr.ValidatedOracleSpecToml(config, legacyChains,
testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
JobID: externalJobID.String(),
@@ -1358,8 +1353,7 @@ func Test_FindPipelineRuns(t *testing.T) {
pipelineORM := pipeline.NewORM(db, logger.TestLogger(t), config.JobPipeline().MaxSuccessfulRuns())
bridgesORM := bridges.NewORM(db)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
orm := NewTestORM(t, db, pipelineORM, bridgesORM, keyStore)
_, bridge := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{})
@@ -1422,8 +1416,7 @@ func Test_PipelineRunsByJobID(t *testing.T) {
pipelineORM := pipeline.NewORM(db, logger.TestLogger(t), config.JobPipeline().MaxSuccessfulRuns())
bridgesORM := bridges.NewORM(db)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
orm := NewTestORM(t, db, pipelineORM, bridgesORM, keyStore)
_, bridge := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{})
@@ -1485,8 +1478,7 @@ func Test_FindPipelineRunIDsByJobID(t *testing.T) {
pipelineORM := pipeline.NewORM(db, logger.TestLogger(t), config.JobPipeline().MaxSuccessfulRuns())
bridgesORM := bridges.NewORM(db)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
orm := NewTestORM(t, db, pipelineORM, bridgesORM, keyStore)
_, address := cltest.MustInsertRandomKey(t, keyStore.Eth())
@@ -1600,8 +1592,7 @@ func Test_FindPipelineRunsByIDs(t *testing.T) {
pipelineORM := pipeline.NewORM(db, logger.TestLogger(t), config.JobPipeline().MaxSuccessfulRuns())
bridgesORM := bridges.NewORM(db)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
orm := NewTestORM(t, db, pipelineORM, bridgesORM, keyStore)
_, bridge := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{})
@@ -1725,7 +1716,7 @@ func Test_FindJobWithoutSpecErrors(t *testing.T) {
jb, err = orm.FindJobWithoutSpecErrors(ctx, jobSpec.ID)
require.NoError(t, err)
- jbWithErrors, err := orm.FindJobTx(testutils.Context(t), jobSpec.ID)
+ jbWithErrors, err := orm.FindJob(testutils.Context(t), jobSpec.ID)
require.NoError(t, err)
assert.Equal(t, len(jb.JobSpecErrors), 0)
@@ -1780,8 +1771,7 @@ func Test_CountPipelineRunsByJobID(t *testing.T) {
pipelineORM := pipeline.NewORM(db, logger.TestLogger(t), config.JobPipeline().MaxSuccessfulRuns())
bridgesORM := bridges.NewORM(db)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
orm := NewTestORM(t, db, pipelineORM, bridgesORM, keyStore)
_, bridge := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{})
diff --git a/core/services/job/job_pipeline_orm_integration_test.go b/core/services/job/job_pipeline_orm_integration_test.go
index ca6cc6f832e..f26c9431ff5 100644
--- a/core/services/job/job_pipeline_orm_integration_test.go
+++ b/core/services/job/job_pipeline_orm_integration_test.go
@@ -20,7 +20,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/chainlink"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/store/models"
)
@@ -156,8 +155,7 @@ func TestPipelineORM_Integration(t *testing.T) {
clearJobsDb(t, db)
orm := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns())
btORM := bridges.NewORM(db)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{Client: evmtest.NewEthClientMockWithDefaultChain(t), DB: db, GeneralConfig: config, KeyStore: ethKeyStore})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{Client: evmtest.NewEthClientMockWithDefaultChain(t), DB: db, GeneralConfig: config, KeyStore: ethKeyStore})
runner := pipeline.NewRunner(orm, btORM, config.JobPipeline(), cfg.WebServer(), legacyChains, nil, nil, lggr, nil, nil)
jobORM := NewTestORM(t, db, orm, btORM, keyStore)
diff --git a/core/services/job/mocks/orm.go b/core/services/job/mocks/orm.go
index 0174d6208cc..c6a40260317 100644
--- a/core/services/job/mocks/orm.go
+++ b/core/services/job/mocks/orm.go
@@ -659,63 +659,6 @@ func (_c *ORM_FindJobIDsWithBridge_Call) RunAndReturn(run func(context.Context,
return _c
}
-// FindJobTx provides a mock function with given fields: ctx, id
-func (_m *ORM) FindJobTx(ctx context.Context, id int32) (job.Job, error) {
- ret := _m.Called(ctx, id)
-
- if len(ret) == 0 {
- panic("no return value specified for FindJobTx")
- }
-
- var r0 job.Job
- var r1 error
- if rf, ok := ret.Get(0).(func(context.Context, int32) (job.Job, error)); ok {
- return rf(ctx, id)
- }
- if rf, ok := ret.Get(0).(func(context.Context, int32) job.Job); ok {
- r0 = rf(ctx, id)
- } else {
- r0 = ret.Get(0).(job.Job)
- }
-
- if rf, ok := ret.Get(1).(func(context.Context, int32) error); ok {
- r1 = rf(ctx, id)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-// ORM_FindJobTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindJobTx'
-type ORM_FindJobTx_Call struct {
- *mock.Call
-}
-
-// FindJobTx is a helper method to define mock.On call
-// - ctx context.Context
-// - id int32
-func (_e *ORM_Expecter) FindJobTx(ctx interface{}, id interface{}) *ORM_FindJobTx_Call {
- return &ORM_FindJobTx_Call{Call: _e.mock.On("FindJobTx", ctx, id)}
-}
-
-func (_c *ORM_FindJobTx_Call) Run(run func(ctx context.Context, id int32)) *ORM_FindJobTx_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context), args[1].(int32))
- })
- return _c
-}
-
-func (_c *ORM_FindJobTx_Call) Return(_a0 job.Job, _a1 error) *ORM_FindJobTx_Call {
- _c.Call.Return(_a0, _a1)
- return _c
-}
-
-func (_c *ORM_FindJobTx_Call) RunAndReturn(run func(context.Context, int32) (job.Job, error)) *ORM_FindJobTx_Call {
- _c.Call.Return(run)
- return _c
-}
-
// FindJobWithoutSpecErrors provides a mock function with given fields: ctx, id
func (_m *ORM) FindJobWithoutSpecErrors(ctx context.Context, id int32) (job.Job, error) {
ret := _m.Called(ctx, id)
diff --git a/core/services/job/orm.go b/core/services/job/orm.go
index d13decc7208..84d78f317ab 100644
--- a/core/services/job/orm.go
+++ b/core/services/job/orm.go
@@ -47,7 +47,6 @@ type ORM interface {
InsertJob(ctx context.Context, job *Job) error
CreateJob(ctx context.Context, jb *Job) error
FindJobs(ctx context.Context, offset, limit int) ([]Job, int, error)
- FindJobTx(ctx context.Context, id int32) (Job, error)
FindJob(ctx context.Context, id int32) (Job, error)
FindJobByExternalJobID(ctx context.Context, uuid uuid.UUID) (Job, error)
FindJobIDByAddress(ctx context.Context, address evmtypes.EIP55Address, evmChainID *big.Big) (int32, error)
@@ -919,10 +918,6 @@ func LoadConfigVarsOCR(evmOcrCfg evmconfig.OCR, ocrCfg OCRConfig, os OCROracleSp
return LoadConfigVarsLocalOCR(evmOcrCfg, os, ocrCfg), nil
}
-func (o *orm) FindJobTx(ctx context.Context, id int32) (Job, error) {
- return o.FindJob(ctx, id)
-}
-
// FindJob returns job by ID, with all relations preloaded
func (o *orm) FindJob(ctx context.Context, id int32) (jb Job, err error) {
err = o.findJob(ctx, &jb, "id", id)
diff --git a/core/services/job/runner_integration_test.go b/core/services/job/runner_integration_test.go
index 0b55b14250e..af3a1f5698d 100644
--- a/core/services/job/runner_integration_test.go
+++ b/core/services/job/runner_integration_test.go
@@ -44,7 +44,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate"
"github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/services/telemetry"
"github.com/smartcontractkit/chainlink/v2/core/services/webhook"
"github.com/smartcontractkit/chainlink/v2/core/store/models"
@@ -84,8 +83,7 @@ func TestRunner(t *testing.T) {
require.NoError(t, pipelineORM.Start(ctx))
t.Cleanup(func() { assert.NoError(t, pipelineORM.Close()) })
btORM := bridges.NewORM(db)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, Client: ethClient, GeneralConfig: config, KeyStore: ethKeyStore})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, Client: ethClient, GeneralConfig: config, KeyStore: ethKeyStore})
c := clhttptest.NewTestLocalOnlyHTTPClient()
runner := pipeline.NewRunner(pipelineORM, btORM, config.JobPipeline(), config.WebServer(), legacyChains, nil, nil, logger.TestLogger(t), c, c)
@@ -561,14 +559,13 @@ answer1 [type=median index=0];
c.OCR.CaptureEATelemetry = ptr(tc.specCaptureEATelemetry)
})
- relayExtenders = evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, Client: ethClient, GeneralConfig: config, KeyStore: ethKeyStore})
- legacyChains = evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains2 := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, Client: ethClient, GeneralConfig: config, KeyStore: ethKeyStore})
kb, err := keyStore.OCR().Create(ctx)
require.NoError(t, err)
s := fmt.Sprintf(minimalNonBootstrapTemplate, cltest.NewEIP55Address(), transmitterAddress.Hex(), kb.ID(), "http://blah.com", "")
- jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, s)
+ jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains2, s)
require.NoError(t, err)
err = toml.Unmarshal([]byte(s), &jb)
require.NoError(t, err)
@@ -588,7 +585,7 @@ answer1 [type=median index=0];
nil,
pw,
monitoringEndpoint,
- legacyChains,
+ legacyChains2,
lggr,
config,
servicetest.Run(t, mailboxtest.NewMonitor(t)),
diff --git a/core/services/job/spawner_test.go b/core/services/job/spawner_test.go
index 86f0324e6a0..885db42b954 100644
--- a/core/services/job/spawner_test.go
+++ b/core/services/job/spawner_test.go
@@ -37,7 +37,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/ocr"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
evmrelayer "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
)
@@ -66,12 +65,11 @@ func clearDB(t *testing.T, db *sqlx.DB) {
}
type relayGetter struct {
- e evmrelay.EVMChainRelayerExtender
r *evmrelayer.Relayer
}
func (g *relayGetter) Get(id types.RelayID) (loop.Relayer, error) {
- return evmrelayer.NewLoopRelayServerAdapter(g.r, g.e), nil
+ return evmrelayer.NewLOOPRelayAdapter(g.r), nil
}
func (g *relayGetter) GetIDToRelayerMap() (map[types.RelayID]loop.Relayer, error) {
@@ -102,8 +100,7 @@ func TestSpawner_CreateJobDeleteJob(t *testing.T) {
}).
Return(nil).Maybe()
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, Client: ethClient, GeneralConfig: config, KeyStore: ethKeyStore})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, Client: ethClient, GeneralConfig: config, KeyStore: ethKeyStore})
t.Run("should respect its dependents", func(t *testing.T) {
lggr := logger.TestLogger(t)
orm := NewTestORM(t, db, pipeline.NewORM(db, lggr, config.JobPipeline().MaxSuccessfulRuns()), bridges.NewORM(db), keyStore)
@@ -289,11 +286,9 @@ func TestSpawner_CreateJobDeleteJob(t *testing.T) {
}
lggr := logger.TestLogger(t)
- relayExtenders := evmtest.NewChainRelayExtenders(t, testopts)
- assert.Equal(t, relayExtenders.Len(), 1)
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
- chain, err := legacyChains.Get("0")
- require.NoError(t, err)
+ legacyChains := evmtest.NewLegacyChains(t, testopts)
+ assert.Equal(t, legacyChains.Len(), 1)
+ chain := evmtest.MustGetDefaultChain(t, legacyChains)
evmRelayer, err := evmrelayer.NewRelayer(lggr, chain, evmrelayer.RelayerOpts{
DS: db,
@@ -303,7 +298,6 @@ func TestSpawner_CreateJobDeleteJob(t *testing.T) {
assert.NoError(t, err)
testRelayGetter := &relayGetter{
- e: relayExtenders.Slice()[0],
r: evmRelayer,
}
diff --git a/core/services/keeper/registry_synchronizer_helper_test.go b/core/services/keeper/registry_synchronizer_helper_test.go
index 73a3cb88166..e095615cb26 100644
--- a/core/services/keeper/registry_synchronizer_helper_test.go
+++ b/core/services/keeper/registry_synchronizer_helper_test.go
@@ -23,7 +23,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/job"
"github.com/smartcontractkit/chainlink/v2/core/services/keeper"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
)
const syncInterval = 1000 * time.Hour // prevents sync timer from triggering during test
@@ -44,8 +43,7 @@ func setupRegistrySync(t *testing.T, version keeper.RegistryVersion) (
lbMock := logmocks.NewBroadcaster(t)
lbMock.On("AddDependents", 1).Maybe()
j := cltest.MustInsertKeeperJob(t, db, korm, cltest.NewEIP55Address(), cltest.NewEIP55Address())
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, Client: ethClient, LogBroadcaster: lbMock, GeneralConfig: cfg, KeyStore: keyStore.Eth()})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, Client: ethClient, LogBroadcaster: lbMock, GeneralConfig: cfg, KeyStore: keyStore.Eth()})
jpv2 := cltest.NewJobPipelineV2(t, cfg.WebServer(), cfg.JobPipeline(), legacyChains, db, keyStore, nil, nil)
contractAddress := j.KeeperSpec.ContractAddress.Address()
diff --git a/core/services/keeper/upkeep_executer_test.go b/core/services/keeper/upkeep_executer_test.go
index c70a92c725c..4f39c5ed72e 100644
--- a/core/services/keeper/upkeep_executer_test.go
+++ b/core/services/keeper/upkeep_executer_test.go
@@ -37,7 +37,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/job"
"github.com/smartcontractkit/chainlink/v2/core/services/keeper"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
)
func newHead() evmtypes.Head {
@@ -81,8 +80,7 @@ func setup(t *testing.T, estimator gas.EvmFeeEstimator, overrideFn func(c *chain
ethClient.On("IsL2").Return(false).Maybe()
ethClient.On("HeadByNumber", mock.Anything, mock.Anything).Maybe().Return(&evmtypes.Head{Number: 1, Hash: utils.NewHash()}, nil)
txm := txmmocks.NewMockEvmTxManager(t)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{TxManager: txm, DB: db, Client: ethClient, KeyStore: keyStore.Eth(), GeneralConfig: cfg, GasEstimator: estimator})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{TxManager: txm, DB: db, Client: ethClient, KeyStore: keyStore.Eth(), GeneralConfig: cfg, GasEstimator: estimator})
jpv2 := cltest.NewJobPipelineV2(t, cfg.WebServer(), cfg.JobPipeline(), legacyChains, db, keyStore, nil, nil)
ch := evmtest.MustGetDefaultChain(t, legacyChains)
orm := keeper.NewORM(db, logger.TestLogger(t))
diff --git a/core/services/llo/bm/dummy_transmitter.go b/core/services/llo/bm/dummy_transmitter.go
index c349c9e0ee8..7219ee15c85 100644
--- a/core/services/llo/bm/dummy_transmitter.go
+++ b/core/services/llo/bm/dummy_transmitter.go
@@ -82,7 +82,7 @@ func (t *transmitter) Transmit(
}
// FromAccount returns the stringified (hex) CSA public key
-func (t *transmitter) FromAccount() (ocr2types.Account, error) {
+func (t *transmitter) FromAccount(context.Context) (ocr2types.Account, error) {
return ocr2types.Account(t.fromAccount), nil
}
diff --git a/core/services/llo/offchain_config_digester.go b/core/services/llo/offchain_config_digester.go
index cd4d9afa3a0..9614f1030e1 100644
--- a/core/services/llo/offchain_config_digester.go
+++ b/core/services/llo/offchain_config_digester.go
@@ -1,6 +1,7 @@
package llo
import (
+ "context"
"crypto/ed25519"
"encoding/binary"
"encoding/hex"
@@ -33,7 +34,7 @@ type OffchainConfigDigester struct {
ContractAddress common.Address
}
-func (d OffchainConfigDigester) ConfigDigest(cc ocrtypes.ContractConfig) (ocrtypes.ConfigDigest, error) {
+func (d OffchainConfigDigester) ConfigDigest(ctx context.Context, cc ocrtypes.ContractConfig) (ocrtypes.ConfigDigest, error) {
signers := []common.Address{}
for i, signer := range cc.Signers {
if len(signer) != 20 {
@@ -70,7 +71,7 @@ func (d OffchainConfigDigester) ConfigDigest(cc ocrtypes.ContractConfig) (ocrtyp
)
}
-func (d OffchainConfigDigester) ConfigDigestPrefix() (ocrtypes.ConfigDigestPrefix, error) {
+func (d OffchainConfigDigester) ConfigDigestPrefix(context.Context) (ocrtypes.ConfigDigestPrefix, error) {
return ocrtypes.ConfigDigestPrefixLLO, nil
}
diff --git a/core/services/llo/offchain_config_digester_test.go b/core/services/llo/offchain_config_digester_test.go
index 0de9117e391..adafd38f550 100644
--- a/core/services/llo/offchain_config_digester_test.go
+++ b/core/services/llo/offchain_config_digester_test.go
@@ -7,17 +7,20 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/smartcontractkit/libocr/offchainreporting2plus/types"
"github.com/stretchr/testify/require"
+
+ "github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
)
func Test_OffchainConfigDigester_ConfigDigest(t *testing.T) {
+ ctx := tests.Context(t)
// ChainID and ContractAddress are taken into account for computation
- cd1, err := OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(types.ContractConfig{})
+ cd1, err := OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(ctx, types.ContractConfig{})
require.NoError(t, err)
- cd2, err := OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(types.ContractConfig{})
+ cd2, err := OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(ctx, types.ContractConfig{})
require.NoError(t, err)
- cd3, err := OffchainConfigDigester{ChainID: big.NewInt(1)}.ConfigDigest(types.ContractConfig{})
+ cd3, err := OffchainConfigDigester{ChainID: big.NewInt(1)}.ConfigDigest(ctx, types.ContractConfig{})
require.NoError(t, err)
- cd4, err := OffchainConfigDigester{ChainID: big.NewInt(1), ContractAddress: common.Address{1}}.ConfigDigest(types.ContractConfig{})
+ cd4, err := OffchainConfigDigester{ChainID: big.NewInt(1), ContractAddress: common.Address{1}}.ConfigDigest(ctx, types.ContractConfig{})
require.NoError(t, err)
require.Equal(t, cd1, cd2)
@@ -26,29 +29,29 @@ func Test_OffchainConfigDigester_ConfigDigest(t *testing.T) {
require.NotEqual(t, cd3, cd4)
// malformed signers
- _, err = OffchainConfigDigester{}.ConfigDigest(types.ContractConfig{
+ _, err = OffchainConfigDigester{}.ConfigDigest(ctx, types.ContractConfig{
Signers: []types.OnchainPublicKey{{1, 2}},
})
require.Error(t, err)
// malformed transmitters
- _, err = OffchainConfigDigester{}.ConfigDigest(types.ContractConfig{
+ _, err = OffchainConfigDigester{}.ConfigDigest(ctx, types.ContractConfig{
Transmitters: []types.Account{"0x"},
})
require.Error(t, err)
- _, err = OffchainConfigDigester{}.ConfigDigest(types.ContractConfig{
+ _, err = OffchainConfigDigester{}.ConfigDigest(ctx, types.ContractConfig{
Transmitters: []types.Account{"7343581f55146951b0f678dc6cfa8fd360e2f353"},
})
require.Error(t, err)
- _, err = OffchainConfigDigester{}.ConfigDigest(types.ContractConfig{
+ _, err = OffchainConfigDigester{}.ConfigDigest(ctx, types.ContractConfig{
Transmitters: []types.Account{"7343581f55146951b0f678dc6cfa8fd360e2f353aabbccddeeffaaccddeeffaz"},
})
require.Error(t, err)
// well-formed transmitters
- _, err = OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(types.ContractConfig{
+ _, err = OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(ctx, types.ContractConfig{
Transmitters: []types.Account{"7343581f55146951b0f678dc6cfa8fd360e2f353aabbccddeeffaaccddeeffaa"},
})
require.NoError(t, err)
diff --git a/core/services/llo/transmitter.go b/core/services/llo/transmitter.go
index b8cfb86de3b..98c9ab4e55d 100644
--- a/core/services/llo/transmitter.go
+++ b/core/services/llo/transmitter.go
@@ -101,6 +101,6 @@ func (t *transmitter) Transmit(
}
// FromAccount returns the stringified (hex) CSA public key
-func (t *transmitter) FromAccount() (ocr2types.Account, error) {
+func (t *transmitter) FromAccount(ctx context.Context) (ocr2types.Account, error) {
return ocr2types.Account(t.fromAccount), nil
}
diff --git a/core/services/ocr2/delegate_test.go b/core/services/ocr2/delegate_test.go
index 9015928ade1..04693061880 100644
--- a/core/services/ocr2/delegate_test.go
+++ b/core/services/ocr2/delegate_test.go
@@ -24,7 +24,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/job"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2"
ocr2validate "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs"
)
@@ -46,9 +45,8 @@ func TestGetEVMEffectiveTransmitterID(t *testing.T) {
lggr := logger.TestLogger(t)
txManager := txmmocks.NewMockEvmTxManager(t)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth(), TxManager: txManager})
- require.True(t, relayExtenders.Len() > 0)
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth(), TxManager: txManager})
+ require.True(t, legacyChains.Len() > 0)
type testCase struct {
name string
diff --git a/core/services/ocr2/plugins/functions/reporting.go b/core/services/ocr2/plugins/functions/reporting.go
index f485ecb9d34..6236b762e18 100644
--- a/core/services/ocr2/plugins/functions/reporting.go
+++ b/core/services/ocr2/plugins/functions/reporting.go
@@ -91,7 +91,7 @@ func formatRequestId(requestId []byte) string {
}
// NewReportingPlugin complies with ReportingPluginFactory
-func (f FunctionsReportingPluginFactory) NewReportingPlugin(rpConfig types.ReportingPluginConfig) (types.ReportingPlugin, types.ReportingPluginInfo, error) {
+func (f FunctionsReportingPluginFactory) NewReportingPlugin(ctx context.Context, rpConfig types.ReportingPluginConfig) (types.ReportingPlugin, types.ReportingPluginInfo, error) {
pluginConfig, err := config.DecodeReportingPluginConfig(rpConfig.OffchainConfig)
if err != nil {
f.Logger.Error("unable to decode reporting plugin config", commontypes.LogFields{
diff --git a/core/services/ocr2/plugins/functions/reporting_test.go b/core/services/ocr2/plugins/functions/reporting_test.go
index 7d6686a0b4f..581e2de70b0 100644
--- a/core/services/ocr2/plugins/functions/reporting_test.go
+++ b/core/services/ocr2/plugins/functions/reporting_test.go
@@ -13,6 +13,7 @@ import (
"github.com/smartcontractkit/libocr/offchainreporting2plus/types"
commonlogger "github.com/smartcontractkit/chainlink-common/pkg/logger"
+ "github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
"github.com/smartcontractkit/chainlink/v2/core/logger"
functions_srv "github.com/smartcontractkit/chainlink/v2/core/services/functions"
@@ -42,7 +43,7 @@ func preparePlugin(t *testing.T, batchSize uint32, maxTotalGasLimit uint32) (typ
}
pluginConfigBytes, err := config.EncodeReportingPluginConfig(&pluginConfig)
require.NoError(t, err)
- plugin, _, err := factory.NewReportingPlugin(types.ReportingPluginConfig{
+ plugin, _, err := factory.NewReportingPlugin(tests.Context(t), types.ReportingPluginConfig{
N: 4,
F: 1,
OffchainConfig: pluginConfigBytes,
diff --git a/core/services/ocr2/plugins/mercury/integration_test.go b/core/services/ocr2/plugins/mercury/integration_test.go
index 9e34e9da8b4..fe6ff84f3f9 100644
--- a/core/services/ocr2/plugins/mercury/integration_test.go
+++ b/core/services/ocr2/plugins/mercury/integration_test.go
@@ -159,7 +159,7 @@ func integration_MercuryV1(t *testing.T) {
serverKey := csakey.MustNewV2XXXTestingOnly(big.NewInt(-1))
serverPubKey := serverKey.PublicKey
srv := NewMercuryServer(t, ed25519.PrivateKey(serverKey.Raw()), reqs, func() []byte {
- report, err := (&reportcodecv1.ReportCodec{}).BuildReport(v1.ReportFields{BenchmarkPrice: big.NewInt(234567), Bid: big.NewInt(1), Ask: big.NewInt(1), CurrentBlockHash: make([]byte, 32)})
+ report, err := (&reportcodecv1.ReportCodec{}).BuildReport(ctx, v1.ReportFields{BenchmarkPrice: big.NewInt(234567), Bid: big.NewInt(1), Ask: big.NewInt(1), CurrentBlockHash: make([]byte, 32)})
if err != nil {
panic(err)
}
@@ -284,7 +284,7 @@ func integration_MercuryV1(t *testing.T) {
}
}
// Setup config on contract
- onchainConfig, err := (datastreamsmercury.StandardOnchainConfigCodec{}).Encode(rawOnchainConfig)
+ onchainConfig, err := (datastreamsmercury.StandardOnchainConfigCodec{}).Encode(ctx, rawOnchainConfig)
require.NoError(t, err)
reportingPluginConfig, err := json.Marshal(rawReportingPluginConfig)
@@ -345,6 +345,7 @@ func integration_MercuryV1(t *testing.T) {
}
t.Run("receives at least one report per feed from each oracle when EAs are at 100% reliability", func(t *testing.T) {
+ ctx := testutils.Context(t)
// Expect at least one report per feed from each oracle
seen := make(map[[32]byte]map[credentials.StaticSizedPublicKey]struct{})
for i := range feeds {
@@ -372,9 +373,9 @@ func integration_MercuryV1(t *testing.T) {
continue // already saw all oracles for this feed
}
- num, err := (&reportcodecv1.ReportCodec{}).CurrentBlockNumFromReport(ocr2types.Report(report.([]byte)))
+ num, err := (&reportcodecv1.ReportCodec{}).CurrentBlockNumFromReport(ctx, ocr2types.Report(report.([]byte)))
require.NoError(t, err)
- currentBlock, err := backend.BlockByNumber(testutils.Context(t), nil)
+ currentBlock, err := backend.BlockByNumber(ctx, nil)
require.NoError(t, err)
assert.GreaterOrEqual(t, currentBlock.Number().Int64(), num)
@@ -407,6 +408,7 @@ func integration_MercuryV1(t *testing.T) {
})
t.Run("receives at least one report per feed from each oracle when EAs are at 80% reliability", func(t *testing.T) {
+ ctx := testutils.Context(t)
pError.Store(20) // 20% chance of EA error
// Expect at least one report per feed from each oracle
@@ -436,7 +438,7 @@ func integration_MercuryV1(t *testing.T) {
continue // already saw all oracles for this feed
}
- num, err := (&reportcodecv1.ReportCodec{}).CurrentBlockNumFromReport(ocr2types.Report(report.([]byte)))
+ num, err := (&reportcodecv1.ReportCodec{}).CurrentBlockNumFromReport(ctx, ocr2types.Report(report.([]byte)))
require.NoError(t, err)
currentBlock, err := backend.BlockByNumber(testutils.Context(t), nil)
require.NoError(t, err)
@@ -516,7 +518,7 @@ func integration_MercuryV2(t *testing.T) {
serverKey := csakey.MustNewV2XXXTestingOnly(big.NewInt(-1))
serverPubKey := serverKey.PublicKey
srv := NewMercuryServer(t, ed25519.PrivateKey(serverKey.Raw()), reqs, func() []byte {
- report, err := (&reportcodecv2.ReportCodec{}).BuildReport(v2.ReportFields{BenchmarkPrice: big.NewInt(234567), LinkFee: big.NewInt(1), NativeFee: big.NewInt(1)})
+ report, err := (&reportcodecv2.ReportCodec{}).BuildReport(ctx, v2.ReportFields{BenchmarkPrice: big.NewInt(234567), LinkFee: big.NewInt(1), NativeFee: big.NewInt(1)})
if err != nil {
panic(err)
}
@@ -635,7 +637,7 @@ func integration_MercuryV2(t *testing.T) {
}
// Setup config on contract
- onchainConfig, err := (datastreamsmercury.StandardOnchainConfigCodec{}).Encode(rawOnchainConfig)
+ onchainConfig, err := (datastreamsmercury.StandardOnchainConfigCodec{}).Encode(ctx, rawOnchainConfig)
require.NoError(t, err)
reportingPluginConfig, err := json.Marshal(rawReportingPluginConfig)
@@ -810,7 +812,7 @@ func integration_MercuryV3(t *testing.T) {
k := csakey.MustNewV2XXXTestingOnly(big.NewInt(int64(-(i + 1))))
reqs := make(chan request, 100)
srv := NewMercuryServer(t, ed25519.PrivateKey(k.Raw()), reqs, func() []byte {
- report, err := (&reportcodecv3.ReportCodec{}).BuildReport(v3.ReportFields{BenchmarkPrice: big.NewInt(234567), Bid: big.NewInt(1), Ask: big.NewInt(1), LinkFee: big.NewInt(1), NativeFee: big.NewInt(1)})
+ report, err := (&reportcodecv3.ReportCodec{}).BuildReport(ctx, v3.ReportFields{BenchmarkPrice: big.NewInt(234567), Bid: big.NewInt(1), Ask: big.NewInt(1), LinkFee: big.NewInt(1), NativeFee: big.NewInt(1)})
if err != nil {
panic(err)
}
@@ -927,7 +929,7 @@ func integration_MercuryV3(t *testing.T) {
}
// Setup config on contract
- onchainConfig, err := (datastreamsmercury.StandardOnchainConfigCodec{}).Encode(rawOnchainConfig)
+ onchainConfig, err := (datastreamsmercury.StandardOnchainConfigCodec{}).Encode(ctx, rawOnchainConfig)
require.NoError(t, err)
reportingPluginConfig, err := json.Marshal(rawReportingPluginConfig)
diff --git a/core/services/ocr2/plugins/promwrapper/factory.go b/core/services/ocr2/plugins/promwrapper/factory.go
index c3dffa55013..a3195ed88c9 100644
--- a/core/services/ocr2/plugins/promwrapper/factory.go
+++ b/core/services/ocr2/plugins/promwrapper/factory.go
@@ -1,6 +1,7 @@
package promwrapper
import (
+ "context"
"math/big"
"github.com/smartcontractkit/libocr/offchainreporting2plus/types"
@@ -15,8 +16,8 @@ type promFactory struct {
chainID *big.Int
}
-func (p *promFactory) NewReportingPlugin(config types.ReportingPluginConfig) (types.ReportingPlugin, types.ReportingPluginInfo, error) {
- plugin, info, err := p.wrapped.NewReportingPlugin(config)
+func (p *promFactory) NewReportingPlugin(ctx context.Context, config types.ReportingPluginConfig) (types.ReportingPlugin, types.ReportingPluginInfo, error) {
+ plugin, info, err := p.wrapped.NewReportingPlugin(ctx, config)
if err != nil {
return nil, types.ReportingPluginInfo{}, err
}
diff --git a/core/services/ocr2/plugins/s4/factory.go b/core/services/ocr2/plugins/s4/factory.go
index 54ed727ad78..3caff4e1866 100644
--- a/core/services/ocr2/plugins/s4/factory.go
+++ b/core/services/ocr2/plugins/s4/factory.go
@@ -1,6 +1,8 @@
package s4
import (
+ "context"
+
s4_orm "github.com/smartcontractkit/chainlink/v2/core/services/s4"
"github.com/smartcontractkit/libocr/commontypes"
@@ -20,7 +22,7 @@ type S4ReportingPluginFactory struct {
var _ types.ReportingPluginFactory = (*S4ReportingPluginFactory)(nil)
// NewReportingPlugin complies with ReportingPluginFactory
-func (f S4ReportingPluginFactory) NewReportingPlugin(rpConfig types.ReportingPluginConfig) (types.ReportingPlugin, types.ReportingPluginInfo, error) {
+func (f S4ReportingPluginFactory) NewReportingPlugin(ctx context.Context, rpConfig types.ReportingPluginConfig) (types.ReportingPlugin, types.ReportingPluginInfo, error) {
config, limits, err := f.ConfigDecoder(rpConfig.OffchainConfig)
if err != nil {
f.Logger.Error("unable to decode reporting plugin config", commontypes.LogFields{
diff --git a/core/services/ocr2/plugins/s4/factory_test.go b/core/services/ocr2/plugins/s4/factory_test.go
index 13a36a53823..53129b18796 100644
--- a/core/services/ocr2/plugins/s4/factory_test.go
+++ b/core/services/ocr2/plugins/s4/factory_test.go
@@ -4,6 +4,7 @@ import (
"errors"
"testing"
+ "github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/s4"
s4_mocks "github.com/smartcontractkit/chainlink/v2/core/services/s4/mocks"
@@ -42,7 +43,7 @@ func TestS4ReportingPluginFactory_NewReportingPlugin(t *testing.T) {
rpConfig := types.ReportingPluginConfig{
OffchainConfig: make([]byte, 100),
}
- plugin, pluginInfo, err := f.NewReportingPlugin(rpConfig)
+ plugin, pluginInfo, err := f.NewReportingPlugin(tests.Context(t), rpConfig)
require.NoError(t, err)
require.NotNil(t, plugin)
require.Equal(t, types.ReportingPluginInfo{
@@ -67,7 +68,7 @@ func TestS4ReportingPluginFactory_NewReportingPlugin(t *testing.T) {
rpConfig := types.ReportingPluginConfig{
OffchainConfig: make([]byte, 100),
}
- plugin, _, err := f.NewReportingPlugin(rpConfig)
+ plugin, _, err := f.NewReportingPlugin(tests.Context(t), rpConfig)
require.ErrorContains(t, err, "some error")
require.Nil(t, plugin)
})
diff --git a/core/services/ocrcommon/adapters.go b/core/services/ocrcommon/adapters.go
index 372d9e37f15..a146a77f6cc 100644
--- a/core/services/ocrcommon/adapters.go
+++ b/core/services/ocrcommon/adapters.go
@@ -75,8 +75,8 @@ func (c *OCR3ContractTransmitterAdapter) Transmit(ctx context.Context, digest oc
}, r.Report, signatures)
}
-func (c *OCR3ContractTransmitterAdapter) FromAccount() (ocrtypes.Account, error) {
- return c.ct.FromAccount()
+func (c *OCR3ContractTransmitterAdapter) FromAccount(ctx context.Context) (ocrtypes.Account, error) {
+ return c.ct.FromAccount(ctx)
}
var _ ocr3types.OnchainKeyring[[]byte] = (*OCR3OnchainKeyringMultiChainAdapter)(nil)
diff --git a/core/services/ocrcommon/adapters_test.go b/core/services/ocrcommon/adapters_test.go
index fed854b0b32..43d01d225df 100644
--- a/core/services/ocrcommon/adapters_test.go
+++ b/core/services/ocrcommon/adapters_test.go
@@ -16,6 +16,7 @@ import (
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/structpb"
+ "github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils/keystest"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key"
@@ -207,16 +208,17 @@ func (f fakeContractTransmitter) LatestConfigDigestAndEpoch(ctx context.Context)
panic("not implemented")
}
-func (f fakeContractTransmitter) FromAccount() (ocrtypes.Account, error) {
+func (f fakeContractTransmitter) FromAccount(context.Context) (ocrtypes.Account, error) {
return account, nil
}
func TestContractTransmitter(t *testing.T) {
+ ctx := testutils.Context(t)
ct := ocrcommon.NewOCR3ContractTransmitterAdapter(fakeContractTransmitter{})
- require.NoError(t, ct.Transmit(context.Background(), configDigest, seqNr, rwi, signatures))
+ require.NoError(t, ct.Transmit(ctx, configDigest, seqNr, rwi, signatures))
- a, err := ct.FromAccount()
+ a, err := ct.FromAccount(ctx)
require.NoError(t, err)
require.Equal(t, a, account)
}
diff --git a/core/services/pipeline/runner_test.go b/core/services/pipeline/runner_test.go
index 022a77c9471..d06c314aacc 100644
--- a/core/services/pipeline/runner_test.go
+++ b/core/services/pipeline/runner_test.go
@@ -14,6 +14,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
+ "github.com/jmoiron/sqlx"
"github.com/shopspring/decimal"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
@@ -21,8 +22,6 @@ import (
"gopkg.in/guregu/null.v4"
"github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
-
"github.com/smartcontractkit/chainlink/v2/core/bridges"
bridgesMocks "github.com/smartcontractkit/chainlink/v2/core/bridges/mocks"
"github.com/smartcontractkit/chainlink/v2/core/internal/cltest"
@@ -36,14 +35,11 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline/mocks"
"github.com/smartcontractkit/chainlink/v2/core/utils"
-
- "github.com/jmoiron/sqlx"
)
func newRunner(t testing.TB, db *sqlx.DB, bridgeORM bridges.ORM, cfg chainlink.GeneralConfig) (pipeline.Runner, *mocks.ORM) {
ethKeyStore := cltest.NewKeyStore(t, db).Eth()
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, KeyStore: ethKeyStore})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, KeyStore: ethKeyStore})
orm := mocks.NewORM(t)
c := clhttptest.NewTestLocalOnlyHTTPClient()
r := pipeline.NewRunner(orm, bridgeORM, cfg.JobPipeline(), cfg.WebServer(), legacyChains, ethKeyStore, nil, logger.TestLogger(t), c, c)
@@ -468,8 +464,7 @@ func Test_PipelineRunner_HandleFaultsPersistRun(t *testing.T) {
Return(nil)
cfg := configtest.NewTestGeneralConfig(t)
ethKeyStore := cltest.NewKeyStore(t, db).Eth()
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, KeyStore: ethKeyStore})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, KeyStore: ethKeyStore})
lggr := logger.TestLogger(t)
r := pipeline.NewRunner(orm, btORM, cfg.JobPipeline(), cfg.WebServer(), legacyChains, ethKeyStore, nil, lggr, nil, nil)
@@ -508,8 +503,7 @@ func Test_PipelineRunner_ExecuteAndInsertFinishedRun_SavingTheSpec(t *testing.T)
Return(nil)
cfg := configtest.NewTestGeneralConfig(t)
ethKeyStore := cltest.NewKeyStore(t, db).Eth()
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, KeyStore: ethKeyStore})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, KeyStore: ethKeyStore})
lggr := logger.TestLogger(t)
r := pipeline.NewRunner(orm, btORM, cfg.JobPipeline(), cfg.WebServer(), legacyChains, ethKeyStore, nil, lggr, nil, nil)
@@ -978,8 +972,7 @@ func Test_PipelineRunner_ExecuteRun(t *testing.T) {
db := pgtest.NewSqlxDB(t)
cfg := configtest.NewTestGeneralConfig(t)
ethKeyStore := cltest.NewKeyStore(t, db).Eth()
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, KeyStore: ethKeyStore})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, KeyStore: ethKeyStore})
lggr := logger.TestLogger(t)
r := pipeline.NewRunner(nil, nil, cfg.JobPipeline(), cfg.WebServer(), legacyChains, ethKeyStore, nil, lggr, nil, nil)
diff --git a/core/services/pipeline/task.eth_call_test.go b/core/services/pipeline/task.eth_call_test.go
index b21b3065f8c..5106bb12d33 100644
--- a/core/services/pipeline/task.eth_call_test.go
+++ b/core/services/pipeline/task.eth_call_test.go
@@ -25,7 +25,6 @@ import (
keystoremocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
pipelinemocks "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/mocks"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
)
func TestETHCallTask(t *testing.T) {
@@ -313,8 +312,7 @@ func TestETHCallTask(t *testing.T) {
var legacyChains legacyevm.LegacyChainContainer
if test.expectedErrorCause != nil || test.expectedErrorContains != "" {
- exts := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, TxManager: txManager, KeyStore: keyStore})
- legacyChains = evmrelay.NewLegacyChainsFromRelayerExtenders(exts)
+ legacyChains = evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg, TxManager: txManager, KeyStore: keyStore})
} else {
legacyChains = cltest.NewLegacyChainsWithMockChain(t, ethClient, cfg)
}
diff --git a/core/services/pipeline/task.eth_tx_test.go b/core/services/pipeline/task.eth_tx_test.go
index 5b9beeb43e1..57f7976f0ab 100644
--- a/core/services/pipeline/task.eth_tx_test.go
+++ b/core/services/pipeline/task.eth_tx_test.go
@@ -23,7 +23,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/chainlink"
keystoremocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
)
func TestETHTxTask(t *testing.T) {
@@ -579,9 +578,8 @@ func TestETHTxTask(t *testing.T) {
})
lggr := logger.TestLogger(t)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg,
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: cfg,
TxManager: txManager, KeyStore: keyStore})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
test.setupClientMocks(keyStore, txManager)
task.HelperSetDependencies(legacyChains, keyStore, test.specGasLimit, pipeline.DirectRequestJobType)
diff --git a/core/services/relay/dummy/config_digester.go b/core/services/relay/dummy/config_digester.go
index a74e007b0ba..745402135f0 100644
--- a/core/services/relay/dummy/config_digester.go
+++ b/core/services/relay/dummy/config_digester.go
@@ -1,6 +1,8 @@
package dummy
import (
+ "context"
+
ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types"
)
@@ -16,11 +18,11 @@ func NewOffchainConfigDigester(cd ocrtypes.ConfigDigest) (ocrtypes.OffchainConfi
// Compute ConfigDigest for the given ContractConfig. The first two bytes of the
// ConfigDigest must be the big-endian encoding of ConfigDigestPrefix!
-func (cd *configDigester) ConfigDigest(ocrtypes.ContractConfig) (ocrtypes.ConfigDigest, error) {
+func (cd *configDigester) ConfigDigest(context.Context, ocrtypes.ContractConfig) (ocrtypes.ConfigDigest, error) {
return cd.configDigest, nil
}
// This should return the same constant value on every invocation
-func (cd *configDigester) ConfigDigestPrefix() (ocrtypes.ConfigDigestPrefix, error) {
+func (cd *configDigester) ConfigDigestPrefix(ctx context.Context) (ocrtypes.ConfigDigestPrefix, error) {
return ocrtypes.ConfigDigestPrefixFromConfigDigest(cd.configDigest), nil
}
diff --git a/core/services/relay/evm/chain_reader.go b/core/services/relay/evm/chain_reader.go
index d84c2f00a9c..639b4617acd 100644
--- a/core/services/relay/evm/chain_reader.go
+++ b/core/services/relay/evm/chain_reader.go
@@ -75,7 +75,7 @@ func NewChainReaderService(ctx context.Context, lggr logger.Logger, lp logpoller
DefaultMaxParallelRpcCalls,
)
- err = cr.bindings.ForEach(ctx, func(c context.Context, cb *contractBinding) error {
+ err = cr.bindings.ForEach(ctx, func(ctx context.Context, cb *contractBinding) error {
for _, rb := range cb.readBindings {
rb.SetCodec(cr.codec)
}
@@ -138,7 +138,7 @@ func (cr *chainReader) Name() string { return cr.lggr.Name() }
// Start registers polling filters if contracts are already bound.
func (cr *chainReader) Start(ctx context.Context) error {
return cr.StartOnce("ChainReader", func() error {
- return cr.bindings.ForEach(ctx, func(c context.Context, cb *contractBinding) error {
+ return cr.bindings.ForEach(ctx, func(ctx context.Context, cb *contractBinding) error {
for _, rb := range cb.readBindings {
if err := rb.Register(ctx); err != nil {
return err
@@ -154,7 +154,7 @@ func (cr *chainReader) Close() error {
return cr.StopOnce("ChainReader", func() error {
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
- return cr.bindings.ForEach(ctx, func(c context.Context, cb *contractBinding) error {
+ return cr.bindings.ForEach(ctx, func(ctx context.Context, cb *contractBinding) error {
for _, rb := range cb.readBindings {
if err := rb.Unregister(ctx); err != nil {
return err
diff --git a/core/services/relay/evm/contract_transmitter.go b/core/services/relay/evm/contract_transmitter.go
index d594dfb9214..10595f82f0c 100644
--- a/core/services/relay/evm/contract_transmitter.go
+++ b/core/services/relay/evm/contract_transmitter.go
@@ -228,7 +228,7 @@ func (oc *contractTransmitter) LatestConfigDigestAndEpoch(ctx context.Context) (
}
// FromAccount returns the account from which the transmitter invokes the contract
-func (oc *contractTransmitter) FromAccount() (ocrtypes.Account, error) {
+func (oc *contractTransmitter) FromAccount(ctx context.Context) (ocrtypes.Account, error) {
return ocrtypes.Account(oc.transmitter.FromAddress().String()), nil
}
diff --git a/core/services/relay/evm/contract_transmitter_test.go b/core/services/relay/evm/contract_transmitter_test.go
index 182cda63ced..6161c58542c 100644
--- a/core/services/relay/evm/contract_transmitter_test.go
+++ b/core/services/relay/evm/contract_transmitter_test.go
@@ -12,6 +12,7 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
+ "github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
evmclimocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller"
lpmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks"
@@ -83,7 +84,7 @@ func TestContractTransmitter(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, "000130da6b9315bd59af6b0a3f5463c0d0a39e92eaa34cbcbdbace7b3bfcc777", hex.EncodeToString(digest[:]))
assert.Equal(t, uint32(2), epoch)
- from, err := ot.FromAccount()
+ from, err := ot.FromAccount(tests.Context(t))
require.NoError(t, err)
assert.Equal(t, sampleAddress.String(), string(from))
}
diff --git a/core/services/relay/evm/evm.go b/core/services/relay/evm/evm.go
index a0782380b5b..01912e2aa71 100644
--- a/core/services/relay/evm/evm.go
+++ b/core/services/relay/evm/evm.go
@@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
+ "math/big"
"strings"
"sync"
@@ -165,16 +166,12 @@ func (r *Relayer) Name() string {
return r.lggr.Name()
}
-// Start does noop: no subservices started on relay start, but when the first job is started
-func (r *Relayer) Start(context.Context) error {
- return nil
+func (r *Relayer) Start(ctx context.Context) error {
+ return r.chain.Start(ctx)
}
func (r *Relayer) Close() error {
- if r.triggerCapability != nil {
- return r.triggerCapability.Close()
- }
- return nil
+ return services.CloseAll(r.triggerCapability, r.chain)
}
// Ready does noop: always ready
@@ -183,18 +180,38 @@ func (r *Relayer) Ready() error {
}
func (r *Relayer) HealthReport() (report map[string]error) {
- report = make(map[string]error)
+ report = map[string]error{r.Name(): r.Ready()}
maps.Copy(report, r.chain.HealthReport())
return
}
-func (r *Relayer) NewOCR3CapabilityProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.OCR3CapabilityProvider, error) {
- pp, err := r.NewPluginProvider(rargs, pargs)
+func (r *Relayer) GetChainStatus(ctx context.Context) (commontypes.ChainStatus, error) {
+ return r.chain.GetChainStatus(ctx)
+}
+
+func (r *Relayer) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []commontypes.NodeStatus, nextPageToken string, total int, err error) {
+ return r.chain.ListNodeStatuses(ctx, pageSize, pageToken)
+}
+
+func (r *Relayer) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error {
+ return r.chain.Transact(ctx, from, to, amount, balanceCheck)
+}
+
+func (r *Relayer) ID() string {
+ return r.chain.ID().String()
+}
+
+func (r *Relayer) Chain() legacyevm.Chain {
+ return r.chain
+}
+
+func (r *Relayer) NewOCR3CapabilityProvider(ctx context.Context, rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.OCR3CapabilityProvider, error) {
+ pp, err := r.NewPluginProvider(ctx, rargs, pargs)
if err != nil {
return nil, err
}
- fromAccount, err := pp.ContractTransmitter().FromAccount()
+ fromAccount, err := pp.ContractTransmitter().FromAccount(ctx)
if err != nil {
return nil, err
}
@@ -205,10 +222,7 @@ func (r *Relayer) NewOCR3CapabilityProvider(rargs commontypes.RelayArgs, pargs c
}, nil
}
-func (r *Relayer) NewPluginProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.PluginProvider, error) {
- // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887
- ctx := context.Background()
-
+func (r *Relayer) NewPluginProvider(ctx context.Context, rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.PluginProvider, error) {
lggr := r.lggr.Named("PluginProvider").Named(rargs.ExternalJobID.String())
configWatcher, err := newStandardConfigProvider(ctx, r.lggr, r.chain, types.NewRelayOpts(rargs))
@@ -230,9 +244,7 @@ func (r *Relayer) NewPluginProvider(rargs commontypes.RelayArgs, pargs commontyp
), nil
}
-func (r *Relayer) NewMercuryProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.MercuryProvider, error) {
- // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887
- ctx := context.Background()
+func (r *Relayer) NewMercuryProvider(ctx context.Context, rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.MercuryProvider, error) {
lggr := r.lggr.Named("MercuryProvider").Named(rargs.ExternalJobID.String())
relayOpts := types.NewRelayOpts(rargs)
relayConfig, err := relayOpts.RelayConfig()
@@ -317,10 +329,7 @@ func (r *Relayer) NewMercuryProvider(rargs commontypes.RelayArgs, pargs commonty
return NewMercuryProvider(cp, r.chainReader, r.codec, NewMercuryChainReader(r.chain.HeadTracker()), transmitter, reportCodecV1, reportCodecV2, reportCodecV3, reportCodecV4, lggr), nil
}
-func (r *Relayer) NewLLOProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.LLOProvider, error) {
- // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887
- ctx := context.Background()
-
+func (r *Relayer) NewLLOProvider(ctx context.Context, rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.LLOProvider, error) {
relayOpts := types.NewRelayOpts(rargs)
var relayConfig types.RelayConfig
{
@@ -377,20 +386,14 @@ func (r *Relayer) NewLLOProvider(rargs commontypes.RelayArgs, pargs commontypes.
return NewLLOProvider(cp, transmitter, r.lggr, cdc), nil
}
-func (r *Relayer) NewFunctionsProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.FunctionsProvider, error) {
- // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887
- ctx := context.Background()
-
+func (r *Relayer) NewFunctionsProvider(ctx context.Context, rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.FunctionsProvider, error) {
lggr := r.lggr.Named("FunctionsProvider").Named(rargs.ExternalJobID.String())
// TODO(FUN-668): Not ready yet (doesn't implement FunctionsEvents() properly)
return NewFunctionsProvider(ctx, r.chain, rargs, pargs, lggr, r.ks.Eth(), functions.FunctionsPlugin)
}
// NewConfigProvider is called by bootstrap jobs
-func (r *Relayer) NewConfigProvider(args commontypes.RelayArgs) (configProvider commontypes.ConfigProvider, err error) {
- // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887
- ctx := context.Background()
-
+func (r *Relayer) NewConfigProvider(ctx context.Context, args commontypes.RelayArgs) (configProvider commontypes.ConfigProvider, err error) {
lggr := r.lggr.Named("ConfigProvider").Named(args.ExternalJobID.String())
relayOpts := types.NewRelayOpts(args)
relayConfig, err := relayOpts.RelayConfig()
@@ -645,8 +648,7 @@ func (r *Relayer) NewChainWriter(_ context.Context, config []byte) (commontypes.
return NewChainWriterService(r.lggr, r.chain.Client(), r.chain.TxManager(), r.chain.GasEstimator(), cfg)
}
-func (r *Relayer) NewContractReader(chainReaderConfig []byte) (commontypes.ContractReader, error) {
- ctx := context.Background()
+func (r *Relayer) NewContractReader(ctx context.Context, chainReaderConfig []byte) (commontypes.ContractReader, error) {
cfg := &types.ChainReaderConfig{}
if err := json.Unmarshal(chainReaderConfig, cfg); err != nil {
return nil, fmt.Errorf("failed to unmarshall chain reader config err: %s", err)
@@ -655,10 +657,7 @@ func (r *Relayer) NewContractReader(chainReaderConfig []byte) (commontypes.Contr
return NewChainReaderService(ctx, r.lggr, r.chain.LogPoller(), r.chain.HeadTracker(), r.chain.Client(), *cfg)
}
-func (r *Relayer) NewMedianProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.MedianProvider, error) {
- // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887
- ctx := context.Background()
-
+func (r *Relayer) NewMedianProvider(ctx context.Context, rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.MedianProvider, error) {
lggr := r.lggr.Named("MedianProvider").Named(rargs.ExternalJobID.String())
relayOpts := types.NewRelayOpts(rargs)
relayConfig, err := relayOpts.RelayConfig()
@@ -727,18 +726,18 @@ func (r *Relayer) NewMedianProvider(rargs commontypes.RelayArgs, pargs commontyp
return &medianProvider, nil
}
-func (r *Relayer) NewAutomationProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.AutomationProvider, error) {
+func (r *Relayer) NewAutomationProvider(ctx context.Context, rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.AutomationProvider, error) {
lggr := r.lggr.Named("AutomationProvider").Named(rargs.ExternalJobID.String())
ocr2keeperRelayer := NewOCR2KeeperRelayer(r.ds, r.chain, lggr.Named("OCR2KeeperRelayer"), r.ks.Eth())
return ocr2keeperRelayer.NewOCR2KeeperProvider(rargs, pargs)
}
-func (r *Relayer) NewCCIPCommitProvider(_ commontypes.RelayArgs, _ commontypes.PluginArgs) (commontypes.CCIPCommitProvider, error) {
+func (r *Relayer) NewCCIPCommitProvider(ctx context.Context, _ commontypes.RelayArgs, _ commontypes.PluginArgs) (commontypes.CCIPCommitProvider, error) {
return nil, errors.New("ccip.commit is not supported for evm")
}
-func (r *Relayer) NewCCIPExecProvider(_ commontypes.RelayArgs, _ commontypes.PluginArgs) (commontypes.CCIPExecProvider, error) {
+func (r *Relayer) NewCCIPExecProvider(ctx context.Context, _ commontypes.RelayArgs, _ commontypes.PluginArgs) (commontypes.CCIPExecProvider, error) {
return nil, errors.New("ccip.exec is not supported for evm")
}
diff --git a/core/services/relay/evm/functions/contract_transmitter.go b/core/services/relay/evm/functions/contract_transmitter.go
index 23143ed3ef1..0a18f229e03 100644
--- a/core/services/relay/evm/functions/contract_transmitter.go
+++ b/core/services/relay/evm/functions/contract_transmitter.go
@@ -282,7 +282,7 @@ func (oc *contractTransmitter) LatestConfigDigestAndEpoch(ctx context.Context) (
}
// FromAccount returns the account from which the transmitter invokes the contract
-func (oc *contractTransmitter) FromAccount() (ocrtypes.Account, error) {
+func (oc *contractTransmitter) FromAccount(ctx context.Context) (ocrtypes.Account, error) {
return ocrtypes.Account(oc.effectiveTransmitterAddress.String()), nil
}
diff --git a/core/services/relay/evm/functions/offchain_config_digester.go b/core/services/relay/evm/functions/offchain_config_digester.go
index fa8199ec0a4..6aadaaea386 100644
--- a/core/services/relay/evm/functions/offchain_config_digester.go
+++ b/core/services/relay/evm/functions/offchain_config_digester.go
@@ -37,7 +37,7 @@ func NewFunctionsOffchainConfigDigester(pluginType FunctionsPluginType, chainID
}
}
-func (d *functionsOffchainConfigDigester) ConfigDigest(cc types.ContractConfig) (types.ConfigDigest, error) {
+func (d *functionsOffchainConfigDigester) ConfigDigest(ctx context.Context, cc types.ContractConfig) (types.ConfigDigest, error) {
contractAddress := d.contractAddress.Load()
if contractAddress == nil {
return types.ConfigDigest{}, errors.New("contract address not set")
@@ -47,7 +47,7 @@ func (d *functionsOffchainConfigDigester) ConfigDigest(cc types.ContractConfig)
ContractAddress: *contractAddress,
}
- configDigest, err := baseDigester.ConfigDigest(cc)
+ configDigest, err := baseDigester.ConfigDigest(ctx, cc)
if err != nil {
return types.ConfigDigest{}, err
}
@@ -69,7 +69,7 @@ func (d *functionsOffchainConfigDigester) ConfigDigest(cc types.ContractConfig)
return configDigest, nil
}
-func (d *functionsOffchainConfigDigester) ConfigDigestPrefix() (types.ConfigDigestPrefix, error) {
+func (d *functionsOffchainConfigDigester) ConfigDigestPrefix(ctx context.Context) (types.ConfigDigestPrefix, error) {
switch d.pluginType {
case FunctionsPlugin:
return FunctionsDigestPrefix, nil
diff --git a/core/services/relay/evm/loop_impl.go b/core/services/relay/evm/loop_impl.go
index aec956cd0d2..3fd1de910b3 100644
--- a/core/services/relay/evm/loop_impl.go
+++ b/core/services/relay/evm/loop_impl.go
@@ -2,30 +2,29 @@ package evm
import (
"github.com/smartcontractkit/chainlink-common/pkg/loop"
- "github.com/smartcontractkit/chainlink-common/pkg/loop/adapters/relay"
"github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm"
+ "github.com/smartcontractkit/chainlink/v2/core/services/relay"
)
-type LoopRelayAdapter interface {
+type LOOPRelayAdapter interface {
loop.Relayer
Chain() legacyevm.Chain
}
-type LoopRelayer struct {
+type loopRelayAdapter struct {
loop.Relayer
- ext EVMChainRelayerExtender
+ chain legacyevm.Chain
}
-var _ loop.Relayer = &LoopRelayer{}
+var _ LOOPRelayAdapter = &loopRelayAdapter{}
-func NewLoopRelayServerAdapter(r *Relayer, cs EVMChainRelayerExtender) *LoopRelayer {
- ra := relay.NewServerAdapter(r, cs)
- return &LoopRelayer{
- Relayer: ra,
- ext: cs,
+func NewLOOPRelayAdapter(r *Relayer) *loopRelayAdapter {
+ return &loopRelayAdapter{
+ Relayer: relay.NewServerAdapter(r),
+ chain: r.chain,
}
}
-func (la *LoopRelayer) Chain() legacyevm.Chain {
- return la.ext.Chain()
+func (la *loopRelayAdapter) Chain() legacyevm.Chain {
+ return la.chain
}
diff --git a/core/services/relay/evm/median_test.go b/core/services/relay/evm/median_test.go
index 9c474006aa7..8d60d9e46a2 100644
--- a/core/services/relay/evm/median_test.go
+++ b/core/services/relay/evm/median_test.go
@@ -32,7 +32,7 @@ func TestNewMedianProvider(t *testing.T) {
rc, err2 := json.Marshal(&relayConfigBadChainID)
rargs2 := commontypes.RelayArgs{ContractID: contractID.String(), RelayConfig: rc}
require.NoError(t, err2)
- _, err2 = relayer.NewMedianProvider(rargs2, pargs)
+ _, err2 = relayer.NewMedianProvider(testutils.Context(t), rargs2, pargs)
assert.ErrorContains(t, err2, "chain id in spec does not match")
})
@@ -41,7 +41,7 @@ func TestNewMedianProvider(t *testing.T) {
rc, err2 := json.Marshal(&relayConfig)
require.NoError(t, err2)
rargsBadContractID := commontypes.RelayArgs{ContractID: "NotAContractID", RelayConfig: rc}
- _, err2 = relayer.NewMedianProvider(rargsBadContractID, pargs)
+ _, err2 = relayer.NewMedianProvider(testutils.Context(t), rargsBadContractID, pargs)
assert.ErrorContains(t, err2, "invalid contractID")
})
}
diff --git a/core/services/relay/evm/mercury/offchain_config_digester.go b/core/services/relay/evm/mercury/offchain_config_digester.go
index f9ba0b23095..dda3533b8b1 100644
--- a/core/services/relay/evm/mercury/offchain_config_digester.go
+++ b/core/services/relay/evm/mercury/offchain_config_digester.go
@@ -1,6 +1,7 @@
package mercury
import (
+ "context"
"crypto/ed25519"
"encoding/hex"
"math/big"
@@ -28,7 +29,7 @@ type OffchainConfigDigester struct {
ContractAddress common.Address
}
-func (d OffchainConfigDigester) ConfigDigest(cc ocrtypes.ContractConfig) (ocrtypes.ConfigDigest, error) {
+func (d OffchainConfigDigester) ConfigDigest(ctx context.Context, cc ocrtypes.ContractConfig) (ocrtypes.ConfigDigest, error) {
signers := []common.Address{}
for i, signer := range cc.Signers {
if len(signer) != 20 {
@@ -66,6 +67,6 @@ func (d OffchainConfigDigester) ConfigDigest(cc ocrtypes.ContractConfig) (ocrtyp
), nil
}
-func (d OffchainConfigDigester) ConfigDigestPrefix() (ocrtypes.ConfigDigestPrefix, error) {
+func (d OffchainConfigDigester) ConfigDigestPrefix(ctx context.Context) (ocrtypes.ConfigDigestPrefix, error) {
return ocrtypes.ConfigDigestPrefixMercuryV02, nil
}
diff --git a/core/services/relay/evm/mercury/offchain_config_digester_test.go b/core/services/relay/evm/mercury/offchain_config_digester_test.go
index c5d39926576..62869cf6f3d 100644
--- a/core/services/relay/evm/mercury/offchain_config_digester_test.go
+++ b/core/services/relay/evm/mercury/offchain_config_digester_test.go
@@ -7,17 +7,20 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/smartcontractkit/libocr/offchainreporting2plus/types"
"github.com/stretchr/testify/require"
+
+ "github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
)
func Test_OffchainConfigDigester_ConfigDigest(t *testing.T) {
+ ctx := tests.Context(t)
// ChainID and ContractAddress are taken into account for computation
- cd1, err := OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(types.ContractConfig{})
+ cd1, err := OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(ctx, types.ContractConfig{})
require.NoError(t, err)
- cd2, err := OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(types.ContractConfig{})
+ cd2, err := OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(ctx, types.ContractConfig{})
require.NoError(t, err)
- cd3, err := OffchainConfigDigester{ChainID: big.NewInt(1)}.ConfigDigest(types.ContractConfig{})
+ cd3, err := OffchainConfigDigester{ChainID: big.NewInt(1)}.ConfigDigest(ctx, types.ContractConfig{})
require.NoError(t, err)
- cd4, err := OffchainConfigDigester{ChainID: big.NewInt(1), ContractAddress: common.Address{1}}.ConfigDigest(types.ContractConfig{})
+ cd4, err := OffchainConfigDigester{ChainID: big.NewInt(1), ContractAddress: common.Address{1}}.ConfigDigest(ctx, types.ContractConfig{})
require.NoError(t, err)
require.Equal(t, cd1, cd2)
@@ -26,29 +29,29 @@ func Test_OffchainConfigDigester_ConfigDigest(t *testing.T) {
require.NotEqual(t, cd3, cd4)
// malformed signers
- _, err = OffchainConfigDigester{}.ConfigDigest(types.ContractConfig{
+ _, err = OffchainConfigDigester{}.ConfigDigest(ctx, types.ContractConfig{
Signers: []types.OnchainPublicKey{{1, 2}},
})
require.Error(t, err)
// malformed transmitters
- _, err = OffchainConfigDigester{}.ConfigDigest(types.ContractConfig{
+ _, err = OffchainConfigDigester{}.ConfigDigest(ctx, types.ContractConfig{
Transmitters: []types.Account{"0x"},
})
require.Error(t, err)
- _, err = OffchainConfigDigester{}.ConfigDigest(types.ContractConfig{
+ _, err = OffchainConfigDigester{}.ConfigDigest(ctx, types.ContractConfig{
Transmitters: []types.Account{"7343581f55146951b0f678dc6cfa8fd360e2f353"},
})
require.Error(t, err)
- _, err = OffchainConfigDigester{}.ConfigDigest(types.ContractConfig{
+ _, err = OffchainConfigDigester{}.ConfigDigest(ctx, types.ContractConfig{
Transmitters: []types.Account{"7343581f55146951b0f678dc6cfa8fd360e2f353aabbccddeeffaaccddeeffaz"},
})
require.Error(t, err)
// well-formed transmitters
- _, err = OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(types.ContractConfig{
+ _, err = OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(ctx, types.ContractConfig{
Transmitters: []types.Account{"7343581f55146951b0f678dc6cfa8fd360e2f353aabbccddeeffaaccddeeffaa"},
})
require.NoError(t, err)
diff --git a/core/services/relay/evm/mercury/transmitter.go b/core/services/relay/evm/mercury/transmitter.go
index f1434bf20f1..9ef2bc232c5 100644
--- a/core/services/relay/evm/mercury/transmitter.go
+++ b/core/services/relay/evm/mercury/transmitter.go
@@ -97,8 +97,8 @@ type ConfigTracker interface {
}
type TransmitterReportDecoder interface {
- BenchmarkPriceFromReport(report ocrtypes.Report) (*big.Int, error)
- ObservationTimestampFromReport(report ocrtypes.Report) (uint32, error)
+ BenchmarkPriceFromReport(ctx context.Context, report ocrtypes.Report) (*big.Int, error)
+ ObservationTimestampFromReport(ctx context.Context, report ocrtypes.Report) (uint32, error)
}
var _ Transmitter = (*mercuryTransmitter)(nil)
@@ -440,7 +440,7 @@ func (mt *mercuryTransmitter) Transmit(ctx context.Context, reportCtx ocrtypes.R
Payload: payload,
}
- ts, err := mt.codec.ObservationTimestampFromReport(report)
+ ts, err := mt.codec.ObservationTimestampFromReport(ctx, report)
if err != nil {
mt.lggr.Warnw("Failed to get observation timestamp from report", "err", err)
}
@@ -466,7 +466,7 @@ func (mt *mercuryTransmitter) Transmit(ctx context.Context, reportCtx ocrtypes.R
}
// FromAccount returns the stringified (hex) CSA public key
-func (mt *mercuryTransmitter) FromAccount() (ocrtypes.Account, error) {
+func (mt *mercuryTransmitter) FromAccount(ctx context.Context) (ocrtypes.Account, error) {
return ocrtypes.Account(mt.fromAccount), nil
}
@@ -512,7 +512,7 @@ func (mt *mercuryTransmitter) LatestPrice(ctx context.Context, feedID [32]byte)
if !is {
return nil, fmt.Errorf("expected report to be []byte, but it was %T", m["report"])
}
- return mt.codec.BenchmarkPriceFromReport(report)
+ return mt.codec.BenchmarkPriceFromReport(ctx, report)
}
// LatestTimestamp will return -1, nil if the feed is missing
diff --git a/core/services/relay/evm/mercury/transmitter_test.go b/core/services/relay/evm/mercury/transmitter_test.go
index 4eedc0c24a8..fc477350485 100644
--- a/core/services/relay/evm/mercury/transmitter_test.go
+++ b/core/services/relay/evm/mercury/transmitter_test.go
@@ -228,11 +228,11 @@ type mockCodec struct {
var _ mercurytypes.ReportCodec = &mockCodec{}
-func (m *mockCodec) BenchmarkPriceFromReport(_ ocrtypes.Report) (*big.Int, error) {
+func (m *mockCodec) BenchmarkPriceFromReport(ctx context.Context, _ ocrtypes.Report) (*big.Int, error) {
return m.val, m.err
}
-func (m *mockCodec) ObservationTimestampFromReport(report ocrtypes.Report) (uint32, error) {
+func (m *mockCodec) ObservationTimestampFromReport(ctx context.Context, report ocrtypes.Report) (uint32, error) {
return 0, nil
}
diff --git a/core/services/relay/evm/mercury/types/types.go b/core/services/relay/evm/mercury/types/types.go
index 972367940b5..98910887111 100644
--- a/core/services/relay/evm/mercury/types/types.go
+++ b/core/services/relay/evm/mercury/types/types.go
@@ -14,7 +14,7 @@ type DataSourceORM interface {
}
type ReportCodec interface {
- BenchmarkPriceFromReport(report ocrtypes.Report) (*big.Int, error)
+ BenchmarkPriceFromReport(ctx context.Context, report ocrtypes.Report) (*big.Int, error)
}
var (
diff --git a/core/services/relay/evm/mercury/v1/data_source.go b/core/services/relay/evm/mercury/v1/data_source.go
index 5a9a11decaa..0b9b6727fcf 100644
--- a/core/services/relay/evm/mercury/v1/data_source.go
+++ b/core/services/relay/evm/mercury/v1/data_source.go
@@ -111,7 +111,7 @@ func (ds *datasource) Observe(ctx context.Context, repts ocrtypes.ReportTimestam
return
}
if latest != nil {
- obs.MaxFinalizedBlockNumber.Val, obs.MaxFinalizedBlockNumber.Err = ds.codec.CurrentBlockNumFromReport(latest)
+ obs.MaxFinalizedBlockNumber.Val, obs.MaxFinalizedBlockNumber.Err = ds.codec.CurrentBlockNumFromReport(ctx, latest)
return
}
val, fetchErr := ds.fetcher.FetchInitialMaxFinalizedBlockNumber(ctx)
diff --git a/core/services/relay/evm/mercury/v1/reportcodec/report_codec.go b/core/services/relay/evm/mercury/v1/reportcodec/report_codec.go
index f4c6af32b8e..e9dfe145bad 100644
--- a/core/services/relay/evm/mercury/v1/reportcodec/report_codec.go
+++ b/core/services/relay/evm/mercury/v1/reportcodec/report_codec.go
@@ -1,6 +1,7 @@
package reportcodec
import (
+ "context"
"errors"
"fmt"
"math"
@@ -35,7 +36,7 @@ func NewReportCodec(feedID [32]byte, lggr logger.Logger) *ReportCodec {
return &ReportCodec{lggr, feedID}
}
-func (r *ReportCodec) BuildReport(rf v1.ReportFields) (ocrtypes.Report, error) {
+func (r *ReportCodec) BuildReport(ctx context.Context, rf v1.ReportFields) (ocrtypes.Report, error) {
var merr error
if rf.BenchmarkPrice == nil {
merr = errors.Join(merr, errors.New("benchmarkPrice may not be nil"))
@@ -61,11 +62,11 @@ func (r *ReportCodec) BuildReport(rf v1.ReportFields) (ocrtypes.Report, error) {
// Maximum length in bytes of Report returned by BuildReport. Used for
// defending against spam attacks.
-func (r *ReportCodec) MaxReportLength(n int) (int, error) {
+func (r *ReportCodec) MaxReportLength(ctx context.Context, n int) (int, error) {
return maxReportLength, nil
}
-func (r *ReportCodec) CurrentBlockNumFromReport(report ocrtypes.Report) (int64, error) {
+func (r *ReportCodec) CurrentBlockNumFromReport(ctx context.Context, report ocrtypes.Report) (int64, error) {
decoded, err := r.Decode(report)
if err != nil {
return 0, err
@@ -76,22 +77,11 @@ func (r *ReportCodec) CurrentBlockNumFromReport(report ocrtypes.Report) (int64,
return int64(decoded.CurrentBlockNum), nil
}
-func (r *ReportCodec) ValidFromBlockNumFromReport(report ocrtypes.Report) (int64, error) {
- decoded, err := r.Decode(report)
- if err != nil {
- return 0, err
- }
- if decoded.ValidFromBlockNum > math.MaxInt64 {
- return 0, fmt.Errorf("ValidFromBlockNum=%d overflows max int64", decoded.ValidFromBlockNum)
- }
- return int64(decoded.ValidFromBlockNum), nil
-}
-
func (r *ReportCodec) Decode(report ocrtypes.Report) (*reporttypes.Report, error) {
return reporttypes.Decode(report)
}
-func (r *ReportCodec) BenchmarkPriceFromReport(report ocrtypes.Report) (*big.Int, error) {
+func (r *ReportCodec) BenchmarkPriceFromReport(ctx context.Context, report ocrtypes.Report) (*big.Int, error) {
decoded, err := r.Decode(report)
if err != nil {
return nil, err
@@ -99,7 +89,7 @@ func (r *ReportCodec) BenchmarkPriceFromReport(report ocrtypes.Report) (*big.Int
return decoded.BenchmarkPrice, nil
}
-func (r *ReportCodec) ObservationTimestampFromReport(report ocrtypes.Report) (uint32, error) {
+func (r *ReportCodec) ObservationTimestampFromReport(ctx context.Context, report ocrtypes.Report) (uint32, error) {
decoded, err := r.Decode(report)
if err != nil {
return 0, err
diff --git a/core/services/relay/evm/mercury/v1/reportcodec/report_codec_test.go b/core/services/relay/evm/mercury/v1/reportcodec/report_codec_test.go
index 3e898d6c1da..d9b90f6140a 100644
--- a/core/services/relay/evm/mercury/v1/reportcodec/report_codec_test.go
+++ b/core/services/relay/evm/mercury/v1/reportcodec/report_codec_test.go
@@ -1,11 +1,14 @@
package reportcodec
import (
+ "fmt"
+ "math"
"math/big"
"testing"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
+ ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -13,6 +16,7 @@ import (
v1 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v1"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils"
+ "github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
)
var hash = hexutil.MustDecode("0x552c2cea3ab43bae137d89ee6142a01db3ae2b5678bc3c9bd5f509f537bea57b")
@@ -34,7 +38,8 @@ func Test_ReportCodec(t *testing.T) {
r := ReportCodec{}
t.Run("BuildReport errors on zero fields", func(t *testing.T) {
- _, err := r.BuildReport(v1.ReportFields{})
+ ctx := testutils.Context(t)
+ _, err := r.BuildReport(ctx, v1.ReportFields{})
require.Error(t, err)
assert.Contains(t, err.Error(), "benchmarkPrice may not be nil")
assert.Contains(t, err.Error(), "bid may not be nil")
@@ -43,10 +48,11 @@ func Test_ReportCodec(t *testing.T) {
})
t.Run("BuildReport constructs a report from observations", func(t *testing.T) {
+ ctx := testutils.Context(t)
rf := newValidReportFields()
// only need to test happy path since validations are done in relaymercury
- report, err := r.BuildReport(rf)
+ report, err := r.BuildReport(ctx, rf)
require.NoError(t, err)
reportElems := make(map[string]interface{})
@@ -64,7 +70,7 @@ func Test_ReportCodec(t *testing.T) {
assert.Equal(t, types.Report{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x55, 0x2c, 0x2c, 0xea, 0x3a, 0xb4, 0x3b, 0xae, 0x13, 0x7d, 0x89, 0xee, 0x61, 0x42, 0xa0, 0x1d, 0xb3, 0xae, 0x2b, 0x56, 0x78, 0xbc, 0x3c, 0x9b, 0xd5, 0xf5, 0x9, 0xf5, 0x37, 0xbe, 0xa5, 0x7b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7b}, report)
- max, err := r.MaxReportLength(4)
+ max, err := r.MaxReportLength(ctx, 4)
require.NoError(t, err)
assert.LessOrEqual(t, len(report), max)
@@ -125,7 +131,8 @@ func Test_ReportCodec_CurrentBlockNumFromReport(t *testing.T) {
t.Run("CurrentBlockNumFromReport extracts the current block number from a valid report", func(t *testing.T) {
report := buildSampleReport(validBn, 143, feedID)
- bn, err := r.CurrentBlockNumFromReport(report)
+ ctx := testutils.Context(t)
+ bn, err := r.CurrentBlockNumFromReport(ctx, report)
require.NoError(t, err)
assert.Equal(t, validBn, bn)
@@ -133,12 +140,25 @@ func Test_ReportCodec_CurrentBlockNumFromReport(t *testing.T) {
t.Run("CurrentBlockNumFromReport returns error if block num is too large", func(t *testing.T) {
report := buildSampleReport(invalidBn, 143, feedID)
- _, err := r.CurrentBlockNumFromReport(report)
+ ctx := testutils.Context(t)
+ _, err := r.CurrentBlockNumFromReport(ctx, report)
require.Error(t, err)
assert.Contains(t, err.Error(), "CurrentBlockNum=18446744073709551615 overflows max int64")
})
}
+
+func (r *ReportCodec) ValidFromBlockNumFromReport(report ocrtypes.Report) (int64, error) {
+ decoded, err := r.Decode(report)
+ if err != nil {
+ return 0, err
+ }
+ if decoded.ValidFromBlockNum > math.MaxInt64 {
+ return 0, fmt.Errorf("ValidFromBlockNum=%d overflows max int64", decoded.ValidFromBlockNum)
+ }
+ return int64(decoded.ValidFromBlockNum), nil
+}
+
func Test_ReportCodec_ValidFromBlockNumFromReport(t *testing.T) {
r := ReportCodec{}
feedID := utils.NewHash()
@@ -166,15 +186,17 @@ func Test_ReportCodec_BenchmarkPriceFromReport(t *testing.T) {
feedID := utils.NewHash()
t.Run("BenchmarkPriceFromReport extracts the benchmark price from valid report", func(t *testing.T) {
+ ctx := testutils.Context(t)
report := buildSampleReport(42, 999, feedID)
- bp, err := r.BenchmarkPriceFromReport(report)
+ bp, err := r.BenchmarkPriceFromReport(ctx, report)
require.NoError(t, err)
assert.Equal(t, big.NewInt(242), bp)
})
t.Run("BenchmarkPriceFromReport errors on invalid report", func(t *testing.T) {
- _, err := r.BenchmarkPriceFromReport([]byte{1, 2, 3})
+ ctx := testutils.Context(t)
+ _, err := r.BenchmarkPriceFromReport(ctx, []byte{1, 2, 3})
require.Error(t, err)
assert.EqualError(t, err, "failed to decode report: abi: cannot marshal in to go type: length insufficient 3 require 32")
})
diff --git a/core/services/relay/evm/mercury/v2/data_source.go b/core/services/relay/evm/mercury/v2/data_source.go
index 28487ec714e..bf53272b393 100644
--- a/core/services/relay/evm/mercury/v2/data_source.go
+++ b/core/services/relay/evm/mercury/v2/data_source.go
@@ -73,7 +73,7 @@ func (ds *datasource) Observe(ctx context.Context, repts ocrtypes.ReportTimestam
return
}
if latest != nil {
- maxFinalizedBlockNumber, decodeErr := ds.codec.ObservationTimestampFromReport(latest)
+ maxFinalizedBlockNumber, decodeErr := ds.codec.ObservationTimestampFromReport(ctx, latest)
obs.MaxFinalizedTimestamp.Val, obs.MaxFinalizedTimestamp.Err = int64(maxFinalizedBlockNumber), decodeErr
return
}
diff --git a/core/services/relay/evm/mercury/v2/reportcodec/report_codec.go b/core/services/relay/evm/mercury/v2/reportcodec/report_codec.go
index 33c5fa9a326..dadbbfa99db 100644
--- a/core/services/relay/evm/mercury/v2/reportcodec/report_codec.go
+++ b/core/services/relay/evm/mercury/v2/reportcodec/report_codec.go
@@ -1,6 +1,7 @@
package reportcodec
import (
+ "context"
"errors"
"fmt"
"math/big"
@@ -31,7 +32,7 @@ func NewReportCodec(feedID [32]byte, lggr logger.Logger) *ReportCodec {
return &ReportCodec{lggr, feedID}
}
-func (r *ReportCodec) BuildReport(rf v2.ReportFields) (ocrtypes.Report, error) {
+func (r *ReportCodec) BuildReport(ctx context.Context, rf v2.ReportFields) (ocrtypes.Report, error) {
var merr error
if rf.BenchmarkPrice == nil {
merr = errors.Join(merr, errors.New("benchmarkPrice may not be nil"))
@@ -53,24 +54,24 @@ func (r *ReportCodec) BuildReport(rf v2.ReportFields) (ocrtypes.Report, error) {
return ocrtypes.Report(reportBytes), pkgerrors.Wrap(err, "failed to pack report blob")
}
-func (r *ReportCodec) MaxReportLength(n int) (int, error) {
+func (r *ReportCodec) MaxReportLength(ctx context.Context, n int) (int, error) {
return maxReportLength, nil
}
-func (r *ReportCodec) ObservationTimestampFromReport(report ocrtypes.Report) (uint32, error) {
- decoded, err := r.Decode(report)
+func (r *ReportCodec) ObservationTimestampFromReport(ctx context.Context, report ocrtypes.Report) (uint32, error) {
+ decoded, err := r.Decode(ctx, report)
if err != nil {
return 0, err
}
return decoded.ObservationsTimestamp, nil
}
-func (r *ReportCodec) Decode(report ocrtypes.Report) (*reporttypes.Report, error) {
+func (r *ReportCodec) Decode(ctx context.Context, report ocrtypes.Report) (*reporttypes.Report, error) {
return reporttypes.Decode(report)
}
-func (r *ReportCodec) BenchmarkPriceFromReport(report ocrtypes.Report) (*big.Int, error) {
- decoded, err := r.Decode(report)
+func (r *ReportCodec) BenchmarkPriceFromReport(ctx context.Context, report ocrtypes.Report) (*big.Int, error) {
+ decoded, err := r.Decode(ctx, report)
if err != nil {
return nil, err
}
diff --git a/core/services/relay/evm/mercury/v2/reportcodec/report_codec_test.go b/core/services/relay/evm/mercury/v2/reportcodec/report_codec_test.go
index 36b3a443880..809869282b7 100644
--- a/core/services/relay/evm/mercury/v2/reportcodec/report_codec_test.go
+++ b/core/services/relay/evm/mercury/v2/reportcodec/report_codec_test.go
@@ -10,6 +10,7 @@ import (
"github.com/smartcontractkit/libocr/offchainreporting2plus/types"
v2 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v2"
+ "github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
)
func newValidReportFields() v2.ReportFields {
@@ -27,7 +28,8 @@ func Test_ReportCodec_BuildReport(t *testing.T) {
r := ReportCodec{}
t.Run("BuildReport errors on zero values", func(t *testing.T) {
- _, err := r.BuildReport(v2.ReportFields{})
+ ctx := testutils.Context(t)
+ _, err := r.BuildReport(ctx, v2.ReportFields{})
require.Error(t, err)
assert.Contains(t, err.Error(), "benchmarkPrice may not be nil")
assert.Contains(t, err.Error(), "linkFee may not be nil")
@@ -35,10 +37,11 @@ func Test_ReportCodec_BuildReport(t *testing.T) {
})
t.Run("BuildReport constructs a report from observations", func(t *testing.T) {
+ ctx := testutils.Context(t)
rf := newValidReportFields()
// only need to test happy path since validations are done in relaymercury
- report, err := r.BuildReport(rf)
+ report, err := r.BuildReport(ctx, rf)
require.NoError(t, err)
reportElems := make(map[string]interface{})
@@ -53,12 +56,13 @@ func Test_ReportCodec_BuildReport(t *testing.T) {
assert.Equal(t, reportElems["nativeFee"].(*big.Int).Int64(), int64(457))
assert.Equal(t, types.Report{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf3}, report)
- max, err := r.MaxReportLength(4)
+ max, err := r.MaxReportLength(ctx, 4)
require.NoError(t, err)
assert.LessOrEqual(t, len(report), max)
t.Run("Decode decodes the report", func(t *testing.T) {
- decoded, err := r.Decode(report)
+ ctx := testutils.Context(t)
+ decoded, err := r.Decode(ctx, report)
require.NoError(t, err)
require.NotNil(t, decoded)
@@ -76,7 +80,8 @@ func Test_ReportCodec_BuildReport(t *testing.T) {
rf := newValidReportFields()
rf.LinkFee = big.NewInt(-1)
rf.NativeFee = big.NewInt(-1)
- _, err := r.BuildReport(rf)
+ ctx := testutils.Context(t)
+ _, err := r.BuildReport(ctx, rf)
require.Error(t, err)
assert.Contains(t, err.Error(), "linkFee may not be negative (got: -1)")
@@ -84,14 +89,15 @@ func Test_ReportCodec_BuildReport(t *testing.T) {
})
t.Run("Decode errors on invalid report", func(t *testing.T) {
- _, err := r.Decode([]byte{1, 2, 3})
+ ctx := testutils.Context(t)
+ _, err := r.Decode(ctx, []byte{1, 2, 3})
assert.EqualError(t, err, "failed to decode report: abi: cannot marshal in to go type: length insufficient 3 require 32")
longBad := make([]byte, 64)
for i := 0; i < len(longBad); i++ {
longBad[i] = byte(i)
}
- _, err = r.Decode(longBad)
+ _, err = r.Decode(ctx, longBad)
assert.EqualError(t, err, "failed to decode report: abi: improperly encoded uint32 value")
})
}
@@ -118,7 +124,8 @@ func Test_ReportCodec_ObservationTimestampFromReport(t *testing.T) {
t.Run("ObservationTimestampFromReport extracts observation timestamp from a valid report", func(t *testing.T) {
report := buildSampleReport(123)
- ts, err := r.ObservationTimestampFromReport(report)
+ ctx := testutils.Context(t)
+ ts, err := r.ObservationTimestampFromReport(ctx, report)
require.NoError(t, err)
assert.Equal(t, ts, uint32(123))
@@ -126,7 +133,8 @@ func Test_ReportCodec_ObservationTimestampFromReport(t *testing.T) {
t.Run("ObservationTimestampFromReport returns error when report is invalid", func(t *testing.T) {
report := []byte{1, 2, 3}
- _, err := r.ObservationTimestampFromReport(report)
+ ctx := testutils.Context(t)
+ _, err := r.ObservationTimestampFromReport(ctx, report)
require.Error(t, err)
assert.EqualError(t, err, "failed to decode report: abi: cannot marshal in to go type: length insufficient 3 require 32")
@@ -137,15 +145,17 @@ func Test_ReportCodec_BenchmarkPriceFromReport(t *testing.T) {
r := ReportCodec{}
t.Run("BenchmarkPriceFromReport extracts the benchmark price from valid report", func(t *testing.T) {
+ ctx := testutils.Context(t)
report := buildSampleReport(123)
- bp, err := r.BenchmarkPriceFromReport(report)
+ bp, err := r.BenchmarkPriceFromReport(ctx, report)
require.NoError(t, err)
assert.Equal(t, big.NewInt(242), bp)
})
t.Run("BenchmarkPriceFromReport errors on invalid report", func(t *testing.T) {
- _, err := r.BenchmarkPriceFromReport([]byte{1, 2, 3})
+ ctx := testutils.Context(t)
+ _, err := r.BenchmarkPriceFromReport(ctx, []byte{1, 2, 3})
require.Error(t, err)
assert.EqualError(t, err, "failed to decode report: abi: cannot marshal in to go type: length insufficient 3 require 32")
})
diff --git a/core/services/relay/evm/mercury/v3/data_source.go b/core/services/relay/evm/mercury/v3/data_source.go
index 644f4e775ec..e7c29c7ad91 100644
--- a/core/services/relay/evm/mercury/v3/data_source.go
+++ b/core/services/relay/evm/mercury/v3/data_source.go
@@ -75,7 +75,7 @@ func (ds *datasource) Observe(ctx context.Context, repts ocrtypes.ReportTimestam
return
}
if latest != nil {
- maxFinalizedBlockNumber, decodeErr := ds.codec.ObservationTimestampFromReport(latest)
+ maxFinalizedBlockNumber, decodeErr := ds.codec.ObservationTimestampFromReport(ctx, latest)
obs.MaxFinalizedTimestamp.Val, obs.MaxFinalizedTimestamp.Err = int64(maxFinalizedBlockNumber), decodeErr
return
}
diff --git a/core/services/relay/evm/mercury/v3/reportcodec/report_codec.go b/core/services/relay/evm/mercury/v3/reportcodec/report_codec.go
index 601431838d2..109b14e9acf 100644
--- a/core/services/relay/evm/mercury/v3/reportcodec/report_codec.go
+++ b/core/services/relay/evm/mercury/v3/reportcodec/report_codec.go
@@ -1,6 +1,7 @@
package reportcodec
import (
+ "context"
"errors"
"fmt"
"math/big"
@@ -31,7 +32,7 @@ func NewReportCodec(feedID [32]byte, lggr logger.Logger) *ReportCodec {
return &ReportCodec{lggr, feedID}
}
-func (r *ReportCodec) BuildReport(rf v3.ReportFields) (ocrtypes.Report, error) {
+func (r *ReportCodec) BuildReport(ctx context.Context, rf v3.ReportFields) (ocrtypes.Report, error) {
var merr error
if rf.BenchmarkPrice == nil {
merr = errors.Join(merr, errors.New("benchmarkPrice may not be nil"))
@@ -59,11 +60,11 @@ func (r *ReportCodec) BuildReport(rf v3.ReportFields) (ocrtypes.Report, error) {
return ocrtypes.Report(reportBytes), pkgerrors.Wrap(err, "failed to pack report blob")
}
-func (r *ReportCodec) MaxReportLength(n int) (int, error) {
+func (r *ReportCodec) MaxReportLength(ctx context.Context, n int) (int, error) {
return maxReportLength, nil
}
-func (r *ReportCodec) ObservationTimestampFromReport(report ocrtypes.Report) (uint32, error) {
+func (r *ReportCodec) ObservationTimestampFromReport(ctx context.Context, report ocrtypes.Report) (uint32, error) {
decoded, err := r.Decode(report)
if err != nil {
return 0, err
@@ -75,7 +76,7 @@ func (r *ReportCodec) Decode(report ocrtypes.Report) (*reporttypes.Report, error
return reporttypes.Decode(report)
}
-func (r *ReportCodec) BenchmarkPriceFromReport(report ocrtypes.Report) (*big.Int, error) {
+func (r *ReportCodec) BenchmarkPriceFromReport(ctx context.Context, report ocrtypes.Report) (*big.Int, error) {
decoded, err := r.Decode(report)
if err != nil {
return nil, err
diff --git a/core/services/relay/evm/mercury/v3/reportcodec/report_codec_test.go b/core/services/relay/evm/mercury/v3/reportcodec/report_codec_test.go
index 752e6ce34b5..2cfb162841b 100644
--- a/core/services/relay/evm/mercury/v3/reportcodec/report_codec_test.go
+++ b/core/services/relay/evm/mercury/v3/reportcodec/report_codec_test.go
@@ -10,6 +10,7 @@ import (
"github.com/smartcontractkit/libocr/offchainreporting2plus/types"
v3 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v3"
+ "github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
)
func newValidReportFields() v3.ReportFields {
@@ -29,7 +30,8 @@ func Test_ReportCodec_BuildReport(t *testing.T) {
r := ReportCodec{}
t.Run("BuildReport errors on zero values", func(t *testing.T) {
- _, err := r.BuildReport(v3.ReportFields{})
+ ctx := testutils.Context(t)
+ _, err := r.BuildReport(ctx, v3.ReportFields{})
require.Error(t, err)
assert.Contains(t, err.Error(), "benchmarkPrice may not be nil")
assert.Contains(t, err.Error(), "linkFee may not be nil")
@@ -40,7 +42,8 @@ func Test_ReportCodec_BuildReport(t *testing.T) {
rf := newValidReportFields()
// only need to test happy path since validations are done in relaymercury
- report, err := r.BuildReport(rf)
+ ctx := testutils.Context(t)
+ report, err := r.BuildReport(ctx, rf)
require.NoError(t, err)
reportElems := make(map[string]interface{})
@@ -57,7 +60,7 @@ func Test_ReportCodec_BuildReport(t *testing.T) {
assert.Equal(t, reportElems["nativeFee"].(*big.Int).Int64(), int64(457))
assert.Equal(t, types.Report{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf5}, report)
- max, err := r.MaxReportLength(4)
+ max, err := r.MaxReportLength(ctx, 4)
require.NoError(t, err)
assert.LessOrEqual(t, len(report), max)
@@ -82,7 +85,8 @@ func Test_ReportCodec_BuildReport(t *testing.T) {
rf := newValidReportFields()
rf.LinkFee = big.NewInt(-1)
rf.NativeFee = big.NewInt(-1)
- _, err := r.BuildReport(rf)
+ ctx := testutils.Context(t)
+ _, err := r.BuildReport(ctx, rf)
require.Error(t, err)
assert.Contains(t, err.Error(), "linkFee may not be negative (got: -1)")
@@ -126,7 +130,8 @@ func Test_ReportCodec_ObservationTimestampFromReport(t *testing.T) {
t.Run("ObservationTimestampFromReport extracts observation timestamp from a valid report", func(t *testing.T) {
report := buildSampleReport(123)
- ts, err := r.ObservationTimestampFromReport(report)
+ ctx := testutils.Context(t)
+ ts, err := r.ObservationTimestampFromReport(ctx, report)
require.NoError(t, err)
assert.Equal(t, ts, uint32(123))
@@ -134,7 +139,8 @@ func Test_ReportCodec_ObservationTimestampFromReport(t *testing.T) {
t.Run("ObservationTimestampFromReport returns error when report is invalid", func(t *testing.T) {
report := []byte{1, 2, 3}
- _, err := r.ObservationTimestampFromReport(report)
+ ctx := testutils.Context(t)
+ _, err := r.ObservationTimestampFromReport(ctx, report)
require.Error(t, err)
assert.EqualError(t, err, "failed to decode report: abi: cannot marshal in to go type: length insufficient 3 require 32")
@@ -145,15 +151,17 @@ func Test_ReportCodec_BenchmarkPriceFromReport(t *testing.T) {
r := ReportCodec{}
t.Run("BenchmarkPriceFromReport extracts the benchmark price from valid report", func(t *testing.T) {
+ ctx := testutils.Context(t)
report := buildSampleReport(123)
- bp, err := r.BenchmarkPriceFromReport(report)
+ bp, err := r.BenchmarkPriceFromReport(ctx, report)
require.NoError(t, err)
assert.Equal(t, big.NewInt(242), bp)
})
t.Run("BenchmarkPriceFromReport errors on invalid report", func(t *testing.T) {
- _, err := r.BenchmarkPriceFromReport([]byte{1, 2, 3})
+ ctx := testutils.Context(t)
+ _, err := r.BenchmarkPriceFromReport(ctx, []byte{1, 2, 3})
require.Error(t, err)
assert.EqualError(t, err, "failed to decode report: abi: cannot marshal in to go type: length insufficient 3 require 32")
})
diff --git a/core/services/relay/evm/mercury/v4/reportcodec/report_codec.go b/core/services/relay/evm/mercury/v4/reportcodec/report_codec.go
index 12f3d88e733..e4f078e3e1b 100644
--- a/core/services/relay/evm/mercury/v4/reportcodec/report_codec.go
+++ b/core/services/relay/evm/mercury/v4/reportcodec/report_codec.go
@@ -1,6 +1,7 @@
package reportcodec
import (
+ "context"
"errors"
"fmt"
"math/big"
@@ -29,7 +30,7 @@ func NewReportCodec(feedID [32]byte, lggr logger.Logger) *ReportCodec {
return &ReportCodec{lggr, feedID}
}
-func (r *ReportCodec) BuildReport(rf v4.ReportFields) (ocrtypes.Report, error) {
+func (r *ReportCodec) BuildReport(ctx context.Context, rf v4.ReportFields) (ocrtypes.Report, error) {
var merr error
if rf.BenchmarkPrice == nil {
merr = errors.Join(merr, errors.New("benchmarkPrice may not be nil"))
@@ -57,24 +58,24 @@ func (r *ReportCodec) BuildReport(rf v4.ReportFields) (ocrtypes.Report, error) {
return ocrtypes.Report(reportBytes), pkgerrors.Wrap(err, "failed to pack report blob")
}
-func (r *ReportCodec) MaxReportLength(n int) (int, error) {
+func (r *ReportCodec) MaxReportLength(ctx context.Context, n int) (int, error) {
return maxReportLength, nil
}
-func (r *ReportCodec) ObservationTimestampFromReport(report ocrtypes.Report) (uint32, error) {
- decoded, err := r.Decode(report)
+func (r *ReportCodec) ObservationTimestampFromReport(ctx context.Context, report ocrtypes.Report) (uint32, error) {
+ decoded, err := r.Decode(ctx, report)
if err != nil {
return 0, err
}
return decoded.ObservationsTimestamp, nil
}
-func (r *ReportCodec) Decode(report ocrtypes.Report) (*reporttypes.Report, error) {
+func (r *ReportCodec) Decode(ctx context.Context, report ocrtypes.Report) (*reporttypes.Report, error) {
return reporttypes.Decode(report)
}
-func (r *ReportCodec) BenchmarkPriceFromReport(report ocrtypes.Report) (*big.Int, error) {
- decoded, err := r.Decode(report)
+func (r *ReportCodec) BenchmarkPriceFromReport(ctx context.Context, report ocrtypes.Report) (*big.Int, error) {
+ decoded, err := r.Decode(ctx, report)
if err != nil {
return nil, err
}
diff --git a/core/services/relay/evm/mocks/loop_relay_adapter.go b/core/services/relay/evm/mocks/loop_relay_adapter.go
deleted file mode 100644
index 50b1dd5f397..00000000000
--- a/core/services/relay/evm/mocks/loop_relay_adapter.go
+++ /dev/null
@@ -1,793 +0,0 @@
-// Code generated by mockery v2.43.2. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
- big "math/big"
-
- legacyevm "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm"
-
- mock "github.com/stretchr/testify/mock"
-
- types "github.com/smartcontractkit/chainlink-common/pkg/types"
-)
-
-// LoopRelayAdapter is an autogenerated mock type for the LoopRelayAdapter type
-type LoopRelayAdapter struct {
- mock.Mock
-}
-
-type LoopRelayAdapter_Expecter struct {
- mock *mock.Mock
-}
-
-func (_m *LoopRelayAdapter) EXPECT() *LoopRelayAdapter_Expecter {
- return &LoopRelayAdapter_Expecter{mock: &_m.Mock}
-}
-
-// Chain provides a mock function with given fields:
-func (_m *LoopRelayAdapter) Chain() legacyevm.Chain {
- ret := _m.Called()
-
- if len(ret) == 0 {
- panic("no return value specified for Chain")
- }
-
- var r0 legacyevm.Chain
- if rf, ok := ret.Get(0).(func() legacyevm.Chain); ok {
- r0 = rf()
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(legacyevm.Chain)
- }
- }
-
- return r0
-}
-
-// LoopRelayAdapter_Chain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Chain'
-type LoopRelayAdapter_Chain_Call struct {
- *mock.Call
-}
-
-// Chain is a helper method to define mock.On call
-func (_e *LoopRelayAdapter_Expecter) Chain() *LoopRelayAdapter_Chain_Call {
- return &LoopRelayAdapter_Chain_Call{Call: _e.mock.On("Chain")}
-}
-
-func (_c *LoopRelayAdapter_Chain_Call) Run(run func()) *LoopRelayAdapter_Chain_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run()
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_Chain_Call) Return(_a0 legacyevm.Chain) *LoopRelayAdapter_Chain_Call {
- _c.Call.Return(_a0)
- return _c
-}
-
-func (_c *LoopRelayAdapter_Chain_Call) RunAndReturn(run func() legacyevm.Chain) *LoopRelayAdapter_Chain_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// Close provides a mock function with given fields:
-func (_m *LoopRelayAdapter) Close() error {
- ret := _m.Called()
-
- if len(ret) == 0 {
- panic("no return value specified for Close")
- }
-
- var r0 error
- if rf, ok := ret.Get(0).(func() error); ok {
- r0 = rf()
- } else {
- r0 = ret.Error(0)
- }
-
- return r0
-}
-
-// LoopRelayAdapter_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
-type LoopRelayAdapter_Close_Call struct {
- *mock.Call
-}
-
-// Close is a helper method to define mock.On call
-func (_e *LoopRelayAdapter_Expecter) Close() *LoopRelayAdapter_Close_Call {
- return &LoopRelayAdapter_Close_Call{Call: _e.mock.On("Close")}
-}
-
-func (_c *LoopRelayAdapter_Close_Call) Run(run func()) *LoopRelayAdapter_Close_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run()
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_Close_Call) Return(_a0 error) *LoopRelayAdapter_Close_Call {
- _c.Call.Return(_a0)
- return _c
-}
-
-func (_c *LoopRelayAdapter_Close_Call) RunAndReturn(run func() error) *LoopRelayAdapter_Close_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// GetChainStatus provides a mock function with given fields: ctx
-func (_m *LoopRelayAdapter) GetChainStatus(ctx context.Context) (types.ChainStatus, error) {
- ret := _m.Called(ctx)
-
- if len(ret) == 0 {
- panic("no return value specified for GetChainStatus")
- }
-
- var r0 types.ChainStatus
- var r1 error
- if rf, ok := ret.Get(0).(func(context.Context) (types.ChainStatus, error)); ok {
- return rf(ctx)
- }
- if rf, ok := ret.Get(0).(func(context.Context) types.ChainStatus); ok {
- r0 = rf(ctx)
- } else {
- r0 = ret.Get(0).(types.ChainStatus)
- }
-
- if rf, ok := ret.Get(1).(func(context.Context) error); ok {
- r1 = rf(ctx)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-// LoopRelayAdapter_GetChainStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChainStatus'
-type LoopRelayAdapter_GetChainStatus_Call struct {
- *mock.Call
-}
-
-// GetChainStatus is a helper method to define mock.On call
-// - ctx context.Context
-func (_e *LoopRelayAdapter_Expecter) GetChainStatus(ctx interface{}) *LoopRelayAdapter_GetChainStatus_Call {
- return &LoopRelayAdapter_GetChainStatus_Call{Call: _e.mock.On("GetChainStatus", ctx)}
-}
-
-func (_c *LoopRelayAdapter_GetChainStatus_Call) Run(run func(ctx context.Context)) *LoopRelayAdapter_GetChainStatus_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context))
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_GetChainStatus_Call) Return(_a0 types.ChainStatus, _a1 error) *LoopRelayAdapter_GetChainStatus_Call {
- _c.Call.Return(_a0, _a1)
- return _c
-}
-
-func (_c *LoopRelayAdapter_GetChainStatus_Call) RunAndReturn(run func(context.Context) (types.ChainStatus, error)) *LoopRelayAdapter_GetChainStatus_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// HealthReport provides a mock function with given fields:
-func (_m *LoopRelayAdapter) HealthReport() map[string]error {
- ret := _m.Called()
-
- if len(ret) == 0 {
- panic("no return value specified for HealthReport")
- }
-
- var r0 map[string]error
- if rf, ok := ret.Get(0).(func() map[string]error); ok {
- r0 = rf()
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(map[string]error)
- }
- }
-
- return r0
-}
-
-// LoopRelayAdapter_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport'
-type LoopRelayAdapter_HealthReport_Call struct {
- *mock.Call
-}
-
-// HealthReport is a helper method to define mock.On call
-func (_e *LoopRelayAdapter_Expecter) HealthReport() *LoopRelayAdapter_HealthReport_Call {
- return &LoopRelayAdapter_HealthReport_Call{Call: _e.mock.On("HealthReport")}
-}
-
-func (_c *LoopRelayAdapter_HealthReport_Call) Run(run func()) *LoopRelayAdapter_HealthReport_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run()
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_HealthReport_Call) Return(_a0 map[string]error) *LoopRelayAdapter_HealthReport_Call {
- _c.Call.Return(_a0)
- return _c
-}
-
-func (_c *LoopRelayAdapter_HealthReport_Call) RunAndReturn(run func() map[string]error) *LoopRelayAdapter_HealthReport_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// ListNodeStatuses provides a mock function with given fields: ctx, pageSize, pageToken
-func (_m *LoopRelayAdapter) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) ([]types.NodeStatus, string, int, error) {
- ret := _m.Called(ctx, pageSize, pageToken)
-
- if len(ret) == 0 {
- panic("no return value specified for ListNodeStatuses")
- }
-
- var r0 []types.NodeStatus
- var r1 string
- var r2 int
- var r3 error
- if rf, ok := ret.Get(0).(func(context.Context, int32, string) ([]types.NodeStatus, string, int, error)); ok {
- return rf(ctx, pageSize, pageToken)
- }
- if rf, ok := ret.Get(0).(func(context.Context, int32, string) []types.NodeStatus); ok {
- r0 = rf(ctx, pageSize, pageToken)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).([]types.NodeStatus)
- }
- }
-
- if rf, ok := ret.Get(1).(func(context.Context, int32, string) string); ok {
- r1 = rf(ctx, pageSize, pageToken)
- } else {
- r1 = ret.Get(1).(string)
- }
-
- if rf, ok := ret.Get(2).(func(context.Context, int32, string) int); ok {
- r2 = rf(ctx, pageSize, pageToken)
- } else {
- r2 = ret.Get(2).(int)
- }
-
- if rf, ok := ret.Get(3).(func(context.Context, int32, string) error); ok {
- r3 = rf(ctx, pageSize, pageToken)
- } else {
- r3 = ret.Error(3)
- }
-
- return r0, r1, r2, r3
-}
-
-// LoopRelayAdapter_ListNodeStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNodeStatuses'
-type LoopRelayAdapter_ListNodeStatuses_Call struct {
- *mock.Call
-}
-
-// ListNodeStatuses is a helper method to define mock.On call
-// - ctx context.Context
-// - pageSize int32
-// - pageToken string
-func (_e *LoopRelayAdapter_Expecter) ListNodeStatuses(ctx interface{}, pageSize interface{}, pageToken interface{}) *LoopRelayAdapter_ListNodeStatuses_Call {
- return &LoopRelayAdapter_ListNodeStatuses_Call{Call: _e.mock.On("ListNodeStatuses", ctx, pageSize, pageToken)}
-}
-
-func (_c *LoopRelayAdapter_ListNodeStatuses_Call) Run(run func(ctx context.Context, pageSize int32, pageToken string)) *LoopRelayAdapter_ListNodeStatuses_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context), args[1].(int32), args[2].(string))
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_ListNodeStatuses_Call) Return(stats []types.NodeStatus, nextPageToken string, total int, err error) *LoopRelayAdapter_ListNodeStatuses_Call {
- _c.Call.Return(stats, nextPageToken, total, err)
- return _c
-}
-
-func (_c *LoopRelayAdapter_ListNodeStatuses_Call) RunAndReturn(run func(context.Context, int32, string) ([]types.NodeStatus, string, int, error)) *LoopRelayAdapter_ListNodeStatuses_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// Name provides a mock function with given fields:
-func (_m *LoopRelayAdapter) Name() string {
- ret := _m.Called()
-
- if len(ret) == 0 {
- panic("no return value specified for Name")
- }
-
- var r0 string
- if rf, ok := ret.Get(0).(func() string); ok {
- r0 = rf()
- } else {
- r0 = ret.Get(0).(string)
- }
-
- return r0
-}
-
-// LoopRelayAdapter_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
-type LoopRelayAdapter_Name_Call struct {
- *mock.Call
-}
-
-// Name is a helper method to define mock.On call
-func (_e *LoopRelayAdapter_Expecter) Name() *LoopRelayAdapter_Name_Call {
- return &LoopRelayAdapter_Name_Call{Call: _e.mock.On("Name")}
-}
-
-func (_c *LoopRelayAdapter_Name_Call) Run(run func()) *LoopRelayAdapter_Name_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run()
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_Name_Call) Return(_a0 string) *LoopRelayAdapter_Name_Call {
- _c.Call.Return(_a0)
- return _c
-}
-
-func (_c *LoopRelayAdapter_Name_Call) RunAndReturn(run func() string) *LoopRelayAdapter_Name_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// NewChainWriter provides a mock function with given fields: ctx, chainWriterConfig
-func (_m *LoopRelayAdapter) NewChainWriter(ctx context.Context, chainWriterConfig []byte) (types.ChainWriter, error) {
- ret := _m.Called(ctx, chainWriterConfig)
-
- if len(ret) == 0 {
- panic("no return value specified for NewChainWriter")
- }
-
- var r0 types.ChainWriter
- var r1 error
- if rf, ok := ret.Get(0).(func(context.Context, []byte) (types.ChainWriter, error)); ok {
- return rf(ctx, chainWriterConfig)
- }
- if rf, ok := ret.Get(0).(func(context.Context, []byte) types.ChainWriter); ok {
- r0 = rf(ctx, chainWriterConfig)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(types.ChainWriter)
- }
- }
-
- if rf, ok := ret.Get(1).(func(context.Context, []byte) error); ok {
- r1 = rf(ctx, chainWriterConfig)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-// LoopRelayAdapter_NewChainWriter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewChainWriter'
-type LoopRelayAdapter_NewChainWriter_Call struct {
- *mock.Call
-}
-
-// NewChainWriter is a helper method to define mock.On call
-// - ctx context.Context
-// - chainWriterConfig []byte
-func (_e *LoopRelayAdapter_Expecter) NewChainWriter(ctx interface{}, chainWriterConfig interface{}) *LoopRelayAdapter_NewChainWriter_Call {
- return &LoopRelayAdapter_NewChainWriter_Call{Call: _e.mock.On("NewChainWriter", ctx, chainWriterConfig)}
-}
-
-func (_c *LoopRelayAdapter_NewChainWriter_Call) Run(run func(ctx context.Context, chainWriterConfig []byte)) *LoopRelayAdapter_NewChainWriter_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context), args[1].([]byte))
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_NewChainWriter_Call) Return(_a0 types.ChainWriter, _a1 error) *LoopRelayAdapter_NewChainWriter_Call {
- _c.Call.Return(_a0, _a1)
- return _c
-}
-
-func (_c *LoopRelayAdapter_NewChainWriter_Call) RunAndReturn(run func(context.Context, []byte) (types.ChainWriter, error)) *LoopRelayAdapter_NewChainWriter_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// NewConfigProvider provides a mock function with given fields: _a0, _a1
-func (_m *LoopRelayAdapter) NewConfigProvider(_a0 context.Context, _a1 types.RelayArgs) (types.ConfigProvider, error) {
- ret := _m.Called(_a0, _a1)
-
- if len(ret) == 0 {
- panic("no return value specified for NewConfigProvider")
- }
-
- var r0 types.ConfigProvider
- var r1 error
- if rf, ok := ret.Get(0).(func(context.Context, types.RelayArgs) (types.ConfigProvider, error)); ok {
- return rf(_a0, _a1)
- }
- if rf, ok := ret.Get(0).(func(context.Context, types.RelayArgs) types.ConfigProvider); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(types.ConfigProvider)
- }
- }
-
- if rf, ok := ret.Get(1).(func(context.Context, types.RelayArgs) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-// LoopRelayAdapter_NewConfigProvider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewConfigProvider'
-type LoopRelayAdapter_NewConfigProvider_Call struct {
- *mock.Call
-}
-
-// NewConfigProvider is a helper method to define mock.On call
-// - _a0 context.Context
-// - _a1 types.RelayArgs
-func (_e *LoopRelayAdapter_Expecter) NewConfigProvider(_a0 interface{}, _a1 interface{}) *LoopRelayAdapter_NewConfigProvider_Call {
- return &LoopRelayAdapter_NewConfigProvider_Call{Call: _e.mock.On("NewConfigProvider", _a0, _a1)}
-}
-
-func (_c *LoopRelayAdapter_NewConfigProvider_Call) Run(run func(_a0 context.Context, _a1 types.RelayArgs)) *LoopRelayAdapter_NewConfigProvider_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context), args[1].(types.RelayArgs))
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_NewConfigProvider_Call) Return(_a0 types.ConfigProvider, _a1 error) *LoopRelayAdapter_NewConfigProvider_Call {
- _c.Call.Return(_a0, _a1)
- return _c
-}
-
-func (_c *LoopRelayAdapter_NewConfigProvider_Call) RunAndReturn(run func(context.Context, types.RelayArgs) (types.ConfigProvider, error)) *LoopRelayAdapter_NewConfigProvider_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// NewContractReader provides a mock function with given fields: ctx, contractReaderConfig
-func (_m *LoopRelayAdapter) NewContractReader(ctx context.Context, contractReaderConfig []byte) (types.ChainReader, error) {
- ret := _m.Called(ctx, contractReaderConfig)
-
- if len(ret) == 0 {
- panic("no return value specified for NewContractReader")
- }
-
- var r0 types.ChainReader
- var r1 error
- if rf, ok := ret.Get(0).(func(context.Context, []byte) (types.ChainReader, error)); ok {
- return rf(ctx, contractReaderConfig)
- }
- if rf, ok := ret.Get(0).(func(context.Context, []byte) types.ChainReader); ok {
- r0 = rf(ctx, contractReaderConfig)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(types.ChainReader)
- }
- }
-
- if rf, ok := ret.Get(1).(func(context.Context, []byte) error); ok {
- r1 = rf(ctx, contractReaderConfig)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-// LoopRelayAdapter_NewContractReader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewContractReader'
-type LoopRelayAdapter_NewContractReader_Call struct {
- *mock.Call
-}
-
-// NewContractReader is a helper method to define mock.On call
-// - ctx context.Context
-// - contractReaderConfig []byte
-func (_e *LoopRelayAdapter_Expecter) NewContractReader(ctx interface{}, contractReaderConfig interface{}) *LoopRelayAdapter_NewContractReader_Call {
- return &LoopRelayAdapter_NewContractReader_Call{Call: _e.mock.On("NewContractReader", ctx, contractReaderConfig)}
-}
-
-func (_c *LoopRelayAdapter_NewContractReader_Call) Run(run func(ctx context.Context, contractReaderConfig []byte)) *LoopRelayAdapter_NewContractReader_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context), args[1].([]byte))
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_NewContractReader_Call) Return(_a0 types.ChainReader, _a1 error) *LoopRelayAdapter_NewContractReader_Call {
- _c.Call.Return(_a0, _a1)
- return _c
-}
-
-func (_c *LoopRelayAdapter_NewContractReader_Call) RunAndReturn(run func(context.Context, []byte) (types.ChainReader, error)) *LoopRelayAdapter_NewContractReader_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// NewLLOProvider provides a mock function with given fields: _a0, _a1, _a2
-func (_m *LoopRelayAdapter) NewLLOProvider(_a0 context.Context, _a1 types.RelayArgs, _a2 types.PluginArgs) (types.LLOProvider, error) {
- ret := _m.Called(_a0, _a1, _a2)
-
- if len(ret) == 0 {
- panic("no return value specified for NewLLOProvider")
- }
-
- var r0 types.LLOProvider
- var r1 error
- if rf, ok := ret.Get(0).(func(context.Context, types.RelayArgs, types.PluginArgs) (types.LLOProvider, error)); ok {
- return rf(_a0, _a1, _a2)
- }
- if rf, ok := ret.Get(0).(func(context.Context, types.RelayArgs, types.PluginArgs) types.LLOProvider); ok {
- r0 = rf(_a0, _a1, _a2)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(types.LLOProvider)
- }
- }
-
- if rf, ok := ret.Get(1).(func(context.Context, types.RelayArgs, types.PluginArgs) error); ok {
- r1 = rf(_a0, _a1, _a2)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-// LoopRelayAdapter_NewLLOProvider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewLLOProvider'
-type LoopRelayAdapter_NewLLOProvider_Call struct {
- *mock.Call
-}
-
-// NewLLOProvider is a helper method to define mock.On call
-// - _a0 context.Context
-// - _a1 types.RelayArgs
-// - _a2 types.PluginArgs
-func (_e *LoopRelayAdapter_Expecter) NewLLOProvider(_a0 interface{}, _a1 interface{}, _a2 interface{}) *LoopRelayAdapter_NewLLOProvider_Call {
- return &LoopRelayAdapter_NewLLOProvider_Call{Call: _e.mock.On("NewLLOProvider", _a0, _a1, _a2)}
-}
-
-func (_c *LoopRelayAdapter_NewLLOProvider_Call) Run(run func(_a0 context.Context, _a1 types.RelayArgs, _a2 types.PluginArgs)) *LoopRelayAdapter_NewLLOProvider_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context), args[1].(types.RelayArgs), args[2].(types.PluginArgs))
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_NewLLOProvider_Call) Return(_a0 types.LLOProvider, _a1 error) *LoopRelayAdapter_NewLLOProvider_Call {
- _c.Call.Return(_a0, _a1)
- return _c
-}
-
-func (_c *LoopRelayAdapter_NewLLOProvider_Call) RunAndReturn(run func(context.Context, types.RelayArgs, types.PluginArgs) (types.LLOProvider, error)) *LoopRelayAdapter_NewLLOProvider_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// NewPluginProvider provides a mock function with given fields: _a0, _a1, _a2
-func (_m *LoopRelayAdapter) NewPluginProvider(_a0 context.Context, _a1 types.RelayArgs, _a2 types.PluginArgs) (types.PluginProvider, error) {
- ret := _m.Called(_a0, _a1, _a2)
-
- if len(ret) == 0 {
- panic("no return value specified for NewPluginProvider")
- }
-
- var r0 types.PluginProvider
- var r1 error
- if rf, ok := ret.Get(0).(func(context.Context, types.RelayArgs, types.PluginArgs) (types.PluginProvider, error)); ok {
- return rf(_a0, _a1, _a2)
- }
- if rf, ok := ret.Get(0).(func(context.Context, types.RelayArgs, types.PluginArgs) types.PluginProvider); ok {
- r0 = rf(_a0, _a1, _a2)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(types.PluginProvider)
- }
- }
-
- if rf, ok := ret.Get(1).(func(context.Context, types.RelayArgs, types.PluginArgs) error); ok {
- r1 = rf(_a0, _a1, _a2)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-// LoopRelayAdapter_NewPluginProvider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewPluginProvider'
-type LoopRelayAdapter_NewPluginProvider_Call struct {
- *mock.Call
-}
-
-// NewPluginProvider is a helper method to define mock.On call
-// - _a0 context.Context
-// - _a1 types.RelayArgs
-// - _a2 types.PluginArgs
-func (_e *LoopRelayAdapter_Expecter) NewPluginProvider(_a0 interface{}, _a1 interface{}, _a2 interface{}) *LoopRelayAdapter_NewPluginProvider_Call {
- return &LoopRelayAdapter_NewPluginProvider_Call{Call: _e.mock.On("NewPluginProvider", _a0, _a1, _a2)}
-}
-
-func (_c *LoopRelayAdapter_NewPluginProvider_Call) Run(run func(_a0 context.Context, _a1 types.RelayArgs, _a2 types.PluginArgs)) *LoopRelayAdapter_NewPluginProvider_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context), args[1].(types.RelayArgs), args[2].(types.PluginArgs))
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_NewPluginProvider_Call) Return(_a0 types.PluginProvider, _a1 error) *LoopRelayAdapter_NewPluginProvider_Call {
- _c.Call.Return(_a0, _a1)
- return _c
-}
-
-func (_c *LoopRelayAdapter_NewPluginProvider_Call) RunAndReturn(run func(context.Context, types.RelayArgs, types.PluginArgs) (types.PluginProvider, error)) *LoopRelayAdapter_NewPluginProvider_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// Ready provides a mock function with given fields:
-func (_m *LoopRelayAdapter) Ready() error {
- ret := _m.Called()
-
- if len(ret) == 0 {
- panic("no return value specified for Ready")
- }
-
- var r0 error
- if rf, ok := ret.Get(0).(func() error); ok {
- r0 = rf()
- } else {
- r0 = ret.Error(0)
- }
-
- return r0
-}
-
-// LoopRelayAdapter_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready'
-type LoopRelayAdapter_Ready_Call struct {
- *mock.Call
-}
-
-// Ready is a helper method to define mock.On call
-func (_e *LoopRelayAdapter_Expecter) Ready() *LoopRelayAdapter_Ready_Call {
- return &LoopRelayAdapter_Ready_Call{Call: _e.mock.On("Ready")}
-}
-
-func (_c *LoopRelayAdapter_Ready_Call) Run(run func()) *LoopRelayAdapter_Ready_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run()
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_Ready_Call) Return(_a0 error) *LoopRelayAdapter_Ready_Call {
- _c.Call.Return(_a0)
- return _c
-}
-
-func (_c *LoopRelayAdapter_Ready_Call) RunAndReturn(run func() error) *LoopRelayAdapter_Ready_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// Start provides a mock function with given fields: _a0
-func (_m *LoopRelayAdapter) Start(_a0 context.Context) error {
- ret := _m.Called(_a0)
-
- if len(ret) == 0 {
- panic("no return value specified for Start")
- }
-
- var r0 error
- if rf, ok := ret.Get(0).(func(context.Context) error); ok {
- r0 = rf(_a0)
- } else {
- r0 = ret.Error(0)
- }
-
- return r0
-}
-
-// LoopRelayAdapter_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
-type LoopRelayAdapter_Start_Call struct {
- *mock.Call
-}
-
-// Start is a helper method to define mock.On call
-// - _a0 context.Context
-func (_e *LoopRelayAdapter_Expecter) Start(_a0 interface{}) *LoopRelayAdapter_Start_Call {
- return &LoopRelayAdapter_Start_Call{Call: _e.mock.On("Start", _a0)}
-}
-
-func (_c *LoopRelayAdapter_Start_Call) Run(run func(_a0 context.Context)) *LoopRelayAdapter_Start_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context))
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_Start_Call) Return(_a0 error) *LoopRelayAdapter_Start_Call {
- _c.Call.Return(_a0)
- return _c
-}
-
-func (_c *LoopRelayAdapter_Start_Call) RunAndReturn(run func(context.Context) error) *LoopRelayAdapter_Start_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// Transact provides a mock function with given fields: ctx, from, to, amount, balanceCheck
-func (_m *LoopRelayAdapter) Transact(ctx context.Context, from string, to string, amount *big.Int, balanceCheck bool) error {
- ret := _m.Called(ctx, from, to, amount, balanceCheck)
-
- if len(ret) == 0 {
- panic("no return value specified for Transact")
- }
-
- var r0 error
- if rf, ok := ret.Get(0).(func(context.Context, string, string, *big.Int, bool) error); ok {
- r0 = rf(ctx, from, to, amount, balanceCheck)
- } else {
- r0 = ret.Error(0)
- }
-
- return r0
-}
-
-// LoopRelayAdapter_Transact_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Transact'
-type LoopRelayAdapter_Transact_Call struct {
- *mock.Call
-}
-
-// Transact is a helper method to define mock.On call
-// - ctx context.Context
-// - from string
-// - to string
-// - amount *big.Int
-// - balanceCheck bool
-func (_e *LoopRelayAdapter_Expecter) Transact(ctx interface{}, from interface{}, to interface{}, amount interface{}, balanceCheck interface{}) *LoopRelayAdapter_Transact_Call {
- return &LoopRelayAdapter_Transact_Call{Call: _e.mock.On("Transact", ctx, from, to, amount, balanceCheck)}
-}
-
-func (_c *LoopRelayAdapter_Transact_Call) Run(run func(ctx context.Context, from string, to string, amount *big.Int, balanceCheck bool)) *LoopRelayAdapter_Transact_Call {
- _c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(*big.Int), args[4].(bool))
- })
- return _c
-}
-
-func (_c *LoopRelayAdapter_Transact_Call) Return(_a0 error) *LoopRelayAdapter_Transact_Call {
- _c.Call.Return(_a0)
- return _c
-}
-
-func (_c *LoopRelayAdapter_Transact_Call) RunAndReturn(run func(context.Context, string, string, *big.Int, bool) error) *LoopRelayAdapter_Transact_Call {
- _c.Call.Return(run)
- return _c
-}
-
-// NewLoopRelayAdapter creates a new instance of LoopRelayAdapter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewLoopRelayAdapter(t interface {
- mock.TestingT
- Cleanup(func())
-}) *LoopRelayAdapter {
- mock := &LoopRelayAdapter{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/core/services/relay/evm/ocr2keeper.go b/core/services/relay/evm/ocr2keeper.go
index b2d19c11702..131f845248b 100644
--- a/core/services/relay/evm/ocr2keeper.go
+++ b/core/services/relay/evm/ocr2keeper.go
@@ -174,8 +174,8 @@ func (t *ocr3keeperProviderContractTransmitter) Transmit(
)
}
-func (t *ocr3keeperProviderContractTransmitter) FromAccount() (ocrtypes.Account, error) {
- return t.contractTransmitter.FromAccount()
+func (t *ocr3keeperProviderContractTransmitter) FromAccount(ctx context.Context) (ocrtypes.Account, error) {
+ return t.contractTransmitter.FromAccount(ctx)
}
type ocr2keeperProvider struct {
diff --git a/core/services/relay/evm/relayer_extender.go b/core/services/relay/evm/relayer_extender.go
index f262948c9c5..884597df718 100644
--- a/core/services/relay/evm/relayer_extender.go
+++ b/core/services/relay/evm/relayer_extender.go
@@ -2,15 +2,11 @@ package evm
import (
"context"
+ "errors"
"fmt"
- "math/big"
- "github.com/pkg/errors"
"go.uber.org/multierr"
- "github.com/smartcontractkit/chainlink-common/pkg/loop/adapters/relay"
- commontypes "github.com/smartcontractkit/chainlink-common/pkg/types"
-
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml"
"github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm"
)
@@ -18,107 +14,30 @@ import (
// ErrNoChains indicates that no EVM chains have been started
var ErrNoChains = errors.New("no EVM chains loaded")
-type EVMChainRelayerExtender interface {
- relay.RelayerExt
- Chain() legacyevm.Chain
-}
-
-type EVMChainRelayerExtenderSlicer interface {
- Slice() []EVMChainRelayerExtender
- Len() int
- AppConfig() legacyevm.AppConfig
-}
-
-type ChainRelayerExtenders struct {
- exts []EVMChainRelayerExtender
- cfg legacyevm.AppConfig
+type LegacyChainsAndConfig struct {
+ rs []legacyevm.Chain
+ cfg toml.EVMConfigs
}
-var _ EVMChainRelayerExtenderSlicer = &ChainRelayerExtenders{}
-
-func NewLegacyChainsFromRelayerExtenders(exts EVMChainRelayerExtenderSlicer) *legacyevm.LegacyChains {
+func (r *LegacyChainsAndConfig) NewLegacyChains() *legacyevm.LegacyChains {
m := make(map[string]legacyevm.Chain)
- for _, r := range exts.Slice() {
- m[r.Chain().ID().String()] = r.Chain()
- }
- return legacyevm.NewLegacyChains(m, exts.AppConfig().EVMConfigs())
-}
-
-func newChainRelayerExtsFromSlice(exts []*ChainRelayerExt, appConfig legacyevm.AppConfig) *ChainRelayerExtenders {
- temp := make([]EVMChainRelayerExtender, len(exts))
- for i := range exts {
- temp[i] = exts[i]
- }
- return &ChainRelayerExtenders{
- exts: temp,
- cfg: appConfig,
+ for _, r := range r.Slice() {
+ m[r.ID().String()] = r
}
+ return legacyevm.NewLegacyChains(m, r.cfg)
}
-func (c *ChainRelayerExtenders) AppConfig() legacyevm.AppConfig {
- return c.cfg
-}
-
-func (c *ChainRelayerExtenders) Slice() []EVMChainRelayerExtender {
- return c.exts
-}
-
-func (c *ChainRelayerExtenders) Len() int {
- return len(c.exts)
-}
-
-// implements OneChain
-type ChainRelayerExt struct {
- chain legacyevm.Chain
-}
-
-var _ EVMChainRelayerExtender = &ChainRelayerExt{}
-
-func (s *ChainRelayerExt) GetChainStatus(ctx context.Context) (commontypes.ChainStatus, error) {
- return s.chain.GetChainStatus(ctx)
-}
-
-func (s *ChainRelayerExt) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []commontypes.NodeStatus, nextPageToken string, total int, err error) {
- return s.chain.ListNodeStatuses(ctx, pageSize, pageToken)
-}
-
-func (s *ChainRelayerExt) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error {
- return s.chain.Transact(ctx, from, to, amount, balanceCheck)
-}
-
-func (s *ChainRelayerExt) ID() string {
- return s.chain.ID().String()
+func (r *LegacyChainsAndConfig) Slice() []legacyevm.Chain {
+ return r.rs
}
-func (s *ChainRelayerExt) Chain() legacyevm.Chain {
- return s.chain
+func (r *LegacyChainsAndConfig) Len() int {
+ return len(r.rs)
}
-var ErrCorruptEVMChain = errors.New("corrupt evm chain")
-
-func (s *ChainRelayerExt) Start(ctx context.Context) error {
- return s.chain.Start(ctx)
-}
-
-func (s *ChainRelayerExt) Close() (err error) {
- return s.chain.Close()
-}
-
-func (s *ChainRelayerExt) Name() string {
- return s.chain.Name()
-}
-
-func (s *ChainRelayerExt) HealthReport() map[string]error {
- return s.chain.HealthReport()
-}
-
-func (s *ChainRelayerExt) Ready() (err error) {
- return s.chain.Ready()
-}
-
-func NewChainRelayerExtenders(ctx context.Context, opts legacyevm.ChainRelayExtenderConfig) (*ChainRelayerExtenders, error) {
- if err := opts.Validate(); err != nil {
- return nil, err
+func NewLegacyChains(ctx context.Context, opts legacyevm.ChainRelayOpts) (result []legacyevm.Chain, err error) {
+ if err = opts.Validate(); err != nil {
+ return
}
unique := make(map[string]struct{})
@@ -136,11 +55,9 @@ func NewChainRelayerExtenders(ctx context.Context, opts legacyevm.ChainRelayExte
}
}
- var result []*ChainRelayerExt
- var err error
for i := range enabled {
cid := enabled[i].ChainID.String()
- privOpts := legacyevm.ChainRelayExtenderConfig{
+ privOpts := legacyevm.ChainRelayOpts{
Logger: opts.Logger.Named(cid),
ChainOpts: opts.ChainOpts,
KeyStore: opts.KeyStore,
@@ -153,11 +70,12 @@ func NewChainRelayerExtenders(ctx context.Context, opts legacyevm.ChainRelayExte
continue
}
- s := &ChainRelayerExt{
- chain: chain,
- }
- result = append(result, s)
+ result = append(result, chain)
}
+ return
+}
+func NewLegacyChainsAndConfig(ctx context.Context, opts legacyevm.ChainRelayOpts) (*LegacyChainsAndConfig, error) {
+ result, err := NewLegacyChains(ctx, opts)
// always return because it's accumulating errors
- return newChainRelayerExtsFromSlice(result, opts.AppConfig), err
+ return &LegacyChainsAndConfig{result, opts.AppConfig.EVMConfigs()}, err
}
diff --git a/core/services/relay/evm/relayer_extender_test.go b/core/services/relay/evm/relayer_extender_test.go
index f2bc3a33a93..3be2bbcb5e7 100644
--- a/core/services/relay/evm/relayer_extender_test.go
+++ b/core/services/relay/evm/relayer_extender_test.go
@@ -35,31 +35,31 @@ func TestChainRelayExtenders(t *testing.T) {
kst := cltest.NewKeyStore(t, db)
require.NoError(t, kst.Unlock(ctx, cltest.Password))
- opts := evmtest.NewChainRelayExtOpts(t, evmtest.TestChainOpts{DB: db, KeyStore: kst.Eth(), GeneralConfig: cfg})
+ opts := evmtest.NewChainOpts(t, evmtest.TestChainOpts{DB: db, KeyStore: kst.Eth(), GeneralConfig: cfg})
opts.GenEthClient = func(*big.Int) evmclient.Client {
return cltest.NewEthMocksWithStartupAssertions(t)
}
- relayExtenders, err := evmrelay.NewChainRelayerExtenders(testutils.Context(t), opts)
+ relayExtenders, err := evmrelay.NewLegacyChains(testutils.Context(t), opts)
require.NoError(t, err)
- require.Equal(t, relayExtenders.Len(), 2)
- relayExtendersInstances := relayExtenders.Slice()
+ require.Equal(t, len(relayExtenders), 2)
+ relayExtendersInstances := relayExtenders
for _, c := range relayExtendersInstances {
require.NoError(t, c.Start(testutils.Context(t)))
require.NoError(t, c.Ready())
}
- require.NotEqual(t, relayExtendersInstances[0].Chain().ID().String(), relayExtendersInstances[1].Chain().ID().String())
+ require.NotEqual(t, relayExtendersInstances[0].ID().String(), relayExtendersInstances[1].ID().String())
for _, c := range relayExtendersInstances {
require.NoError(t, c.Close())
}
- relayExtendersInstances[0].Chain().Client().(*evmclimocks.Client).AssertCalled(t, "Close")
- relayExtendersInstances[1].Chain().Client().(*evmclimocks.Client).AssertCalled(t, "Close")
+ relayExtendersInstances[0].Client().(*evmclimocks.Client).AssertCalled(t, "Close")
+ relayExtendersInstances[1].Client().(*evmclimocks.Client).AssertCalled(t, "Close")
- assert.Error(t, relayExtendersInstances[0].Chain().Ready())
- assert.Error(t, relayExtendersInstances[1].Chain().Ready())
+ assert.Error(t, relayExtendersInstances[0].Ready())
+ assert.Error(t, relayExtendersInstances[1].Ready())
// test extender methods on single instance
relayExt := relayExtendersInstances[0]
diff --git a/core/services/relay/evm/write_target.go b/core/services/relay/evm/write_target.go
index fb1c694a2e7..041e945a065 100644
--- a/core/services/relay/evm/write_target.go
+++ b/core/services/relay/evm/write_target.go
@@ -41,7 +41,7 @@ func NewWriteTarget(ctx context.Context, relayer *Relayer, chain legacyevm.Chain
if err != nil {
return nil, fmt.Errorf("failed to marshal contract reader config %v", err)
}
- cr, err := relayer.NewContractReader(contractReaderConfigEncoded)
+ cr, err := relayer.NewContractReader(ctx, contractReaderConfigEncoded)
if err != nil {
return nil, err
}
diff --git a/core/services/relay/relay.go b/core/services/relay/relay.go
index a2681418cee..6f3438e1b94 100644
--- a/core/services/relay/relay.go
+++ b/core/services/relay/relay.go
@@ -1,5 +1,13 @@
package relay
+import (
+ "context"
+ "fmt"
+
+ "github.com/smartcontractkit/chainlink-common/pkg/loop"
+ "github.com/smartcontractkit/chainlink-common/pkg/types"
+)
+
const (
NetworkEVM = "evm"
NetworkCosmos = "cosmos"
@@ -19,3 +27,36 @@ var SupportedNetworks = map[string]struct{}{
NetworkDummy: {},
}
+
+var _ loop.Relayer = (*ServerAdapter)(nil)
+
+// ServerAdapter extends [loop.RelayerAdapter] by overriding NewPluginProvider to dispatches calls according to `RelayArgs.ProviderType`.
+// This should only be used to adapt relayers not running via GRPC in a LOOPP.
+type ServerAdapter struct {
+ types.Relayer
+}
+
+// NewServerAdapter returns a new ServerAdapter.
+func NewServerAdapter(r types.Relayer) *ServerAdapter { //nolint:staticcheck
+ return &ServerAdapter{Relayer: r}
+}
+
+func (r *ServerAdapter) NewPluginProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.PluginProvider, error) {
+ switch types.OCR2PluginType(rargs.ProviderType) {
+ case types.Median:
+ return r.NewMedianProvider(ctx, rargs, pargs)
+ case types.Functions:
+ return r.NewFunctionsProvider(ctx, rargs, pargs)
+ case types.Mercury:
+ return r.NewMercuryProvider(ctx, rargs, pargs)
+ case types.OCR2Keeper:
+ return r.NewAutomationProvider(ctx, rargs, pargs)
+ case types.OCR3Capability:
+ return r.NewOCR3CapabilityProvider(ctx, rargs, pargs)
+ case types.DKG, types.OCR2VRF, types.GenericPlugin:
+ return r.Relayer.NewPluginProvider(ctx, rargs, pargs)
+ case types.LLO, types.CCIPCommit, types.CCIPExecution:
+ return nil, fmt.Errorf("provider type not supported: %s", rargs.ProviderType)
+ }
+ return nil, fmt.Errorf("provider type not recognized: %s", rargs.ProviderType)
+}
diff --git a/core/services/streams/stream_registry.go b/core/services/streams/stream_registry.go
index 9d3fcda7109..9ab2df11d33 100644
--- a/core/services/streams/stream_registry.go
+++ b/core/services/streams/stream_registry.go
@@ -4,14 +4,14 @@ import (
"fmt"
"sync"
- llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo"
+ "github.com/smartcontractkit/chainlink-common/pkg/types/llo"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
)
// alias for easier refactoring
-type StreamID = llotypes.StreamID
+type StreamID = llo.StreamID
type Registry interface {
Getter
diff --git a/core/services/vrf/delegate_test.go b/core/services/vrf/delegate_test.go
index 889b19d0e04..ff61d7b551a 100644
--- a/core/services/vrf/delegate_test.go
+++ b/core/services/vrf/delegate_test.go
@@ -40,7 +40,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/keystore"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/vrfkey"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/services/signatures/secp256k1"
"github.com/smartcontractkit/chainlink/v2/core/services/vrf"
vrf_mocks "github.com/smartcontractkit/chainlink/v2/core/services/vrf/mocks"
@@ -88,8 +87,7 @@ func buildVrfUni(t *testing.T, db *sqlx.DB, cfg chainlink.GeneralConfig) vrfUniv
require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), cltest.Head(51)))
jrm := job.NewORM(db, prm, btORM, ks, lggr)
t.Cleanup(func() { assert.NoError(t, jrm.Close()) })
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{LogBroadcaster: lb, KeyStore: ks.Eth(), Client: ec, DB: db, GeneralConfig: cfg, TxManager: txm})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{LogBroadcaster: lb, KeyStore: ks.Eth(), Client: ec, DB: db, GeneralConfig: cfg, TxManager: txm})
pr := pipeline.NewRunner(prm, btORM, cfg.JobPipeline(), cfg.WebServer(), legacyChains, ks.Eth(), ks.VRF(), lggr, nil, nil)
require.NoError(t, ks.Unlock(ctx, testutils.Password))
k, err2 := ks.Eth().Create(testutils.Context(t), testutils.FixtureChainID)
diff --git a/core/services/vrf/v2/integration_v2_test.go b/core/services/vrf/v2/integration_v2_test.go
index e9ae908565a..a62d7693c6c 100644
--- a/core/services/vrf/v2/integration_v2_test.go
+++ b/core/services/vrf/v2/integration_v2_test.go
@@ -74,7 +74,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/vrfkey"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/services/signatures/secp256k1"
"github.com/smartcontractkit/chainlink/v2/core/services/vrf/proof"
v1 "github.com/smartcontractkit/chainlink/v2/core/services/vrf/v1"
@@ -2047,8 +2046,7 @@ func TestStartingCountsV1(t *testing.T) {
ec.On("ConfiguredChainID").Return(testutils.SimulatedChainID)
ec.On("LatestBlockHeight", mock.Anything).Return(big.NewInt(2), nil).Maybe()
txm := makeTestTxm(t, txStore, ks, ec)
- relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{KeyStore: ks.Eth(), Client: ec, DB: db, GeneralConfig: cfg, TxManager: txm})
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
+ legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{KeyStore: ks.Eth(), Client: ec, DB: db, GeneralConfig: cfg, TxManager: txm})
chain, err := legacyChains.Get(testutils.SimulatedChainID.String())
require.NoError(t, err)
listenerV1 := &v1.Listener{
diff --git a/core/web/chains_controller.go b/core/web/chains_controller.go
index bcaaf909540..6bc5ee4daa3 100644
--- a/core/web/chains_controller.go
+++ b/core/web/chains_controller.go
@@ -58,7 +58,7 @@ func (cc *chainsController[R]) Index(c *gin.Context, size, page, offset int) {
jsonAPIError(c, http.StatusBadRequest, cc.errNotEnabled)
return
}
- chains, count, err := cc.chainStats.ChainStatuses(c, offset, size)
+ chains, count, err := cc.chainStats.ChainStatuses(c.Request.Context(), offset, size)
if err != nil {
jsonAPIError(c, http.StatusBadRequest, err)
@@ -79,7 +79,7 @@ func (cc *chainsController[R]) Show(c *gin.Context) {
return
}
relayID := types.RelayID{Network: cc.network, ChainID: c.Param("ID")}
- chain, err := cc.chainStats.ChainStatus(c, relayID)
+ chain, err := cc.chainStats.ChainStatus(c.Request.Context(), relayID)
if err != nil {
jsonAPIError(c, http.StatusBadRequest, err)
return
diff --git a/core/web/jobs_controller.go b/core/web/jobs_controller.go
index 2e005d6d230..4bc0112f4cd 100644
--- a/core/web/jobs_controller.go
+++ b/core/web/jobs_controller.go
@@ -74,7 +74,7 @@ func (jc *JobsController) Show(c *gin.Context) {
jobSpec, err = jc.App.JobORM().FindJobByExternalJobID(ctx, externalJobID)
} else if pErr = jobSpec.SetID(c.Param("ID")); pErr == nil {
// Find a job by job ID
- jobSpec, err = jc.App.JobORM().FindJobTx(ctx, jobSpec.ID)
+ jobSpec, err = jc.App.JobORM().FindJob(ctx, jobSpec.ID)
} else {
jsonAPIError(c, http.StatusUnprocessableEntity, pErr)
return
diff --git a/core/web/nodes_controller.go b/core/web/nodes_controller.go
index bf5bb0e65e1..0e43316629a 100644
--- a/core/web/nodes_controller.go
+++ b/core/web/nodes_controller.go
@@ -68,9 +68,10 @@ func (n *nodesController[R]) Index(c *gin.Context, size, page, offset int) {
var count int
var err error
+ ctx := c.Request.Context()
if id == "" {
// fetch all nodes
- nodes, count, err = n.nodeSet.NodeStatuses(c, offset, size)
+ nodes, count, err = n.nodeSet.NodeStatuses(ctx, offset, size)
} else {
// fetch nodes for chain ID
// backward compatibility
@@ -80,7 +81,7 @@ func (n *nodesController[R]) Index(c *gin.Context, size, page, offset int) {
rid.ChainID = id
rid.Network = n.nodeSet.network
}
- nodes, count, err = n.nodeSet.NodeStatuses(c, offset, size, rid)
+ nodes, count, err = n.nodeSet.NodeStatuses(ctx, offset, size, rid)
}
var resources []R
diff --git a/core/web/solana_transfer_controller.go b/core/web/solana_transfer_controller.go
index db93401d0d7..07c629a7dd1 100644
--- a/core/web/solana_transfer_controller.go
+++ b/core/web/solana_transfer_controller.go
@@ -60,7 +60,7 @@ func (tc *SolanaTransfersController) Create(c *gin.Context) {
return
}
- err = relayer.Transact(c, tr.From.String(), tr.To.String(), amount, !tr.AllowHigherAmounts)
+ err = relayer.Transact(c.Request.Context(), tr.From.String(), tr.To.String(), amount, !tr.AllowHigherAmounts)
if err != nil {
if errors.Is(err, chains.ErrNotFound) || errors.Is(err, chains.ErrChainIDEmpty) {
jsonAPIError(c, http.StatusBadRequest, err)
diff --git a/core/web/testdata/body/health.html b/core/web/testdata/body/health.html
index 2a1b2227530..2e57bcac104 100644
--- a/core/web/testdata/body/health.html
+++ b/core/web/testdata/body/health.html
@@ -52,6 +52,9 @@
LogBroadcaster
+
+ Relayer
+
Txm
diff --git a/core/web/testdata/body/health.json b/core/web/testdata/body/health.json
index 10415c0abdc..fcf883dc0dd 100644
--- a/core/web/testdata/body/health.json
+++ b/core/web/testdata/body/health.json
@@ -54,6 +54,15 @@
"output": ""
}
},
+ {
+ "type": "checks",
+ "id": "EVM.0.Relayer",
+ "attributes": {
+ "name": "EVM.0.Relayer",
+ "status": "passing",
+ "output": ""
+ }
+ },
{
"type": "checks",
"id": "EVM.0.Txm",
diff --git a/core/web/testdata/body/health.txt b/core/web/testdata/body/health.txt
index 09c8cff6c2d..047ca5e3863 100644
--- a/core/web/testdata/body/health.txt
+++ b/core/web/testdata/body/health.txt
@@ -5,6 +5,7 @@ ok EVM.0.HeadTracker
! EVM.0.HeadTracker.HeadListener
Listener is not connected
ok EVM.0.LogBroadcaster
+ok EVM.0.Relayer
ok EVM.0.Txm
ok EVM.0.Txm.BlockHistoryEstimator
ok EVM.0.Txm.Broadcaster
diff --git a/go.mod b/go.mod
index 45e0b62d52e..6f77e56220f 100644
--- a/go.mod
+++ b/go.mod
@@ -71,16 +71,16 @@ require (
github.com/shirou/gopsutil/v3 v3.24.3
github.com/shopspring/decimal v1.4.0
github.com/smartcontractkit/chain-selectors v1.0.10
- github.com/smartcontractkit/chainlink-automation v1.0.4
- github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c
- github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799
- github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7
- github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1
- github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1
+ github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965
+ github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49
+ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411
+ github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d
+ github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177
+ github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79
+ github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79
github.com/smartcontractkit/wsrpc v0.7.3
github.com/spf13/cast v1.6.0
github.com/stretchr/testify v1.9.0
@@ -115,11 +115,6 @@ require (
)
require (
- cloud.google.com/go/auth v0.7.1 // indirect
- cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect
- cloud.google.com/go/compute/metadata v0.5.0 // indirect
- cloud.google.com/go/iam v1.1.11 // indirect
- cloud.google.com/go/storage v1.43.0 // indirect
contrib.go.opencensus.io/exporter/stackdriver v0.13.5 // indirect
cosmossdk.io/api v0.3.1 // indirect
cosmossdk.io/core v0.5.1 // indirect
@@ -181,6 +176,7 @@ require (
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/docker/go-connections v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dvsekhvalnov/jose2go v1.7.0 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
@@ -218,6 +214,8 @@ require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-tpm v0.9.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
+ github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
+ github.com/googleapis/gax-go/v2 v2.12.5 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/grafana/pyroscope-go/godeltaprof v0.1.6 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
@@ -277,6 +275,7 @@ require (
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/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
@@ -289,7 +288,7 @@ require (
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/sethvargo/go-retry v0.2.4 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
- github.com/spf13/afero v1.9.5 // indirect
+ github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
@@ -322,7 +321,6 @@ require (
go.mongodb.org/mongo-driver v1.15.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
@@ -332,9 +330,7 @@ require (
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/ratelimit v0.3.0 // indirect
golang.org/x/arch v0.8.0 // indirect
- golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.22.0 // indirect
- google.golang.org/api v0.188.0 // indirect
google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect
diff --git a/go.sum b/go.sum
index 4a6b294c122..ef0787e79c6 100644
--- a/go.sum
+++ b/go.sum
@@ -30,6 +30,7 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
+cloud.google.com/go/compute v1.27.2 h1:5cE5hdrwJV/92ravlwIFRGnyH9CpLGhh4N0ZDVTU+BA=
cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY=
cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
@@ -338,8 +339,8 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUn
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
-github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
-github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
+github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
+github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/dominikbraun/graph v0.23.0 h1:TdZB4pPqCLFxYhdyMFb1TBdFxp8XLcJfTTBQucVPgCo=
@@ -1000,8 +1001,8 @@ github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
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/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034=
-github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
+github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI=
+github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w=
github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
@@ -1134,30 +1135,30 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCqR1LNS7aI3jT0V+xGrg=
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
-github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
-github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
-github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c h1:3apUsez/6Pkp1ckXzSwIhzPRuWjDGjzMjKapEKi0Fcw=
-github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c/go.mod h1:Jg1sCTsbxg76YByI8ifpFby3FvVqISStHT8ypy9ocmY=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 h1:NBQLtqk8zsyY4qTJs+NElI3aDFTcAo83JHvqD04EvB0=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45/go.mod h1:LV0h7QBQUpoC2UUi6TcUvcIFm1xjP/DtEcqV8+qeLUs=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f h1:I9fTBJpHkeldFplXUy71eLIn6A6GxuR4xrABoUeD+CM=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f/go.mod h1:V/86loaFSH0dqqUEHqyXVbyNqDRSjvcf9BRomWFTljU=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h1:BCHu4pNP6arrcHLEWx61XjLaonOd2coQNyL0NTUcaMc=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827/go.mod h1:OPX+wC2TWQsyLNpR7daMt2vMpmsNcoBxbZyGTHr6tiA=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e h1:PzwzlHNv1YbJ6ZIdl/pIFRoOuOS4V4WLvjZvFUnZFL4=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e/go.mod h1:hsFhop+SlQHKD+DEFjZrMJmbauT1A/wvtZIeeo4PxFU=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU=
+github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965 h1:bKm1AJK9vhYoDdyF+cJb5zg8HRxP30qcOubMrhOJjYI=
+github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965/go.mod h1:WG3DV9T+o+c2BNYAy0fTJwENUdnplgIwBk+6wjhOohY=
+github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49 h1:7h7F8oQrFlRFPI0kQxI4O5UTESwuA8p5n2Ea1ALxNfg=
+github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49/go.mod h1:D7yrE2bf5xdz/qDeFNvPNMIAk6eR/GtqIJOpylKSgOA=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7 h1:CNC76ehoHML5Utz45ORMKOuwbuUt1blZwIwdBcpUT48=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7/go.mod h1:+6tPLOlhS76DyU2CFGESfelmDWWajPQn7QEUCW+MQlY=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d h1:qCNroDe/TUJr7XceNLZyf5D+fTAI2KPKP9R6TKiySEM=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d/go.mod h1:sPzJDIYAPMTPRhyu4qgdG5QeMHH1GwaHCXAsw28q84Q=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411 h1:oCj5ZPpP8hn/skgYTNnv3YQrhPail7sfH1TqUL1HodY=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411/go.mod h1:UT7xiG4ObmPypyPzHYx4NJ2gyx7er/SLYKGwmPYbOfI=
+github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0 h1:C5pWGVg+PEFs2o2vs8wLvkKUXIdAnSbYFnEj9uCSYyM=
+github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0/go.mod h1:4qzRB1+tKH34AEf51xXZvXhBUifQ/6GNzX9XTFriiw4=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d h1:Yt6YgwuG4oMGBXRTo9S3RWUSAKBiKOpPD2CIuuheIrg=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d/go.mod h1:bWpuaCFKvueRhRI0RmY/VGrdVSMhC3kRfiKbj8nRWjo=
github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo=
github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0=
-github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7 h1:e38V5FYE7DA1JfKXeD5Buo/7lczALuVXlJ8YNTAUxcw=
-github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
-github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE=
-github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg=
-github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ=
-github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw=
+github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177 h1:bt/70PIgLcJe4arjbhIMxmI+DQJBTyhfiTcpUQ5FwwI=
+github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
+github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79 h1:TNb1CroCwjZ92s+ILmbwuO0CT/VqpcyjbxChdN2q//s=
+github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79/go.mod h1:0y3aCUlAUevgzvGHGQ7qDDhjOHOR9OWED+oIk3aSBwo=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79 h1:p7mVwRlLkRlxVat3GOWd/e740VJazR8k6QOipD2LHkk=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79/go.mod h1:JjP0TZ026rjAlFuj3SMcC/WO93SBV5vbMr8wTbFpaIg=
github.com/smartcontractkit/wsrpc v0.7.3 h1:CKYZfawZShZGfvsQep1F9oBansnFk9ByZPCdTMpLphw=
github.com/smartcontractkit/wsrpc v0.7.3/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
@@ -1167,8 +1168,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
-github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
-github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
+github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=
+github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
diff --git a/integration-tests/go.mod b/integration-tests/go.mod
index 8f9652099b1..ea62ddfffd2 100644
--- a/integration-tests/go.mod
+++ b/integration-tests/go.mod
@@ -27,13 +27,13 @@ require (
github.com/segmentio/ksuid v1.0.4
github.com/shopspring/decimal v1.4.0
github.com/slack-go/slack v0.12.2
- github.com/smartcontractkit/chainlink-automation v1.0.4
- github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c
+ github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965
+ github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49
github.com/smartcontractkit/chainlink-testing-framework v1.33.0
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/havoc/k8schaos v0.0.0-20240409145249-e78d20847e37
- github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7
+ github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177
github.com/smartcontractkit/seth v1.0.12
github.com/smartcontractkit/wasp v0.4.5
github.com/spf13/cobra v1.8.0
@@ -341,7 +341,6 @@ require (
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
- github.com/opencontainers/runc v1.1.7 // indirect
github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e // indirect
github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
@@ -376,17 +375,17 @@ require (
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/chain-selectors v1.0.10 // indirect
- github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 // indirect
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f // indirect
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 // indirect
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e // indirect
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 // indirect
- github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
- github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect
+ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7 // indirect
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d // indirect
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411 // indirect
+ github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0 // indirect
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d // indirect
+ github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79 // indirect
+ github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79 // indirect
github.com/smartcontractkit/wsrpc v0.7.3 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/sony/gobreaker v0.5.0 // indirect
- github.com/spf13/afero v1.9.5 // indirect
+ github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
@@ -474,7 +473,7 @@ require (
k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f // indirect
k8s.io/kubectl v0.28.2 // indirect
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
- nhooyr.io/websocket v1.8.7 // indirect
+ nhooyr.io/websocket v1.8.10 // indirect
pgregory.net/rapid v0.5.5 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
sigs.k8s.io/controller-runtime v0.16.2 // indirect
diff --git a/integration-tests/go.sum b/integration-tests/go.sum
index bca92f4a97c..2f09a2286c3 100644
--- a/integration-tests/go.sum
+++ b/integration-tests/go.sum
@@ -555,7 +555,6 @@ github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NB
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM=
-github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/go-asn1-ber/asn1-ber v1.5.5 h1:MNHlNMBDgEKD4TcKr36vQN68BA00aDfjIt3/bD50WnA=
@@ -625,16 +624,12 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU=
github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg=
-github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
-github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
-github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
-github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24=
github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
@@ -681,14 +676,8 @@ github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGt
github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0=
github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
-github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
-github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
-github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
-github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
-github.com/gobwas/ws v1.2.1 h1:F2aeBZrm2NDsc7vbovKrWSogd4wvfAxg0FQ89/iqOTk=
-github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0=
@@ -819,12 +808,12 @@ github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM=
-github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w=
+github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs=
+github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
-github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas=
-github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
+github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA=
+github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E=
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo=
github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM=
@@ -1102,7 +1091,6 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
-github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
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=
@@ -1135,7 +1123,6 @@ github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awS
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a h1:dHCfT5W7gghzPtfsW488uPmEOm85wewI+ypUwibyTdU=
github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
-github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
@@ -1323,8 +1310,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI=
github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
-github.com/opencontainers/runc v1.1.7 h1:y2EZDS8sNng4Ksf0GUYNhKbTShZJPJg1FiXJNH/uoCk=
-github.com/opencontainers/runc v1.1.7/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50=
+github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs=
+github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg=
github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e h1:4cPxUYdgaGzZIT5/j0IfqOrrXmq6bG8AwvwisMXpdrg=
github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo=
github.com/opentracing-contrib/go-stdlib v1.0.0 h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w=
@@ -1484,20 +1471,20 @@ github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ
github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw=
github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCqR1LNS7aI3jT0V+xGrg=
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
-github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
-github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
-github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c h1:3apUsez/6Pkp1ckXzSwIhzPRuWjDGjzMjKapEKi0Fcw=
-github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c/go.mod h1:Jg1sCTsbxg76YByI8ifpFby3FvVqISStHT8ypy9ocmY=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 h1:NBQLtqk8zsyY4qTJs+NElI3aDFTcAo83JHvqD04EvB0=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45/go.mod h1:LV0h7QBQUpoC2UUi6TcUvcIFm1xjP/DtEcqV8+qeLUs=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f h1:I9fTBJpHkeldFplXUy71eLIn6A6GxuR4xrABoUeD+CM=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f/go.mod h1:V/86loaFSH0dqqUEHqyXVbyNqDRSjvcf9BRomWFTljU=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h1:BCHu4pNP6arrcHLEWx61XjLaonOd2coQNyL0NTUcaMc=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827/go.mod h1:OPX+wC2TWQsyLNpR7daMt2vMpmsNcoBxbZyGTHr6tiA=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e h1:PzwzlHNv1YbJ6ZIdl/pIFRoOuOS4V4WLvjZvFUnZFL4=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e/go.mod h1:hsFhop+SlQHKD+DEFjZrMJmbauT1A/wvtZIeeo4PxFU=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU=
+github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965 h1:bKm1AJK9vhYoDdyF+cJb5zg8HRxP30qcOubMrhOJjYI=
+github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965/go.mod h1:WG3DV9T+o+c2BNYAy0fTJwENUdnplgIwBk+6wjhOohY=
+github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49 h1:7h7F8oQrFlRFPI0kQxI4O5UTESwuA8p5n2Ea1ALxNfg=
+github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49/go.mod h1:D7yrE2bf5xdz/qDeFNvPNMIAk6eR/GtqIJOpylKSgOA=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7 h1:CNC76ehoHML5Utz45ORMKOuwbuUt1blZwIwdBcpUT48=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7/go.mod h1:+6tPLOlhS76DyU2CFGESfelmDWWajPQn7QEUCW+MQlY=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d h1:qCNroDe/TUJr7XceNLZyf5D+fTAI2KPKP9R6TKiySEM=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d/go.mod h1:sPzJDIYAPMTPRhyu4qgdG5QeMHH1GwaHCXAsw28q84Q=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411 h1:oCj5ZPpP8hn/skgYTNnv3YQrhPail7sfH1TqUL1HodY=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411/go.mod h1:UT7xiG4ObmPypyPzHYx4NJ2gyx7er/SLYKGwmPYbOfI=
+github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0 h1:C5pWGVg+PEFs2o2vs8wLvkKUXIdAnSbYFnEj9uCSYyM=
+github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0/go.mod h1:4qzRB1+tKH34AEf51xXZvXhBUifQ/6GNzX9XTFriiw4=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d h1:Yt6YgwuG4oMGBXRTo9S3RWUSAKBiKOpPD2CIuuheIrg=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d/go.mod h1:bWpuaCFKvueRhRI0RmY/VGrdVSMhC3kRfiKbj8nRWjo=
github.com/smartcontractkit/chainlink-testing-framework v1.33.0 h1:vHQODEdsq5AIbRiyZZ30de6uwJUNFXLYvCr+Odr8TIs=
github.com/smartcontractkit/chainlink-testing-framework v1.33.0/go.mod h1:GrhHthZ5AmceF82+Ypw6Fov1EvB05JJbb1T0EKyO1x0=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 h1:Kk5OVlx/5g9q3Z3lhxytZS4/f8ds1MiNM8yaHgK3Oe8=
@@ -1508,14 +1495,14 @@ github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJ
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0=
github.com/smartcontractkit/havoc/k8schaos v0.0.0-20240409145249-e78d20847e37 h1:ZEhn2Yo1jY4hqy8nasDL4k4pNtopT3rS3Ap1GDb7ODc=
github.com/smartcontractkit/havoc/k8schaos v0.0.0-20240409145249-e78d20847e37/go.mod h1:/kFr0D7SI/vueXl1N03uzOun4nViGPFRyA5X6eL3jXw=
-github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7 h1:e38V5FYE7DA1JfKXeD5Buo/7lczALuVXlJ8YNTAUxcw=
-github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
+github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177 h1:bt/70PIgLcJe4arjbhIMxmI+DQJBTyhfiTcpUQ5FwwI=
+github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
github.com/smartcontractkit/seth v1.0.12 h1:iVdgMx42XWanPPnBaM5StR4c1XsTr/0/B/kKRZL5BsY=
github.com/smartcontractkit/seth v1.0.12/go.mod h1:thWtbLyW4nRHJGzC5heknQDORoJPErE15sF34LHkorg=
-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/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79 h1:TNb1CroCwjZ92s+ILmbwuO0CT/VqpcyjbxChdN2q//s=
+github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79/go.mod h1:0y3aCUlAUevgzvGHGQ7qDDhjOHOR9OWED+oIk3aSBwo=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79 h1:p7mVwRlLkRlxVat3GOWd/e740VJazR8k6QOipD2LHkk=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79/go.mod h1:JjP0TZ026rjAlFuj3SMcC/WO93SBV5vbMr8wTbFpaIg=
github.com/smartcontractkit/wasp v0.4.5 h1:pgiXwBci2m15eo33AzspzhpNG/gxg+8QGxl+I5LpfsQ=
github.com/smartcontractkit/wasp v0.4.5/go.mod h1:eVhBVLbVv0qORUlN7aR5C4aTN/lTYO3KnN1erO4ROOI=
github.com/smartcontractkit/wsrpc v0.7.3 h1:CKYZfawZShZGfvsQep1F9oBansnFk9ByZPCdTMpLphw=
@@ -1531,8 +1518,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
-github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
-github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
+github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=
+github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
@@ -2366,8 +2353,8 @@ k8s.io/kubectl v0.28.2 h1:fOWOtU6S0smdNjG1PB9WFbqEIMlkzU5ahyHkc7ESHgM=
k8s.io/kubectl v0.28.2/go.mod h1:6EQWTPySF1fn7yKoQZHYf9TPwIl2AygHEcJoxFekr64=
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak=
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
-nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
-nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
+nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q=
+nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA=
pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod
index f0554f2c725..16ead208c84 100644
--- a/integration-tests/load/go.mod
+++ b/integration-tests/load/go.mod
@@ -15,14 +15,14 @@ require (
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.31.0
github.com/slack-go/slack v0.12.2
- github.com/smartcontractkit/chainlink-automation v1.0.4
- github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c
+ github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965
+ github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49
github.com/smartcontractkit/chainlink-testing-framework v1.33.0
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240214231432-4ad5eb95178c
github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240216210048-da02459ddad8
- github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7
+ github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177
github.com/smartcontractkit/seth v1.0.12
- github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1
+ github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79
github.com/smartcontractkit/wasp v0.4.7
github.com/stretchr/testify v1.9.0
github.com/wiremock/go-wiremock v1.9.0
@@ -38,7 +38,7 @@ require (
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
- github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 // indirect
+ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7 // indirect
k8s.io/apimachinery v0.30.2 // indirect
)
@@ -369,17 +369,17 @@ require (
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/chain-selectors v1.0.10 // indirect
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f // indirect
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 // indirect
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e // indirect
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 // indirect
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d // indirect
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411 // indirect
+ github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0 // indirect
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d // indirect
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 // indirect
github.com/smartcontractkit/havoc/k8schaos v0.0.0-20240409145249-e78d20847e37 // indirect
- github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
+ github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79 // indirect
github.com/smartcontractkit/wsrpc v0.7.3 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/sony/gobreaker v0.5.0 // indirect
- github.com/spf13/afero v1.9.5 // indirect
+ github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
@@ -476,7 +476,7 @@ require (
k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f // indirect
k8s.io/kubectl v0.28.2 // indirect
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
- nhooyr.io/websocket v1.8.7 // indirect
+ nhooyr.io/websocket v1.8.10 // indirect
pgregory.net/rapid v0.5.5 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
sigs.k8s.io/controller-runtime v0.18.4 // indirect
diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum
index f31a11d389d..98e5b96cc24 100644
--- a/integration-tests/load/go.sum
+++ b/integration-tests/load/go.sum
@@ -545,7 +545,6 @@ github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NB
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM=
-github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/go-asn1-ber/asn1-ber v1.5.5 h1:MNHlNMBDgEKD4TcKr36vQN68BA00aDfjIt3/bD50WnA=
@@ -615,16 +614,12 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU=
github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg=
-github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
-github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
-github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
-github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24=
github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
@@ -671,14 +666,8 @@ github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGt
github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0=
github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
-github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
-github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
-github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
-github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
-github.com/gobwas/ws v1.2.1 h1:F2aeBZrm2NDsc7vbovKrWSogd4wvfAxg0FQ89/iqOTk=
-github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0=
@@ -809,12 +798,12 @@ github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM=
-github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w=
+github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs=
+github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
-github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas=
-github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
+github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA=
+github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E=
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo=
github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM=
@@ -1090,7 +1079,6 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
-github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
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=
@@ -1123,7 +1111,6 @@ github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awS
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a h1:dHCfT5W7gghzPtfsW488uPmEOm85wewI+ypUwibyTdU=
github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
-github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
@@ -1466,20 +1453,20 @@ github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ
github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw=
github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCqR1LNS7aI3jT0V+xGrg=
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
-github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
-github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
-github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c h1:3apUsez/6Pkp1ckXzSwIhzPRuWjDGjzMjKapEKi0Fcw=
-github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805160614-501c4f40b98c/go.mod h1:Jg1sCTsbxg76YByI8ifpFby3FvVqISStHT8ypy9ocmY=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 h1:NBQLtqk8zsyY4qTJs+NElI3aDFTcAo83JHvqD04EvB0=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45/go.mod h1:LV0h7QBQUpoC2UUi6TcUvcIFm1xjP/DtEcqV8+qeLUs=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f h1:I9fTBJpHkeldFplXUy71eLIn6A6GxuR4xrABoUeD+CM=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240801131703-fd75761c982f/go.mod h1:V/86loaFSH0dqqUEHqyXVbyNqDRSjvcf9BRomWFTljU=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h1:BCHu4pNP6arrcHLEWx61XjLaonOd2coQNyL0NTUcaMc=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827/go.mod h1:OPX+wC2TWQsyLNpR7daMt2vMpmsNcoBxbZyGTHr6tiA=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e h1:PzwzlHNv1YbJ6ZIdl/pIFRoOuOS4V4WLvjZvFUnZFL4=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e/go.mod h1:hsFhop+SlQHKD+DEFjZrMJmbauT1A/wvtZIeeo4PxFU=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU=
+github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965 h1:bKm1AJK9vhYoDdyF+cJb5zg8HRxP30qcOubMrhOJjYI=
+github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240801163457-43763630e965/go.mod h1:WG3DV9T+o+c2BNYAy0fTJwENUdnplgIwBk+6wjhOohY=
+github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49 h1:7h7F8oQrFlRFPI0kQxI4O5UTESwuA8p5n2Ea1ALxNfg=
+github.com/smartcontractkit/chainlink-common v0.2.2-0.20240805231047-ec2d56020a49/go.mod h1:D7yrE2bf5xdz/qDeFNvPNMIAk6eR/GtqIJOpylKSgOA=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7 h1:CNC76ehoHML5Utz45ORMKOuwbuUt1blZwIwdBcpUT48=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240801172621-0780686e8cd7/go.mod h1:+6tPLOlhS76DyU2CFGESfelmDWWajPQn7QEUCW+MQlY=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d h1:qCNroDe/TUJr7XceNLZyf5D+fTAI2KPKP9R6TKiySEM=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240805231213-4fc7a43d063d/go.mod h1:sPzJDIYAPMTPRhyu4qgdG5QeMHH1GwaHCXAsw28q84Q=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411 h1:oCj5ZPpP8hn/skgYTNnv3YQrhPail7sfH1TqUL1HodY=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240801163225-8d63d719e411/go.mod h1:UT7xiG4ObmPypyPzHYx4NJ2gyx7er/SLYKGwmPYbOfI=
+github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0 h1:C5pWGVg+PEFs2o2vs8wLvkKUXIdAnSbYFnEj9uCSYyM=
+github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240801182727-03e9d9e161e0/go.mod h1:4qzRB1+tKH34AEf51xXZvXhBUifQ/6GNzX9XTFriiw4=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d h1:Yt6YgwuG4oMGBXRTo9S3RWUSAKBiKOpPD2CIuuheIrg=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240801215534-34b4aec98b2d/go.mod h1:bWpuaCFKvueRhRI0RmY/VGrdVSMhC3kRfiKbj8nRWjo=
github.com/smartcontractkit/chainlink-testing-framework v1.33.0 h1:vHQODEdsq5AIbRiyZZ30de6uwJUNFXLYvCr+Odr8TIs=
github.com/smartcontractkit/chainlink-testing-framework v1.33.0/go.mod h1:GrhHthZ5AmceF82+Ypw6Fov1EvB05JJbb1T0EKyO1x0=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 h1:Kk5OVlx/5g9q3Z3lhxytZS4/f8ds1MiNM8yaHgK3Oe8=
@@ -1490,14 +1477,14 @@ github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJ
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0=
github.com/smartcontractkit/havoc/k8schaos v0.0.0-20240409145249-e78d20847e37 h1:ZEhn2Yo1jY4hqy8nasDL4k4pNtopT3rS3Ap1GDb7ODc=
github.com/smartcontractkit/havoc/k8schaos v0.0.0-20240409145249-e78d20847e37/go.mod h1:/kFr0D7SI/vueXl1N03uzOun4nViGPFRyA5X6eL3jXw=
-github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7 h1:e38V5FYE7DA1JfKXeD5Buo/7lczALuVXlJ8YNTAUxcw=
-github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
+github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177 h1:bt/70PIgLcJe4arjbhIMxmI+DQJBTyhfiTcpUQ5FwwI=
+github.com/smartcontractkit/libocr v0.0.0-20240805102757-d84f1198d177/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
github.com/smartcontractkit/seth v1.0.12 h1:iVdgMx42XWanPPnBaM5StR4c1XsTr/0/B/kKRZL5BsY=
github.com/smartcontractkit/seth v1.0.12/go.mod h1:thWtbLyW4nRHJGzC5heknQDORoJPErE15sF34LHkorg=
-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/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79 h1:TNb1CroCwjZ92s+ILmbwuO0CT/VqpcyjbxChdN2q//s=
+github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240801223644-b81c0f1b9c79/go.mod h1:0y3aCUlAUevgzvGHGQ7qDDhjOHOR9OWED+oIk3aSBwo=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79 h1:p7mVwRlLkRlxVat3GOWd/e740VJazR8k6QOipD2LHkk=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240801223644-b81c0f1b9c79/go.mod h1:JjP0TZ026rjAlFuj3SMcC/WO93SBV5vbMr8wTbFpaIg=
github.com/smartcontractkit/wasp v0.4.7 h1:7mKJfwzFbuE8xVLUYtLt7Bjw8q/bmVZRW6Ks8kc1LVM=
github.com/smartcontractkit/wasp v0.4.7/go.mod h1:jeabvyXikb2aNoLQwcZGqaz17efrR8NJhpq4seAmdgs=
github.com/smartcontractkit/wsrpc v0.7.3 h1:CKYZfawZShZGfvsQep1F9oBansnFk9ByZPCdTMpLphw=
@@ -1513,8 +1500,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
-github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
-github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
+github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=
+github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
@@ -2346,8 +2333,8 @@ k8s.io/kubectl v0.28.2 h1:fOWOtU6S0smdNjG1PB9WFbqEIMlkzU5ahyHkc7ESHgM=
k8s.io/kubectl v0.28.2/go.mod h1:6EQWTPySF1fn7yKoQZHYf9TPwIl2AygHEcJoxFekr64=
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak=
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
-nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
-nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
+nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q=
+nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA=
pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
diff --git a/testdata/scripts/health/default.txtar b/testdata/scripts/health/default.txtar
index 1dbf6b8eb96..024ba749137 100644
--- a/testdata/scripts/health/default.txtar
+++ b/testdata/scripts/health/default.txtar
@@ -29,6 +29,8 @@ fj293fbBnlQ!f9vNs
-- config.toml.tmpl --
[Webserver]
HTTPPort = $PORT
+[WebServer.TLS]
+HTTPSPort = 0
-- out.txt --
ok JobSpawner
diff --git a/testdata/scripts/health/multi-chain.txtar b/testdata/scripts/health/multi-chain.txtar
index 7e01493b30b..160c1f70aeb 100644
--- a/testdata/scripts/health/multi-chain.txtar
+++ b/testdata/scripts/health/multi-chain.txtar
@@ -37,6 +37,8 @@ fj293fbBnlQ!f9vNs
-- config.toml.tmpl --
[Webserver]
HTTPPort = $PORT
+[WebServer.TLS]
+HTTPSPort = 0
[[Cosmos]]
ChainID = 'Foo'
@@ -78,6 +80,7 @@ ok EVM.1.HeadTracker
! EVM.1.HeadTracker.HeadListener
Listener is not connected
ok EVM.1.LogBroadcaster
+ok EVM.1.Relayer
ok EVM.1.Txm
ok EVM.1.Txm.BlockHistoryEstimator
ok EVM.1.Txm.Broadcaster
@@ -91,8 +94,10 @@ ok PipelineORM
ok PipelineRunner
ok PipelineRunner.BridgeCache
ok PromReporter
-ok Solana.Bar
-ok StarkNet.Baz
+ok Solana.Bar.Chain
+ok Solana.Bar.Relayer
+ok Solana.Bar.Txm
+ok StarkNet.Baz.Relayer
ok TelemetryManager
-- out-unhealthy.txt --
@@ -183,6 +188,15 @@ ok TelemetryManager
"output": ""
}
},
+ {
+ "type": "checks",
+ "id": "EVM.1.Relayer",
+ "attributes": {
+ "name": "EVM.1.Relayer",
+ "status": "passing",
+ "output": ""
+ }
+ },
{
"type": "checks",
"id": "EVM.1.Txm",
@@ -302,18 +316,36 @@ ok TelemetryManager
},
{
"type": "checks",
- "id": "Solana.Bar",
+ "id": "Solana.Bar.Chain",
+ "attributes": {
+ "name": "Solana.Bar.Chain",
+ "status": "passing",
+ "output": ""
+ }
+ },
+ {
+ "type": "checks",
+ "id": "Solana.Bar.Relayer",
+ "attributes": {
+ "name": "Solana.Bar.Relayer",
+ "status": "passing",
+ "output": ""
+ }
+ },
+ {
+ "type": "checks",
+ "id": "Solana.Bar.Txm",
"attributes": {
- "name": "Solana.Bar",
+ "name": "Solana.Bar.Txm",
"status": "passing",
"output": ""
}
},
{
"type": "checks",
- "id": "StarkNet.Baz",
+ "id": "StarkNet.Baz.Relayer",
"attributes": {
- "name": "StarkNet.Baz",
+ "name": "StarkNet.Baz.Relayer",
"status": "passing",
"output": ""
}