Skip to content

Commit

Permalink
Merge branch 'develop' into tt_1435_update_Sol_Foundry_with_diff
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Aug 12, 2024
2 parents 8f9f96a + 518cc28 commit 4fe3a8f
Show file tree
Hide file tree
Showing 353 changed files with 25,115 additions and 4,034 deletions.
5 changes: 5 additions & 0 deletions .changeset/chatty-spiders-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

remove dependency on FinalityDepth in EVM TXM code. #internal
5 changes: 5 additions & 0 deletions .changeset/eight-radios-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#added merging core/capabilities/ccip from https://github.com/smartcontractkit/ccip
5 changes: 5 additions & 0 deletions .changeset/hip-crabs-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#added Add Astar TerminallyUnderpriced error mapping
5 changes: 5 additions & 0 deletions .changeset/itchy-bugs-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Introduced finalized transaction state. Added a finalizer component to the TXM to mark transactions as finalized. #internal
5 changes: 5 additions & 0 deletions .changeset/odd-hats-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal fix the mock trigger to ensure events are sent
5 changes: 5 additions & 0 deletions .changeset/rich-chairs-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal
5 changes: 5 additions & 0 deletions .changeset/seven-kiwis-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Added custom client error messages for Mantle to capture InsufficientEth and Fatal errors. #added
5 changes: 5 additions & 0 deletions .changeset/shy-windows-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal
5 changes: 5 additions & 0 deletions .changeset/sweet-pumas-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#bugfix Addresses 2 minor issues with the pruning of LogPoller's db tables: logs not matching any filter will now be pruned, and rows deleted are now properly reported for observability
5 changes: 5 additions & 0 deletions .changeset/tall-poems-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal
5 changes: 5 additions & 0 deletions .changeset/tasty-walls-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#updated Update Polygon configs to match PIP-35
5 changes: 5 additions & 0 deletions .changeset/thirty-olives-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Change ChainReader Block primitive field from int to string. #internal
5 changes: 5 additions & 0 deletions .changeset/twelve-balloons-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal fix data race in syncer launcher
5 changes: 5 additions & 0 deletions .changeset/warm-houses-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Added custom finality calculation for Astar #internal
5 changes: 5 additions & 0 deletions .changeset/weak-rabbits-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal prevent reentrancy when configuring DON in Capabilities Registry
26 changes: 26 additions & 0 deletions .github/actions/detect-solidity-foundry-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Detect Foundry version in GNUmakefile'
description: 'Detects Foundry version in GNUmakefile'
inputs:
working-directory:
description: 'The GNUmakefile directory'
required: false
default: 'contracts'
outputs:
foundry-version:
description: 'Foundry version found in GNUmakefile'
value: ${{ steps.extract-foundry-version.outputs.foundry-version }}
runs:
using: 'composite'
steps:
- name: Extract Foundry version
id: extract-foundry-version
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
foundry_version=$(grep -Eo "foundryup --version [^ ]+" GNUmakefile | awk '{print $3}')
if [ -z "$foundry_version" ]; then
echo "::error::Foundry version not found in GNUmakefile"
exit 1
fi
echo "Foundry version found: $foundry_version"
echo "foundry-version=$foundry_version" >> $GITHUB_OUTPUT
4 changes: 2 additions & 2 deletions .github/actions/setup-slither/action.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Setup Slither
description: Installs Slither for contract analysis. Requires Python 3.6 or higher.
description: Installs Slither 0.10.3 for contract analysis. Requires Python 3.6 or higher.
runs:
using: composite
steps:
- name: Install Slither
shell: bash
run: |
python -m pip install --upgrade pip
pip install slither-analyzer
pip install slither-analyzer==0.10.3
2 changes: 0 additions & 2 deletions .github/actions/setup-solc-select/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ runs:
- name: Install solc-select and solc
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y python3-pip
pip3 install solc-select
sudo ln -s /usr/local/bin/solc-select /usr/bin/solc-select
Expand Down
103 changes: 103 additions & 0 deletions .github/actions/validate-artifact-scope/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Validate Artifact Scope
description: Checks there are any modified Solidity files outside of the specified scope. If so, it prints a warning message, but does not fail the workflow.
inputs:
product:
description: The product for which the artifacts are being generated
required: true
sol_files:
description: Comma-separated (CSV) or space-separated (shell) list of Solidity files to check
required: true

