Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/smartcontractkit/chainlink
Browse files Browse the repository at this point in the history
… into CRIB-322-keystone-evm-contract-deployment-tooling
  • Loading branch information
HenryNguyen5 committed Dec 20, 2024
2 parents f4bb112 + 6ea85ea commit a35f536
Show file tree
Hide file tree
Showing 740 changed files with 19,920 additions and 29,261 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-geckos-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#updated Gracefully fail if CL_DATABASE_URL is not set.
5 changes: 5 additions & 0 deletions .changeset/brave-cooks-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#updated feat(job-distributor): support tron chain type on sync
5 changes: 5 additions & 0 deletions .changeset/eighty-geckos-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Reduce PriceMin on Avalanche to 1 gwei #nops
5 changes: 5 additions & 0 deletions .changeset/five-gifts-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#added stream job delete capability
5 changes: 5 additions & 0 deletions .changeset/large-fishes-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Fix logic for mapping affected files in CI that affects golangci-lint execution
5 changes: 5 additions & 0 deletions .changeset/mean-ravens-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal add versioned geth wrappers for keystone prod contracts
5 changes: 5 additions & 0 deletions .changeset/metal-houses-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Added TxExpirationRebroadcast feature and config for Solana TXM. #added
5 changes: 5 additions & 0 deletions .changeset/shaggy-carpets-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#removed dead transmission tests
5 changes: 5 additions & 0 deletions .changeset/wild-cats-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Added the `EVM.Transactions.Enabled` config to enable or disable the transaction manager. #added
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# Services
/core/services/directrequest @smartcontractkit/foundations
/core/services/feeds @smartcontractkit/deployment-automation @eutopian @yevshev @smartcontractkit/core
/core/services/feeds @smartcontractkit/deployment-automation @eutopian @smartcontractkit/core
/core/services/synchronization/telem @smartcontractkit/realtime @smartcontractkit/core
/core/capabilities/ @smartcontractkit/keystone @smartcontractkit/capabilities-team
/core/capabilities/ccip @smartcontractkit/ccip-offchain
Expand Down Expand Up @@ -140,8 +140,8 @@ core/scripts/gateway @smartcontractkit/dev-services

# Deployment tooling
/deployment @smartcontractkit/ccip @smartcontractkit/keystone @smartcontractkit/core @smartcontractkit/deployment-automation
/deployment/ccip @smartcontractkit/ccip @smartcontractkit/core
/deployment/keystone @smartcontractkit/keystone @smartcontractkit/core
/deployment/ccip @smartcontractkit/ccip @smartcontractkit/core @smartcontractkit/deployment-automation
/deployment/keystone @smartcontractkit/keystone @smartcontractkit/core @smartcontractkit/deployment-automation
# TODO: As more products add their deployment logic here, add the team as an owner

# CI/CD
Expand Down
60 changes: 45 additions & 15 deletions .github/actions/golangci-lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,50 +27,80 @@ runs:
if: github.event_name == 'merge_group'
with:
fetch-depth: 0

- name: Checkout repo
uses: actions/[email protected]
if: github.event_name != 'merge_group'
with:
fetch-depth: 1

- name: Setup Go
uses: ./.github/actions/setup-go
with:
only-modules: ${{ inputs.only-modules }}
cache-version: ${{ inputs.cache-version }}
go-version-file: ${{ inputs.go-version-file }}
go-module-file: ${{ inputs.go-module-file }}

- name: Touching core/web/assets/index.html
shell: bash
run: mkdir -p core/web/assets && touch core/web/assets/index.html
- name: Build binary
working-directory: ${{ inputs.go-directory }}
shell: bash
run: go build ./...
- name: Set golangci-lint working directory

