Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
kalverra committed Nov 28, 2024
2 parents 15bcbff + 19393cf commit 46b6450
Show file tree
Hide file tree
Showing 223 changed files with 6,115 additions and 1,927 deletions.
11 changes: 11 additions & 0 deletions .changeset/kind-parents-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"chainlink": patch
---

Add two new metrics for monitoring LLO transmitter health #added

`llo_mercurytransmitter_concurrent_transmit_gauge`
Gauge that measures the number of transmit threads currently waiting on a remote transmit call. You may wish to alert if this exceeds some number for a given period of time, or if it ever reaches its max.

`llo_mercurytransmitter_concurrent_delete_gauge`
Gauge that measures the number of delete threads currently waiting on a delete call to the DB. You may wish to alert if this exceeds some number for a given period of time, or if it ever reaches its max.
37 changes: 12 additions & 25 deletions .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -948,19 +948,6 @@ runner-test-matrix:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
E2E_JD_VERSION: 0.6.0

- id: smoke/ccip/ccip_messaging_test.go:*
path: integration-tests/smoke/ccip/ccip_messaging_test.go
test_env_type: docker
runs_on: ubuntu-latest
triggers:
- PR E2E Core Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/smoke/ccip && go test ccip_messaging_test.go -timeout 15m -test.parallel=1 -count=1 -json
pyroscope_env: ci-smoke-ccipv1_6-evm-simulated
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
E2E_JD_VERSION: 0.6.0

- id: smoke/ccip/ccip_batching_test.go:*
path: integration-tests/smoke/ccip/ccip_batching_test.go
test_env_type: docker
Expand Down Expand Up @@ -1012,8 +999,8 @@ runner-test-matrix:
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
E2E_JD_VERSION: 0.6.0
E2E_RMN_RAGEPROXY_VERSION: master-5208d09
E2E_RMN_AFN2PROXY_VERSION: master-5208d09
E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_MultipleMessagesOnOneLaneNoWaitForExec$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
Expand All @@ -1027,8 +1014,8 @@ runner-test-matrix:
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
E2E_JD_VERSION: 0.6.0
E2E_RMN_RAGEPROXY_VERSION: master-5208d09
E2E_RMN_AFN2PROXY_VERSION: master-5208d09
E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e

# Enable after flaking issue is resolved
# - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughObservers$
Expand All @@ -1043,8 +1030,8 @@ runner-test-matrix:
# test_env_vars:
# E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
# E2E_JD_VERSION: 0.6.0
# E2E_RMN_RAGEPROXY_VERSION: master-5208d09
# E2E_RMN_AFN2PROXY_VERSION: master-5208d09
# E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
# E2E_RMN_AFN2PROXY_VERSION: master-f461a9e

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_DifferentSigners$
path: integration-tests/smoke/ccip/ccip_rmn_test.go
Expand All @@ -1058,8 +1045,8 @@ runner-test-matrix:
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
E2E_JD_VERSION: 0.6.0
E2E_RMN_RAGEPROXY_VERSION: master-5208d09
E2E_RMN_AFN2PROXY_VERSION: master-5208d09
E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e

# Enable after flaking issue is resolved
# - id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughSigners$
Expand All @@ -1074,8 +1061,8 @@ runner-test-matrix:
# test_env_vars:
# E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
# E2E_JD_VERSION: 0.6.0
# E2E_RMN_RAGEPROXY_VERSION: master-5208d09
# E2E_RMN_AFN2PROXY_VERSION: master-5208d09
# E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
# E2E_RMN_AFN2PROXY_VERSION: master-f461a9e


- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_DifferentRmnNodesForDifferentChains$
Expand All @@ -1090,8 +1077,8 @@ runner-test-matrix:
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
E2E_JD_VERSION: 0.6.0
E2E_RMN_RAGEPROXY_VERSION: master-5208d09
E2E_RMN_AFN2PROXY_VERSION: master-5208d09
E2E_RMN_RAGEPROXY_VERSION: master-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e


