Skip to content

Commit 603dbab

Browse files
committed
Merge branch 'develop' into ivo/label_nodes
2 parents d8e1766 + d3362cd commit 603dbab

File tree

430 files changed

+8906
-7943
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

430 files changed

+8906
-7943
lines changed

.changeset/better-buckets-hang.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"chainlink": patch
3+
---
4+
5+
#internal add env var CL_SKIP_APP_VERSION_CHECK to enable booting prior app versions

.changeset/chatty-toes-press.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"chainlink": patch
3+
---
4+
5+
#updated Bump chainlink-solana
6+
#updated Bump chainlink-ccip
7+
#updated Bump mcms

.changeset/tasty-pillows-drum.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"chainlink": minor
3+
---
4+
5+
Cleanup and refactoring several functions to use the plugin map #added

.github/e2e-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ runner-test-matrix:
214214
- Merge Queue CRE E2E Core Tests
215215
- Nightly E2E Tests
216216
- Push CRE E2E Core Tests
217-
test_cmd: cd tests && pushd smoke/cre/cmd > /dev/null && go run main.go download all --output-dir ../ --gh-token-env-var-name GITHUB_API_TOKEN --cre-cli-version v0.1.5 --capability-name cron --capability-version v1.0.2-alpha 1>&2 && popd > /dev/null && { go test github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre -v -run "^(TestCRE_OCR3_PoR_Workflow_SingleDon_MultipleWriters_MockedPrice)$" -timeout 30m -count=1 -test.parallel=1 -json; exit_code=$?; ../../tools/ci/wait-for-containers-to-stop.sh 30; exit $exit_code; } # Sleep to allow testcontainers to stop
217+
test_cmd: cd tests && pushd smoke/cre/cmd > /dev/null && go run main.go download all --output-dir ../ --gh-token-env-var-name GITHUB_API_TOKEN --cre-cli-version v0.2.0 --capability-names cron --capability-version v1.0.2-alpha 1>&2 && popd > /dev/null && { go test github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre -v -run "^(TestCRE_OCR3_PoR_Workflow_SingleDon_MultipleWriters_MockedPrice)$" -timeout 30m -count=1 -test.parallel=1 -json; exit_code=$?; ../../tools/ci/wait-for-containers-to-stop.sh 30; exit $exit_code; } # Sleep to allow testcontainers to stop
218218
pyroscope_env: ci-smoke-cre-evm-simulated
219219
test_env_vars:
220220
E2E_TEST_CHAINLINK_VERSION: "{{ env.DEFAULT_CHAINLINK_PLUGINS_VERSION }}" # This is the chainlink version that has the plugins
@@ -235,7 +235,7 @@ runner-test-matrix:
235235
- Merge Queue CRE E2E Core Tests
236236
- Nightly E2E Tests
237237
- Push CRE E2E Core Tests
238-
test_cmd: cd tests && pushd smoke/cre/cmd > /dev/null && go run main.go download all --output-dir ../ --gh-token-env-var-name GITHUB_API_TOKEN --cre-cli-version v0.1.5 --capability-name cron --capability-version v1.0.2-alpha 1>&2 && popd > /dev/null && { go test github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre -v -run "^(TestCRE_OCR3_PoR_Workflow_GatewayDon_MockedPrice)$" -timeout 30m -count=1 -test.parallel=1 -json; exit_code=$?; ../../tools/ci/wait-for-containers-to-stop.sh 30; exit $exit_code; } # Sleep to allow testcontainers to stop
238+
test_cmd: cd tests && pushd smoke/cre/cmd > /dev/null && go run main.go download all --output-dir ../ --gh-token-env-var-name GITHUB_API_TOKEN --cre-cli-version v0.2.0 --capability-names cron --capability-version v1.0.2-alpha 1>&2 && popd > /dev/null && { go test github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre -v -run "^(TestCRE_OCR3_PoR_Workflow_GatewayDon_MockedPrice)$" -timeout 30m -count=1 -test.parallel=1 -json; exit_code=$?; ../../tools/ci/wait-for-containers-to-stop.sh 30; exit $exit_code; } # Sleep to allow testcontainers to stop
239239
pyroscope_env: ci-smoke-capabilities-evm-simulated
240240
test_env_vars:
241241
E2E_TEST_CHAINLINK_VERSION: "{{ env.DEFAULT_CHAINLINK_PLUGINS_VERSION }}" # This is the chainlink version that has the plugins
@@ -256,7 +256,7 @@ runner-test-matrix:
256256
- Merge Queue CRE E2E Core Tests
257257
- Nightly E2E Tests
258258
- Push CRE E2E Core Tests
259-
test_cmd: cd tests && pushd smoke/cre/cmd > /dev/null && go run main.go download all --output-dir ../ --gh-token-env-var-name GITHUB_API_TOKEN --cre-cli-version v0.1.5 --capability-name cron --capability-version v1.0.2-alpha 1>&2 && popd > /dev/null && { go test github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre -v -run "^(TestCRE_OCR3_PoR_Workflow_CapabilitiesDons_LivePrice)$" -timeout 30m -count=1 -test.parallel=1 -json; exit_code=$?; ../../tools/ci/wait-for-containers-to-stop.sh 30; exit $exit_code; } # Sleep to allow testcontainers to stop
259+
test_cmd: cd tests && pushd smoke/cre/cmd > /dev/null && go run main.go download all --output-dir ../ --gh-token-env-var-name GITHUB_API_TOKEN --cre-cli-version v0.2.0 --capability-names cron --capability-version v1.0.2-alpha 1>&2 && popd > /dev/null && { go test github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre -v -run "^(TestCRE_OCR3_PoR_Workflow_CapabilitiesDons_LivePrice)$" -timeout 30m -count=1 -test.parallel=1 -json; exit_code=$?; ../../tools/ci/wait-for-containers-to-stop.sh 30; exit $exit_code; } # Sleep to allow testcontainers to stop
260260
pyroscope_env: ci-smoke-capabilities-evm-simulated
261261
test_env_vars:
262262
E2E_TEST_CHAINLINK_VERSION: "{{ env.DEFAULT_CHAINLINK_PLUGINS_VERSION }}" # This is the chainlink version that has the plugins

