Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
augustbleeds committed May 23, 2024
2 parents 59d1414 + e2bedae commit f0923d6
Show file tree
Hide file tree
Showing 30 changed files with 131 additions and 138 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/automation-nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ jobs:
cl_image_tag: 'latest'
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
artifacts_location: ./integration-tests/${{ matrix.tests.suite }}/logs
artifacts_name: testcontainers-logs-${{ matrix.tests.name }}
publish_check_name: Automation Results ${{ matrix.tests.name }}
token: ${{ secrets.GITHUB_TOKEN }}
go_mod_path: ./integration-tests/go.mod
Expand All @@ -139,7 +140,7 @@ jobs:
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: failure()
with:
name: test-log-${{ matrix.tests.name }}
name: gotest-logs-${{ matrix.tests.name }}
path: /tmp/gotest.log
retention-days: 7
continue-on-error: true
Expand All @@ -155,6 +156,9 @@ jobs:
this-job-name: Automation ${{ matrix.tests.name }} Test
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
continue-on-error: true
- name: Print failed test summary
if: always()
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17

test-notify:
name: Start Slack Thread
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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)
Expand Down
32 changes: 15 additions & 17 deletions core/cmd/shell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{},
Expand All @@ -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{},
Expand Down Expand Up @@ -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{},
Expand Down Expand Up @@ -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"),
},
}
Expand All @@ -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"),
},
}
Expand Down Expand Up @@ -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"),
},
}
Expand Down
4 changes: 2 additions & 2 deletions core/cmd/solana_chains_commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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),
}
Expand Down
7 changes: 3 additions & 4 deletions core/cmd/solana_node_commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand All @@ -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()
Expand Down
5 changes: 2 additions & 3 deletions core/cmd/solana_transaction_commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions core/config/docs/docs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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-20240522213638-159fb2d99917 // 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
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs=
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=
Expand Down
6 changes: 3 additions & 3 deletions core/services/chainlink/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"`
}
Expand Down Expand Up @@ -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()
}
Expand Down
4 changes: 2 additions & 2 deletions core/services/chainlink/config_general.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

Expand Down
7 changes: 3 additions & 4 deletions core/services/chainlink/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -632,7 +631,7 @@ func TestConfig_Marshal(t *testing.T) {
},
}},
}
full.Solana = []*solana.TOMLConfig{
full.Solana = []*solcfg.TOMLConfig{
{
ChainID: ptr("mainnet"),
Enabled: ptr(false),
Expand Down Expand Up @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions core/services/chainlink/mocks/general_config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f0923d6

Please sign in to comment.