- name: Set Golangci-lint working directory
shell: bash
id: set-working-directory
# XXX: Don't use `.` default working directory here due to issues with the golangci-lint-action.
run: |
if [ "${{ inputs.go-directory }}" == "." ]; then
echo "golangci-lint-working-directory=" | tee -a $GITHUB_OUTPUT
echo "golangci-lint-working-directory=" >> $GITHUB_OUTPUT
else
echo "golangci-lint-working-directory=${{ inputs.go-directory }}" | tee -a $GITHUB_OUTPUT
echo "golangci-lint-working-directory=${{ inputs.go-directory }}/" >> $GITHUB_OUTPUT
fi
- name: golangci-lint
- name: Golangci-lint
uses: golangci/golangci-lint-action@38e1018663fa5173f3968ea0777460d3de38f256 # v5.3.0
with:
version: v1.61.0
version: v1.62.2
only-new-issues: true
args: --out-format colored-line-number,checkstyle:golangci-lint-report.xml
working-directory: ${{ steps.set-working-directory.outputs.golangci-lint-working-directory }}
- name: Print lint report artifact

- name: Print Golangci-lint report results
if: failure()
shell: bash
run: cat ${{ inputs.go-directory }}/golangci-lint-report.xml
- name: Store lint report artifact
run: cat ./${{ steps.set-working-directory.outputs.golangci-lint-working-directory }}golangci-lint-report.xml