runs:
using: composite
steps:
- name: Transform input array
id: transform_input_array
shell: bash
run: |
is_csv_format() {
local input="$1"
if [[ "$input" =~ "," ]]; then
return 0
else
return 1
fi
}
is_space_separated_string() {
local input="$1"
if [[ "$input" =~ ^[^[:space:]]+([[:space:]][^[:space:]]+)*$ ]]; then
return 0
else
return 1
fi
}
array="${{ inputs.sol_files }}"
if is_csv_format "$array"; then
echo "::debug::CSV format detected, nothing to do"
echo "sol_files=$array" >> $GITHUB_OUTPUT
exit 0
fi
if is_space_separated_string "$array"; then
echo "::debug::Space-separated format detected, converting to CSV"
csv_array="${array// /,}"
echo "sol_files=$csv_array" >> $GITHUB_OUTPUT
exit 0
fi
echo "::error::Invalid input format for sol_files. Please provide a comma-separated (CSV) or space-separated (shell) list of Solidity files"
exit 1
- name: Check for changes outside of artifact scope
shell: bash
run: |
echo "::debug::All modified contracts:"
echo "${{ steps.transform_input_array.outputs.sol_files }}" | tr ',' '\n'
if [ "${{ inputs.product }}" = "shared" ]; then
excluded_paths_pattern="!/^contracts\/src\/v0\.8\/interfaces/ && !/^contracts\/src\/v0\.8\/${{ inputs.product }}/ && !/^contracts\/src\/v0\.8\/[^\/]+\.sol$/"
else
excluded_paths_pattern="!/^contracts\/src\/v0\.8\/${{ inputs.product }}/"
fi
echo "::debug::Excluded paths: $excluded_paths_pattern"
unexpected_files=$(echo "${{ steps.transform_input_array.outputs.sol_files }}" | tr ',' '\n' | awk "$excluded_paths_pattern")
missing_files=""
set -e
set -o pipefail
if [[ -n "$unexpected_files" ]]; then
products=()
productsStr=""
IFS=$'\n' read -r -d '' -a files <<< "$unexpected_files" || true
echo "Files: ${files[@]}"
for file in "${files[@]}"; do
missing_files+="$file,"
product=$(echo "$file" | awk -F'src/v0.8/' '{if ($2 ~ /\//) print substr($2, 1, index($2, "/")-1); else print "shared"}')
if [[ ! " ${products[@]} " =~ " ${product} " ]]; then
products+=("$product")
productsStr+="$product, "
fi
done
productsStr=${productsStr%, }
set +e
set +o pipefail
missing_files=$(echo $missing_files | tr ',' '\n')
echo "Error: Found modified contracts outside of the expected scope: ${{ inputs.product }}"
echo "Files:"
echo "$missing_files"
echo "Action required: If you want to generate artifacts for other products ($productsStr) run this workflow again with updated configuration"
echo "# Warning!" >> $GITHUB_STEP_SUMMARY
echo "## Reason: Found modified contracts outside of the expected scope: ${{ inputs.product }}" >> $GITHUB_STEP_SUMMARY
echo "### Files:" >> $GITHUB_STEP_SUMMARY
echo "$missing_files" >> $GITHUB_STEP_SUMMARY
echo "## Action required: If you want to generate artifacts for other products ($productsStr) run this workflow again with updated configuration" >> $GITHUB_STEP_SUMMARY
else
echo "No unexpected files found."
fi
41 changes: 0 additions & 41 deletions .github/actions/validate-solidity-artifacts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,10 @@ inputs:
sol_files:
description: Comma-separated (CSV) or space-separated (shell) list of Solidity files to check
required: true
# remove this when AurorNZ/paths-filter is fixed
base_ref:
description: Base reference for comparison (skip if your list doesn't contain deleted files)
required: false

runs:
using: composite
steps:
- name: Fetch base ref
if: ${{ inputs.base_ref != '' }}
id: fetch_base_ref
shell: bash
run: |
type=$(git cat-file -t "${{ inputs.base_ref }}")
if echo "$type" | grep -q commit; then
# we do not know to which branch the base ref belongs, so we fetch all branches
git fetch --all --prune
echo "ref_to_use=${{ inputs.base_ref }}" >> $GITHUB_OUTPUT
elif echo "$type" | grep -q tag; then
git fetch origin ${{ inputs.base_ref }}
echo "ref_to_use=${{ inputs.base_ref }}" >> $GITHUB_OUTPUT
else
# must be branch
echo "::debug:: Base reference type: $type"
git fetch origin ${{ inputs.base_ref }}
echo "ref_to_use=origin/${{ inputs.base_ref }}" >> $GITHUB_OUTPUT
fi
- name: Transform input array
id: transform_input_array
shell: bash
Expand Down Expand Up @@ -91,15 +68,6 @@ runs:
IFS=',' read -r -a modified_files <<< "${{ steps.transform_input_array.outputs.sol_files }}"
missing_svgs=()
for file in "${modified_files[@]}"; do
if [ "${{ inputs.base_ref }}" != "" ]; then
# TODO remove this check when AurorNZ/paths-filter is fixed
status=$(git diff --name-status "${{ steps.fetch_base_ref.outputs.ref_to_use }}" HEAD -- "$file" | awk '{ print $1 }')
if [ "$status" == "D" ]; then
echo "File $file was deleted, skipping validation"
continue
fi
fi
svg_file="$(basename "${file%.sol}").svg"
if [ ! -f "${{ inputs.uml_diagrams_path }}/$svg_file" ]; then
echo "Error: UML diagram for $file not found"
Expand Down Expand Up @@ -127,15 +95,6 @@ runs:
IFS=',' read -r -a modified_files <<< "${{ steps.transform_input_array.outputs.sol_files }}"
missing_reports=()
for file in "${modified_files[@]}"; do
if [ "${{ inputs.base_ref }}" != "" ]; then
# TODO remove this check when AurorNZ/paths-filter is fixed
status=$(git diff --name-status "${{ steps.fetch_base_ref.outputs.ref_to_use }}" HEAD -- "$file" | awk '{ print $1 }')
if [ "$status" == "D" ]; then
echo "File $file was deleted, skipping validation"
continue
fi
fi
report_file="$(basename "${file%.sol}")-slither-report.md"
if [ ! -f "${{ inputs.slither_reports_path }}/$report_file" ]; then
echo "Error: Slither report for $file not found"
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ updates:
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
open-pull-requests-limit: 0
ignore:
# Old versions are pinned for libocr.
- dependency-name: github.com/libp2p/go-libp2p-core
Expand Down
32 changes: 28 additions & 4 deletions .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ runner-test-matrix:
test_env_type: k8s-remote-runner
runs_on: ubuntu-latest
test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRv1Soak$ -test.parallel=1 -timeout 30m -count=1 -json
test_config_override_required: true
test_secrets_required: true
test_inputs:
test_suite: soak

Expand Down Expand Up @@ -543,15 +545,37 @@ runner-test-matrix:
chainlink_upgrade_version: develop
pyroscope_env: ci-smoke-automation-upgrade-tests

- id: integration-tests/reorg/automation_reorg_test.go
- id: integration-tests/reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_0
path: integration-tests/reorg/automation_reorg_test.go
runs_on: ubuntu-latest
test_env_type: k8s-remote-runner
test_env_type: docker
test_inputs:
test_suite: reorg
workflows:
- Run Automation On Demand Tests (TEST WORKFLOW)
test_cmd: cd integration-tests/reorg && DETACH_RUNNER=false go test -v -test.run ^TestAutomationReorg/registry_2_0 -test.parallel=1 -timeout 30m -count=1 -json
pyroscope_env: ci-automation-on-demand-reorg

- id: integration-tests/reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_1
path: integration-tests/reorg/automation_reorg_test.go
runs_on: ubuntu-latest
test_env_type: docker
test_inputs:
test_suite: reorg
workflows:
- Run Automation On Demand Tests (TEST WORKFLOW)
test_cmd: cd integration-tests/reorg && DETACH_RUNNER=false go test -v -test.run ^TestAutomationReorg/registry_2_1 -test.parallel=2 -timeout 30m -count=1 -json
pyroscope_env: ci-automation-on-demand-reorg

- id: integration-tests/reorg/automation_reorg_test.go^TestAutomationReorg/registry_2_2
path: integration-tests/reorg/automation_reorg_test.go
runs_on: ubuntu-latest
test_env_type: docker
test_inputs:
test_suite: reorg
workflows:
- Run Automation On Demand Tests (TEST WORKFLOW)
test_cmd: cd integration-tests/reorg && DETACH_RUNNER=false go test -v -test.run ^TestAutomationReorg$ -test.parallel=7 -timeout 60m -count=1 -json
test_cmd: cd integration-tests/reorg && DETACH_RUNNER=false go test -v -test.run ^TestAutomationReorg/registry_2_2 -test.parallel=2 -timeout 30m -count=1 -json
pyroscope_env: ci-automation-on-demand-reorg

- id: integration-tests/chaos/automation_chaos_test.go
Expand All @@ -560,7 +584,7 @@ runner-test-matrix:
runs_on: ubuntu-latest
workflows:
- Run Automation On Demand Tests (TEST WORKFLOW)
test_cmd: cd integration-tests/chaos && DETACH_RUNNER=false go test -v -test.run ^TestAutomationChaos$ -test.parallel=15 -timeout 60m -count=1 -json
test_cmd: cd integration-tests/chaos && DETACH_RUNNER=false go test -v -test.run ^TestAutomationChaos$ -test.parallel=20 -timeout 60m -count=1 -json
pyroscope_env: ci-automation-on-demand-chaos
test_inputs:
test_suite: chaos
Expand Down
Loading

0 comments on commit 4fe3a8f

Please sign in to comment.