.github/workflows/ci-core.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,7 @@ jobs:
316316
USE_FLAKEGUARD: ${{ matrix.type.use-flakeguard == 'true' && 'true' || '' }}
317317
run: |
318318
# See: https://github.com/golang/go/issues/69179
319-
GODEBUG=goindex=0
320-
321-
./tools/bin/${{ matrix.type.cmd }} ./...
319+
GODEBUG=goindex=0 ./tools/bin/${{ matrix.type.cmd }} ./...
322320
323321
- name: Generate Flakeguard Test Reports
324322
if: ${{ always() && steps.run-tests.outcome != 'skipped' && matrix.type.should-run == 'true' && matrix.type.use-flakeguard == 'true' }}
@@ -640,6 +638,7 @@ jobs:
640638
runs-on: ubuntu-latest
641639
env:
642640
SH_TEST_RUNNER: runs-on=${{ github.run_id }}/cpu=32+64/ram=64+128/family=c6id+m6id+m6idn/spot=false/extras=s3-cache
641+
SH_DEPLOYMENT_TEST_RUNNER: runs-on=${{ github.run_id }}/cpu=48/ram=96/family=c6id/spot=false/extras=s3-cache
643642
SH_FUZZ_RUNNER: runs-on=${{ github.run_id}}/cpu=8+16/ram=32+64/family=c6id+m6id+m6idn/spot=false/extras=s3-cache
644643
SH_RACE_TEST_RUNNER: runs-on=${{ github.run_id}}/cpu=64+128/ram=128+128/family=c7+m7/disk=large/spot=false/extras=s3-cache
645644
GH_TEST_RUNNER: ubuntu22.04-32cores-128GB
@@ -716,7 +715,7 @@ jobs:
716715
717716
echo "Opt-out is false for current run. Using self-hosted runner for deployment tests."
718717
echo "deployment-tests-is-self-hosted=true" | tee -a $GITHUB_OUTPUT
719-
echo "deployment-tests-runner=${SH_TEST_RUNNER}" | tee -a $GITHUB_OUTPUT
718+
echo "deployment-tests-runner=${SH_DEPLOYMENT_TEST_RUNNER}" | tee -a $GITHUB_OUTPUT
720719
721720
- name: Select runners for core tests
722721
id: core-tests

.github/workflows/flakeguard.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,11 @@ jobs:
322322
id: gen_id
323323
run: echo "id=$(uuidgen)" >> "$GITHUB_OUTPUT"
324324