# Get a valid name for the upload-artifact step.
# Avoid error: `The artifact name is not valid: <path>/<to>/<artifact>/` caused by `/`.
# Remove trailing `/` from the directory name: `core/scripts/` -> `core/scripts`.
# Replace remaining `/` with `-`: `core/scripts` -> `core-scripts`.
# Assign `root` if the directory name is empty (ref: step.id: set-working-directory).
- name: Get valid suffix for artifact name
if: always()
id: suffix
shell: bash
run: |
go_directory=${{ steps.set-working-directory.outputs.golangci-lint-working-directory }}
echo "Validating if directory name '$go_directory' is empty or has slashes"
if [[ $go_directory == *\/* ]]; then
suffix=$(echo "$go_directory" | sed 's:\/$::' | tr '/' '-')
echo "Directory name with slashes '$go_directory' updated to a valid artifact suffix '$suffix'"
elif [[ $go_directory == "" ]]; then
suffix="root"
echo "Root directory (empty string) updated to a valid artifact suffix '$suffix'"
else
suffix="$go_directory"
echo "Directory name is valid for the artifact suffix: '$suffix'"
fi
echo "suffix=${suffix}" >> $GITHUB_OUTPUT
- name: Store Golangci-lint report artifact
if: always()
uses: actions/[email protected]
with:
name: golangci-lint-report
path: ${{ inputs.go-directory }}/golangci-lint-report.xml
retention-days: 7
# Use a unique suffix for each lint report artifact to avoid duplication errors
name: golangci-lint-report-${{ steps.suffix.outputs.suffix }}
# N/B: value may be empty (no slash) OR `<path>/<to>/<module>/` (with slash tat the end)
path: ./${{ steps.set-working-directory.outputs.golangci-lint-working-directory }}golangci-lint-report.xml
14 changes: 13 additions & 1 deletion .github/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,22 @@ inputs:
runs:
using: composite
steps:
- name: Get Go Version
shell: bash
id: go-version
run: |
version=$(sed -ne '/^toolchain /s/^toolchain go//p' ${{ inputs.go-version-file }})
if [ -z "$version" ]; then
version=$(sed -ne '/^go /s/^go //p' ${{ inputs.go-version-file }})
echo "Toolchain version not found in ${{ inputs.go-version-file }}, using go directive instead."
fi
echo "Go Version: $version"
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/[email protected]
with:
go-version-file: ${{ inputs.go-version-file }}
go-version: ${{ steps.go-version.outputs.version }}
cache: false
check-latest: true

Expand Down
32 changes: 16 additions & 16 deletions .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,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-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e
E2E_RMN_RAGEPROXY_VERSION: 678509b
E2E_RMN_AFN2PROXY_VERSION: 678509b
CCIP_V16_TEST_ENV: docker

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_MultipleMessagesOnOneLaneNoWaitForExec$
Expand All @@ -993,8 +993,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-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e
E2E_RMN_RAGEPROXY_VERSION: 678509b
E2E_RMN_AFN2PROXY_VERSION: 678509b
CCIP_V16_TEST_ENV: docker

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughObservers$
Expand All @@ -1009,8 +1009,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-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e
E2E_RMN_RAGEPROXY_VERSION: 678509b
E2E_RMN_AFN2PROXY_VERSION: 678509b
CCIP_V16_TEST_ENV: docker

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_DifferentSigners$
Expand All @@ -1025,8 +1025,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-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e
E2E_RMN_RAGEPROXY_VERSION: 678509b
E2E_RMN_AFN2PROXY_VERSION: 678509b
CCIP_V16_TEST_ENV: docker

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_NotEnoughSigners$
Expand All @@ -1041,8 +1041,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-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e
E2E_RMN_RAGEPROXY_VERSION: 678509b
E2E_RMN_AFN2PROXY_VERSION: 678509b
CCIP_V16_TEST_ENV: docker

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_DifferentRmnNodesForDifferentChains$
Expand All @@ -1057,8 +1057,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-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e
E2E_RMN_RAGEPROXY_VERSION: 678509b
E2E_RMN_AFN2PROXY_VERSION: 678509b
CCIP_V16_TEST_ENV: docker

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_TwoMessagesOneSourceChainCursed$
Expand All @@ -1073,8 +1073,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-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e
E2E_RMN_RAGEPROXY_VERSION: 678509b
E2E_RMN_AFN2PROXY_VERSION: 678509b
CCIP_V16_TEST_ENV: docker

- id: smoke/ccip/ccip_rmn_test.go:^TestRMN_GlobalCurseTwoMessagesOnTwoLanes$
Expand All @@ -1089,8 +1089,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-f461a9e
E2E_RMN_AFN2PROXY_VERSION: master-f461a9e
E2E_RMN_RAGEPROXY_VERSION: 678509b
E2E_RMN_AFN2PROXY_VERSION: 678509b
CCIP_V16_TEST_ENV: docker

# END: CCIPv1.6 tests
Expand Down
60 changes: 60 additions & 0 deletions .github/scripts/map-affected-files-to-modules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/bash
set -e

# This script:
# 1. Finds all modules.
# 2. Maps changed files (passed as a param) to found modules.
# 3. Prints out the affected modules.
# 4. Output the result (as JSON) to a GitHub Actions environment variable.

# Get the list of changed files as parameter (from JSON array)
changed_files=$(echo "$1" | jq -r '.[]')
echo "Changed files: $changed_files"

# 1. Find all modules in the repository,
# - Strip the leading './' from the path
# (necessary for comparison, affected files do not have leading './')
modules=$(find . -name 'go.mod' -exec dirname {} \; | sed 's|^./||' | uniq)
echo "Found modules: $modules"

# Use a Bash associative array to track unique modules
declare -A unique_modules

for path_to_file in $changed_files; do
echo "Resolving a module affected by a file: '$path_to_file'"
# the flag that indicates if the path matches any module
is_path_in_modules=false
for module in $modules; do
echo "Validating against module: '$module'"
# if a module's name matches with a file path
# add it, to the affected modules array, skipping the root (`.`)
if [[ $module != "." && $path_to_file =~ ^$module* ]]; then
echo -e "File '$path_to_file' mapped to the module '$module'\n"
unique_modules["$module"]="$module"
is_path_in_modules=true
break
fi
done
# if no matched module default to root module
if [[ $is_path_in_modules == false ]]; then
echo "File '$path_to_file' did not match any module, defaulting to root '.'"
unique_modules["."]="."
is_path_in_modules=false
fi
is_path_in_modules=false
done

# if the path is empty (for any reason), it will not get to the loop,
# so if the unique_modules array is empty, default to the root module
if [[ ${#unique_modules[@]} -eq 0 ]]; then
echo "No files were changed, defaulting to the root module '.'"
unique_modules["."]="."
fi

# Convert keys (module names) of the associative array to an indexed array
affected_modules=("${!unique_modules[@]}")
echo "Affected modules: ${affected_modules[@]}"

# Convert bash array to a JSON array for GitHub Actions
json_array=$(printf '%s\n' "${affected_modules[@]}" | jq -R . | jq -s . | jq -c)
echo "module_names=$json_array" >> "$GITHUB_OUTPUT"
2 changes: 1 addition & 1 deletion .github/workflows/ci-core-partial.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Core Unit Tests
name: Experimental Test Optimization

on:
push:
Expand Down
Loading

0 comments on commit a35f536

Please sign in to comment.