diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index ad04a9d808c..9e944ead9bf 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1214,7 +1214,7 @@ jobs: QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - - name: Pull Artfacts + - name: Pull Artifacts if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' run: | IMAGE_NAME=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ needs.get_solana_sha.outputs.sha }} @@ -1232,12 +1232,20 @@ jobs: docker rm "$CONTAINER_ID" - name: Install Solana CLI # required for ensuring the local test validator is configured correctly run: ./scripts/install-solana-ci.sh + - name: Install gauntlet + run: | + yarn --cwd ./gauntlet install --frozen-lockfile + yarn --cwd ./gauntlet build + yarn --cwd ./gauntlet gauntlet - name: Generate config overrides run: | # https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/README.md cat << EOF > config.toml [ChainlinkImage] image="${{ env.CHAINLINK_IMAGE }}" version="${{ inputs.evm-ref || github.sha }}" + [Common] + user="${{ github.actor }}" + internal_docker_repo = "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com" EOF # shellcheck disable=SC2002 BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) diff --git a/core/cmd/shell_test.go b/core/cmd/shell_test.go index 1e3b93851f3..6ecdc4a34de 100644 --- a/core/cmd/shell_test.go +++ b/core/cmd/shell_test.go @@ -18,9 +18,7 @@ import ( "github.com/urfave/cli" commoncfg "github.com/smartcontractkit/chainlink-common/pkg/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" - "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" stkcfg "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -359,20 +357,20 @@ func TestSetupSolanaRelayer(t *testing.T) { // config 3 chains but only enable 2 => should only be 2 relayer nEnabledChains := 2 tConfig := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { - c.Solana = solana.TOMLConfigs{ - &solana.TOMLConfig{ + c.Solana = solcfg.TOMLConfigs{ + &solcfg.TOMLConfig{ ChainID: ptr[string]("solana-id-1"), Enabled: ptr(true), Chain: solcfg.Chain{}, Nodes: []*solcfg.Node{}, }, - &solana.TOMLConfig{ + &solcfg.TOMLConfig{ ChainID: ptr[string]("solana-id-2"), Enabled: ptr(true), Chain: solcfg.Chain{}, Nodes: []*solcfg.Node{}, }, - &solana.TOMLConfig{ + &solcfg.TOMLConfig{ ChainID: ptr[string]("disabled-solana-id-1"), Enabled: ptr(false), Chain: solcfg.Chain{}, @@ -382,8 +380,8 @@ func TestSetupSolanaRelayer(t *testing.T) { }) t2Config := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { - c.Solana = solana.TOMLConfigs{ - &solana.TOMLConfig{ + c.Solana = solcfg.TOMLConfigs{ + &solcfg.TOMLConfig{ ChainID: ptr[string]("solana-id-1"), Enabled: ptr(true), Chain: solcfg.Chain{}, @@ -420,14 +418,14 @@ func TestSetupSolanaRelayer(t *testing.T) { // test that duplicate enabled chains is an error when duplicateConfig := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { - c.Solana = solana.TOMLConfigs{ - &solana.TOMLConfig{ + c.Solana = solcfg.TOMLConfigs{ + &solcfg.TOMLConfig{ ChainID: ptr[string]("dupe"), Enabled: ptr(true), Chain: solcfg.Chain{}, Nodes: []*solcfg.Node{}, }, - &solana.TOMLConfig{ + &solcfg.TOMLConfig{ ChainID: ptr[string]("dupe"), Enabled: ptr(true), Chain: solcfg.Chain{}, @@ -478,21 +476,21 @@ func TestSetupStarkNetRelayer(t *testing.T) { ChainID: ptr[string]("starknet-id-1"), Enabled: ptr(true), Chain: stkcfg.Chain{}, - Nodes: []*config.Node{}, + Nodes: []*stkcfg.Node{}, FeederURL: commoncfg.MustParseURL("https://feeder.url"), }, &stkcfg.TOMLConfig{ ChainID: ptr[string]("starknet-id-2"), Enabled: ptr(true), Chain: stkcfg.Chain{}, - Nodes: []*config.Node{}, + Nodes: []*stkcfg.Node{}, FeederURL: commoncfg.MustParseURL("https://feeder.url"), }, &stkcfg.TOMLConfig{ ChainID: ptr[string]("disabled-starknet-id-1"), Enabled: ptr(false), Chain: stkcfg.Chain{}, - Nodes: []*config.Node{}, + Nodes: []*stkcfg.Node{}, FeederURL: commoncfg.MustParseURL("https://feeder.url"), }, } @@ -504,7 +502,7 @@ func TestSetupStarkNetRelayer(t *testing.T) { ChainID: ptr[string]("starknet-id-3"), Enabled: ptr(true), Chain: stkcfg.Chain{}, - Nodes: []*config.Node{}, + Nodes: []*stkcfg.Node{}, FeederURL: commoncfg.MustParseURL("https://feeder.url"), }, } @@ -542,14 +540,14 @@ func TestSetupStarkNetRelayer(t *testing.T) { ChainID: ptr[string]("dupe"), Enabled: ptr(true), Chain: stkcfg.Chain{}, - Nodes: []*config.Node{}, + Nodes: []*stkcfg.Node{}, FeederURL: commoncfg.MustParseURL("https://feeder.url"), }, &stkcfg.TOMLConfig{ ChainID: ptr[string]("dupe"), Enabled: ptr(true), Chain: stkcfg.Chain{}, - Nodes: []*config.Node{}, + Nodes: []*stkcfg.Node{}, FeederURL: commoncfg.MustParseURL("https://feeder.url"), }, } diff --git a/core/cmd/solana_chains_commands_test.go b/core/cmd/solana_chains_commands_test.go index 88bc8049247..e374ba11c65 100644 --- a/core/cmd/solana_chains_commands_test.go +++ b/core/cmd/solana_chains_commands_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-solana/pkg/solana" + solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/solanatest" @@ -16,7 +16,7 @@ func TestShell_IndexSolanaChains(t *testing.T) { t.Parallel() id := solanatest.RandomChainID() - cfg := solana.TOMLConfig{ + cfg := solcfg.TOMLConfig{ ChainID: &id, Enabled: ptr(true), } diff --git a/core/cmd/solana_node_commands_test.go b/core/cmd/solana_node_commands_test.go index ebe9502d1fa..adc699de79b 100644 --- a/core/cmd/solana_node_commands_test.go +++ b/core/cmd/solana_node_commands_test.go @@ -12,14 +12,13 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/config" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/solanatest" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" ) -func solanaStartNewApplication(t *testing.T, cfgs ...*solana.TOMLConfig) *cltest.TestApplication { +func solanaStartNewApplication(t *testing.T, cfgs ...*solcfg.TOMLConfig) *cltest.TestApplication { for i := range cfgs { cfgs[i].SetDefaults() } @@ -41,9 +40,9 @@ func TestShell_IndexSolanaNodes(t *testing.T) { Name: ptr("second"), URL: config.MustParseURL("https://solana2.example"), } - chain := solana.TOMLConfig{ + chain := solcfg.TOMLConfig{ ChainID: &id, - Nodes: solana.SolanaNodes{&node1, &node2}, + Nodes: solcfg.Nodes{&node1, &node2}, } app := solanaStartNewApplication(t, &chain) client, r := app.NewShellAndRenderer() diff --git a/core/cmd/solana_transaction_commands_test.go b/core/cmd/solana_transaction_commands_test.go index c26bd89ab94..79a5513f190 100644 --- a/core/cmd/solana_transaction_commands_test.go +++ b/core/cmd/solana_transaction_commands_test.go @@ -16,7 +16,6 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana" solanaClient "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -32,9 +31,9 @@ func TestShell_SolanaSendSol(t *testing.T) { Name: ptr(t.Name()), URL: config.MustParseURL(url), } - cfg := solana.TOMLConfig{ + cfg := solcfg.TOMLConfig{ ChainID: &chainID, - Nodes: solana.SolanaNodes{&node}, + Nodes: solcfg.Nodes{&node}, Enabled: ptr(true), } app := solanaStartNewApplication(t, &cfg) diff --git a/core/config/docs/docs_test.go b/core/config/docs/docs_test.go index 8c6429fd0df..aceb77dc33a 100644 --- a/core/config/docs/docs_test.go +++ b/core/config/docs/docs_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" coscfg "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana" + solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" stkcfg "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" "github.com/smartcontractkit/chainlink-common/pkg/config" @@ -97,7 +97,7 @@ func TestDoc(t *testing.T) { }) t.Run("Solana", func(t *testing.T) { - var fallbackDefaults solana.TOMLConfig + var fallbackDefaults solcfg.TOMLConfig fallbackDefaults.SetDefaults() assertTOML(t, fallbackDefaults.Chain, defaults.Solana[0].Chain) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 18840a04cad..cea4ca21242 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -259,7 +259,7 @@ require ( github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240508101745-af1ed7bc8a69 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69 // 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 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 48cff213690..cde855e2d2f 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1193,8 +1193,8 @@ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83 h1:f3W82k9V/XA6ZP/VQVJcGMVR6CrL3pQrPJSwyQWVFys= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83/go.mod h1:RdAtOeBUWq2zByw2kEbwPlXaPIb7YlaDOmnn+nVUBJI= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc h1:ZqgatXFWsJR/hkvm2mKAta6ivXZqTw7542Iz9ucoOq0= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc/go.mod h1:sR0dMjjpvvEpX3qH8DPRANauPkbO9jgUUGYK95xjLRU= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69 h1:ssh/w3oXWu+C6bE88GuFRC1+0Bx/4ihsbc80XMLrl2k= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69/go.mod h1:VsfjhvWgjxqWja4q+FlXEtX5lu8BSxn10xRo6gi948g= github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 h1:LQmRsrzzaYYN3wEU1l5tWiccznhvbyGnu2N+wHSXZAo= diff --git a/core/services/chainlink/config.go b/core/services/chainlink/config.go index b77a54f39a8..7e6fa413c67 100644 --- a/core/services/chainlink/config.go +++ b/core/services/chainlink/config.go @@ -9,7 +9,7 @@ import ( gotoml "github.com/pelletier/go-toml/v2" coscfg "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana" + solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" stkcfg "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" commoncfg "github.com/smartcontractkit/chainlink/v2/common/config" @@ -39,7 +39,7 @@ type Config struct { Cosmos coscfg.TOMLConfigs `toml:",omitempty"` - Solana solana.TOMLConfigs `toml:",omitempty"` + Solana solcfg.TOMLConfigs `toml:",omitempty"` Starknet stkcfg.TOMLConfigs `toml:",omitempty"` } @@ -122,7 +122,7 @@ func (c *Config) setDefaults() { for i := range c.Solana { if c.Solana[i] == nil { - c.Solana[i] = new(solana.TOMLConfig) + c.Solana[i] = new(solcfg.TOMLConfig) } c.Solana[i].Chain.SetDefaults() } diff --git a/core/services/chainlink/config_general.go b/core/services/chainlink/config_general.go index cae01c01cb7..ce34cc47e47 100644 --- a/core/services/chainlink/config_general.go +++ b/core/services/chainlink/config_general.go @@ -14,7 +14,7 @@ import ( "go.uber.org/zap/zapcore" coscfg "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana" + solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" starknet "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" @@ -201,7 +201,7 @@ func (g *generalConfig) CosmosConfigs() coscfg.TOMLConfigs { return g.c.Cosmos } -func (g *generalConfig) SolanaConfigs() solana.TOMLConfigs { +func (g *generalConfig) SolanaConfigs() solcfg.TOMLConfigs { return g.c.Solana } diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 11d286fbcd5..624a575d65c 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -22,7 +22,6 @@ import ( commoncfg "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/utils/hex" coscfg "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" stkcfg "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" commonconfig "github.com/smartcontractkit/chainlink/v2/common/config" @@ -160,7 +159,7 @@ var ( {Name: ptr("secondary"), TendermintURL: commoncfg.MustParseURL("http://bombay.cosmos.com")}, }}, }, - Solana: []*solana.TOMLConfig{ + Solana: []*solcfg.TOMLConfig{ { ChainID: ptr("mainnet"), Chain: solcfg.Chain{ @@ -632,7 +631,7 @@ func TestConfig_Marshal(t *testing.T) { }, }}, } - full.Solana = []*solana.TOMLConfig{ + full.Solana = []*solcfg.TOMLConfig{ { ChainID: ptr("mainnet"), Enabled: ptr(false), @@ -1546,7 +1545,7 @@ func TestConfig_setDefaults(t *testing.T) { var c Config c.EVM = evmcfg.EVMConfigs{{ChainID: ubig.NewI(99999133712345)}} c.Cosmos = coscfg.TOMLConfigs{{ChainID: ptr("unknown cosmos chain")}} - c.Solana = solana.TOMLConfigs{{ChainID: ptr("unknown solana chain")}} + c.Solana = solcfg.TOMLConfigs{{ChainID: ptr("unknown solana chain")}} c.Starknet = stkcfg.TOMLConfigs{{ChainID: ptr("unknown starknet chain")}} c.setDefaults() if s, err := c.TOMLString(); assert.NoError(t, err) { diff --git a/core/services/chainlink/mocks/general_config.go b/core/services/chainlink/mocks/general_config.go index a86753a59e3..c7e224f4f2a 100644 --- a/core/services/chainlink/mocks/general_config.go +++ b/core/services/chainlink/mocks/general_config.go @@ -10,7 +10,7 @@ import ( mock "github.com/stretchr/testify/mock" - solana "github.com/smartcontractkit/chainlink-solana/pkg/solana" + solanaconfig "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" time "time" @@ -616,19 +616,19 @@ func (_m *GeneralConfig) ShutdownGracePeriod() time.Duration { } // SolanaConfigs provides a mock function with given fields: -func (_m *GeneralConfig) SolanaConfigs() solana.TOMLConfigs { +func (_m *GeneralConfig) SolanaConfigs() solanaconfig.TOMLConfigs { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for SolanaConfigs") } - var r0 solana.TOMLConfigs - if rf, ok := ret.Get(0).(func() solana.TOMLConfigs); ok { + var r0 solanaconfig.TOMLConfigs + if rf, ok := ret.Get(0).(func() solanaconfig.TOMLConfigs); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(solana.TOMLConfigs) + r0 = ret.Get(0).(solanaconfig.TOMLConfigs) } } diff --git a/core/services/chainlink/relayer_chain_interoperators_test.go b/core/services/chainlink/relayer_chain_interoperators_test.go index c6183cc1a34..c2baa1edcde 100644 --- a/core/services/chainlink/relayer_chain_interoperators_test.go +++ b/core/services/chainlink/relayer_chain_interoperators_test.go @@ -18,7 +18,6 @@ import ( solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" stkcfg "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -75,8 +74,8 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { Nodes: evmcfg.EVMNodes{&node2_1}, }) - c.Solana = solana.TOMLConfigs{ - &solana.TOMLConfig{ + c.Solana = solcfg.TOMLConfigs{ + &solcfg.TOMLConfig{ ChainID: &solanaChainID1, Enabled: ptr(true), Chain: solcfg.Chain{}, @@ -85,7 +84,7 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { URL: ((*commonconfig.URL)(commonconfig.MustParseURL("http://localhost:8547").URL())), }}, }, - &solana.TOMLConfig{ + &solcfg.TOMLConfig{ ChainID: &solanaChainID2, Enabled: ptr(true), Chain: solcfg.Chain{}, diff --git a/core/services/chainlink/relayer_factory.go b/core/services/chainlink/relayer_factory.go index 2aaeb253c0a..bcdb08b8026 100644 --- a/core/services/chainlink/relayer_factory.go +++ b/core/services/chainlink/relayer_factory.go @@ -14,7 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos" coscfg "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" "github.com/smartcontractkit/chainlink-solana/pkg/solana" - pkgsolana "github.com/smartcontractkit/chainlink-solana/pkg/solana" + solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" pkgstarknet "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink" starkchain "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/chain" "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" @@ -92,10 +92,10 @@ func (r *RelayerFactory) NewEVM(ctx context.Context, config EVMFactoryConfig) (m type SolanaFactoryConfig struct { Keystore keystore.Solana - solana.TOMLConfigs + solcfg.TOMLConfigs } -func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solana.TOMLConfigs) (map[types.RelayID]loop.Relayer, error) { +func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solcfg.TOMLConfigs) (map[types.RelayID]loop.Relayer, error) { solanaRelayers := make(map[types.RelayID]loop.Relayer) var ( solLggr = r.Logger.Named("Solana") @@ -123,7 +123,7 @@ func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solana.TOMLConf if cmdName := env.SolanaPlugin.Cmd.Get(); cmdName != "" { // setup the solana relayer to be a LOOP cfgTOML, err := toml.Marshal(struct { - Solana solana.TOMLConfig + Solana solcfg.TOMLConfig }{Solana: *chainCfg}) if err != nil { @@ -154,7 +154,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(solana.NewRelayer(lggr, chain), chain) } } return solanaRelayers, nil diff --git a/core/services/chainlink/types.go b/core/services/chainlink/types.go index 72cad694167..4c7550142a2 100644 --- a/core/services/chainlink/types.go +++ b/core/services/chainlink/types.go @@ -2,7 +2,7 @@ package chainlink import ( coscfg "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana" + solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" stkcfg "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" @@ -15,7 +15,7 @@ type GeneralConfig interface { config.AppConfig toml.HasEVMConfigs CosmosConfigs() coscfg.TOMLConfigs - SolanaConfigs() solana.TOMLConfigs + SolanaConfigs() solcfg.TOMLConfigs StarknetConfigs() stkcfg.TOMLConfigs // ConfigTOML returns both the user provided and effective configuration as TOML. ConfigTOML() (user, effective string) diff --git a/core/utils/config/validate.go b/core/utils/config/validate.go index 5fbae24ad53..f8508f27bf7 100644 --- a/core/utils/config/validate.go +++ b/core/utils/config/validate.go @@ -33,7 +33,9 @@ func validate(v reflect.Value, checkInterface bool) (err error) { if checkInterface { i := v.Interface() if vc, ok := i.(Validated); ok { - err = multierr.Append(err, vc.ValidateConfig()) + for _, e := range utils.UnwrapError(vc.ValidateConfig()) { + err = multierr.Append(err, e) + } } else if v.CanAddr() { i = v.Addr().Interface() if vc, ok := i.(Validated); ok { diff --git a/core/web/solana_chains_controller_test.go b/core/web/solana_chains_controller_test.go index 1377cb65aba..a2ac904b783 100644 --- a/core/web/solana_chains_controller_test.go +++ b/core/web/solana_chains_controller_test.go @@ -15,7 +15,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -80,7 +79,7 @@ Nodes = [] t.Run(tc.name, func(t *testing.T) { t.Parallel() - controller := setupSolanaChainsControllerTestV2(t, &solana.TOMLConfig{ + controller := setupSolanaChainsControllerTestV2(t, &config.TOMLConfig{ ChainID: ptr(validId), Chain: config.Chain{ SkipPreflight: ptr(false), @@ -111,13 +110,13 @@ Nodes = [] func Test_SolanaChainsController_Index(t *testing.T) { t.Parallel() - chainA := &solana.TOMLConfig{ + chainA := &config.TOMLConfig{ ChainID: ptr(fmt.Sprintf("ChainlinktestA-%d", rand.Int31n(999999))), Chain: config.Chain{ TxTimeout: commoncfg.MustNewDuration(time.Hour), }, } - chainB := &solana.TOMLConfig{ + chainB := &config.TOMLConfig{ ChainID: ptr(fmt.Sprintf("ChainlinktestB-%d", rand.Int31n(999999))), Chain: config.Chain{ SkipPreflight: ptr(false), @@ -175,7 +174,7 @@ type TestSolanaChainsController struct { client cltest.HTTPClientCleaner } -func setupSolanaChainsControllerTestV2(t *testing.T, cfgs ...*solana.TOMLConfig) *TestSolanaChainsController { +func setupSolanaChainsControllerTestV2(t *testing.T, cfgs ...*config.TOMLConfig) *TestSolanaChainsController { for i := range cfgs { cfgs[i].SetDefaults() } diff --git a/go.mod b/go.mod index 9b72abb4db0..9ce8d98b91d 100644 --- a/go.mod +++ b/go.mod @@ -76,7 +76,7 @@ require ( github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240508101745-af1ed7bc8a69 github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83 + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c diff --git a/go.sum b/go.sum index e452df784af..a41f19e2cb1 100644 --- a/go.sum +++ b/go.sum @@ -1179,8 +1179,8 @@ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83 h1:f3W82k9V/XA6ZP/VQVJcGMVR6CrL3pQrPJSwyQWVFys= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83/go.mod h1:RdAtOeBUWq2zByw2kEbwPlXaPIb7YlaDOmnn+nVUBJI= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc h1:ZqgatXFWsJR/hkvm2mKAta6ivXZqTw7542Iz9ucoOq0= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc/go.mod h1:sR0dMjjpvvEpX3qH8DPRANauPkbO9jgUUGYK95xjLRU= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69 h1:ssh/w3oXWu+C6bE88GuFRC1+0Bx/4ihsbc80XMLrl2k= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69/go.mod h1:VsfjhvWgjxqWja4q+FlXEtX5lu8BSxn10xRo6gi948g= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 144b1f62643..9442426eeb3 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -376,7 +376,7 @@ require ( github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240508101745-af1ed7bc8a69 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69 // indirect github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 98d30f02d35..477edf4ab53 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1520,8 +1520,8 @@ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83 h1:f3W82k9V/XA6ZP/VQVJcGMVR6CrL3pQrPJSwyQWVFys= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83/go.mod h1:RdAtOeBUWq2zByw2kEbwPlXaPIb7YlaDOmnn+nVUBJI= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc h1:ZqgatXFWsJR/hkvm2mKAta6ivXZqTw7542Iz9ucoOq0= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc/go.mod h1:sR0dMjjpvvEpX3qH8DPRANauPkbO9jgUUGYK95xjLRU= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69 h1:ssh/w3oXWu+C6bE88GuFRC1+0Bx/4ihsbc80XMLrl2k= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69/go.mod h1:VsfjhvWgjxqWja4q+FlXEtX5lu8BSxn10xRo6gi948g= github.com/smartcontractkit/chainlink-testing-framework v1.28.15 h1:mga7N6jtXQ3UOCt43IdsEnCMBh9xjOWPaE9BiM6kr6Q= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 162e506196b..395199f599b 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -369,7 +369,7 @@ require ( github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240508101745-af1ed7bc8a69 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69 // indirect github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449 // indirect github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 35c37e1ecf9..95624177f68 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1510,8 +1510,8 @@ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83 h1:f3W82k9V/XA6ZP/VQVJcGMVR6CrL3pQrPJSwyQWVFys= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240510181707-46b1311a5a83/go.mod h1:RdAtOeBUWq2zByw2kEbwPlXaPIb7YlaDOmnn+nVUBJI= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc h1:ZqgatXFWsJR/hkvm2mKAta6ivXZqTw7542Iz9ucoOq0= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240523174813-45db170c1ccc/go.mod h1:sR0dMjjpvvEpX3qH8DPRANauPkbO9jgUUGYK95xjLRU= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69 h1:ssh/w3oXWu+C6bE88GuFRC1+0Bx/4ihsbc80XMLrl2k= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240508155030-1024f2b55c69/go.mod h1:VsfjhvWgjxqWja4q+FlXEtX5lu8BSxn10xRo6gi948g= github.com/smartcontractkit/chainlink-testing-framework v1.28.15 h1:mga7N6jtXQ3UOCt43IdsEnCMBh9xjOWPaE9BiM6kr6Q=