325-
- name: Install flakeguard
325+
- name: Install flakeguard and gotestsum
326326
shell: bash
327-
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@bc66d27e3325a1fecedc0fc932d13d3e54ff6f25 # [email protected]
327+
run: |
328+
go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@bc66d27e3325a1fecedc0fc932d13d3e54ff6f25 # [email protected]
329+
go install gotest.tools/[email protected] # needed for flakeguard output formatting
328330
329331
- name: Run tests with flakeguard
330332
shell: bash

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,7 @@ vendor/*
109109
contracts/lcov.info
110110
contracts/out/
111111
/cache
112+
113+
# Used by plugins/chianlink.prebuilt.Dockerfile
114+
bin/
115+
lib/

.mockery.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ packages:
2727
OracleCreator:
2828
github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common:
2929
interfaces:
30-
ExtraDataCodec:
30+
SourceChainExtraDataCodec:
31+
ChainSpecificAddressCodec:
3132
github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types:
3233
interfaces:
3334
Dispatcher:
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
package ccipevm
2+
3+
import (
4+
"context"
5+
"encoding/json"
6+
"fmt"
7+
8+
"github.com/ethereum/go-ethereum/common"
9+
"github.com/smartcontractkit/chainlink-common/pkg/types"
10+
ccipcommon "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common"
11+
evmconfig "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/configs/evm"
12+
evmrelaytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types"
13+
)
14+
15+
// ChainCWProvider is a struct that implements the ChainRWProvider interface for EVM chains.
16+
type ChainCWProvider struct{}
17+
18+
// GetChainReader returns a new ContractReader for EVM chains.
19+
func (g ChainCWProvider) GetChainReader(ctx context.Context, params ccipcommon.ChainReaderProviderOpts) (types.ContractReader, error) {
20+
var chainReaderConfig evmrelaytypes.ChainReaderConfig
21+
if params.ChainID == params.DestChainID {
22+
chainReaderConfig = evmconfig.DestReaderConfig
23+
} else {
24+
chainReaderConfig = evmconfig.SourceReaderConfig
25+
}
26+
27+
if !params.Ofc.CommitEmpty() && params.Ofc.Commit.PriceFeedChainSelector == params.ChainSelector {
28+
params.Lggr.Debugw("Adding feed reader config", "chainID", params.ChainID)
29+
chainReaderConfig = evmconfig.MergeReaderConfigs(chainReaderConfig, evmconfig.FeedReaderConfig)
30+
}
31+
32+
if isUSDCEnabled(params.Ofc) {
33+
params.Lggr.Debugw("Adding USDC reader config", "chainID", params.ChainID)
34+
chainReaderConfig = evmconfig.MergeReaderConfigs(chainReaderConfig, evmconfig.USDCReaderConfig)
35+
}
36+
37+
if params.ChainID == params.HomeChainID {
38+
params.Lggr.Debugw("Adding home chain reader config", "chainID", params.ChainID)
39+
chainReaderConfig = evmconfig.MergeReaderConfigs(chainReaderConfig, evmconfig.HomeChainReaderConfigRaw)
40+
}
41+
42+
marshaledConfig, err := json.Marshal(chainReaderConfig)
43+
if err != nil {
44+
return nil, fmt.Errorf("failed to marshal chain reader config: %w", err)
45+
}
46+
47+
cr, err := params.Relayer.NewContractReader(ctx, marshaledConfig)
48+
if err != nil {
49+
return nil, err
50+
}
51+
52+
return cr, nil
53+
}
54+
55+
// GetChainWriter returns a new ContractWriter for EVM chains.
56+
func (g ChainCWProvider) GetChainWriter(ctx context.Context, params ccipcommon.ChainWriterProviderOpts) (types.ContractWriter, error) {
57+
var fromAddress common.Address
58+
transmitter, ok := params.Transmitters[types.NewRelayID(params.ChainFamily, params.ChainID)]
59+
if ok {
60+
fromAddress = common.HexToAddress(transmitter[0])
61+
}
62+
63+
evmConfig, err := evmconfig.ChainWriterConfigRaw(
64+
fromAddress,
65+
defaultCommitGasLimit,
66+
params.ExecBatchGasLimit)
67+
if err != nil {
68+
return nil, fmt.Errorf("failed to create EVM chain writer config: %w", err)
69+
}
70+
71+
chainWriterConfig, err := json.Marshal(evmConfig)
72+
if err != nil {
73+
return nil, fmt.Errorf("failed to marshal EVM chain writer config: %w", err)
74+
}
75+
76+
cw, err := params.Relayer.NewContractWriter(ctx, chainWriterConfig)
77+
if err != nil {
78+
return nil, fmt.Errorf("failed to create chain writer for chain %s: %w", params.ChainID, err)
79+
}
80+
81+
return cw, nil
82+
}
83+
84+
func isUSDCEnabled(ofc ccipcommon.OffChainConfig) bool {
85+
if ofc.ExecEmpty() {
86+
return false
87+
}
88+
89+
return ofc.Execute.IsUSDCEnabled()
90+
}

core/capabilities/ccip/ccipevm/executecodec.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ import (
88
"github.com/ethereum/go-ethereum/accounts/abi"
99
"github.com/ethereum/go-ethereum/common"
1010
chainsel "github.com/smartcontractkit/chain-selectors"
11-
12-
ccipcommon "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common"
13-
14-
cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
15-
1611
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp"
12+
cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
13+
ccipcommon "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common"
1714
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers"
1815
)
1916

@@ -62,7 +59,6 @@ func (e *ExecutePluginCodecV1) Encode(ctx context.Context, report cciptypes.Exec
6259
evmMessages := make([]offramp.InternalAny2EVMRampMessage, 0, len(chainReport.Messages))
6360
for _, message := range chainReport.Messages {
6461
receiver := common.BytesToAddress(message.Receiver)
65-
6662
tokenAmounts := make([]offramp.InternalAny2EVMTokenTransfer, 0, len(message.TokenAmounts))
6763
for _, tokenAmount := range message.TokenAmounts {
6864
if tokenAmount.Amount.IsEmpty() {

0 commit comments

Comments
 (0)