diff --git a/core/chains/evm/log/helpers_test.go b/core/chains/evm/log/helpers_test.go
index 18f396fab9d..ed3d5557f9b 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, globalConfig.Database())
- 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, config.WebServer(), config.JobPipeline(), config.Database(), legacyChains, db, kst, nil, nil)
return &broadcasterHelper{
diff --git a/core/chains/legacyevm/chain.go b/core/chains/legacyevm/chain.go
index 830a1198258..b89ec59002a 100644
--- a/core/chains/legacyevm/chain.go
+++ b/core/chains/legacyevm/chain.go
@@ -135,27 +135,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
@@ -196,7 +181,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
@@ -211,7 +196,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, chainType := cfg.EVM().ChainID(), cfg.EVM().ChainType()
l := opts.Logger
var client evmclient.Client
diff --git a/core/chains/legacyevm/evm_txm.go b/core/chains/legacyevm/evm_txm.go
index c4959b78a47..f45d1638a5d 100644
--- a/core/chains/legacyevm/evm_txm.go
+++ b/core/chains/legacyevm/evm_txm.go
@@ -24,7 +24,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 596b699ff7a..9b742c5cf88 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{
@@ -190,7 +190,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 cd231450650..45679365d80 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"
@@ -1262,7 +1261,7 @@ func TestIntegration_BlockHistoryEstimator(t *testing.T) {
kst := cltest.NewKeyStore(t, db, cfg.Database())
require.NoError(t, kst.Unlock(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,
@@ -1318,8 +1317,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]
@@ -1329,6 +1327,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 83c356bf1a3..0691a905e83 100644
--- a/core/internal/testutils/evmtest/evmtest.go
+++ b/core/internal/testutils/evmtest/evmtest.go
@@ -70,19 +70,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 4ae3186aa4b..254d7e70f99 100644
--- a/core/scripts/go.mod
+++ b/core/scripts/go.mod
@@ -5,6 +5,10 @@ go 1.21.7
// Make sure we're working with the latest chainlink libs
replace github.com/smartcontractkit/chainlink/v2 => ../../
+replace github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin => github.com/jmank88/tdh2/go/ocr2/decryptionplugin v0.0.0-20240322233947-cf396d1ab345
+
+replace github.com/smartcontractkit/tdh2/go/tdh2 => github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240322233947-cf396d1ab345
+
require (
github.com/docker/docker v24.0.7+incompatible
github.com/docker/go-connections v0.4.0
@@ -20,11 +24,11 @@ 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.2-0.20240311111125-22812a072c35
- github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac
- github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868
+ github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240322235341-67354bde3ba9
+ github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373
+ github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
- github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66
+ github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.15.0
github.com/stretchr/testify v1.9.0
@@ -52,6 +56,8 @@ require (
github.com/Depado/ginprom v1.8.0 // indirect
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/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/XSAM/otelsql v0.27.0 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
@@ -252,11 +258,11 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect
github.com/smartcontractkit/chain-selectors v1.0.10 // indirect
- github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 // indirect
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 // indirect
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e // indirect
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0 // indirect
+ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b // indirect
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8 // indirect
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5 // indirect
+ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f // indirect
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4 // 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/wsrpc v0.7.2 // indirect
@@ -271,6 +277,7 @@ require (
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 // indirect
+ github.com/test-go/testify v1.1.4 // indirect
github.com/theodesp/go-heaps v0.0.0-20190520121037-88e35354fe0a // indirect
github.com/tidwall/btree v1.6.0 // indirect
github.com/tidwall/gjson v1.17.0 // indirect
diff --git a/core/scripts/go.sum b/core/scripts/go.sum
index 7ed135dcb14..8ecf54ec998 100644
--- a/core/scripts/go.sum
+++ b/core/scripts/go.sum
@@ -108,6 +108,10 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0
github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
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/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=
@@ -832,6 +836,10 @@ 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/tdh2/go/ocr2/decryptionplugin v0.0.0-20240322233947-cf396d1ab345 h1:4FJOmStBVZSi9m4iOYyzjPjBC1K7SE45J4M63qRIIbA=
+github.com/jmank88/tdh2/go/ocr2/decryptionplugin v0.0.0-20240322233947-cf396d1ab345/go.mod h1:vh/7A1cagy3c5LG3kV1A7kZFIUyMMQiLUgZTYF7stUw=
+github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240322233947-cf396d1ab345 h1:nNffyDOo23KolqsC5x0+4fxHS+kwBtPTYgtM2Db6xRA=
+github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240322233947-cf396d1ab345/go.mod h1:svr6lBANcspshEK48INy7ADxLz2iGCbAJi6sEv6MtaA=
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=
@@ -1177,32 +1185,28 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/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.2-0.20240311111125-22812a072c35 h1:GNhRKD3izyzAoGMXDvVUAwEuzz4Atdj3U3RH7eak5Is=
-github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35/go.mod h1:2I0dWdYdK6jHPnSYYy7Y7Xp7L0YTnJ3KZtkhLQflsTU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac h1:EjQDAPZu4N7s554uXzA7QOLZz+JnvjbBwSumExmzF0k=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac/go.mod h1://xWphjmC6GWJtT8l86J2VpnG21xNwFCb0thzz4ItEk=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 h1:I326nw5GwHQHsLKHwtu5Sb9EBLylC8CfUd7BFAS0jtg=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8/go.mod h1:a65NtrK4xZb01mf0dDNghPkN2wXgcqFQ55ADthVBgMc=
-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-20240119021347-3c541a78cdb8 h1:1BcjXuviSAKttOX7BZoVHRZZGfxqoA2+AL8tykmkdoc=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8/go.mod h1:vy1L7NybTy2F/Yv7BOh+oZBa1MACD6gzd1+DkcSkfp8=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e h1:k8HS3GsAFZnxXIW3141VsQP2+EL1XrTtOi/HDt7sdBE=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e/go.mod h1:JiykN+8W5TA4UD2ClrzQCVvcH3NcyLEVv7RwY0busrw=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0 h1:7m9PVtccb8/pvKTXMaGuyceFno1icRyC2SFH7KG7+70=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0/go.mod h1:SZ899lZYQ0maUulWbZg+SWqabHQ1wTbyk3jT8wJfyo8=
-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.2-0.20240322235341-67354bde3ba9 h1:eZ44NIjtYird3gpk28+Gn7cBVNkNxFQtAH09jro/8XY=
+github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240322235341-67354bde3ba9/go.mod h1:WjCjkd+sCB9CfYwQWCkSsmLRQkiagB2zzuTECxY9qwU=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373 h1:zlPLi+aJRwOp4Y/JlHSqKnBd038rCCUzgDSYszbmySI=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373/go.mod h1:kmBPIyrTt8Q3HuSC3qdK96uwr4edw9SYbxjWmle7la4=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b h1:NhDYzsdTOJ7OIdGVyG+6E/SfI3t7PU8mt0Z+uHY/SH4=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b/go.mod h1:sJnJBkaz58bs0m1cqzS2tL6V/g0xw7R/2P6bZBZdyEQ=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8 h1:QpVluEtKzdKMeJH6WbH4JWIGHt2Q+wXmViXFNZABDP4=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8/go.mod h1:zIZK8dTDva0QK+L+TfcWMGHLBcmWhsosh6iTDhod6zo=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5 h1:zLwHraB43DUxnbxN1l6s3X9D5207vblu1LAdQztU3SE=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5/go.mod h1:2gYoMI7y1xvamSx+NVl3VHIFhTzTT3FSejt0LV8SSa0=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f h1:uNcb1HQWuDrXNvAx+820ZtvwsyPiwO5Xfn9JDWdKST0=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f/go.mod h1:slVU+efkZe1CRHJ8VCh2gL5nCV+KBBn5+4/11I1A008=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4 h1:x1r401LcpategpYCBMTO+OQwCr9nYFUxZu4ehzG0HZw=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4/go.mod h1:713M0hit6xGMGsKLK0+sEhLzhWXWLiPYtNMJzxDVA/k=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5 h1:aPa02s24dCt+hPKnDqpKPmlEIVUxth26//USvXhBYsc=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5/go.mod h1:2f8f0mCWyn8rRHYNxLH2AaeLCQu4/XuVyoVhYWwDTJ8=
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-20240229181116-bfb2432a7a66 h1:xsU00JB9GJxEiN6tDbqgN+fT98ySdxkUwTw6CfBXscw=
-github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4=
-github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE=
-github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg=
-github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ=
-github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw=
+github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14 h1:sGlxJ7y3guP20ohhn23XDj5kPXf+sOR7iFJaWjIvao0=
+github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4=
github.com/smartcontractkit/wsrpc v0.7.2 h1:iBXzMeg7vc5YoezIQBq896y25BARw7OKbhrb6vPbtRQ=
github.com/smartcontractkit/wsrpc v0.7.2/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
diff --git a/core/services/blockhashstore/bhs_test.go b/core/services/blockhashstore/bhs_test.go
index 75424ee8059..d8031e25fb6 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, cfg.Database())
require.NoError(t, kst.Unlock(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 4c37273f161..409b607f521 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(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 673f71e3c65..19a3668a7ed 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 f5cb1badb95..6e97221ea16 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[relay.ID]evmrelay.LoopRelayAdapter, error) {
+func (r *RelayerFactory) NewEVM(ctx context.Context, config EVMFactoryConfig) (map[relay.ID]evmrelay.LOOPRelayAdapter, error) {
// TODO impl EVM loop. For now always 'fallback' to an adapter and embedded chain
- relayers := make(map[relay.ID]evmrelay.LoopRelayAdapter)
+ relayers := make(map[relay.ID]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 := relay.ID{Network: relay.EVM, ChainID: ext.Chain().ID().String()}
- chain, err2 := legacyChains.Get(relayID.ChainID)
- if err2 != nil {
- return nil, err2
- }
+ for _, chain := range legacyChains {
+ relayID := relay.ID{Network: relay.EVM, ChainID: chain.ID().String()}
+ chain := chain
relayerOpts := evmrelay.RelayerOpts{
DB: ccOpts.SqlxDB,
@@ -78,7 +74,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
@@ -152,7 +148,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
@@ -227,7 +223,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
@@ -262,12 +258,12 @@ func (c CosmosFactoryConfig) Validate() error {
return err
}
-func (r *RelayerFactory) NewCosmos(config CosmosFactoryConfig) (map[relay.ID]CosmosLoopRelayerChainer, error) {
+func (r *RelayerFactory) NewCosmos(config CosmosFactoryConfig) (map[relay.ID]LOOPRelayAdapter, error) {
err := config.Validate()
if err != nil {
return nil, fmt.Errorf("cannot create Cosmos relayer: %w", err)
}
- relayers := make(map[relay.ID]CosmosLoopRelayerChainer)
+ relayers := make(map[relay.ID]LOOPRelayAdapter)
var (
cosmosLggr = r.Logger.Named("Cosmos")
@@ -291,7 +287,7 @@ func (r *RelayerFactory) NewCosmos(config CosmosFactoryConfig) (map[relay.ID]Cos
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 d8540b4471c..76a73558458 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/pg"
"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, cfg.Database())
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, cfg.Database())
- 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.Database(), cfg.JobPipeline().MaxSuccessfulRuns())
btORM := bridges.NewORM(db, lggr, cfg.Database())
jobORM := job.NewORM(db, orm, btORM, keyStore, lggr, cfg.Database())
- 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 78af9bf6912..0d75ed49a86 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"
)
@@ -1649,12 +1648,12 @@ func createJob(t *testing.T, db *sqlx.DB, externalJobID uuid.UUID) *job.Job {
t.Helper()
var (
- config = configtest.NewGeneralConfig(t, nil)
- keyStore = cltest.NewKeyStore(t, db, config.Database())
- lggr = logger.TestLogger(t)
- pipelineORM = pipeline.NewORM(db, lggr, config.Database(), config.JobPipeline().MaxSuccessfulRuns())
- bridgeORM = bridges.NewORM(db, lggr, config.Database())
- relayExtenders = evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
+ config = configtest.NewGeneralConfig(t, nil)
+ keyStore = cltest.NewKeyStore(t, db, config.Database())
+ lggr = logger.TestLogger(t)
+ pipelineORM = pipeline.NewORM(db, lggr, config.Database(), config.JobPipeline().MaxSuccessfulRuns())
+ bridgeORM = bridges.NewORM(db, lggr, config.Database())
+ legacyChains = evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()})
)
orm := job.NewORM(db, pipelineORM, bridgeORM, keyStore, lggr, config.Database())
require.NoError(t, keyStore.OCR().Add(cltest.DefaultOCRKey))
@@ -1666,7 +1665,6 @@ func createJob(t *testing.T, db *sqlx.DB, externalJobID uuid.UUID) *job.Job {
_, bridge2 := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{}, config.Database())
_, address := cltest.MustInsertRandomKey(t, keyStore.Eth())
- legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
jb, err := ocr.ValidatedOracleSpecToml(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 afefc5b2df8..66f8d18adb9 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 *
keyStore := new(ksmocks.Master)
scopedConfig := evmtest.NewChainScopedConfig(t, gcfg)
ethKeyStore := cltest.NewKeyStore(t, db, gcfg.Database()).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 24d95cdcd6b..b53ff669538 100644
--- a/core/services/functions/listener_test.go
+++ b/core/services/functions/listener_test.go
@@ -37,7 +37,6 @@ import (
threshold_mocks "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/threshold/mocks"
"github.com/smartcontractkit/chainlink/v2/core/services/pg"
"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, cfg.Database())
- 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 a7543753d63..f1975b2741d 100644
--- a/core/services/job/helpers_test.go
+++ b/core/services/job/helpers_test.go
@@ -26,7 +26,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"
)
@@ -215,8 +214,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, pgtest.NewQConfig(true))
- 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(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 a8931796fd0..20ba460ed9d 100644
--- a/core/services/job/job_orm_test.go
+++ b/core/services/job/job_orm_test.go
@@ -40,7 +40,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/ocrbootstrap"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
"github.com/smartcontractkit/chainlink/v2/core/services/relay"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrfcommon"
"github.com/smartcontractkit/chainlink/v2/core/services/webhook"
"github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs"
@@ -339,8 +338,7 @@ func TestORM_DeleteJob_DeletesAssociatedRecords(t *testing.T) {
_, bridge2 := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{}, config.Database())
_, 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(legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
TransmitterAddress: address.Hex(),
DS1BridgeName: bridge.Name.String(),
@@ -741,8 +739,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(legacyChains, spec.Toml())
require.NoError(t, err)
@@ -979,8 +976,7 @@ func Test_FindJobs(t *testing.T) {
_, bridge2 := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{}, config.Database())
_, 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(legacyChains,
testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
JobID: uuid.New().String(),
@@ -1063,8 +1059,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(legacyChains,
testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{
JobID: externalJobID.String(),
@@ -1280,8 +1275,7 @@ func Test_FindPipelineRuns(t *testing.T) {
pipelineORM := pipeline.NewORM(db, logger.TestLogger(t), config.Database(), config.JobPipeline().MaxSuccessfulRuns())
bridgesORM := bridges.NewORM(db, logger.TestLogger(t), config.Database())
- 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, config.Database())
_, bridge := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{}, config.Database())
@@ -1341,8 +1335,7 @@ func Test_PipelineRunsByJobID(t *testing.T) {
pipelineORM := pipeline.NewORM(db, logger.TestLogger(t), config.Database(), config.JobPipeline().MaxSuccessfulRuns())
bridgesORM := bridges.NewORM(db, logger.TestLogger(t), config.Database())
- 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, config.Database())
_, bridge := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{}, config.Database())
@@ -1402,8 +1395,7 @@ func Test_FindPipelineRunIDsByJobID(t *testing.T) {
lggr := logger.TestLogger(t)
pipelineORM := pipeline.NewORM(db, logger.TestLogger(t), config.Database(), config.JobPipeline().MaxSuccessfulRuns())
bridgesORM := bridges.NewORM(db, lggr, config.Database())
- 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, config.Database())
_, address := cltest.MustInsertRandomKey(t, keyStore.Eth())
@@ -1510,8 +1502,7 @@ func Test_FindPipelineRunsByIDs(t *testing.T) {
pipelineORM := pipeline.NewORM(db, logger.TestLogger(t), config.Database(), config.JobPipeline().MaxSuccessfulRuns())
bridgesORM := bridges.NewORM(db, logger.TestLogger(t), config.Database())
- 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, config.Database())
_, bridge := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{}, config.Database())
@@ -1682,8 +1673,7 @@ func Test_CountPipelineRunsByJobID(t *testing.T) {
pipelineORM := pipeline.NewORM(db, logger.TestLogger(t), config.Database(), config.JobPipeline().MaxSuccessfulRuns())
bridgesORM := bridges.NewORM(db, logger.TestLogger(t), config.Database())
- 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, config.Database())
_, bridge := cltest.MustCreateBridge(t, db, cltest.BridgeOpts{}, config.Database())
diff --git a/core/services/job/job_pipeline_orm_integration_test.go b/core/services/job/job_pipeline_orm_integration_test.go
index dd3062fa14b..55f8819712c 100644
--- a/core/services/job/job_pipeline_orm_integration_test.go
+++ b/core/services/job/job_pipeline_orm_integration_test.go
@@ -19,7 +19,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"
)
@@ -153,8 +152,7 @@ func TestPipelineORM_Integration(t *testing.T) {
clearJobsDb(t, db)
orm := pipeline.NewORM(db, logger.TestLogger(t), cfg.Database(), cfg.JobPipeline().MaxSuccessfulRuns())
btORM := bridges.NewORM(db, logger.TestLogger(t), cfg.Database())
- 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, cfg.Database())
diff --git a/core/services/job/orm.go b/core/services/job/orm.go
index 6c8533d1dee..4aeec128733 100644
--- a/core/services/job/orm.go
+++ b/core/services/job/orm.go
@@ -792,6 +792,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) {
ctx, cancel := context.WithTimeout(ctx, o.cfg.DefaultQueryTimeout())
defer cancel()
diff --git a/core/services/job/runner_integration_test.go b/core/services/job/runner_integration_test.go
index 8c631984680..e795727ebc3 100644
--- a/core/services/job/runner_integration_test.go
+++ b/core/services/job/runner_integration_test.go
@@ -43,7 +43,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"
@@ -83,8 +82,7 @@ func TestRunner(t *testing.T) {
require.NoError(t, pipelineORM.Start(ctx))
t.Cleanup(func() { assert.NoError(t, pipelineORM.Close()) })
btORM := bridges.NewORM(db, logger.TestLogger(t), config.Database())
- 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)
@@ -550,14 +548,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()
require.NoError(t, err)
s := fmt.Sprintf(minimalNonBootstrapTemplate, cltest.NewEIP55Address(), transmitterAddress.Hex(), kb.ID(), "http://blah.com", "")
- jb, err := ocr.ValidatedOracleSpecToml(legacyChains, s)
+ jb, err := ocr.ValidatedOracleSpecToml(legacyChains2, s)
require.NoError(t, err)
err = toml.Unmarshal([]byte(s), &jb)
require.NoError(t, err)
@@ -577,7 +574,7 @@ answer1 [type=median index=0];
nil,
pw,
monitoringEndpoint,
- legacyChains,
+ legacyChains2,
lggr,
config.Database(),
servicetest.Run(t, mailboxtest.NewMonitor(t)),
diff --git a/core/services/job/spawner_test.go b/core/services/job/spawner_test.go
index 71357a675c3..f3a166ace3a 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/ocr2"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
"github.com/smartcontractkit/chainlink/v2/core/services/relay"
- evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
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 relay.ID) (loop.Relayer, error) {
- return evmrelayer.NewLoopRelayServerAdapter(g.r, g.e), nil
+ return evmrelayer.NewLOOPRelayAdapter(g.r), nil
}
func TestSpawner_CreateJobDeleteJob(t *testing.T) {
@@ -96,8 +94,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.Database(), config.JobPipeline().MaxSuccessfulRuns()), bridges.NewORM(db, lggr, config.Database()), keyStore, config.Database())
@@ -280,9 +277,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{
@@ -293,7 +289,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 19ba2eedbbb..f57ac436d82 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
@@ -45,8 +44,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()})
ch := evmtest.MustGetDefaultChain(t, legacyChains)
jpv2 := cltest.NewJobPipelineV2(t, cfg.WebServer(), cfg.JobPipeline(), cfg.Database(), 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 8299f47c853..fb0f4a5d7c1 100644
--- a/core/services/keeper/upkeep_executer_test.go
+++ b/core/services/keeper/upkeep_executer_test.go
@@ -36,7 +36,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 {
@@ -80,8 +79,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(), cfg.Database(), legacyChains, db, keyStore, nil, nil)
ch := evmtest.MustGetDefaultChain(t, legacyChains)
orm := keeper.NewORM(db, logger.TestLogger(t), ch.Config().Database())
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 3da0c9cbfd6..0d7104e1a81 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"
)
@@ -44,9 +43,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 36e8a882734..5a3af1fb17a 100644
--- a/core/services/ocr2/plugins/functions/reporting.go
+++ b/core/services/ocr2/plugins/functions/reporting.go
@@ -92,7 +92,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 5b9f59ccb23..0d8767a5b3e 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 e4ac5dd7c5c..f5e582e8257 100644
--- a/core/services/ocr2/plugins/mercury/integration_test.go
+++ b/core/services/ocr2/plugins/mercury/integration_test.go
@@ -132,6 +132,7 @@ func TestIntegration_MercuryV1(t *testing.T) {
}
func integration_MercuryV1(t *testing.T) {
+ ctx := testutils.Context(t)
var logObservers []*observer.ObservedLogs
t.Cleanup(func() {
detectPanicLogs(t, logObservers)
@@ -159,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)
}
@@ -273,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)
@@ -342,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 {
@@ -369,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)
@@ -404,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
@@ -433,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)
@@ -474,6 +477,7 @@ func TestIntegration_MercuryV2(t *testing.T) {
}
func integration_MercuryV2(t *testing.T) {
+ ctx := testutils.Context(t)
var logObservers []*observer.ObservedLogs
t.Cleanup(func() {
detectPanicLogs(t, logObservers)
@@ -512,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)
}
@@ -623,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)
@@ -748,6 +752,7 @@ func TestIntegration_MercuryV3(t *testing.T) {
}
func integration_MercuryV3(t *testing.T) {
+ ctx := testutils.Context(t)
var logObservers []*observer.ObservedLogs
t.Cleanup(func() {
detectPanicLogs(t, logObservers)
@@ -805,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)
}
@@ -914,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 5b4aaef7e88..e238bd5eb6a 100644
--- a/core/services/pipeline/runner_test.go
+++ b/core/services/pipeline/runner_test.go
@@ -14,14 +14,13 @@ 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"
"github.com/stretchr/testify/require"
"gopkg.in/guregu/null.v4"
- 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,15 +35,12 @@ 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) {
lggr := logger.TestLogger(t)
ethKeyStore := cltest.NewKeyStore(t, db, cfg.Database()).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)
q := pg.NewQ(db, lggr, cfg.Database())
@@ -480,8 +476,7 @@ func Test_PipelineRunner_HandleFaultsPersistRun(t *testing.T) {
Return(nil)
cfg := configtest.NewTestGeneralConfig(t)
ethKeyStore := cltest.NewKeyStore(t, db, cfg.Database()).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)
@@ -948,8 +943,7 @@ func Test_PipelineRunner_ExecuteRun(t *testing.T) {
db := pgtest.NewSqlxDB(t)
cfg := configtest.NewTestGeneralConfig(t)
ethKeyStore := cltest.NewKeyStore(t, db, cfg.Database()).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 ddddb82aaed..52b51685ae2 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"
@@ -144,13 +145,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
@@ -159,16 +159,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))
@@ -190,9 +206,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()
@@ -258,11 +272,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
{
@@ -319,21 +329,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()
@@ -557,10 +560,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()
@@ -629,7 +629,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.db, r.chain, lggr.Named("OCR2KeeperRelayer"), r.ks.Eth(), r.pgCfg)
diff --git a/core/services/relay/evm/functions/contract_transmitter.go b/core/services/relay/evm/functions/contract_transmitter.go
index 051b1f0bef9..ed3aa7786f3 100644
--- a/core/services/relay/evm/functions/contract_transmitter.go
+++ b/core/services/relay/evm/functions/contract_transmitter.go
@@ -239,7 +239,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/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 5e7335af06d..00000000000
--- a/core/services/relay/evm/mocks/loop_relay_adapter.go
+++ /dev/null
@@ -1,325 +0,0 @@
-// Code generated by mockery v2.38.0. 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 8a62281c9e2..575caa3cb5b 100644
--- a/core/services/relay/evm/ocr2keeper.go
+++ b/core/services/relay/evm/ocr2keeper.go
@@ -178,8 +178,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 af15461aee9..fc108a1043b 100644
--- a/core/services/relay/evm/relayer_extender_test.go
+++ b/core/services/relay/evm/relayer_extender_test.go
@@ -34,31 +34,31 @@ func TestChainRelayExtenders(t *testing.T) {
kst := cltest.NewKeyStore(t, db, cfg.Database())
require.NoError(t, kst.Unlock(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 db8cb03d431..efc82f54705 100644
--- a/core/services/relay/relay.go
+++ b/core/services/relay/relay.go
@@ -70,15 +70,17 @@ func (i *ID) UnmarshalString(s string) error {
return nil
}
-// ServerAdapter extends [loop.RelayerAdapter] by overriding NewPluginProvider to dispatches calls according to `RelayArgs.ProviderType`.
+var _ loop.Relayer = (*ServerAdapter)(nil)
+
+// ServerAdapter extends [types.Relayer] to implement [loop.Relayer] with 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) {
@@ -92,7 +94,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 dc12b769609..1c76e105dbd 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"
@@ -152,30 +151,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
@@ -183,7 +178,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
@@ -222,17 +217,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 adf54428b4e..5f6e9558e74 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"
@@ -87,8 +86,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, cfg.Database())
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(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 1a7c15a2508..eab3a164107 100644
--- a/core/services/vrf/v2/integration_v2_test.go
+++ b/core/services/vrf/v2/integration_v2_test.go
@@ -75,7 +75,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/vrfkey"
"github.com/smartcontractkit/chainlink/v2/core/services/pg"
"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"
@@ -2051,8 +2050,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 61c8d1dc84d..7613c15a328 100644
--- a/core/web/chains_controller.go
+++ b/core/web/chains_controller.go
@@ -59,7 +59,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)
@@ -80,7 +80,7 @@ func (cc *chainsController[R]) Show(c *gin.Context) {
return
}
relayID := relay.ID{Network: cc.network, ChainID: c.Param("ID")}
- chain, err := cc.chainStats.ChainStatus(c, relayID)
+ chain, err := cc.chainStats.ChainStatus(c.Request.Context(), relayID)
if err != nil {
jsonAPIError(c, http.StatusBadRequest, err)
return
diff --git a/core/web/jobs_controller.go b/core/web/jobs_controller.go
index 6296c6a016f..8cea0587ae5 100644
--- a/core/web/jobs_controller.go
+++ b/core/web/jobs_controller.go
@@ -73,7 +73,7 @@ func (jc *JobsController) Show(c *gin.Context) {
jobSpec, err = jc.App.JobORM().FindJobByExternalJobID(externalJobID, pg.WithParentCtx(c.Request.Context()))
} else if pErr = jobSpec.SetID(c.Param("ID")); pErr == nil {
// Find a job by job ID
- jobSpec, err = jc.App.JobORM().FindJobTx(c, jobSpec.ID)
+ jobSpec, err = jc.App.JobORM().FindJobTx(c.Request.Context(), jobSpec.ID)
} else {
jsonAPIError(c, http.StatusUnprocessableEntity, pErr)
return
diff --git a/core/web/nodes_controller.go b/core/web/nodes_controller.go
index 04c4693983f..38a233ebff9 100644
--- a/core/web/nodes_controller.go
+++ b/core/web/nodes_controller.go
@@ -69,9 +69,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
@@ -81,7 +82,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 70218080a87..6a640377e1c 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/core/web/webauthn_controller.go b/core/web/webauthn_controller.go
index 41c8f268ad4..e4fdd85b579 100644
--- a/core/web/webauthn_controller.go
+++ b/core/web/webauthn_controller.go
@@ -29,74 +29,74 @@ func NewWebAuthnController(app chainlink.Application) WebAuthnController {
}
}
-func (c *WebAuthnController) BeginRegistration(ctx *gin.Context) {
- user, ok := auth.GetAuthenticatedUser(ctx)
+func (w *WebAuthnController) BeginRegistration(c *gin.Context) {
+ user, ok := auth.GetAuthenticatedUser(c)
if !ok {
- jsonAPIError(ctx, http.StatusInternalServerError, errors.New("failed to obtain current user from context"))
+ jsonAPIError(c, http.StatusInternalServerError, errors.New("failed to obtain current user from context"))
return
}
- orm := c.App.AuthenticationProvider()
+ orm := w.App.AuthenticationProvider()
uwas, err := orm.GetUserWebAuthn(user.Email)
if err != nil {
- c.App.GetLogger().Errorf("failed to obtain current user MFA tokens: error in GetUserWebAuthn: %+v", err)
- jsonAPIError(ctx, http.StatusInternalServerError, errors.New("Unable to register key"))
+ w.App.GetLogger().Errorf("failed to obtain current user MFA tokens: error in GetUserWebAuthn: %+v", err)
+ jsonAPIError(c, http.StatusInternalServerError, errors.New("Unable to register key"))
return
}
- webAuthnConfig := c.App.GetWebAuthnConfiguration()
+ webAuthnConfig := w.App.GetWebAuthnConfiguration()
- options, err := c.inProgressRegistrationsStore.BeginWebAuthnRegistration(*user, uwas, webAuthnConfig)
+ options, err := w.inProgressRegistrationsStore.BeginWebAuthnRegistration(*user, uwas, webAuthnConfig)
if err != nil {
- c.App.GetLogger().Errorf("error in BeginWebAuthnRegistration: %s", err)
- jsonAPIError(ctx, http.StatusInternalServerError, errors.New("internal Server Error"))
+ w.App.GetLogger().Errorf("error in BeginWebAuthnRegistration: %s", err)
+ jsonAPIError(c, http.StatusInternalServerError, errors.New("internal Server Error"))
return
}
optionsp := presenters.NewRegistrationSettings(*options)
- jsonAPIResponse(ctx, optionsp, "settings")
+ jsonAPIResponse(c, optionsp, "settings")
}
-func (c *WebAuthnController) FinishRegistration(ctx *gin.Context) {
- user, ok := auth.GetAuthenticatedUser(ctx)
+func (w *WebAuthnController) FinishRegistration(c *gin.Context) {
+ user, ok := auth.GetAuthenticatedUser(c)
if !ok {
- logger.Sugared(c.App.GetLogger()).AssumptionViolationf("failed to obtain current user from context")
- jsonAPIError(ctx, http.StatusInternalServerError, errors.New("Unable to register key"))
+ logger.Sugared(w.App.GetLogger()).AssumptionViolationf("failed to obtain current user from context")
+ jsonAPIError(c, http.StatusInternalServerError, errors.New("Unable to register key"))
return
}
- orm := c.App.AuthenticationProvider()
+ orm := w.App.AuthenticationProvider()
uwas, err := orm.GetUserWebAuthn(user.Email)
if err != nil {
- c.App.GetLogger().Errorf("failed to obtain current user MFA tokens: error in GetUserWebAuthn: %s", err)
- jsonAPIError(ctx, http.StatusInternalServerError, errors.New("Unable to register key"))
+ w.App.GetLogger().Errorf("failed to obtain current user MFA tokens: error in GetUserWebAuthn: %s", err)
+ jsonAPIError(c, http.StatusInternalServerError, errors.New("Unable to register key"))
return
}
- webAuthnConfig := c.App.GetWebAuthnConfiguration()
+ webAuthnConfig := w.App.GetWebAuthnConfiguration()
- credential, err := c.inProgressRegistrationsStore.FinishWebAuthnRegistration(*user, uwas, ctx.Request, webAuthnConfig)
+ credential, err := w.inProgressRegistrationsStore.FinishWebAuthnRegistration(*user, uwas, c.Request, webAuthnConfig)
if err != nil {
- c.App.GetLogger().Errorf("error in FinishWebAuthnRegistration: %s", err)
- jsonAPIError(ctx, http.StatusBadRequest, errors.New("registration was unsuccessful"))
+ w.App.GetLogger().Errorf("error in FinishWebAuthnRegistration: %s", err)
+ jsonAPIError(c, http.StatusBadRequest, errors.New("registration was unsuccessful"))
return
}
- if sessions.AddCredentialToUser(c.App.AuthenticationProvider(), user.Email, credential) != nil {
- c.App.GetLogger().Errorf("Could not save WebAuthn credential to DB for user: %s", user.Email)
- jsonAPIError(ctx, http.StatusInternalServerError, errors.New("internal Server Error"))
+ if sessions.AddCredentialToUser(w.App.AuthenticationProvider(), user.Email, credential) != nil {
+ w.App.GetLogger().Errorf("Could not save WebAuthn credential to DB for user: %s", user.Email)
+ jsonAPIError(c, http.StatusInternalServerError, errors.New("internal Server Error"))
return
}
// Forward registered credentials for audit logs
credj, err := json.Marshal(credential)
if err != nil {
- c.App.GetLogger().Errorf("error in Marshal credentials: %s", err)
- jsonAPIError(ctx, http.StatusBadRequest, errors.New("registration was unsuccessful"))
+ w.App.GetLogger().Errorf("error in Marshal credentials: %s", err)
+ jsonAPIError(c, http.StatusBadRequest, errors.New("registration was unsuccessful"))
return
}
- c.App.GetAuditLogger().Audit(audit.Auth2FAEnrolled, map[string]interface{}{"email": user.Email, "credential": string(credj)})
+ w.App.GetAuditLogger().Audit(audit.Auth2FAEnrolled, map[string]interface{}{"email": user.Email, "credential": string(credj)})
- ctx.String(http.StatusOK, "{}")
+ c.String(http.StatusOK, "{}")
}
diff --git a/go.md b/go.md
index 497f87d77b5..77586a70802 100644
--- a/go.md
+++ b/go.md
@@ -60,7 +60,6 @@ flowchart LR
chainlink-feeds --> libocr
chainlink-solana --> chainlink-common
chainlink-solana --> libocr
- chainlink-starknet/relayer --> caigo
chainlink-starknet/relayer --> chainlink-common
chainlink-starknet/relayer --> libocr
chainlink-vrf --> libocr
diff --git a/go.mod b/go.mod
index 6031fb6b686..27cd2180d0c 100644
--- a/go.mod
+++ b/go.mod
@@ -2,6 +2,10 @@ module github.com/smartcontractkit/chainlink/v2
go 1.21.7
+replace github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin => github.com/jmank88/tdh2/go/ocr2/decryptionplugin v0.0.0-20240323111842-07045992ea06
+
+replace github.com/smartcontractkit/tdh2/go/tdh2 => github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240323111842-07045992ea06
+
require (
github.com/Depado/ginprom v1.8.0
github.com/Masterminds/semver/v3 v3.2.1
@@ -70,15 +74,15 @@ require (
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704
github.com/smartcontractkit/chain-selectors v1.0.10
- github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35
- github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac
- github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0
- github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868
- github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66
+ github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240322235341-67354bde3ba9
+ github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373
+ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5
+ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4
+ github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5
+ github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14
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/wsrpc v0.7.2
@@ -130,6 +134,8 @@ require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/Masterminds/goutils v1.1.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/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect
@@ -294,6 +300,7 @@ require (
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 // indirect
+ github.com/test-go/testify v1.1.4 // indirect
github.com/tidwall/btree v1.6.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
diff --git a/go.sum b/go.sum
index 67edc6ee6eb..f0681a0319c 100644
--- a/go.sum
+++ b/go.sum
@@ -113,6 +113,10 @@ github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj
github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
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/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=
@@ -826,6 +830,10 @@ 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/tdh2/go/ocr2/decryptionplugin v0.0.0-20240323111842-07045992ea06 h1:7XRomrHVbev1xeOT7yzt2o7T2GppHj7JGZtfMO/n8u0=
+github.com/jmank88/tdh2/go/ocr2/decryptionplugin v0.0.0-20240323111842-07045992ea06/go.mod h1:ssks2CkbqIYL2Db8wP1DLqenXuFpdaJbvqARnnzj2zA=
+github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240323111842-07045992ea06 h1:b8w7JLmkg3blq5H7Gbw0SLMgPx9rg9sEm+bP2NNRd/c=
+github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240323111842-07045992ea06/go.mod h1:svr6lBANcspshEK48INy7ADxLz2iGCbAJi6sEv6MtaA=
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=
@@ -1172,32 +1180,28 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/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.2-0.20240311111125-22812a072c35 h1:GNhRKD3izyzAoGMXDvVUAwEuzz4Atdj3U3RH7eak5Is=
-github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35/go.mod h1:2I0dWdYdK6jHPnSYYy7Y7Xp7L0YTnJ3KZtkhLQflsTU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac h1:EjQDAPZu4N7s554uXzA7QOLZz+JnvjbBwSumExmzF0k=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac/go.mod h1://xWphjmC6GWJtT8l86J2VpnG21xNwFCb0thzz4ItEk=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 h1:I326nw5GwHQHsLKHwtu5Sb9EBLylC8CfUd7BFAS0jtg=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8/go.mod h1:a65NtrK4xZb01mf0dDNghPkN2wXgcqFQ55ADthVBgMc=
-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-20240119021347-3c541a78cdb8 h1:1BcjXuviSAKttOX7BZoVHRZZGfxqoA2+AL8tykmkdoc=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8/go.mod h1:vy1L7NybTy2F/Yv7BOh+oZBa1MACD6gzd1+DkcSkfp8=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e h1:k8HS3GsAFZnxXIW3141VsQP2+EL1XrTtOi/HDt7sdBE=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e/go.mod h1:JiykN+8W5TA4UD2ClrzQCVvcH3NcyLEVv7RwY0busrw=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0 h1:7m9PVtccb8/pvKTXMaGuyceFno1icRyC2SFH7KG7+70=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0/go.mod h1:SZ899lZYQ0maUulWbZg+SWqabHQ1wTbyk3jT8wJfyo8=
-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.2-0.20240322235341-67354bde3ba9 h1:eZ44NIjtYird3gpk28+Gn7cBVNkNxFQtAH09jro/8XY=
+github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240322235341-67354bde3ba9/go.mod h1:WjCjkd+sCB9CfYwQWCkSsmLRQkiagB2zzuTECxY9qwU=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373 h1:zlPLi+aJRwOp4Y/JlHSqKnBd038rCCUzgDSYszbmySI=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373/go.mod h1:kmBPIyrTt8Q3HuSC3qdK96uwr4edw9SYbxjWmle7la4=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b h1:NhDYzsdTOJ7OIdGVyG+6E/SfI3t7PU8mt0Z+uHY/SH4=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b/go.mod h1:sJnJBkaz58bs0m1cqzS2tL6V/g0xw7R/2P6bZBZdyEQ=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8 h1:QpVluEtKzdKMeJH6WbH4JWIGHt2Q+wXmViXFNZABDP4=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8/go.mod h1:zIZK8dTDva0QK+L+TfcWMGHLBcmWhsosh6iTDhod6zo=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5 h1:zLwHraB43DUxnbxN1l6s3X9D5207vblu1LAdQztU3SE=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5/go.mod h1:2gYoMI7y1xvamSx+NVl3VHIFhTzTT3FSejt0LV8SSa0=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f h1:uNcb1HQWuDrXNvAx+820ZtvwsyPiwO5Xfn9JDWdKST0=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f/go.mod h1:slVU+efkZe1CRHJ8VCh2gL5nCV+KBBn5+4/11I1A008=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4 h1:x1r401LcpategpYCBMTO+OQwCr9nYFUxZu4ehzG0HZw=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4/go.mod h1:713M0hit6xGMGsKLK0+sEhLzhWXWLiPYtNMJzxDVA/k=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5 h1:aPa02s24dCt+hPKnDqpKPmlEIVUxth26//USvXhBYsc=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5/go.mod h1:2f8f0mCWyn8rRHYNxLH2AaeLCQu4/XuVyoVhYWwDTJ8=
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-20240229181116-bfb2432a7a66 h1:xsU00JB9GJxEiN6tDbqgN+fT98ySdxkUwTw6CfBXscw=
-github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4=
-github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE=
-github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg=
-github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ=
-github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw=
+github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14 h1:sGlxJ7y3guP20ohhn23XDj5kPXf+sOR7iFJaWjIvao0=
+github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4=
github.com/smartcontractkit/wsrpc v0.7.2 h1:iBXzMeg7vc5YoezIQBq896y25BARw7OKbhrb6vPbtRQ=
github.com/smartcontractkit/wsrpc v0.7.2/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
diff --git a/integration-tests/go.mod b/integration-tests/go.mod
index 67cd30c9b98..c6709fb9122 100644
--- a/integration-tests/go.mod
+++ b/integration-tests/go.mod
@@ -5,6 +5,10 @@ go 1.21.7
// Make sure we're working with the latest chainlink libs
replace github.com/smartcontractkit/chainlink/v2 => ../
+replace github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin => github.com/jmank88/tdh2/go/ocr2/decryptionplugin v0.0.0-20240323111842-07045992ea06
+
+replace github.com/smartcontractkit/tdh2/go/tdh2 => github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240323111842-07045992ea06
+
require (
github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df
github.com/cli/go-gh/v2 v2.0.0
@@ -22,12 +26,12 @@ require (
github.com/scylladb/go-reflectx v1.0.1
github.com/segmentio/ksuid v1.0.4
github.com/slack-go/slack v0.12.2
- github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35
- github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac
+ github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240322235341-67354bde3ba9
+ github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373
github.com/smartcontractkit/chainlink-testing-framework v1.27.3
- github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868
+ github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
- github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66
+ github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14
github.com/smartcontractkit/seth v0.1.2
github.com/smartcontractkit/wasp v0.4.5
github.com/spf13/cobra v1.8.0
@@ -81,6 +85,8 @@ require (
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
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/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/XSAM/otelsql v0.27.0 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
@@ -340,7 +346,6 @@ require (
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
- github.com/opencontainers/runc v1.1.7 // indirect
github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e // indirect
github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
@@ -376,11 +381,11 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect
github.com/smartcontractkit/chain-selectors v1.0.10 // indirect
- github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 // indirect
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 // indirect
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e // indirect
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0 // indirect
+ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b // indirect
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8 // indirect
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5 // indirect
+ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f // indirect
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4 // 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/wsrpc v0.7.2 // indirect
diff --git a/integration-tests/go.sum b/integration-tests/go.sum
index ffddab3c37d..1b09430211b 100644
--- a/integration-tests/go.sum
+++ b/integration-tests/go.sum
@@ -148,6 +148,10 @@ 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/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8=
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/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=
@@ -1063,6 +1067,10 @@ 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/tdh2/go/ocr2/decryptionplugin v0.0.0-20240323111842-07045992ea06 h1:7XRomrHVbev1xeOT7yzt2o7T2GppHj7JGZtfMO/n8u0=
+github.com/jmank88/tdh2/go/ocr2/decryptionplugin v0.0.0-20240323111842-07045992ea06/go.mod h1:ssks2CkbqIYL2Db8wP1DLqenXuFpdaJbvqARnnzj2zA=
+github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240323111842-07045992ea06 h1:b8w7JLmkg3blq5H7Gbw0SLMgPx9rg9sEm+bP2NNRd/c=
+github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240323111842-07045992ea06/go.mod h1:svr6lBANcspshEK48INy7ADxLz2iGCbAJi6sEv6MtaA=
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=
@@ -1333,8 +1341,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=
@@ -1517,36 +1525,32 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/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.2-0.20240311111125-22812a072c35 h1:GNhRKD3izyzAoGMXDvVUAwEuzz4Atdj3U3RH7eak5Is=
-github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35/go.mod h1:2I0dWdYdK6jHPnSYYy7Y7Xp7L0YTnJ3KZtkhLQflsTU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac h1:EjQDAPZu4N7s554uXzA7QOLZz+JnvjbBwSumExmzF0k=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac/go.mod h1://xWphjmC6GWJtT8l86J2VpnG21xNwFCb0thzz4ItEk=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 h1:I326nw5GwHQHsLKHwtu5Sb9EBLylC8CfUd7BFAS0jtg=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8/go.mod h1:a65NtrK4xZb01mf0dDNghPkN2wXgcqFQ55ADthVBgMc=
-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-20240119021347-3c541a78cdb8 h1:1BcjXuviSAKttOX7BZoVHRZZGfxqoA2+AL8tykmkdoc=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8/go.mod h1:vy1L7NybTy2F/Yv7BOh+oZBa1MACD6gzd1+DkcSkfp8=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e h1:k8HS3GsAFZnxXIW3141VsQP2+EL1XrTtOi/HDt7sdBE=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e/go.mod h1:JiykN+8W5TA4UD2ClrzQCVvcH3NcyLEVv7RwY0busrw=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0 h1:7m9PVtccb8/pvKTXMaGuyceFno1icRyC2SFH7KG7+70=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0/go.mod h1:SZ899lZYQ0maUulWbZg+SWqabHQ1wTbyk3jT8wJfyo8=
+github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240322235341-67354bde3ba9 h1:eZ44NIjtYird3gpk28+Gn7cBVNkNxFQtAH09jro/8XY=
+github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240322235341-67354bde3ba9/go.mod h1:WjCjkd+sCB9CfYwQWCkSsmLRQkiagB2zzuTECxY9qwU=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373 h1:zlPLi+aJRwOp4Y/JlHSqKnBd038rCCUzgDSYszbmySI=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373/go.mod h1:kmBPIyrTt8Q3HuSC3qdK96uwr4edw9SYbxjWmle7la4=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b h1:NhDYzsdTOJ7OIdGVyG+6E/SfI3t7PU8mt0Z+uHY/SH4=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b/go.mod h1:sJnJBkaz58bs0m1cqzS2tL6V/g0xw7R/2P6bZBZdyEQ=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8 h1:QpVluEtKzdKMeJH6WbH4JWIGHt2Q+wXmViXFNZABDP4=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8/go.mod h1:zIZK8dTDva0QK+L+TfcWMGHLBcmWhsosh6iTDhod6zo=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5 h1:zLwHraB43DUxnbxN1l6s3X9D5207vblu1LAdQztU3SE=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5/go.mod h1:2gYoMI7y1xvamSx+NVl3VHIFhTzTT3FSejt0LV8SSa0=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f h1:uNcb1HQWuDrXNvAx+820ZtvwsyPiwO5Xfn9JDWdKST0=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f/go.mod h1:slVU+efkZe1CRHJ8VCh2gL5nCV+KBBn5+4/11I1A008=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4 h1:x1r401LcpategpYCBMTO+OQwCr9nYFUxZu4ehzG0HZw=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4/go.mod h1:713M0hit6xGMGsKLK0+sEhLzhWXWLiPYtNMJzxDVA/k=
github.com/smartcontractkit/chainlink-testing-framework v1.27.3 h1:rUvTtLXPcxI5s3AttdpWeWTNXAprrjyyBvBEvYZp994=
github.com/smartcontractkit/chainlink-testing-framework v1.27.3/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-20240323112415-be2b2ccbdfd5 h1:aPa02s24dCt+hPKnDqpKPmlEIVUxth26//USvXhBYsc=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5/go.mod h1:2f8f0mCWyn8rRHYNxLH2AaeLCQu4/XuVyoVhYWwDTJ8=
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-20240229181116-bfb2432a7a66 h1:xsU00JB9GJxEiN6tDbqgN+fT98ySdxkUwTw6CfBXscw=
-github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4=
+github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14 h1:sGlxJ7y3guP20ohhn23XDj5kPXf+sOR7iFJaWjIvao0=
+github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4=
github.com/smartcontractkit/seth v0.1.2 h1:ImXJmniuq6yWB6b3eezjV+lkYb1GfQuaJkwRvrCfTKQ=
github.com/smartcontractkit/seth v0.1.2/go.mod h1:aOaGwrIVFG/MYaLSj9UUMyE5QJnYQoAgnxm5cKfT9Ng=
-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/wasp v0.4.5 h1:pgiXwBci2m15eo33AzspzhpNG/gxg+8QGxl+I5LpfsQ=
github.com/smartcontractkit/wasp v0.4.5/go.mod h1:eVhBVLbVv0qORUlN7aR5C4aTN/lTYO3KnN1erO4ROOI=
github.com/smartcontractkit/wsrpc v0.7.2 h1:iBXzMeg7vc5YoezIQBq896y25BARw7OKbhrb6vPbtRQ=
diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod
index a85da1326bf..65e76886ae8 100644
--- a/integration-tests/load/go.mod
+++ b/integration-tests/load/go.mod
@@ -14,12 +14,12 @@ require (
github.com/pelletier/go-toml/v2 v2.1.1
github.com/rs/zerolog v1.30.0
github.com/slack-go/slack v0.12.2
- github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35
- github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac
+ github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240322235341-67354bde3ba9
+ github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373
github.com/smartcontractkit/chainlink-testing-framework v1.27.3
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-20240229181116-bfb2432a7a66
+ github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14
github.com/smartcontractkit/seth v0.1.2
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1
github.com/smartcontractkit/wasp v0.4.6
@@ -58,6 +58,8 @@ require (
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
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/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/XSAM/otelsql v0.27.0 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
@@ -364,13 +366,13 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect
github.com/smartcontractkit/chain-selectors v1.0.10 // indirect
- github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 // indirect
- github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect
- github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 // indirect
- github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e // indirect
- github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0 // indirect
+ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b // indirect
+ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8 // indirect
+ github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5 // indirect
+ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f // indirect
+ github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4 // 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/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5 // indirect
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
github.com/smartcontractkit/wsrpc v0.7.2 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum
index c209a1ae48e..791f870d3d1 100644
--- a/integration-tests/load/go.sum
+++ b/integration-tests/load/go.sum
@@ -148,6 +148,10 @@ 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/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8=
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/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=
@@ -1500,32 +1504,32 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/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.2-0.20240311111125-22812a072c35 h1:GNhRKD3izyzAoGMXDvVUAwEuzz4Atdj3U3RH7eak5Is=
-github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35/go.mod h1:2I0dWdYdK6jHPnSYYy7Y7Xp7L0YTnJ3KZtkhLQflsTU=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac h1:EjQDAPZu4N7s554uXzA7QOLZz+JnvjbBwSumExmzF0k=
-github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324144450-2bc22a6738ac/go.mod h1://xWphjmC6GWJtT8l86J2VpnG21xNwFCb0thzz4ItEk=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 h1:I326nw5GwHQHsLKHwtu5Sb9EBLylC8CfUd7BFAS0jtg=
-github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8/go.mod h1:a65NtrK4xZb01mf0dDNghPkN2wXgcqFQ55ADthVBgMc=
-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-20240119021347-3c541a78cdb8 h1:1BcjXuviSAKttOX7BZoVHRZZGfxqoA2+AL8tykmkdoc=
-github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8/go.mod h1:vy1L7NybTy2F/Yv7BOh+oZBa1MACD6gzd1+DkcSkfp8=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e h1:k8HS3GsAFZnxXIW3141VsQP2+EL1XrTtOi/HDt7sdBE=
-github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e/go.mod h1:JiykN+8W5TA4UD2ClrzQCVvcH3NcyLEVv7RwY0busrw=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0 h1:7m9PVtccb8/pvKTXMaGuyceFno1icRyC2SFH7KG7+70=
-github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0/go.mod h1:SZ899lZYQ0maUulWbZg+SWqabHQ1wTbyk3jT8wJfyo8=
+github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240322235341-67354bde3ba9 h1:eZ44NIjtYird3gpk28+Gn7cBVNkNxFQtAH09jro/8XY=
+github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240322235341-67354bde3ba9/go.mod h1:WjCjkd+sCB9CfYwQWCkSsmLRQkiagB2zzuTECxY9qwU=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373 h1:zlPLi+aJRwOp4Y/JlHSqKnBd038rCCUzgDSYszbmySI=
+github.com/smartcontractkit/chainlink-common v0.1.7-0.20240324182820-92b84cfb6373/go.mod h1:kmBPIyrTt8Q3HuSC3qdK96uwr4edw9SYbxjWmle7la4=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b h1:NhDYzsdTOJ7OIdGVyG+6E/SfI3t7PU8mt0Z+uHY/SH4=
+github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240325014258-b275e705179b/go.mod h1:sJnJBkaz58bs0m1cqzS2tL6V/g0xw7R/2P6bZBZdyEQ=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8 h1:QpVluEtKzdKMeJH6WbH4JWIGHt2Q+wXmViXFNZABDP4=
+github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240325014229-d9718e73cff8/go.mod h1:zIZK8dTDva0QK+L+TfcWMGHLBcmWhsosh6iTDhod6zo=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5 h1:zLwHraB43DUxnbxN1l6s3X9D5207vblu1LAdQztU3SE=
+github.com/smartcontractkit/chainlink-feeds v0.0.0-20240325014324-38983442cab5/go.mod h1:2gYoMI7y1xvamSx+NVl3VHIFhTzTT3FSejt0LV8SSa0=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f h1:uNcb1HQWuDrXNvAx+820ZtvwsyPiwO5Xfn9JDWdKST0=
+github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240322235813-18bd0e72971f/go.mod h1:slVU+efkZe1CRHJ8VCh2gL5nCV+KBBn5+4/11I1A008=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4 h1:x1r401LcpategpYCBMTO+OQwCr9nYFUxZu4ehzG0HZw=
+github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325130322-9170caf24ce4/go.mod h1:713M0hit6xGMGsKLK0+sEhLzhWXWLiPYtNMJzxDVA/k=
github.com/smartcontractkit/chainlink-testing-framework v1.27.3 h1:rUvTtLXPcxI5s3AttdpWeWTNXAprrjyyBvBEvYZp994=
github.com/smartcontractkit/chainlink-testing-framework v1.27.3/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-20240323112415-be2b2ccbdfd5 h1:aPa02s24dCt+hPKnDqpKPmlEIVUxth26//USvXhBYsc=
+github.com/smartcontractkit/chainlink-vrf v0.0.0-20240323112415-be2b2ccbdfd5/go.mod h1:2f8f0mCWyn8rRHYNxLH2AaeLCQu4/XuVyoVhYWwDTJ8=
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-20240229181116-bfb2432a7a66 h1:xsU00JB9GJxEiN6tDbqgN+fT98ySdxkUwTw6CfBXscw=
-github.com/smartcontractkit/libocr v0.0.0-20240229181116-bfb2432a7a66/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4=
+github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14 h1:sGlxJ7y3guP20ohhn23XDj5kPXf+sOR7iFJaWjIvao0=
+github.com/smartcontractkit/libocr v0.0.0-20240322223357-61738d25af14/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4=
github.com/smartcontractkit/seth v0.1.2 h1:ImXJmniuq6yWB6b3eezjV+lkYb1GfQuaJkwRvrCfTKQ=
github.com/smartcontractkit/seth v0.1.2/go.mod h1:aOaGwrIVFG/MYaLSj9UUMyE5QJnYQoAgnxm5cKfT9Ng=
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE=
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 112d9e3cdb1..5b69d03616d 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'
@@ -69,6 +71,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
@@ -81,8 +84,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 --
@@ -160,6 +165,15 @@ ok TelemetryManager
"output": ""
}
},
+ {
+ "type": "checks",
+ "id": "EVM.1.Relayer",
+ "attributes": {
+ "name": "EVM.1.Relayer",
+ "status": "passing",
+ "output": ""
+ }
+ },
{
"type": "checks",
"id": "EVM.1.Txm",
@@ -270,18 +284,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": ""
}