diff --git a/core/chains/evm/log/helpers_test.go b/core/chains/evm/log/helpers_test.go
index 13aeb8d2338..f65215c2c8d 100644
--- a/core/chains/evm/log/helpers_test.go
+++ b/core/chains/evm/log/helpers_test.go
@@ -96,7 +96,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,
@@ -106,10 +106,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 27e0155da52..f652eb374b4 100644
--- a/core/chains/legacyevm/chain.go
+++ b/core/chains/legacyevm/chain.go
@@ -133,27 +133,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
@@ -190,7 +175,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
@@ -205,7 +190,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 df1f4248ce2..a450e5774ea 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 7427e6caedb..dbae599522f 100644
--- a/core/cmd/shell_local_test.go
+++ b/core/cmd/shell_local_test.go
@@ -41,7 +41,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()),
@@ -85,7 +85,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{
@@ -189,7 +189,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 26e7d5eae56..28d5ff68dc0 100644
--- a/core/internal/features/features_test.go
+++ b/core/internal/features/features_test.go
@@ -68,7 +68,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"
@@ -1269,7 +1268,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,
@@ -1325,8 +1324,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 evmtest.RawSub[*evmtypes.Head]
@@ -1336,6 +1334,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 276dea2ac5d..7d22e079a8e 100644
--- a/core/internal/testutils/evmtest/evmtest.go
+++ b/core/internal/testutils/evmtest/evmtest.go
@@ -69,19 +69,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 08050c32167..14e8eef4f8f 100644
--- a/core/scripts/go.mod
+++ b/core/scripts/go.mod
@@ -5,6 +5,8 @@ go 1.21.7
// Make sure we're working with the latest chainlink libs
replace github.com/smartcontractkit/chainlink/v2 => ../../
+replace github.com/smartcontractkit/libocr => github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1
+
require (
github.com/docker/docker v24.0.7+incompatible
github.com/docker/go-connections v0.4.0
@@ -20,9 +22,9 @@ require (
github.com/pelletier/go-toml/v2 v2.1.1
github.com/prometheus/client_golang v1.17.0
github.com/shopspring/decimal v1.3.1
- github.com/smartcontractkit/chainlink-automation v1.0.3
- github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73
- github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772
+ github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697
+ github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724
+ github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c
github.com/spf13/cobra v1.6.1
@@ -53,7 +55,7 @@ require (
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/NethermindEth/juno v0.3.1 // indirect
- github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 // indirect
+ github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/XSAM/otelsql v0.27.0 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
@@ -256,13 +258,13 @@ require (
github.com/shirou/gopsutil/v3 v3.24.3 // 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.20240419213354-ea34a948e2ee // indirect
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab // indirect
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 // indirect
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 // 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.20240425111720-534241c6da15 // indirect
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094 // indirect
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2 // indirect
+ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c // indirect
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0 // indirect
+ github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240425104007-9b8b97a46619 // indirect
+ github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619 // indirect
github.com/smartcontractkit/wsrpc v0.8.1 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.6.0 // indirect
diff --git a/core/scripts/go.sum b/core/scripts/go.sum
index 48a66de1ec3..f0530f3f98f 100644
--- a/core/scripts/go.sum
+++ b/core/scripts/go.sum
@@ -110,8 +110,8 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA=
github.com/NethermindEth/juno v0.3.1/go.mod h1:SGbTpgGaCsxhFsKOid7Ylnz//WZ8swtILk+NbHGsk/Q=
-github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 h1:9SBvy3eZut1X+wEyAFqfb7ADGj8IQw7ZnlkMwz0YOTY=
-github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1/go.mod h1:V6qrbi1+fTDCftETIT1grBXIf+TvWP/4Aois1a9EF1E=
+github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb h1:Mv8SscePPyw2ju4igIJAjFgcq5zCQfjgbz53DwYu5mc=
+github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb/go.mod h1:gQkhWpAs9/QR6reZU2xoi1UIYlMS64FLTlh9CrgHH/Y=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
@@ -834,6 +834,8 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
+github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1 h1:69HY56JW2xUoY6GuFffcBcvtI+mMaJOO13pYwZm3ac8=
+github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
@@ -1183,32 +1185,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.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs=
-github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73 h1:54hM3/SrOM166it2K35hGb5K7gQ49/Op0aHp9WkqpqU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee h1:eFuBKyEbL2b+eyfgV/Eu9+8HuCEev+IcBi+K9l1dG7g=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 h1:jc4ab5QrKZfkICyxJysCt7mSExuSPbePjgZsnJR3nRQ=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58/go.mod h1:oV5gIuSKrPEcjQ6uB6smBsm5kXHxyydVLNyAs4V9CoQ=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 h1:y6ks0HsSOhPUueOmTcoxDQ50RCS1XINlRDTemZyHjFw=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595/go.mod h1:vV6WfnVIbK5Q1JsIru4YcTG0T1uRpLJm6t2BgCnCSsg=
-github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 h1:LQmRsrzzaYYN3wEU1l5tWiccznhvbyGnu2N+wHSXZAo=
-github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs=
+github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697 h1:YfM7su8+D95pePvxaZSMcEJwhIvOjTCiPCYavh6O6HY=
+github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697/go.mod h1:seBnsUeqCJi3WXQOW9wDJTPDGqH/Ntr1hfTISKUlYig=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724 h1:1qpCBUyjYP7nTYi2mdN27ZmOB9r7kA0GFww4M6VYbBA=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724/go.mod h1:2BbaKM4DOcZCH+x1SNAPq1+X/1BCMOJNx12u/OzLlNk=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240425111720-534241c6da15 h1:swprvmfr8PSy/rn+uP7OXx4ohQO7lwCEVtB7Bk0xRro=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240425111720-534241c6da15/go.mod h1:H4mNg5rXTDb+BWYMCSBh6cdFh1de2kss25kjvf92atQ=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094 h1:1tTd6Y5ubp6/nC23o2uhdKQraQRHkzge3K8xGgzf0Ps=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094/go.mod h1:cDGVfPDEo5ucLCeoZ9u8UF8WrpbAWzV3dG2Jk/8PDWE=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2 h1:j2u+yvqJejvzJfO/0U0z+hyCyMscVTGk6xPbHsziCOo=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2/go.mod h1:r2f1CJqmgf1O6jglxMSgc211+a+9FYCYoFgxOT5zH+c=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c h1:S+4sODHRkptpYSEXcLNQeb2iNRiVCOpSIxjz2Kxqxaw=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c/go.mod h1:XNgaSeX55jdNSc3N/NDLg7FrLGiqdtIjBxwH0OvC0Yk=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0 h1:W7oNTI+76Oic+CxYiKlHe01ie0N7woxkCKcZlRLuco8=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0/go.mod h1:wA2vVpjkMpah9vRLaFdVrn0WKPjXP2JWrXuYUJu+Zts=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931 h1:9+elK07h4jdlRcmqcbMEEA+PsOZiIj1J3sx+c5e3TL8=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931/go.mod h1:KZxdqAO5gbl4gkdNzvFcR2c+LqgUwk397JXdsyKHuhQ=
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-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI=
-github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/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/tdh2/go/ocr2/decryptionplugin v0.0.0-20240425104007-9b8b97a46619 h1:m7Nb27VOg25XibM66KjCjzGxv+jxcpMTgUzS96c65qg=
+github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240425104007-9b8b97a46619/go.mod h1:YNz4Ihf0bQYfK2nEKxDsHghPPmMbSzCl3twaisFpeqE=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619 h1:mrhyPo3ZRB7t7RIROOZSqTSNgyQCpir6N1MwoKxjV1g=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619/go.mod h1:JjP0TZ026rjAlFuj3SMcC/WO93SBV5vbMr8wTbFpaIg=
github.com/smartcontractkit/wsrpc v0.8.1 h1:kk0SXLqWrWaZ3J6c7n8D0NZ2uTMBBBpG5dZZXZX8UGE=
github.com/smartcontractkit/wsrpc v0.8.1/go.mod h1:yfg8v8fPLXkb6Mcnx6Pm/snP6jJ0r5Kf762Yd1a/KpA=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
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 e17d4d516e9..e49a1b88ac0 100644
--- a/core/services/chainlink/relayer_chain_interoperators.go
+++ b/core/services/chainlink/relayer_chain_interoperators.go
@@ -126,7 +126,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
@@ -371,25 +370,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 00db81cce37..284fe8c7671 100644
--- a/core/services/chainlink/relayer_factory.go
+++ b/core/services/chainlink/relayer_factory.go
@@ -40,31 +40,27 @@ type EVMFactoryConfig struct {
evmrelay.CSAETHKeystore
}
-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: types.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: types.NetworkEVM, ChainID: chain.ID().String()}
+ chain := chain
relayerOpts := evmrelay.RelayerOpts{
DS: ccOpts.DS,
@@ -77,7 +73,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
@@ -151,7 +147,7 @@ func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solana.TOMLConf
if err != nil {
return nil, err
}
- solanaRelayers[relayID] = relay.NewServerAdapter(pkgsolana.NewRelayer(lggr, chain), chain)
+ solanaRelayers[relayID] = relay.NewServerAdapter(pkgsolana.NewRelayer(lggr, chain))
}
}
return solanaRelayers, nil
@@ -226,7 +222,7 @@ func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs config.TOML
return nil, err
}
- starknetRelayers[relayID] = relay.NewServerAdapter(pkgstarknet.NewRelayer(lggr, chain), chain)
+ starknetRelayers[relayID] = relay.NewServerAdapter(pkgstarknet.NewRelayer(lggr, chain))
}
}
return starknetRelayers, nil
@@ -257,12 +253,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")
@@ -286,7 +282,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 e754713b010..44d0881318e 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 df2624319f5..8afa7e5014f 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"
)
@@ -1689,12 +1688,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))
@@ -1706,7 +1705,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 af656618f78..39df576d4cf 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/utils/crypto"
)
@@ -178,9 +177,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 7120fe4200c..80c89eda90e 100644
--- a/core/services/job/helpers_test.go
+++ b/core/services/job/helpers_test.go
@@ -25,7 +25,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"
)
@@ -214,8 +213,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 f07b68d9987..c47541ce14e 100644
--- a/core/services/job/job_orm_test.go
+++ b/core/services/job/job_orm_test.go
@@ -40,7 +40,6 @@ import (
ocr2validate "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate"
"github.com/smartcontractkit/chainlink/v2/core/services/ocrbootstrap"
"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/vrf/vrfcommon"
"github.com/smartcontractkit/chainlink/v2/core/services/webhook"
"github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs"
@@ -365,8 +364,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(),
@@ -773,8 +771,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)
@@ -1020,8 +1017,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(),
@@ -1105,8 +1101,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(),
@@ -1337,8 +1332,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{})
@@ -1401,8 +1395,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{})
@@ -1464,8 +1457,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())
@@ -1579,8 +1571,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{})
@@ -1759,8 +1750,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 f8a43bca34d..e01caa880ce 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/orm.go b/core/services/job/orm.go
index 2b2f73396dc..3f5bb264d6b 100644
--- a/core/services/job/orm.go
+++ b/core/services/job/orm.go
@@ -887,6 +887,7 @@ func LoadConfigVarsOCR(evmOcrCfg evmconfig.OCR, ocrCfg OCRConfig, os OCROracleSp
return LoadConfigVarsLocalOCR(evmOcrCfg, os, ocrCfg), nil
}
+// TODO why does this even exist?
func (o *orm) FindJobTx(ctx context.Context, id int32) (Job, error) {
return o.FindJob(ctx, id)
}
diff --git a/core/services/job/runner_integration_test.go b/core/services/job/runner_integration_test.go
index cdfe39dd17f..3336588caaa 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)
@@ -562,14 +560,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)
@@ -589,7 +586,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 7b4ab138e7c..3fb76ee42c7 100644
--- a/core/services/job/spawner_test.go
+++ b/core/services/job/spawner_test.go
@@ -35,7 +35,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"
"github.com/smartcontractkit/chainlink/v2/plugins"
)
@@ -65,12 +64,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 TestSpawner_CreateJobDeleteJob(t *testing.T) {
@@ -97,8 +95,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)
@@ -284,9 +281,8 @@ 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)
+ legacyChains := evmtest.NewLegacyChains(t, testopts)
+ assert.Equal(t, legacyChains.Len(), 1)
chain := evmtest.MustGetDefaultChain(t, legacyChains)
evmRelayer, err := evmrelayer.NewRelayer(lggr, chain, evmrelayer.RelayerOpts{
@@ -296,7 +292,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 cd02fc27d11..4edde9e2721 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 b998c19cb29..e3958ffbba0 100644
--- a/core/services/llo/bm/dummy_transmitter.go
+++ b/core/services/llo/bm/dummy_transmitter.go
@@ -65,7 +65,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 eef211ab5d5..c91e785f625 100644
--- a/core/services/llo/transmitter.go
+++ b/core/services/llo/transmitter.go
@@ -148,6 +148,6 @@ func encodeEVM(digest types.ConfigDigest, seqNr uint64, report ocr2types.Report,
}
// 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 bae1f5f3e78..a05554435e6 100644
--- a/core/services/ocr2/delegate_test.go
+++ b/core/services/ocr2/delegate_test.go
@@ -22,7 +22,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"
)
@@ -45,9 +44,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 d9d68ec9097..851c1ff2eee 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 2339117d4e3..d55b5bc859f 100644
--- a/core/services/ocr2/plugins/mercury/integration_test.go
+++ b/core/services/ocr2/plugins/mercury/integration_test.go
@@ -160,7 +160,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)
}
@@ -274,7 +274,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)
@@ -343,6 +343,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 {
@@ -370,9 +371,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)
@@ -405,6 +406,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
@@ -434,7 +436,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)
@@ -514,7 +516,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)
}
@@ -625,7 +627,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)
@@ -808,7 +810,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)
}
@@ -917,7 +919,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 1eee437eb6b..06c08907750 100644
--- a/core/services/ocrcommon/adapters.go
+++ b/core/services/ocrcommon/adapters.go
@@ -68,6 +68,6 @@ 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)
}
diff --git a/core/services/ocrcommon/adapters_test.go b/core/services/ocrcommon/adapters_test.go
index 6c13ac85f15..b6aeaaf5a32 100644
--- a/core/services/ocrcommon/adapters_test.go
+++ b/core/services/ocrcommon/adapters_test.go
@@ -11,6 +11,7 @@ import (
ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types"
"github.com/stretchr/testify/require"
+ "github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
"github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon"
)
@@ -139,16 +140,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 44d7acadd27..53d9eefd13e 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)
@@ -471,8 +467,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)
@@ -511,8 +506,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)
@@ -992,8 +986,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 c38c338df20..8710c64618e 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) {
@@ -581,9 +580,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/evm/contract_transmitter.go b/core/services/relay/evm/contract_transmitter.go
index af0f83f6979..6abf8761110 100644
--- a/core/services/relay/evm/contract_transmitter.go
+++ b/core/services/relay/evm/contract_transmitter.go
@@ -193,7 +193,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 930ef0249e6..173e05e4416 100644
--- a/core/services/relay/evm/contract_transmitter_test.go
+++ b/core/services/relay/evm/contract_transmitter_test.go
@@ -13,6 +13,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"
@@ -71,7 +72,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 9097c217590..629e7005072 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"
@@ -137,13 +138,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 {
- return nil
+ return r.chain.Close()
}
// Ready does noop: always ready
@@ -152,16 +152,32 @@ 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) NewPluginProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.PluginProvider, error) {
+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()
+}
- // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887
- ctx := context.Background()
+func (r *Relayer) Chain() legacyevm.Chain {
+ return r.chain
+}
+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))
@@ -183,9 +199,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()
@@ -251,11 +265,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, 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
{
@@ -312,21 +322,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()
@@ -549,10 +552,7 @@ func newOnChainContractTransmitter(ctx context.Context, lggr logger.Logger, rarg
)
}
-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()
@@ -621,7 +621,7 @@ 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())
diff --git a/core/services/relay/evm/functions/contract_transmitter.go b/core/services/relay/evm/functions/contract_transmitter.go
index 4a8ba25fd9d..945035ec43f 100644
--- a/core/services/relay/evm/functions/contract_transmitter.go
+++ b/core/services/relay/evm/functions/contract_transmitter.go
@@ -283,7 +283,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 c53d07e77ca..df06ac36431 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 57a09dd49ae..3fd1de910b3 100644
--- a/core/services/relay/evm/loop_impl.go
+++ b/core/services/relay/evm/loop_impl.go
@@ -7,26 +7,24 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/relay"
)
-//go:generate mockery --quiet --name LoopRelayAdapter --output ./mocks/ --case=underscore
-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 6f49ca91bfc..1a56102117f 100644
--- a/core/services/relay/evm/mercury/transmitter.go
+++ b/core/services/relay/evm/mercury/transmitter.go
@@ -415,7 +415,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
}
diff --git a/core/services/relay/evm/mercury/v1/data_source.go b/core/services/relay/evm/mercury/v1/data_source.go
index 7f41bd1e36c..083f8638636 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 8f2eac59c33..937287c0127 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
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..001a4252339 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
@@ -13,6 +13,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 +35,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 +45,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 +67,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 +128,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,7 +137,8 @@ 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")
diff --git a/core/services/relay/evm/mercury/v2/data_source.go b/core/services/relay/evm/mercury/v2/data_source.go
index 7c2d6424fae..bd6e0769e07 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..f906a0ce729 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,11 +54,11 @@ 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) {
+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/v2/reportcodec/report_codec_test.go b/core/services/relay/evm/mercury/v2/reportcodec/report_codec_test.go
index 36b3a443880..d3a940fe5c3 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,7 +56,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}, report)
- max, err := r.MaxReportLength(4)
+ max, err := r.MaxReportLength(ctx, 4)
require.NoError(t, err)
assert.LessOrEqual(t, len(report), max)
@@ -76,7 +79,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)")
@@ -118,7 +122,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 +131,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")
diff --git a/core/services/relay/evm/mercury/v3/data_source.go b/core/services/relay/evm/mercury/v3/data_source.go
index a751149f378..6bb9c119dbd 100644
--- a/core/services/relay/evm/mercury/v3/data_source.go
+++ b/core/services/relay/evm/mercury/v3/data_source.go
@@ -74,7 +74,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..696ee6691f9 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
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..212313d9f3b 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")
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 9b2fed8423a..00000000000
--- a/core/services/relay/evm/mocks/loop_relay_adapter.go
+++ /dev/null
@@ -1,325 +0,0 @@
-// Code generated by mockery v2.42.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
-}
-
-// 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
-}
-
-// 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
-}
-
-// 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
-}
-
-// 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
-}
-
-// 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
-}
-
-// 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
-}
-
-// 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
-}
-
-// 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
-}
-
-// 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
-}
-
-// 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
-}
-
-// 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
-}
-
-// 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
-}
-
-// 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 78f4b43b43f..b1a4298dfdf 100644
--- a/core/services/relay/evm/ocr2keeper.go
+++ b/core/services/relay/evm/ocr2keeper.go
@@ -175,8 +175,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 83f03b47f9e..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"
- 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 {
- loop.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 (r *LegacyChainsAndConfig) Slice() []legacyevm.Chain {
+ return r.rs
}
-func (c *ChainRelayerExtenders) Slice() []EVMChainRelayerExtender {
- return c.exts
+func (r *LegacyChainsAndConfig) Len() int {
+ return len(r.rs)
}
-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 (s *ChainRelayerExt) Chain() legacyevm.Chain {
- return s.chain
-}
-
-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,12 +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,
@@ -154,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 b9a6433c3a7..36ad2c61f14 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/grpc_provider_server_test.go b/core/services/relay/grpc_provider_server_test.go
index 72bbbca0f44..15f5879fac9 100644
--- a/core/services/relay/grpc_provider_server_test.go
+++ b/core/services/relay/grpc_provider_server_test.go
@@ -13,7 +13,7 @@ import (
func TestProviderServer(t *testing.T) {
r := &mockRelayer{}
- sa := NewServerAdapter(r, mockRelayerExt{})
+ sa := NewServerAdapter(r)
mp, _ := sa.NewPluginProvider(testutils.Context(t), types.RelayArgs{ProviderType: string(types.Median)}, types.PluginArgs{})
lggr := logger.TestLogger(t)
diff --git a/core/services/relay/relay.go b/core/services/relay/relay.go
index b4cc4517390..5f19303475e 100644
--- a/core/services/relay/relay.go
+++ b/core/services/relay/relay.go
@@ -8,15 +8,17 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/types"
)
+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 {
- loop.RelayerAdapter
+ types.Relayer
}
// NewServerAdapter returns a new ServerAdapter.
-func NewServerAdapter(r types.Relayer, e loop.RelayerExt) *ServerAdapter { //nolint:staticcheck
- return &ServerAdapter{RelayerAdapter: loop.RelayerAdapter{Relayer: r, RelayerExt: e}}
+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) {
@@ -30,7 +32,7 @@ func (r *ServerAdapter) NewPluginProvider(ctx context.Context, rargs types.Relay
case types.OCR2Keeper:
return r.NewAutomationProvider(ctx, rargs, pargs)
case types.DKG, types.OCR2VRF, types.GenericPlugin:
- return r.RelayerAdapter.NewPluginProvider(ctx, rargs, pargs)
+ 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)
}
diff --git a/core/services/relay/relay_test.go b/core/services/relay/relay_test.go
index c0b2248ed1a..bd4157b5f03 100644
--- a/core/services/relay/relay_test.go
+++ b/core/services/relay/relay_test.go
@@ -9,7 +9,6 @@ import (
"github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median"
ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types"
- "github.com/smartcontractkit/chainlink-common/pkg/loop"
"github.com/smartcontractkit/chainlink-common/pkg/types"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
@@ -105,30 +104,26 @@ type mockRelayer struct {
types.Relayer
}
-func (m *mockRelayer) NewMedianProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.MedianProvider, error) {
+func (m *mockRelayer) NewMedianProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.MedianProvider, error) {
return staticMedianProvider{}, nil
}
-func (m *mockRelayer) NewFunctionsProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.FunctionsProvider, error) {
+func (m *mockRelayer) NewFunctionsProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.FunctionsProvider, error) {
return staticFunctionsProvider{}, nil
}
-func (m *mockRelayer) NewMercuryProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.MercuryProvider, error) {
+func (m *mockRelayer) NewMercuryProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.MercuryProvider, error) {
return staticMercuryProvider{}, nil
}
-func (m *mockRelayer) NewAutomationProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.AutomationProvider, error) {
+func (m *mockRelayer) NewAutomationProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.AutomationProvider, error) {
return staticAutomationProvider{}, nil
}
-func (m *mockRelayer) NewPluginProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.PluginProvider, error) {
+func (m *mockRelayer) NewPluginProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.PluginProvider, error) {
return staticPluginProvider{}, nil
}
-type mockRelayerExt struct {
- loop.RelayerExt
-}
-
func isType[T any](p any) bool {
_, ok := p.(T)
return ok
@@ -136,7 +131,7 @@ func isType[T any](p any) bool {
func TestRelayerServerAdapter(t *testing.T) {
r := &mockRelayer{}
- sa := NewServerAdapter(r, mockRelayerExt{})
+ sa := NewServerAdapter(r)
testCases := []struct {
ProviderType string
@@ -175,17 +170,19 @@ func TestRelayerServerAdapter(t *testing.T) {
ctx := testutils.Context(t)
for _, tc := range testCases {
- pp, err := sa.NewPluginProvider(
- ctx,
- types.RelayArgs{ProviderType: tc.ProviderType},
- types.PluginArgs{},
- )
-
- if tc.Error != "" {
- assert.ErrorContains(t, err, tc.Error)
- } else {
- assert.NoError(t, err)
- assert.True(t, tc.Test(pp))
- }
+ t.Run(tc.ProviderType, func(t *testing.T) {
+ pp, err := sa.NewPluginProvider(
+ ctx,
+ types.RelayArgs{ProviderType: tc.ProviderType},
+ types.PluginArgs{},
+ )
+
+ if tc.Error != "" {
+ assert.ErrorContains(t, err, tc.Error)
+ } else {
+ assert.NoError(t, err)
+ assert.True(t, tc.Test(pp))
+ }
+ })
}
}
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 e8d4fd255f7..e5b03c5372d 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"
@@ -2042,8 +2041,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/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 7885c73bf7a..493c4080aa1 100644
--- a/core/web/solana_transfer_controller.go
+++ b/core/web/solana_transfer_controller.go
@@ -59,7 +59,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 d1b208f4a0d..5d330b4d72a 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 3c0117de7ec..ab3249b49b4 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 03a78c22c28..a5272437344 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 6e081467bc0..aea3b276373 100644
--- a/go.mod
+++ b/go.mod
@@ -2,12 +2,14 @@ module github.com/smartcontractkit/chainlink/v2
go 1.21.7
+replace github.com/smartcontractkit/libocr => github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1
+
require (
github.com/Depado/ginprom v1.8.0
github.com/Masterminds/semver/v3 v3.2.1
github.com/Masterminds/sprig/v3 v3.2.3
github.com/NethermindEth/juno v0.3.1
- github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1
+ github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb
github.com/XSAM/otelsql v0.27.0
github.com/avast/retry-go/v4 v4.5.1
github.com/btcsuite/btcd/btcec/v2 v2.3.2
@@ -71,17 +73,17 @@ require (
github.com/shirou/gopsutil/v3 v3.24.3
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/chain-selectors v1.0.10
- github.com/smartcontractkit/chainlink-automation v1.0.3
- github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73
- github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595
- github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868
+ github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697
+ github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724
+ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240425111720-534241c6da15
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2
+ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0
+ github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931
github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c
- 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/tdh2/go/ocr2/decryptionplugin v0.0.0-20240425104007-9b8b97a46619
+ github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619
github.com/smartcontractkit/wsrpc v0.8.1
github.com/spf13/cast v1.6.0
github.com/stretchr/testify v1.9.0
diff --git a/go.sum b/go.sum
index 50cb9f3b44f..70e1b81103a 100644
--- a/go.sum
+++ b/go.sum
@@ -115,8 +115,8 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA=
github.com/NethermindEth/juno v0.3.1/go.mod h1:SGbTpgGaCsxhFsKOid7Ylnz//WZ8swtILk+NbHGsk/Q=
-github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 h1:9SBvy3eZut1X+wEyAFqfb7ADGj8IQw7ZnlkMwz0YOTY=
-github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1/go.mod h1:V6qrbi1+fTDCftETIT1grBXIf+TvWP/4Aois1a9EF1E=
+github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb h1:Mv8SscePPyw2ju4igIJAjFgcq5zCQfjgbz53DwYu5mc=
+github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb/go.mod h1:gQkhWpAs9/QR6reZU2xoi1UIYlMS64FLTlh9CrgHH/Y=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
@@ -828,6 +828,8 @@ github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
+github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1 h1:69HY56JW2xUoY6GuFffcBcvtI+mMaJOO13pYwZm3ac8=
+github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
@@ -1178,32 +1180,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.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs=
-github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73 h1:54hM3/SrOM166it2K35hGb5K7gQ49/Op0aHp9WkqpqU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee h1:eFuBKyEbL2b+eyfgV/Eu9+8HuCEev+IcBi+K9l1dG7g=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 h1:jc4ab5QrKZfkICyxJysCt7mSExuSPbePjgZsnJR3nRQ=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58/go.mod h1:oV5gIuSKrPEcjQ6uB6smBsm5kXHxyydVLNyAs4V9CoQ=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 h1:y6ks0HsSOhPUueOmTcoxDQ50RCS1XINlRDTemZyHjFw=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595/go.mod h1:vV6WfnVIbK5Q1JsIru4YcTG0T1uRpLJm6t2BgCnCSsg=
-github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8=
-github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs=
+github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697 h1:YfM7su8+D95pePvxaZSMcEJwhIvOjTCiPCYavh6O6HY=
+github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697/go.mod h1:seBnsUeqCJi3WXQOW9wDJTPDGqH/Ntr1hfTISKUlYig=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724 h1:1qpCBUyjYP7nTYi2mdN27ZmOB9r7kA0GFww4M6VYbBA=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724/go.mod h1:2BbaKM4DOcZCH+x1SNAPq1+X/1BCMOJNx12u/OzLlNk=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240425111720-534241c6da15 h1:swprvmfr8PSy/rn+uP7OXx4ohQO7lwCEVtB7Bk0xRro=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240425111720-534241c6da15/go.mod h1:H4mNg5rXTDb+BWYMCSBh6cdFh1de2kss25kjvf92atQ=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094 h1:1tTd6Y5ubp6/nC23o2uhdKQraQRHkzge3K8xGgzf0Ps=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094/go.mod h1:cDGVfPDEo5ucLCeoZ9u8UF8WrpbAWzV3dG2Jk/8PDWE=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2 h1:j2u+yvqJejvzJfO/0U0z+hyCyMscVTGk6xPbHsziCOo=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2/go.mod h1:r2f1CJqmgf1O6jglxMSgc211+a+9FYCYoFgxOT5zH+c=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c h1:S+4sODHRkptpYSEXcLNQeb2iNRiVCOpSIxjz2Kxqxaw=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c/go.mod h1:XNgaSeX55jdNSc3N/NDLg7FrLGiqdtIjBxwH0OvC0Yk=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0 h1:W7oNTI+76Oic+CxYiKlHe01ie0N7woxkCKcZlRLuco8=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0/go.mod h1:wA2vVpjkMpah9vRLaFdVrn0WKPjXP2JWrXuYUJu+Zts=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931 h1:9+elK07h4jdlRcmqcbMEEA+PsOZiIj1J3sx+c5e3TL8=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931/go.mod h1:KZxdqAO5gbl4gkdNzvFcR2c+LqgUwk397JXdsyKHuhQ=
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-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI=
-github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/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/tdh2/go/ocr2/decryptionplugin v0.0.0-20240425104007-9b8b97a46619 h1:m7Nb27VOg25XibM66KjCjzGxv+jxcpMTgUzS96c65qg=
+github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240425104007-9b8b97a46619/go.mod h1:YNz4Ihf0bQYfK2nEKxDsHghPPmMbSzCl3twaisFpeqE=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619 h1:mrhyPo3ZRB7t7RIROOZSqTSNgyQCpir6N1MwoKxjV1g=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619/go.mod h1:JjP0TZ026rjAlFuj3SMcC/WO93SBV5vbMr8wTbFpaIg=
github.com/smartcontractkit/wsrpc v0.8.1 h1:kk0SXLqWrWaZ3J6c7n8D0NZ2uTMBBBpG5dZZXZX8UGE=
github.com/smartcontractkit/wsrpc v0.8.1/go.mod h1:yfg8v8fPLXkb6Mcnx6Pm/snP6jJ0r5Kf762Yd1a/KpA=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
diff --git a/integration-tests/go.mod b/integration-tests/go.mod
index 69c09244ef8..fab9794281f 100644
--- a/integration-tests/go.mod
+++ b/integration-tests/go.mod
@@ -5,6 +5,8 @@ go 1.21.7
// Make sure we're working with the latest chainlink libs
replace github.com/smartcontractkit/chainlink/v2 => ../
+replace github.com/smartcontractkit/libocr => github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1
+
require (
github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df
github.com/cli/go-gh/v2 v2.0.0
@@ -24,10 +26,10 @@ require (
github.com/segmentio/ksuid v1.0.4
github.com/shopspring/decimal v1.3.1
github.com/slack-go/slack v0.12.2
- github.com/smartcontractkit/chainlink-automation v1.0.3
- github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73
+ github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697
+ github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724
github.com/smartcontractkit/chainlink-testing-framework v1.28.4
- github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868
+ github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c
github.com/smartcontractkit/seth v0.1.6
@@ -84,7 +86,7 @@ require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.11.4 // indirect
github.com/NethermindEth/juno v0.3.1 // indirect
- github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 // indirect
+ github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/XSAM/otelsql v0.27.0 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
@@ -342,7 +344,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
@@ -377,13 +378,13 @@ 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.20240419213354-ea34a948e2ee // indirect
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab // indirect
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 // indirect
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 // 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.20240425111720-534241c6da15 // indirect
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094 // indirect
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2 // indirect
+ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c // indirect
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0 // indirect
+ github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240425104007-9b8b97a46619 // indirect
+ github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619 // indirect
github.com/smartcontractkit/wsrpc v0.8.1 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/sony/gobreaker v0.5.0 // indirect
diff --git a/integration-tests/go.sum b/integration-tests/go.sum
index e2be6f36438..157fa8e1d6a 100644
--- a/integration-tests/go.sum
+++ b/integration-tests/go.sum
@@ -150,8 +150,8 @@ github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7
github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w=
github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA=
github.com/NethermindEth/juno v0.3.1/go.mod h1:SGbTpgGaCsxhFsKOid7Ylnz//WZ8swtILk+NbHGsk/Q=
-github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 h1:9SBvy3eZut1X+wEyAFqfb7ADGj8IQw7ZnlkMwz0YOTY=
-github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1/go.mod h1:V6qrbi1+fTDCftETIT1grBXIf+TvWP/4Aois1a9EF1E=
+github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb h1:Mv8SscePPyw2ju4igIJAjFgcq5zCQfjgbz53DwYu5mc=
+github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb/go.mod h1:gQkhWpAs9/QR6reZU2xoi1UIYlMS64FLTlh9CrgHH/Y=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
@@ -1065,6 +1065,8 @@ github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
+github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1 h1:69HY56JW2xUoY6GuFffcBcvtI+mMaJOO13pYwZm3ac8=
+github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
@@ -1331,8 +1333,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=
@@ -1515,36 +1517,34 @@ 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.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs=
-github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73 h1:54hM3/SrOM166it2K35hGb5K7gQ49/Op0aHp9WkqpqU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee h1:eFuBKyEbL2b+eyfgV/Eu9+8HuCEev+IcBi+K9l1dG7g=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 h1:jc4ab5QrKZfkICyxJysCt7mSExuSPbePjgZsnJR3nRQ=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58/go.mod h1:oV5gIuSKrPEcjQ6uB6smBsm5kXHxyydVLNyAs4V9CoQ=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 h1:y6ks0HsSOhPUueOmTcoxDQ50RCS1XINlRDTemZyHjFw=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595/go.mod h1:vV6WfnVIbK5Q1JsIru4YcTG0T1uRpLJm6t2BgCnCSsg=
+github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697 h1:YfM7su8+D95pePvxaZSMcEJwhIvOjTCiPCYavh6O6HY=
+github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697/go.mod h1:seBnsUeqCJi3WXQOW9wDJTPDGqH/Ntr1hfTISKUlYig=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724 h1:1qpCBUyjYP7nTYi2mdN27ZmOB9r7kA0GFww4M6VYbBA=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724/go.mod h1:2BbaKM4DOcZCH+x1SNAPq1+X/1BCMOJNx12u/OzLlNk=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240425111720-534241c6da15 h1:swprvmfr8PSy/rn+uP7OXx4ohQO7lwCEVtB7Bk0xRro=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240425111720-534241c6da15/go.mod h1:H4mNg5rXTDb+BWYMCSBh6cdFh1de2kss25kjvf92atQ=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094 h1:1tTd6Y5ubp6/nC23o2uhdKQraQRHkzge3K8xGgzf0Ps=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094/go.mod h1:cDGVfPDEo5ucLCeoZ9u8UF8WrpbAWzV3dG2Jk/8PDWE=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2 h1:j2u+yvqJejvzJfO/0U0z+hyCyMscVTGk6xPbHsziCOo=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2/go.mod h1:r2f1CJqmgf1O6jglxMSgc211+a+9FYCYoFgxOT5zH+c=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c h1:S+4sODHRkptpYSEXcLNQeb2iNRiVCOpSIxjz2Kxqxaw=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c/go.mod h1:XNgaSeX55jdNSc3N/NDLg7FrLGiqdtIjBxwH0OvC0Yk=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0 h1:W7oNTI+76Oic+CxYiKlHe01ie0N7woxkCKcZlRLuco8=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0/go.mod h1:wA2vVpjkMpah9vRLaFdVrn0WKPjXP2JWrXuYUJu+Zts=
github.com/smartcontractkit/chainlink-testing-framework v1.28.4 h1:/OOPH76VFQlG5HEXrXgBVDv1fjuasQzMV1EyeaaXWzM=
github.com/smartcontractkit/chainlink-testing-framework v1.28.4/go.mod h1:jN+HgXbriq6fKRlIqLw9F3I81aYImV6kBJkIfz0mdIA=
-github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8=
-github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931 h1:9+elK07h4jdlRcmqcbMEEA+PsOZiIj1J3sx+c5e3TL8=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931/go.mod h1:KZxdqAO5gbl4gkdNzvFcR2c+LqgUwk397JXdsyKHuhQ=
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-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI=
-github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
github.com/smartcontractkit/seth v0.1.6 h1:exU96KiKM/gxvp7OR8KkOXnTgbtFNepdhMBvyobFKCw=
github.com/smartcontractkit/seth v0.1.6/go.mod h1:2TMOZQ8WTAw7rR1YBbXpnad6VmT/+xDd/nXLmB7Eero=
-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-20240425104007-9b8b97a46619 h1:m7Nb27VOg25XibM66KjCjzGxv+jxcpMTgUzS96c65qg=
+github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240425104007-9b8b97a46619/go.mod h1:YNz4Ihf0bQYfK2nEKxDsHghPPmMbSzCl3twaisFpeqE=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619 h1:mrhyPo3ZRB7t7RIROOZSqTSNgyQCpir6N1MwoKxjV1g=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619/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.8.1 h1:kk0SXLqWrWaZ3J6c7n8D0NZ2uTMBBBpG5dZZXZX8UGE=
diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod
index 128c611c04d..85e61ada247 100644
--- a/integration-tests/load/go.mod
+++ b/integration-tests/load/go.mod
@@ -5,6 +5,8 @@ go 1.21.7
// Make sure we're working with the latest chainlink libs
replace github.com/smartcontractkit/chainlink/v2 => ../../
+replace github.com/smartcontractkit/libocr => github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1
+
replace github.com/smartcontractkit/chainlink/integration-tests => ../
require (
@@ -15,14 +17,14 @@ require (
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.30.0
github.com/slack-go/slack v0.12.2
- github.com/smartcontractkit/chainlink-automation v1.0.3
- github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73
+ github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697
+ github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724
github.com/smartcontractkit/chainlink-testing-framework v1.28.4
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-20240419185742-fd3cab206b2c
github.com/smartcontractkit/seth v0.1.6
- github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1
+ github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619
github.com/smartcontractkit/wasp v0.4.6
github.com/stretchr/testify v1.9.0
github.com/wiremock/go-wiremock v1.9.0
@@ -61,7 +63,7 @@ require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.11.4 // indirect
github.com/NethermindEth/juno v0.3.1 // indirect
- github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 // indirect
+ github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/XSAM/otelsql v0.27.0 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
@@ -366,14 +368,14 @@ require (
github.com/shopspring/decimal v1.3.1 // 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.20240419213354-ea34a948e2ee // indirect
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab // indirect
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 // indirect
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 // indirect
+ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240425111720-534241c6da15 // indirect
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094 // indirect
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2 // indirect
+ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c // indirect
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0 // indirect
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240227164431-18a7065e23ea // indirect
- github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 // indirect
- github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
+ github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931 // indirect
+ github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240425104007-9b8b97a46619 // indirect
github.com/smartcontractkit/wsrpc v0.8.1 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/sony/gobreaker v0.5.0 // indirect
diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum
index 291f221f4b8..364b2f31e98 100644
--- a/integration-tests/load/go.sum
+++ b/integration-tests/load/go.sum
@@ -150,8 +150,8 @@ github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7
github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w=
github.com/NethermindEth/juno v0.3.1 h1:AW72LiAm9gqUeCVJWvepnZcTnpU4Vkl0KzPMxS+42FA=
github.com/NethermindEth/juno v0.3.1/go.mod h1:SGbTpgGaCsxhFsKOid7Ylnz//WZ8swtILk+NbHGsk/Q=
-github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1 h1:9SBvy3eZut1X+wEyAFqfb7ADGj8IQw7ZnlkMwz0YOTY=
-github.com/NethermindEth/starknet.go v0.6.1-0.20231218140327-915109ab5bc1/go.mod h1:V6qrbi1+fTDCftETIT1grBXIf+TvWP/4Aois1a9EF1E=
+github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb h1:Mv8SscePPyw2ju4igIJAjFgcq5zCQfjgbz53DwYu5mc=
+github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb/go.mod h1:gQkhWpAs9/QR6reZU2xoi1UIYlMS64FLTlh9CrgHH/Y=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
@@ -1054,6 +1054,8 @@ github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
+github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1 h1:69HY56JW2xUoY6GuFffcBcvtI+mMaJOO13pYwZm3ac8=
+github.com/jmank88/libocr v0.0.0-20240425120538-09fa8c2edfb1/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
@@ -1498,38 +1500,36 @@ 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.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs=
-github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73 h1:54hM3/SrOM166it2K35hGb5K7gQ49/Op0aHp9WkqpqU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240424132620-add4946c1c73/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee h1:eFuBKyEbL2b+eyfgV/Eu9+8HuCEev+IcBi+K9l1dG7g=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=
-github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 h1:jc4ab5QrKZfkICyxJysCt7mSExuSPbePjgZsnJR3nRQ=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58/go.mod h1:oV5gIuSKrPEcjQ6uB6smBsm5kXHxyydVLNyAs4V9CoQ=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 h1:y6ks0HsSOhPUueOmTcoxDQ50RCS1XINlRDTemZyHjFw=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595/go.mod h1:vV6WfnVIbK5Q1JsIru4YcTG0T1uRpLJm6t2BgCnCSsg=
+github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697 h1:YfM7su8+D95pePvxaZSMcEJwhIvOjTCiPCYavh6O6HY=
+github.com/smartcontractkit/chainlink-automation v1.0.4-0.20240425153817-1ba5b9d03697/go.mod h1:seBnsUeqCJi3WXQOW9wDJTPDGqH/Ntr1hfTISKUlYig=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724 h1:1qpCBUyjYP7nTYi2mdN27ZmOB9r7kA0GFww4M6VYbBA=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240425103110-dbf028ff5724/go.mod h1:2BbaKM4DOcZCH+x1SNAPq1+X/1BCMOJNx12u/OzLlNk=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240425111720-534241c6da15 h1:swprvmfr8PSy/rn+uP7OXx4ohQO7lwCEVtB7Bk0xRro=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240425111720-534241c6da15/go.mod h1:H4mNg5rXTDb+BWYMCSBh6cdFh1de2kss25kjvf92atQ=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094 h1:1tTd6Y5ubp6/nC23o2uhdKQraQRHkzge3K8xGgzf0Ps=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240425112624-15ce220ad094/go.mod h1:cDGVfPDEo5ucLCeoZ9u8UF8WrpbAWzV3dG2Jk/8PDWE=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2 h1:j2u+yvqJejvzJfO/0U0z+hyCyMscVTGk6xPbHsziCOo=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240425122245-fceb89c286e2/go.mod h1:r2f1CJqmgf1O6jglxMSgc211+a+9FYCYoFgxOT5zH+c=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c h1:S+4sODHRkptpYSEXcLNQeb2iNRiVCOpSIxjz2Kxqxaw=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240425171656-b77da610333c/go.mod h1:XNgaSeX55jdNSc3N/NDLg7FrLGiqdtIjBxwH0OvC0Yk=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0 h1:W7oNTI+76Oic+CxYiKlHe01ie0N7woxkCKcZlRLuco8=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240425153944-9f020809dee0/go.mod h1:wA2vVpjkMpah9vRLaFdVrn0WKPjXP2JWrXuYUJu+Zts=
github.com/smartcontractkit/chainlink-testing-framework v1.28.4 h1:/OOPH76VFQlG5HEXrXgBVDv1fjuasQzMV1EyeaaXWzM=
github.com/smartcontractkit/chainlink-testing-framework v1.28.4/go.mod h1:jN+HgXbriq6fKRlIqLw9F3I81aYImV6kBJkIfz0mdIA=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240227164431-18a7065e23ea h1:ZdLmNAfKRjH8AYUvjiiDGUgiWQfq/7iNpxyTkvjx/ko=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240227164431-18a7065e23ea/go.mod h1:gCKC9w6XpNk6jm+XIk2psrkkfxhi421N9NSiFceXW88=
-github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8=
-github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931 h1:9+elK07h4jdlRcmqcbMEEA+PsOZiIj1J3sx+c5e3TL8=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240425104933-465ce85fe931/go.mod h1:KZxdqAO5gbl4gkdNzvFcR2c+LqgUwk397JXdsyKHuhQ=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
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-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI=
-github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM=
github.com/smartcontractkit/seth v0.1.6 h1:exU96KiKM/gxvp7OR8KkOXnTgbtFNepdhMBvyobFKCw=
github.com/smartcontractkit/seth v0.1.6/go.mod h1:2TMOZQ8WTAw7rR1YBbXpnad6VmT/+xDd/nXLmB7Eero=
-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-20240425104007-9b8b97a46619 h1:m7Nb27VOg25XibM66KjCjzGxv+jxcpMTgUzS96c65qg=
+github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20240425104007-9b8b97a46619/go.mod h1:YNz4Ihf0bQYfK2nEKxDsHghPPmMbSzCl3twaisFpeqE=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619 h1:mrhyPo3ZRB7t7RIROOZSqTSNgyQCpir6N1MwoKxjV1g=
+github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20240425104007-9b8b97a46619/go.mod h1:JjP0TZ026rjAlFuj3SMcC/WO93SBV5vbMr8wTbFpaIg=
github.com/smartcontractkit/wasp v0.4.6 h1:s6J8HgpxMHORl19nCpZPxc5jaVUQv8EXB6QjTuLXXnw=
github.com/smartcontractkit/wasp v0.4.6/go.mod h1:+ViWdUf1ap6powiEiwPskpZfH/Q1sG29YoVav7zGOIo=
github.com/smartcontractkit/wsrpc v0.8.1 h1:kk0SXLqWrWaZ3J6c7n8D0NZ2uTMBBBpG5dZZXZX8UGE=
diff --git a/testdata/scripts/health/default.txtar b/testdata/scripts/health/default.txtar
index 4ca7fba9254..7d2fb9fe919 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 fd48c0ad1ce..b9aff65bc29 100644
--- a/testdata/scripts/health/multi-chain.txtar
+++ b/testdata/scripts/health/multi-chain.txtar
@@ -29,6 +29,8 @@ fj293fbBnlQ!f9vNs
-- config.toml.tmpl --
[Webserver]
HTTPPort = $PORT
+[WebServer.TLS]
+HTTPSPort = 0
[[Cosmos]]
ChainID = 'Foo'
@@ -70,6 +72,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
@@ -82,8 +85,10 @@ ok Mercury.WSRPCPool.CacheSet
ok PipelineORM
ok PipelineRunner
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.json --
@@ -170,6 +175,15 @@ ok TelemetryManager
"output": ""
}
},
+ {
+ "type": "checks",
+ "id": "EVM.1.Relayer",
+ "attributes": {
+ "name": "EVM.1.Relayer",
+ "status": "passing",
+ "output": ""
+ }
+ },
{
"type": "checks",
"id": "EVM.1.Txm",
@@ -280,18 +294,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": ""
}