# END: CCIPv1.6 tests
Expand Down
18 changes: 18 additions & 0 deletions .github/integration-in-memory-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file specifies the GitHub runner for each in-memory integration test and is utilized by .github/workflows/integration-in-memory-tests.yml CI workflow.
#
# Each entry in this file includes the following:
# - The GitHub runner (runs_on field) that will execute tests.
# - The tests that will be run by the runner.
# - The triggers (e.g., PR Integration CCIP Tests) that should trigger these tests.
#
runner-test-matrix:
# START: CCIPv1.6 tests

- id: smoke/ccip/ccip_messaging_test.go:*
path: integration-tests/smoke/ccip/ccip_messaging_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
test_cmd: cd integration-tests/smoke/ccip && go test ccip_messaging_test.go -timeout 12m -test.parallel=2 -count=1 -json
# END: CCIP tests
1 change: 1 addition & 0 deletions .github/workflows/ccip-chaos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
run-e2e-tests-workflow:
name: Run E2E Tests
uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # ctf-run-tests@0.2.0
with:
test_path: .github/e2e-tests.yml
chainlink_version: ${{ github.sha }}
require_chainlink_image_versions_in_qa_ecr: ${{ github.sha }}
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,26 +231,14 @@ jobs:
echo "COUNT=50" >> $GITHUB_ENV
echo "FUZZ_TIMEOUT_MINUTES=10">> $GITHUB_ENV
- name: Install gotestloghelper
if: ${{ needs.filter.outputs.should-run-ci-core == 'true' }}
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/gotestloghelper@v1.50.0

- name: Run tests
if: ${{ needs.filter.outputs.should-run-ci-core == 'true' }}
id: run-tests
env:
OUTPUT_FILE: ./output.txt
USE_TEE: false
CL_DATABASE_URL: ${{ env.DB_URL }}
run: ./tools/bin/${{ matrix.type.cmd }} ./...

