diff --git a/core/chains/cosmos/relayer_adapter.go b/core/chains/cosmos/relayer_adapter.go index 899eae01951..ffe4181ceb0 100644 --- a/core/chains/cosmos/relayer_adapter.go +++ b/core/chains/cosmos/relayer_adapter.go @@ -37,8 +37,7 @@ type LoopRelayerChain struct { } func NewLoopRelayerChain(r *pkgcosmos.Relayer, s adapters.Chain) *LoopRelayerChain { - - ra := relay.NewRelayerAdapter(r, s) + ra := relay.NewRelayerServerAdapter(r, s) return &LoopRelayerChain{ Relayer: ra, chain: s, diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 7131bb1d437..68e623d4786 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -299,7 +299,7 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230831132059-42af68994512 // indirect - github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230905185157-da01915913a4 // indirect + github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230908130052-16ce8fa4a45b // indirect github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230829114801-14bf715f805e // indirect diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 641adcd89eb..7f3ed97110b 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1377,8 +1377,8 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230831132059-42af68994512 h1:DojChlaudA1HAxwQPKmt/EDf36OUeFJ0LJBYClauMyU= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230831132059-42af68994512/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230905185157-da01915913a4 h1:yArUq/0t126bl8BRtjLCf2NuHK35CDIkhc3M5P46apc= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230905185157-da01915913a4/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230908130052-16ce8fa4a45b h1:RrG9RuPfQi1Ak7/FdIEDlDpta2PSm5Dghmxpq2ZIO8M= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230908130052-16ce8fa4a45b/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4= github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE= github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca/go.mod h1:RIUJXn7EVp24TL2p4FW79dYjyno23x5mjt1nKN+5WEk= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw= diff --git a/core/services/chainlink/relayer_factory.go b/core/services/chainlink/relayer_factory.go index 6c09f5c4ab4..df7de835052 100644 --- a/core/services/chainlink/relayer_factory.go +++ b/core/services/chainlink/relayer_factory.go @@ -62,7 +62,7 @@ func (r *RelayerFactory) NewEVM(ctx context.Context, config EVMFactoryConfig) (m if err != nil { return nil, err } - relayer := evmrelay.NewLoopRelayAdapter(evmrelay.NewRelayer(ccOpts.DB, chain, r.QConfig, ccOpts.Logger, config.CSAETHKeystore, ccOpts.EventBroadcaster), ext) + relayer := evmrelay.NewLoopRelayServerAdapter(evmrelay.NewRelayer(ccOpts.DB, chain, r.QConfig, ccOpts.Logger, config.CSAETHKeystore, ccOpts.EventBroadcaster), ext) relayers[relayID] = relayer } @@ -135,7 +135,7 @@ func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solana.SolanaCo if err != nil { return nil, err } - solanaRelayers[relayId] = relay.NewRelayerAdapter(pkgsolana.NewRelayer(solLggr, chain), chain) + solanaRelayers[relayId] = relay.NewRelayerServerAdapter(pkgsolana.NewRelayer(solLggr, chain), chain) } } return solanaRelayers, nil @@ -208,7 +208,7 @@ func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs starknet.St return nil, err } - starknetRelayers[relayId] = relay.NewRelayerAdapter(pkgstarknet.NewRelayer(starkLggr, chain), chain) + starknetRelayers[relayId] = relay.NewRelayerServerAdapter(pkgstarknet.NewRelayer(starkLggr, chain), chain) } } return starknetRelayers, nil diff --git a/core/services/job/job_orm_test.go b/core/services/job/job_orm_test.go index 1f5dba452fe..4fb8b767903 100644 --- a/core/services/job/job_orm_test.go +++ b/core/services/job/job_orm_test.go @@ -15,6 +15,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-relay/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/assets" @@ -911,7 +912,7 @@ func TestORM_ValidateKeyStoreMatch(t *testing.T) { }) t.Run("test Mercury ETH key validation", func(t *testing.T) { - jb.OCR2OracleSpec.PluginType = job.Mercury + jb.OCR2OracleSpec.PluginType = types.Mercury err = job.ValidateKeyStoreMatch(jb.OCR2OracleSpec, keyStore, "bad key") require.EqualError(t, err, "no CSA key matching: \"bad key\"") diff --git a/core/services/job/models.go b/core/services/job/models.go index d70afde12c2..8f9a2f529d3 100644 --- a/core/services/job/models.go +++ b/core/services/job/models.go @@ -14,6 +14,7 @@ import ( "github.com/pkg/errors" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-relay/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/assets" "github.com/smartcontractkit/chainlink/v2/core/bridges" clnull "github.com/smartcontractkit/chainlink/v2/core/null" @@ -310,28 +311,7 @@ func (r JSONConfig) MercuryCredentialName() (string, error) { return name, nil } -var ForwardersSupportedPlugins = []OCR2PluginType{Median, DKG, OCR2VRF, OCR2Keeper, OCR2Functions} - -// OCR2PluginType defines supported OCR2 plugin types. -type OCR2PluginType string - -const ( - // Median refers to the median.Median type - Median OCR2PluginType = "median" - - DKG OCR2PluginType = "dkg" - - OCR2VRF OCR2PluginType = "ocr2vrf" - - // Keeper was rebranded to automation. For now the plugin type required in job spec points - // to the new name (automation) but in code we refer it to keepers - // TODO: sc-55296 to rename ocr2keeper to ocr2automation in code - OCR2Keeper OCR2PluginType = "ocr2automation" - - OCR2Functions OCR2PluginType = "functions" - - Mercury OCR2PluginType = "mercury" -) +var ForwardersSupportedPlugins = []types.OCR2PluginType{types.Median, types.DKG, types.OCR2VRF, types.OCR2Keeper, types.Functions} // OCR2OracleSpec defines the job spec for OCR2 jobs. // Relay config is chain specific config for a relay (chain adapter). @@ -341,21 +321,21 @@ type OCR2OracleSpec struct { FeedID *common.Hash `toml:"feedID"` Relay relay.Network `toml:"relay"` // TODO BCF-2442 implement ChainID as top level parameter rathe than buried in RelayConfig. - ChainID string `toml:"chainID"` - RelayConfig JSONConfig `toml:"relayConfig"` - P2PV2Bootstrappers pq.StringArray `toml:"p2pv2Bootstrappers"` - OCRKeyBundleID null.String `toml:"ocrKeyBundleID"` - MonitoringEndpoint null.String `toml:"monitoringEndpoint"` - TransmitterID null.String `toml:"transmitterID"` - BlockchainTimeout models.Interval `toml:"blockchainTimeout"` - ContractConfigTrackerPollInterval models.Interval `toml:"contractConfigTrackerPollInterval"` - ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` - PluginConfig JSONConfig `toml:"pluginConfig"` - PluginType OCR2PluginType `toml:"pluginType"` - CreatedAt time.Time `toml:"-"` - UpdatedAt time.Time `toml:"-"` - CaptureEATelemetry bool `toml:"captureEATelemetry"` - CaptureAutomationCustomTelemetry bool `toml:"captureAutomationCustomTelemetry"` + ChainID string `toml:"chainID"` + RelayConfig JSONConfig `toml:"relayConfig"` + P2PV2Bootstrappers pq.StringArray `toml:"p2pv2Bootstrappers"` + OCRKeyBundleID null.String `toml:"ocrKeyBundleID"` + MonitoringEndpoint null.String `toml:"monitoringEndpoint"` + TransmitterID null.String `toml:"transmitterID"` + BlockchainTimeout models.Interval `toml:"blockchainTimeout"` + ContractConfigTrackerPollInterval models.Interval `toml:"contractConfigTrackerPollInterval"` + ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` + PluginConfig JSONConfig `toml:"pluginConfig"` + PluginType types.OCR2PluginType `toml:"pluginType"` + CreatedAt time.Time `toml:"-"` + UpdatedAt time.Time `toml:"-"` + CaptureEATelemetry bool `toml:"captureEATelemetry"` + CaptureAutomationCustomTelemetry bool `toml:"captureAutomationCustomTelemetry"` } func (s *OCR2OracleSpec) RelayID() (relay.ID, error) { diff --git a/core/services/job/orm.go b/core/services/job/orm.go index 277b03b24dd..d53452fa3bc 100644 --- a/core/services/job/orm.go +++ b/core/services/job/orm.go @@ -19,6 +19,8 @@ import ( "github.com/smartcontractkit/sqlx" + "github.com/smartcontractkit/chainlink-relay/pkg/types" + "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/chains" "github.com/smartcontractkit/chainlink/v2/core/chains/evm" @@ -268,7 +270,7 @@ func (o *orm) CreateJob(jb *Job, qopts ...pg.QOpt) error { return errors.Errorf("forwarding is not currently supported for %s jobs", jb.OCR2OracleSpec.PluginType) } - if jb.OCR2OracleSpec.PluginType == Mercury { + if jb.OCR2OracleSpec.PluginType == types.Mercury { if jb.OCR2OracleSpec.FeedID == nil { return errors.New("feed ID is required for mercury plugin type") } @@ -278,7 +280,7 @@ func (o *orm) CreateJob(jb *Job, qopts ...pg.QOpt) error { } } - if jb.OCR2OracleSpec.PluginType == Median { + if jb.OCR2OracleSpec.PluginType == types.Median { var cfg medianconfig.PluginConfig err = json.Unmarshal(jb.OCR2OracleSpec.PluginConfig.Bytes(), &cfg) if err != nil { @@ -456,7 +458,7 @@ func (o *orm) CreateJob(jb *Job, qopts ...pg.QOpt) error { // ValidateKeyStoreMatch confirms that the key has a valid match in the keystore func ValidateKeyStoreMatch(spec *OCR2OracleSpec, keyStore keystore.Master, key string) error { - if spec.PluginType == Mercury { + if spec.PluginType == types.Mercury { _, err := keyStore.CSA().Get(key) if err != nil { return errors.Errorf("no CSA key matching: %q", key) diff --git a/core/services/job/spawner_test.go b/core/services/job/spawner_test.go index f35aa50ba4d..efa252e4c4d 100644 --- a/core/services/job/spawner_test.go +++ b/core/services/job/spawner_test.go @@ -67,7 +67,7 @@ type relayGetter struct { } func (g *relayGetter) Get(id relay.ID) (loop.Relayer, error) { - return evmrelayer.NewLoopRelayAdapter(g.r, g.e), nil + return evmrelayer.NewLoopRelayServerAdapter(g.r, g.e), nil } func TestSpawner_CreateJobDeleteJob(t *testing.T) { diff --git a/core/services/ocr2/delegate.go b/core/services/ocr2/delegate.go index 2a8fea38efe..6c7924e2fef 100644 --- a/core/services/ocr2/delegate.go +++ b/core/services/ocr2/delegate.go @@ -274,12 +274,12 @@ func (d *Delegate) cleanupEVM(jb job.Job, q pg.Queryer, relayID relay.ID) error var filters []string switch spec.PluginType { - case job.OCR2VRF: + case types.OCR2VRF: filters, err = ocr2coordinator.FilterNamesFromSpec(spec) if err != nil { d.lggr.Errorw("failed to derive ocr2vrf filter names from spec", "err", err, "spec", spec) } - case job.OCR2Keeper: + case types.OCR2Keeper: filters, err = ocr2keeper.FilterNamesFromSpec20(spec) if err != nil { d.lggr.Errorw("failed to derive ocr2keeper filter names from spec", "err", err, "spec", spec) @@ -405,22 +405,22 @@ func (d *Delegate) ServicesForSpec(jb job.Job, qopts ...pg.QOpt) ([]job.ServiceC ctx := lggrCtx.ContextWithValues(context.Background()) switch spec.PluginType { - case job.Mercury: + case types.Mercury: return d.newServicesMercury(ctx, lggr, jb, runResults, bootstrapPeers, kb, ocrDB, lc, ocrLogger) - case job.Median: + case types.Median: return d.newServicesMedian(ctx, lggr, jb, runResults, bootstrapPeers, kb, ocrDB, lc, ocrLogger) - case job.DKG: + case types.DKG: return d.newServicesDKG(lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger) - case job.OCR2VRF: + case types.OCR2VRF: return d.newServicesOCR2VRF(lggr, jb, runResults, bootstrapPeers, kb, ocrDB, lc) - case job.OCR2Keeper: + case types.OCR2Keeper: return d.newServicesOCR2Keepers(lggr, jb, runResults, bootstrapPeers, kb, ocrDB, lc, ocrLogger) - case job.OCR2Functions: + case types.Functions: const ( _ int32 = iota thresholdPluginId @@ -437,7 +437,7 @@ func (d *Delegate) ServicesForSpec(jb job.Job, qopts ...pg.QOpt) ([]job.ServiceC func GetEVMEffectiveTransmitterID(jb *job.Job, chain evm.Chain, lggr logger.SugaredLogger) (string, error) { spec := jb.OCR2OracleSpec - if spec.PluginType == job.Mercury { + if spec.PluginType == types.Mercury { return spec.TransmitterID.String, nil } @@ -448,7 +448,7 @@ func GetEVMEffectiveTransmitterID(jb *job.Job, chain evm.Chain, lggr logger.Suga if err != nil { return "", err } - if len(sendingKeys) > 1 && spec.PluginType != job.OCR2VRF { + if len(sendingKeys) > 1 && spec.PluginType != types.OCR2VRF { return "", errors.New("only ocr2 vrf should have more than 1 sending key") } spec.TransmitterID = null.StringFrom(sendingKeys[0]) @@ -514,13 +514,14 @@ func (d *Delegate) newServicesMercury( return nil, fmt.Errorf("mercury services: failed to get chain %s: %w", rid.ChainID, err) } - mercuryProvider, err2 := relayer.NewMercuryProvider(ctx, + provider, err2 := relayer.NewPluginProvider(ctx, types.RelayArgs{ ExternalJobID: jb.ExternalJobID, JobID: spec.ID, ContractID: spec.ContractID, New: d.isNewlyCreatedJob, RelayConfig: spec.RelayConfig.Bytes(), + ProviderType: string(spec.PluginType), }, types.PluginArgs{ TransmitterID: transmitterID, PluginConfig: spec.PluginConfig.Bytes(), @@ -529,6 +530,11 @@ func (d *Delegate) newServicesMercury( return nil, err2 } + mercuryProvider, ok := provider.(types.MercuryProvider) + if !ok { + return nil, errors.New("could not coerce PluginProvider to MercuryProvider") + } + oracleArgsNoPlugin := libocr2.MercuryOracleArgs{ BinaryNetworkEndpointFactory: d.peerWrapper.Peer2, V2Bootstrappers: bootstrapPeers, diff --git a/core/services/ocr2/delegate_test.go b/core/services/ocr2/delegate_test.go index e78af2e19b4..97c9faa44d4 100644 --- a/core/services/ocr2/delegate_test.go +++ b/core/services/ocr2/delegate_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-relay/pkg/types" evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" txmmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -49,7 +50,7 @@ func TestGetEVMEffectiveTransmitterID(t *testing.T) { type testCase struct { name string - pluginType job.OCR2PluginType + pluginType types.OCR2PluginType transmitterID null.String sendingKeys []any expectedError bool @@ -75,7 +76,7 @@ func TestGetEVMEffectiveTransmitterID(t *testing.T) { testCases := []testCase{ { name: "mercury plugin should just return transmitterID", - pluginType: job.Mercury, + pluginType: types.Mercury, transmitterID: null.StringFrom("Mercury transmitterID"), expectedTransmitterID: "Mercury transmitterID", }, @@ -91,7 +92,7 @@ func TestGetEVMEffectiveTransmitterID(t *testing.T) { }, { name: "when transmitterID is not defined and plugin is ocr2vrf, it should allow>1 sendingKeys and set transmitterID to the first one", - pluginType: job.OCR2VRF, + pluginType: types.OCR2VRF, sendingKeys: []any{"0x7e57000000000000000000000000000000000000", "0x7e57000000000000000000000000000000000001", "0x7e57000000000000000000000000000000000002"}, expectedTransmitterID: "0x7e57000000000000000000000000000000000000", }, @@ -109,7 +110,7 @@ func TestGetEVMEffectiveTransmitterID(t *testing.T) { }, { name: "when forwarders are enabled and when transmitterID is not defined, it should use first sendingKey to retrieve forwarder address", - pluginType: job.OCR2VRF, + pluginType: types.OCR2VRF, forwardingEnabled: true, sendingKeys: []any{"0x7e57000000000000000000000000000000000001", "0x7e57000000000000000000000000000000000002"}, getForwarderForEOAArg: common.HexToAddress("0x7e57000000000000000000000000000000000001"), @@ -117,7 +118,7 @@ func TestGetEVMEffectiveTransmitterID(t *testing.T) { }, { name: "when forwarders are enabled but forwarder address fails to be retrieved and when transmitterID is not defined, it should default to using first sendingKey", - pluginType: job.OCR2VRF, + pluginType: types.OCR2VRF, forwardingEnabled: true, sendingKeys: []any{"0x7e57000000000000000000000000000000000001", "0x7e57000000000000000000000000000000000002"}, getForwarderForEOAArg: common.HexToAddress("0x7e57000000000000000000000000000000000001"), diff --git a/core/services/ocr2/plugins/median/services.go b/core/services/ocr2/plugins/median/services.go index 8ff97c2cc56..e435ee747f5 100644 --- a/core/services/ocr2/plugins/median/services.go +++ b/core/services/ocr2/plugins/median/services.go @@ -3,6 +3,7 @@ package median import ( "context" "encoding/json" + "errors" "fmt" "time" @@ -67,12 +68,13 @@ func NewMedianServices(ctx context.Context, } spec := jb.OCR2OracleSpec - provider, err := relayer.NewMedianProvider(ctx, types.RelayArgs{ + provider, err := relayer.NewPluginProvider(ctx, types.RelayArgs{ ExternalJobID: jb.ExternalJobID, JobID: spec.ID, ContractID: spec.ContractID, New: isNewlyCreatedJob, RelayConfig: spec.RelayConfig.Bytes(), + ProviderType: string(spec.PluginType), }, types.PluginArgs{ TransmitterID: spec.TransmitterID.String, PluginConfig: spec.PluginConfig.Bytes(), @@ -80,6 +82,12 @@ func NewMedianServices(ctx context.Context, if err != nil { return } + + medianProvider, ok := provider.(types.MedianProvider) + if !ok { + return nil, errors.New("could not coerce PluginProvider to MedianProvider") + } + srvs = append(srvs, provider) argsNoPlugin.ContractTransmitter = provider.ContractTransmitter() argsNoPlugin.ContractConfigTracker = provider.ContractConfigTracker() @@ -113,11 +121,11 @@ func NewMedianServices(ctx context.Context, abort() return } - median := loop.NewMedianService(lggr, telem, cmdFn, provider, dataSource, juelsPerFeeCoinSource, errorLog) + median := loop.NewMedianService(lggr, telem, cmdFn, medianProvider, dataSource, juelsPerFeeCoinSource, errorLog) argsNoPlugin.ReportingPluginFactory = median srvs = append(srvs, median) } else { - argsNoPlugin.ReportingPluginFactory, err = NewPlugin(lggr).NewMedianFactory(ctx, provider, dataSource, juelsPerFeeCoinSource, errorLog) + argsNoPlugin.ReportingPluginFactory, err = NewPlugin(lggr).NewMedianFactory(ctx, medianProvider, dataSource, juelsPerFeeCoinSource, errorLog) if err != nil { err = fmt.Errorf("failed to create median factory: %w", err) abort() diff --git a/core/services/ocr2/plugins/mercury/plugin.go b/core/services/ocr2/plugins/mercury/plugin.go index 64336548a1e..05e7e968f8b 100644 --- a/core/services/ocr2/plugins/mercury/plugin.go +++ b/core/services/ocr2/plugins/mercury/plugin.go @@ -67,7 +67,7 @@ func NewServices( runResults, chEnhancedTelem, chainHeadTracker, - ocr2Provider.ContractTransmitter(), + ocr2Provider.MercuryServerFetcher(), pluginConfig.InitialBlockNumber.Ptr(), feedID, ) @@ -87,7 +87,7 @@ func NewServices( lggr, runResults, chEnhancedTelem, - ocr2Provider.ContractTransmitter(), + ocr2Provider.MercuryServerFetcher(), *pluginConfig.LinkFeedID, *pluginConfig.NativeFeedID, ) @@ -107,7 +107,7 @@ func NewServices( lggr, runResults, chEnhancedTelem, - ocr2Provider.ContractTransmitter(), + ocr2Provider.MercuryServerFetcher(), *pluginConfig.LinkFeedID, *pluginConfig.NativeFeedID, ) diff --git a/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go b/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go index 6ce8b0aa8cf..7d69ea6522d 100644 --- a/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go @@ -29,6 +29,7 @@ import ( "github.com/stretchr/testify/require" "github.com/umbracle/ethgo/abi" + relaytypes "github.com/smartcontractkit/chainlink-relay/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" automationForwarderLogic "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_forwarder_logic" @@ -57,7 +58,7 @@ func TestFilterNamesFromSpec21(t *testing.T) { address := common.HexToAddress(hexutil.Encode(b)) spec := &job.OCR2OracleSpec{ - PluginType: job.OCR2Keeper, + PluginType: relaytypes.OCR2Keeper, ContractID: address.String(), // valid contract addr } @@ -69,7 +70,7 @@ func TestFilterNamesFromSpec21(t *testing.T) { assert.Equal(t, logpoller.FilterName("KeeperRegistry Events", address), names[1]) spec = &job.OCR2OracleSpec{ - PluginType: job.OCR2Keeper, + PluginType: relaytypes.OCR2Keeper, ContractID: "0x5431", // invalid contract addr } _, err = ocr2keeper.FilterNamesFromSpec21(spec) diff --git a/core/services/ocr2/plugins/ocr2keeper/integration_test.go b/core/services/ocr2/plugins/ocr2keeper/integration_test.go index 8b7e92c40fe..9d53b4cab32 100644 --- a/core/services/ocr2/plugins/ocr2keeper/integration_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/integration_test.go @@ -56,6 +56,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" "github.com/smartcontractkit/chainlink/v2/core/store/models" "github.com/smartcontractkit/chainlink/v2/core/utils" + + relaytypes "github.com/smartcontractkit/chainlink-relay/pkg/types" ) const ( @@ -705,7 +707,7 @@ func TestFilterNamesFromSpec20(t *testing.T) { address := common.HexToAddress(hexutil.Encode(b)) spec := &job.OCR2OracleSpec{ - PluginType: job.OCR2Keeper, + PluginType: relaytypes.OCR2Keeper, ContractID: address.String(), // valid contract addr } @@ -717,7 +719,7 @@ func TestFilterNamesFromSpec20(t *testing.T) { assert.Equal(t, logpoller.FilterName("EvmRegistry - Upkeep events for", address), names[1]) spec = &job.OCR2OracleSpec{ - PluginType: job.OCR2Keeper, + PluginType: relaytypes.OCR2Keeper, ContractID: "0x5431", // invalid contract addr } _, err = ocr2keeper.FilterNamesFromSpec20(spec) diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator_test.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator_test.go index 5a32644d0ee..1222ab7b2a4 100644 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator_test.go +++ b/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator_test.go @@ -25,6 +25,7 @@ import ( "github.com/smartcontractkit/ocr2vrf/ocr2vrf" ocr2vrftypes "github.com/smartcontractkit/ocr2vrf/types" + relaytypes "github.com/smartcontractkit/chainlink-relay/pkg/types" evmclimocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" lp_mocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks" @@ -1761,7 +1762,7 @@ func TestFilterNamesFromSpec(t *testing.T) { spec := &job.OCR2OracleSpec{ ContractID: beaconAddress.String(), - PluginType: job.OCR2VRF, + PluginType: relaytypes.OCR2VRF, PluginConfig: job.JSONConfig{ "VRFCoordinatorAddress": coordinatorAddress.String(), "DKGContractAddress": dkgAddress.String(), @@ -1775,7 +1776,7 @@ func TestFilterNamesFromSpec(t *testing.T) { assert.Equal(t, logpoller.FilterName("VRF Coordinator", beaconAddress, coordinatorAddress, dkgAddress), names[0]) spec = &job.OCR2OracleSpec{ - PluginType: job.OCR2VRF, + PluginType: relaytypes.OCR2VRF, ContractID: beaconAddress.String(), PluginConfig: nil, // missing coordinator & dkg addresses } diff --git a/core/services/ocr2/validate/validate.go b/core/services/ocr2/validate/validate.go index ca1ab60deb9..cde1a1f9276 100644 --- a/core/services/ocr2/validate/validate.go +++ b/core/services/ocr2/validate/validate.go @@ -12,6 +12,7 @@ import ( libocr2 "github.com/smartcontractkit/libocr/offchainreporting2plus" + "github.com/smartcontractkit/chainlink-relay/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/job" dkgconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/dkg/config" mercuryconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury/config" @@ -98,20 +99,20 @@ func validateSpec(tree *toml.Tree, spec job.Job) error { } switch spec.OCR2OracleSpec.PluginType { - case job.Median: + case types.Median: if spec.Pipeline.Source == "" { return errors.New("no pipeline specified") } - case job.DKG: + case types.DKG: return validateDKGSpec(spec.OCR2OracleSpec.PluginConfig) - case job.OCR2VRF: + case types.OCR2VRF: return validateOCR2VRFSpec(spec.OCR2OracleSpec.PluginConfig) - case job.OCR2Keeper: + case types.OCR2Keeper: return validateOCR2KeeperSpec(spec.OCR2OracleSpec.PluginConfig) - case job.OCR2Functions: + case types.Functions: // TODO validator for DR-OCR spec: https://app.shortcut.com/chainlinklabs/story/54054/ocr-plugin-for-directrequest-ocr return nil - case job.Mercury: + case types.Mercury: return validateOCR2MercurySpec(spec.OCR2OracleSpec.PluginConfig, *spec.OCR2OracleSpec.FeedID) case "": return errors.New("no plugin specified") diff --git a/core/services/ocrbootstrap/delegate.go b/core/services/ocrbootstrap/delegate.go index b39f9eec6ec..d530797367f 100644 --- a/core/services/ocrbootstrap/delegate.go +++ b/core/services/ocrbootstrap/delegate.go @@ -118,7 +118,7 @@ func (d *Delegate) ServicesForSpec(jobSpec job.Job, qopts ...pg.QOpt) (services if routerFields.ContractVersion != 1 || routerFields.ContractUpdateCheckFrequencySec == 0 { return nil, errors.New("invalid router contract config") } - configProvider, err = relayer.NewFunctionsProvider( + configProvider, err = relayer.NewPluginProvider( ctx, types.RelayArgs{ ExternalJobID: jobSpec.ExternalJobID, @@ -126,6 +126,7 @@ func (d *Delegate) ServicesForSpec(jobSpec job.Job, qopts ...pg.QOpt) (services ContractID: spec.ContractID, RelayConfig: spec.RelayConfig.Bytes(), New: d.isNewlyCreatedJob, + ProviderType: string(types.Functions), }, types.PluginArgs{ PluginConfig: spec.RelayConfig.Bytes(), // contains all necessary fields for config provider diff --git a/core/services/relay/evm/loop_impl.go b/core/services/relay/evm/loop_impl.go index 02a9194b380..87f7aed1a55 100644 --- a/core/services/relay/evm/loop_impl.go +++ b/core/services/relay/evm/loop_impl.go @@ -19,8 +19,8 @@ type LoopRelayer struct { var _ loop.Relayer = &LoopRelayer{} -func NewLoopRelayAdapter(r *Relayer, cs EVMChainRelayerExtender) *LoopRelayer { - ra := relay.NewRelayerAdapter(r, cs) +func NewLoopRelayServerAdapter(r *Relayer, cs EVMChainRelayerExtender) *LoopRelayer { + ra := relay.NewRelayerServerAdapter(r, cs) return &LoopRelayer{ Relayer: ra, ext: cs, diff --git a/core/services/relay/evm/mercury_provider.go b/core/services/relay/evm/mercury_provider.go index ee32b8d99be..74072167061 100644 --- a/core/services/relay/evm/mercury_provider.go +++ b/core/services/relay/evm/mercury_provider.go @@ -4,13 +4,15 @@ import ( "context" "errors" + "golang.org/x/exp/maps" + + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + relaymercury "github.com/smartcontractkit/chainlink-relay/pkg/reportingplugins/mercury" relaymercuryv1 "github.com/smartcontractkit/chainlink-relay/pkg/reportingplugins/mercury/v1" relaymercuryv2 "github.com/smartcontractkit/chainlink-relay/pkg/reportingplugins/mercury/v2" relaymercuryv3 "github.com/smartcontractkit/chainlink-relay/pkg/reportingplugins/mercury/v3" relaytypes "github.com/smartcontractkit/chainlink-relay/pkg/types" - ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - "golang.org/x/exp/maps" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services" @@ -96,6 +98,10 @@ func (p *mercuryProvider) ReportCodecV3() relaymercuryv3.ReportCodec { return p.reportCodecV3 } -func (p *mercuryProvider) ContractTransmitter() relaymercury.Transmitter { +func (p *mercuryProvider) ContractTransmitter() ocrtypes.ContractTransmitter { + return p.transmitter +} + +func (p *mercuryProvider) MercuryServerFetcher() relaymercury.MercuryServerFetcher { return p.transmitter } diff --git a/core/services/relay/evm/mocks/loop_relay_adapter.go b/core/services/relay/evm/mocks/loop_relay_adapter.go index 7ed28ac4b11..02064c2ea9f 100644 --- a/core/services/relay/evm/mocks/loop_relay_adapter.go +++ b/core/services/relay/evm/mocks/loop_relay_adapter.go @@ -181,72 +181,20 @@ func (_m *LoopRelayAdapter) NewConfigProvider(_a0 context.Context, _a1 types.Rel return r0, r1 } -// NewFunctionsProvider provides a mock function with given fields: _a0, _a1, _a2 -func (_m *LoopRelayAdapter) NewFunctionsProvider(_a0 context.Context, _a1 types.RelayArgs, _a2 types.PluginArgs) (types.FunctionsProvider, error) { +// 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) - var r0 types.FunctionsProvider + var r0 types.PluginProvider var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.RelayArgs, types.PluginArgs) (types.FunctionsProvider, error)); ok { + 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.FunctionsProvider); ok { + 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.FunctionsProvider) - } - } - - 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 -} - -// NewMedianProvider provides a mock function with given fields: _a0, _a1, _a2 -func (_m *LoopRelayAdapter) NewMedianProvider(_a0 context.Context, _a1 types.RelayArgs, _a2 types.PluginArgs) (types.MedianProvider, error) { - ret := _m.Called(_a0, _a1, _a2) - - var r0 types.MedianProvider - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.RelayArgs, types.PluginArgs) (types.MedianProvider, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, types.RelayArgs, types.PluginArgs) types.MedianProvider); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(types.MedianProvider) - } - } - - 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 -} - -// NewMercuryProvider provides a mock function with given fields: _a0, _a1, _a2 -func (_m *LoopRelayAdapter) NewMercuryProvider(_a0 context.Context, _a1 types.RelayArgs, _a2 types.PluginArgs) (types.MercuryProvider, error) { - ret := _m.Called(_a0, _a1, _a2) - - var r0 types.MercuryProvider - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.RelayArgs, types.PluginArgs) (types.MercuryProvider, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, types.RelayArgs, types.PluginArgs) types.MercuryProvider); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(types.MercuryProvider) + r0 = ret.Get(0).(types.PluginProvider) } } diff --git a/core/services/relay/relay.go b/core/services/relay/relay.go index fccd69c411e..5e8f065f289 100644 --- a/core/services/relay/relay.go +++ b/core/services/relay/relay.go @@ -112,12 +112,12 @@ var _ loop.Relayer = (*relayerAdapter)(nil) // relayerAdapter adapts a [types.Relayer] and [RelayerExt] to implement [loop.Relayer]. type relayerAdapter struct { types.Relayer - // TODO we can un-embedded `ext` once BFC-2441 is merged. Right now that's not possible - // because this are conflicting definitions of SendTx RelayerExt } // NewRelayerAdapter returns a [loop.Relayer] adapted from a [types.Relayer] and [RelayerExt]. +// Unlike NewRelayerServerAdapter which is used to adapt non-LOOPP relayers, this is used to adapt +// LOOPP-based relayer which are then server over GRPC (by the relayerServer). func NewRelayerAdapter(r types.Relayer, e RelayerExt) loop.Relayer { return &relayerAdapter{Relayer: r, RelayerExt: e} } @@ -138,6 +138,10 @@ func (r *relayerAdapter) NewFunctionsProvider(ctx context.Context, rargs types.R return r.Relayer.NewFunctionsProvider(rargs, pargs) } +func (r *relayerAdapter) NewPluginProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.PluginProvider, error) { + return nil, fmt.Errorf("unexpected call to NewPluginProvider: did you forget to wrap relayerAdapter in a relayerServerAdapter?") +} + func (r *relayerAdapter) Start(ctx context.Context) error { var ms services.MultiStart return ms.Start(ctx, r.RelayerExt, r.Relayer) @@ -184,3 +188,33 @@ func (r *relayerAdapter) NodeStatuses(ctx context.Context, offset, limit int, ch } return nodes[offset:limit], total, nil } + +type relayerServerAdapter struct { + *relayerAdapter +} + +func (r *relayerServerAdapter) NewPluginProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.PluginProvider, error) { + switch types.OCR2PluginType(rargs.ProviderType) { + case types.Median: + return r.NewMedianProvider(ctx, rargs, pargs) + case types.Functions: + return r.NewFunctionsProvider(ctx, rargs, pargs) + case types.Mercury: + return r.NewMercuryProvider(ctx, rargs, pargs) + case types.DKG, types.OCR2VRF, types.OCR2Keeper, types.GenericPlugin: + return r.relayerAdapter.NewPluginProvider(ctx, rargs, pargs) + } + + return nil, fmt.Errorf("provider type not supported: %s", rargs.ProviderType) +} + +// NewRelayerServerAdapter returns a [loop.Relayer] adapted from a [types.Relayer] and [RelayerExt]. +// Unlike NewRelayerAdapter, this behaves like the loop `RelayerServer` and dispatches calls +// to `NewPluginProvider` according to the passed in `RelayArgs.ProviderType`. +// This should only be used to adapt relayers not running via GRPC in a LOOPP. +// +// nolint:staticcheck // SA1019 +func NewRelayerServerAdapter(r types.Relayer, e RelayerExt) loop.Relayer { + ra := &relayerAdapter{Relayer: r, RelayerExt: e} + return &relayerServerAdapter{relayerAdapter: ra} +} diff --git a/core/services/relay/relay_test.go b/core/services/relay/relay_test.go index 0ed14b6c5b7..1180379677e 100644 --- a/core/services/relay/relay_test.go +++ b/core/services/relay/relay_test.go @@ -1,9 +1,12 @@ package relay import ( + "context" "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-relay/pkg/types" ) func TestIdentifier_UnmarshalString(t *testing.T) { @@ -79,3 +82,87 @@ func TestNewID(t *testing.T) { }) } } + +type staticMedianProvider struct { + types.MedianProvider +} + +type staticFunctionsProvider struct { + types.FunctionsProvider +} + +type staticMercuryProvider struct { + types.MercuryProvider +} + +type mockRelayer struct { + types.Relayer +} + +func (m *mockRelayer) NewMedianProvider(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) { + return staticFunctionsProvider{}, nil +} + +func (m *mockRelayer) NewMercuryProvider(rargs types.RelayArgs, pargs types.PluginArgs) (types.MercuryProvider, error) { + return staticMercuryProvider{}, nil +} + +type mockRelayerExt struct { + RelayerExt +} + +func isType[T any](p any) bool { + _, ok := p.(T) + return ok +} + +func TestRelayerServerAdapter(t *testing.T) { + r := &mockRelayer{} + sa := NewRelayerServerAdapter(r, mockRelayerExt{}) + + testCases := []struct { + ProviderType string + Test func(p any) bool + Error string + }{ + { + ProviderType: string(types.Median), + Test: isType[types.MedianProvider], + }, + { + ProviderType: string(types.Functions), + Test: isType[types.FunctionsProvider], + }, + { + ProviderType: string(types.Mercury), + Test: isType[types.MercuryProvider], + }, + { + ProviderType: "unknown", + Error: "provider type not supported", + }, + { + ProviderType: string(types.GenericPlugin), + Error: "unexpected call to NewPluginProvider", + }, + } + + for _, tc := range testCases { + pp, err := sa.NewPluginProvider( + context.Background(), + 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/store/migrate/migrate_test.go b/core/store/migrate/migrate_test.go index 97d0ec5b182..66764a266f0 100644 --- a/core/store/migrate/migrate_test.go +++ b/core/store/migrate/migrate_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-relay/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest/heavyweight" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" @@ -350,7 +351,7 @@ func TestMigrate_101_GenericOCR2(t *testing.T) { require.NoError(t, err) type PluginValues struct { - PluginType job.OCR2PluginType + PluginType types.OCR2PluginType PluginConfig job.JSONConfig } @@ -360,7 +361,7 @@ func TestMigrate_101_GenericOCR2(t *testing.T) { err = db.Get(&pluginValues, sql) require.NoError(t, err) - require.Equal(t, job.Median, pluginValues.PluginType) + require.Equal(t, types.Median, pluginValues.PluginType) require.Equal(t, job.JSONConfig{"juelsPerFeeCoinSource": spec.JuelsPerFeeCoinPipeline}, pluginValues.PluginConfig) err = goose.Down(db.DB, migrationDir) diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 8c6dadc880e..c4efbb65825 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-relay/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/assets" clnull "github.com/smartcontractkit/chainlink/v2/core/null" "github.com/smartcontractkit/chainlink/v2/core/services/job" @@ -515,7 +516,7 @@ func TestResolver_OCR2Spec(t *testing.T) { Relay: relay.EVM, RelayConfig: relayConfig, TransmitterID: null.StringFrom(transmitterAddress.String()), - PluginType: job.Median, + PluginType: types.Median, PluginConfig: pluginConfig, }, }, nil) diff --git a/go.mod b/go.mod index 19efff0277c..64560eb08fe 100644 --- a/go.mod +++ b/go.mod @@ -67,7 +67,7 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230831132059-42af68994512 - github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230905185157-da01915913a4 + github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230908130052-16ce8fa4a45b github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 github.com/smartcontractkit/libocr v0.0.0-20230816220705-665e93233ae5 diff --git a/go.sum b/go.sum index 57938ebab7d..f434c6fc492 100644 --- a/go.sum +++ b/go.sum @@ -1377,8 +1377,8 @@ github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumv github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230831132059-42af68994512 h1:DojChlaudA1HAxwQPKmt/EDf36OUeFJ0LJBYClauMyU= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230831132059-42af68994512/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230905185157-da01915913a4 h1:yArUq/0t126bl8BRtjLCf2NuHK35CDIkhc3M5P46apc= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230905185157-da01915913a4/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230908130052-16ce8fa4a45b h1:RrG9RuPfQi1Ak7/FdIEDlDpta2PSm5Dghmxpq2ZIO8M= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230908130052-16ce8fa4a45b/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4= github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE= github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca/go.mod h1:RIUJXn7EVp24TL2p4FW79dYjyno23x5mjt1nKN+5WEk= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 1b1b3940ccf..8fda4ca62dd 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -384,7 +384,7 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230831132059-42af68994512 // indirect - github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230905185157-da01915913a4 // indirect + github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230908130052-16ce8fa4a45b // indirect github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 // indirect github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 2e77b16fe09..4d57db530fc 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -2252,8 +2252,8 @@ github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230831132059-42af6899451 github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230831132059-42af68994512/go.mod h1:xMwqRdj5vqYhCJXgKVqvyAwdcqM6ZAEhnwEQ4Khsop8= github.com/smartcontractkit/chainlink-env v0.36.0 h1:CFOjs0c0y3lrHi/fl5qseCH9EQa5W/6CFyOvmhe2VnA= github.com/smartcontractkit/chainlink-env v0.36.0/go.mod h1:NbRExHmJGnKSYXmvNuJx5VErSx26GtE1AEN/CRzYOg8= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230905185157-da01915913a4 h1:yArUq/0t126bl8BRtjLCf2NuHK35CDIkhc3M5P46apc= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230905185157-da01915913a4/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230908130052-16ce8fa4a45b h1:RrG9RuPfQi1Ak7/FdIEDlDpta2PSm5Dghmxpq2ZIO8M= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230908130052-16ce8fa4a45b/go.mod h1:gWclxGW7rLkbjXn7FGizYlyKhp/boekto4MEYGyiMG4= github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca h1:x7M0m512gtXw5Z4B1WJPZ52VgshoIv+IvHqQ8hsH4AE= github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230831134610-680240b97aca/go.mod h1:RIUJXn7EVp24TL2p4FW79dYjyno23x5mjt1nKN+5WEk= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230901115736-bbabe542a918 h1:ByVauKFXphRlSNG47lNuxZ9aicu+r8AoNp933VRPpCw=