- name: Print Filtered Test Results
if: ${{ failure() && needs.filter.outputs.should-run-ci-core == 'true' && steps.run-tests.conclusion == 'failure' }}
run: |
if [[ "${{ matrix.type.printResults }}" == "true" ]]; then
cat output.txt | gotestloghelper -ci
fi
- name: Print Races
id: print-races
if: ${{ failure() && matrix.type.cmd == 'go_core_race_tests' && needs.filter.outputs.should-run-ci-core == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crib-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
echo $GITHUB_WORKSPACE
- name: Deploy and validate CRIB Environment for Core
uses: smartcontractkit/.github/actions/crib-deploy-environment@a4058228b4b9b6e30bb0e2b883e3b4f0cd447970 # crib-deploy-environment@2.1.0
uses: smartcontractkit/.github/actions/crib-deploy-environment@c1c5e0952dfb1f7748cdad9789fd2a2ae8dc7348 # crib-deploy-environment@2.1.1
id: deploy-crib
with:
github-token: ${{ steps.token.outputs.access-token }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/flakeguard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ env:
ALL_TESTS_RUNNER_COUNT: ${{ fromJson(inputs.extraArgs)['all_tests_runner_count'] || '2' }} # The number of GitHub runners to use when running all tests `runAllTests=true`.
TEST_REPEAT_COUNT: ${{ fromJson(inputs.extraArgs)['test_repeat_count'] || '5' }} # The number of times each runner should run a test to detect flaky tests.
RUN_WITH_RACE: ${{ fromJson(inputs.extraArgs)['run_with_race'] || 'true' }} # Whether to run tests with -race flag.
RUN_WITH_SHUFFLE: ${{ fromJson(inputs.extraArgs)['run_with_shuffle'] || 'false' }} # Whether to run tests with -shuffle flag.
SHUFFLE_SEED: ${{ fromJson(inputs.extraArgs)['shuffle_seed'] || '999' }} # The seed to use when -shuffle flag is enabled. Requires RUN_WITH_SHUFFLE to be true.
ALL_TESTS_RUNNER: ${{ fromJson(inputs.extraArgs)['all_tests_runner'] || 'ubuntu22.04-32cores-128GB' }} # The runner to use for running all tests.
DEFAULT_RUNNER: 'ubuntu-latest' # The default runner to use for running tests.
UPLOAD_ALL_TEST_RESULTS: ${{ fromJson(inputs.extraArgs)['upload_all_test_results'] || 'false' }} # Whether to upload all test results as artifacts.
Expand Down Expand Up @@ -257,11 +259,11 @@ jobs:

- name: Install flakeguard
shell: bash
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@5c4a2d3cd499e3ea56250cc8184841d10fed1ff8 # flakguard@0.0.1
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@5c4a2d3cd499e3ea56250cc8184841d10fed1ff8 # flakguard@0.1.0

- name: Run tests with flakeguard
shell: bash
run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --skip-tests=${{ env.SKIPPED_TESTS }} --print-failed-tests=${{ env.PRINT_FAILED_TESTS }} --output-json=test-result.json
run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --print-failed-tests=${{ env.PRINT_FAILED_TESTS }} --output-json=test-result.json
env:
CL_DATABASE_URL: ${{ env.DB_URL }}

Expand Down Expand Up @@ -299,7 +301,7 @@ jobs:

- name: Install flakeguard
shell: bash
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@5c4a2d3cd499e3ea56250cc8184841d10fed1ff8 # flakguard@0.0.1
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@5c4a2d3cd499e3ea56250cc8184841d10fed1ff8 # flakguard@0.1.0

- name: Set combined test results
id: set_test_results
Expand Down
145 changes: 145 additions & 0 deletions .github/workflows/integration-in-memory-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
#
# Workflow to run in-memory integration tests
# Test matrix is defined in .github/integration-in-memory-tests.yml
#
name: Integration In-Memory Tests
run-name: Integration In-Memory Tests
on:
merge_group:
pull_request:
push:
tags:
- "*"
workflow_dispatch:
inputs:
cl_ref:
description: 'The ref to checkout, defaults to the calling branch'
required: false
type: string

# Only run 1 of this workflow at a time per PR
concurrency:
group: ${{ github.ref }}-${{ github.repository }}-${{ github.event_name }}--integration-tests
cancel-in-progress: true

jobs:
changes:
environment: integration
name: Check Paths That Require Tests To Run
runs-on: ubuntu-latest
# We don't directly merge dependabot PRs, so let's not waste the resources
if: github.actor != 'dependabot[bot]'
steps:
- name: Checkout the repo
uses: actions/checkout@v4.2.1
with:
repository: smartcontractkit/chainlink
ref: ${{ inputs.cl_ref }}
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
github_ci_changes:
- '.github/workflows/integration-tests.yml'
- '.github/workflows/integration-in-memory-tests.yml'
- '.github/integration-in-memory-tests.yml'
core_changes:
- '**/*.go'
- '**/*go.sum'
- '**/*go.mod'
- '**/*Dockerfile'
- 'core/**/migrations/*.sql'
- 'core/**/config/**/*.toml'
- 'integration-tests/**/*.toml'
ccip_changes:
- '**/*ccip*'
- '**/*ccip*/**'
- name: Ignore Filter On Workflow Dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
id: ignore-filter
run: echo "changes=true" >> $GITHUB_OUTPUT
outputs:
github_ci_changes: ${{ steps.ignore-filter.outputs.changes || steps.changes.outputs.github_ci_changes }}
core_changes: ${{ steps.ignore-filter.outputs.changes || steps.changes.outputs.core_changes }}
ccip_changes: ${{ steps.ignore-filter.outputs.changes || steps.changes.outputs.ccip_changes }}

run-ccip-integration-tests-for-pr:
name: Run CCIP integration Tests For PR
permissions:
actions: read
checks: write
pull-requests: write
id-token: write
contents: read
needs: changes
if: github.event_name == 'pull_request' && ( needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true')
uses: smartcontractkit/.github/.github/workflows/run-integration-tests.yml@57112554b9e5cfae79e795a8b1c36acf7e9dead7
with:
workflow_name: Run CCIP Integration Tests For PR
test_path: .github/integration-in-memory-tests.yml
test_trigger: PR Integration CCIP Tests
secrets:
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}

run-ccip-integration-tests-for-merge-queue:
name: Run CCIP Integration Tests For Merge Queue
permissions:
actions: read
checks: write
pull-requests: write
id-token: write
contents: read
needs: changes
if: github.event_name == 'merge_group' && ( needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true')
uses: smartcontractkit/.github/.github/workflows/run-integration-tests.yml@57112554b9e5cfae79e795a8b1c36acf7e9dead7
with:
workflow_name: Run CCIP Integration Tests For Merge Queue
test_path: .github/integration-in-memory-tests.yml
test_trigger: Merge Queue Integration CCIP Tests
slack_notification_after_tests: on_failure
slack_notification_after_tests_channel_id: "#ccip-testing"
slack_notification_after_tests_name: CCIP integration Tests In Merge Queue
secrets:
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}

check-integration-test-results:
if: always()
name: Integration Tests
runs-on: ubuntu-latest
needs: [run-ccip-integration-tests-for-pr,run-ccip-integration-tests-for-merge-queue]
steps:
- name: Fail the job if ccip tests in PR not successful
if: always() && needs.run-ccip-integration-tests-for-pr.result == 'failure'
run: exit 1

- name: Fail the job if ccip tests in merge queue not successful
if: always() && needs.run-ccip-integration-tests-for-merge-queue.result == 'failure'
run: exit 1

cleanup:
name: Clean up integration environment deployments
if: always()
needs: [run-ccip-integration-tests-for-pr, run-ccip-integration-tests-for-merge-queue]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v4.2.1
with:
repository: smartcontractkit/chainlink
ref: ${{ inputs.cl_ref }}

- name: 🧼 Clean up Environment
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/actions/delete-deployments
with:
environment: integration
ref: ${{ github.head_ref }} # See https://github.com/github/docs/issues/15319#issuecomment-1476705663
1 change: 1 addition & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ jobs:
]
env:
CONTRACT_ARTIFACTS_PATH: contracts/target/deploy
GOTOOLCHAIN: auto
steps:
- name: Checkout the repo
if: (needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch') && needs.solana-test-image-exists.outputs.exists == 'false'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/solidity-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
{ "name": "shared", "setup": { "run-coverage": true, "extra-coverage-params": "--no-match-path='*CallWithExactGas*' --ir-minimum", "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "transmission", "setup": { "run-coverage": true, "min-coverage": 61.5, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "vrf", "setup": { "run-coverage": false, "min-coverage": 98.5, "run-gas-snapshot": false, "run-forge-fmt": false }},
{ "name": "workflow", "setup": { "run-coverage": true, "extra-coverage-params": "--ir-minimum", "min-coverage": 65.0, "run-gas-snapshot": false, "run-forge-fmt": true }}
{ "name": "workflow", "setup": { "run-coverage": true, "extra-coverage-params": "--ir-minimum", "min-coverage": 96.0, "run-gas-snapshot": true, "run-forge-fmt": true }}
]
EOF
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ regarding Chainlink social accounts, news, and networking.

## Build Chainlink

1. [Install Go 1.22](https://golang.org/doc/install), and add your GOPATH's [bin directory to your PATH](https://golang.org/doc/code.html#GOPATH)
1. [Install Go 1.23](https://golang.org/doc/install), and add your GOPATH's [bin directory to your PATH](https://golang.org/doc/code.html#GOPATH)
- Example Path for macOS `export PATH=$GOPATH/bin:$PATH` & `export GOPATH=/Users/$USER/go`
2. Install [NodeJS v20](https://nodejs.org/en/download/package-manager/) & [pnpm v9 via npm](https://pnpm.io/installation#using-npm).
- It might be easier long term to use [nvm](https://nodejs.org/en/download/package-manager/#nvm) to switch between node versions for different projects. For example, assuming $NODE_VERSION was set to a valid version of NodeJS, you could run: `nvm install $NODE_VERSION && nvm use $NODE_VERSION`
Expand Down
5 changes: 5 additions & 0 deletions contracts/.changeset/perfect-bears-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/contracts': patch
---

Add BalanceReader contract for native balance reads through a contract
5 changes: 5 additions & 0 deletions contracts/.changeset/three-dogs-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/contracts': patch
---

extra validation on decimal logic in token pools
Loading

0 comments on commit 46b6450

Please sign in to comment.