Skip to content

Commit

Permalink
Merge branch 'develop' into BCI-3905/update-txm-confirmer-and-finaliz…
Browse files Browse the repository at this point in the history
…er-query-to-skip-evm-receipt
  • Loading branch information
huangzhen1997 authored Aug 22, 2024
2 parents 1e9cd28 + c98feb2 commit 8cdda93
Show file tree
Hide file tree
Showing 99 changed files with 11,878 additions and 1,262 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-roses-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#added Allow workflows to run without external registry configured
5 changes: 5 additions & 0 deletions .changeset/eight-bees-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#bugfix head reporter non-zero reporting period
5 changes: 5 additions & 0 deletions .changeset/hot-laws-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal log info on missed finalized head instead of returning an error
5 changes: 5 additions & 0 deletions .changeset/lucky-boats-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Reporting all the token prices from the job spec for CCIP #updated
5 changes: 5 additions & 0 deletions .changeset/smart-pumas-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#bugfix Fix incorrect error handling when registering a new feed manager
5 changes: 5 additions & 0 deletions .changeset/thick-mails-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Simplify how token and gas prices are stored in the database - user upsert instead of insert/delete flow #db_update
5 changes: 5 additions & 0 deletions .changeset/two-mugs-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Edited the Optimism Stack L1 Oracle to add support for Mantle #added
10 changes: 7 additions & 3 deletions .github/actions/goreleaser-build-sign-publish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,17 @@ Following inputs can be used as `step.with` keys

| Name | Type | Default | Description |
| ---------------------------- | ------ | ------------------ | ----------------------------------------------------------------------- |
| `goreleaser-version` | String | `1.13.1` | `goreleaser` version |
| `zig-version` | String | `0.10.0` | `zig` version |
| `cosign-version` | String | `v1.13.1` | `cosign` version |
| `goreleaser-version` | String | `~> v2` | `goreleaser` version |
| `zig-version` | String | `0.10.1` | `zig` version |
| `cosign-version` | String | `v2.2.2` | `cosign` version |
| `macos-sdk-dir` | String | `MacOSX12.3.sdk` | MacOSX sdk directory |
| `enable-docker-publish` | Bool | `true` | Enable publishing of Docker images / manifests |
| `docker-registry` | String | `localhost:5001` | Docker registry |
| `docker-image-name` | String | `chainlink` | Docker image name |
| `docker-image-tag` | String | `develop` | Docker image tag |
| `enable-goreleaser-snapshot` | Bool | `false` | Enable goreleaser build / release snapshot |
| `enable-goreleaser-split` | Bool | `false` | Enable goreleaser build using split and merge |
| `goreleaser-split-arch` | String | `""` | The arch to build the image with - amd64, arm64 |
| `goreleaser-exec` | String | `goreleaser` | The goreleaser executable, can invoke wrapper script |
| `goreleaser-config` | String | `.goreleaser.yaml` | The goreleaser configuration yaml |
| `enable-cosign` | Bool | `false` | Enable signing of Docker images |
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/goreleaser-build-sign-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A composite action that allows building and publishing signed chain
inputs:
goreleaser-version:
description: The goreleaser version
default: 1.23.0
default: "~> v2"
required: false
goreleaser-key:
description: The goreleaser key
Expand Down Expand Up @@ -83,7 +83,7 @@ runs:
with:
go-version-file: "go.mod"
- name: Setup goreleaser
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
distribution: goreleaser-pro
install-only: true
Expand Down
10 changes: 4 additions & 6 deletions .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ runner-test-matrix:
test_cmd: cd integration-tests/ && go test smoke/ocr2_test.go -timeout 30m -count=1 -test.parallel=6 -json
pyroscope_env: ci-smoke-ocr2-plugins-evm-simulated
test_env_vars:
E2E_TEST_CHAINLINK_VERSION: '{{ env.GITHUB_SHA_PLUGINS }}' # This is the chainlink version that has the plugins
E2E_TEST_CHAINLINK_VERSION: '{{ env.DEFAULT_CHAINLINK_PLUGINS_VERSION }}' # This is the chainlink version that has the plugins
ENABLE_OTEL_TRACES: true

# END: OCR tests
Expand Down Expand Up @@ -215,7 +215,7 @@ runner-test-matrix:
workflows:
- PR E2E Core Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/smoke && go test -test.run "^TestAutomationBasic/registry_2_3_conditional_native|TestAutomationBasic/registry_2_3_conditional_link$" -test.parallel=3 -timeout 30m -count=1 -json
test_cmd: cd integration-tests/smoke && go test -test.run "^TestAutomationBasic/registry_2_3_conditional_native|TestAutomationBasic/registry_2_3_conditional_link$" -test.parallel=2 -timeout 30m -count=1 -json
pyroscope_env: ci-smoke-automation-evm-simulated

- id: smoke/automation_test.go:^TestAutomationBasic/registry_2_3_logtrigger_native|TestAutomationBasic/registry_2_3_logtrigger_link$
Expand Down Expand Up @@ -375,7 +375,7 @@ runner-test-matrix:
workflows:
- PR E2E Core Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperCheckPerformGasLimit$ -test.parallel=3 -timeout 30m -count=1 -json
test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperCheckPerformGasLimit$ -test.parallel=2 -timeout 30m -count=1 -json
pyroscope_env: ci-smoke-keeper-evm-simulated

- id: smoke/keeper_test.go:^TestKeeperRegisterUpkeep$
Expand Down Expand Up @@ -823,7 +823,7 @@ runner-test-matrix:
E2E_TEST_CHAINLINK_IMAGE: public.ecr.aws/chainlink/chainlink
E2E_TEST_CHAINLINK_VERSION: '{{ env.LATEST_CHAINLINK_RELEASE_VERSION }}'
E2E_TEST_CHAINLINK_UPGRADE_IMAGE: '{{ env.QA_CHAINLINK_IMAGE }}'
E2E_TEST_CHAINLINK_UPGRADE_VERSION: '{{ env.GITHUB_SHA }}'
E2E_TEST_CHAINLINK_UPGRADE_VERSION: '{{ env.DEFAULT_CHAINLINK_VERSION }}'

# END: Other tests

Expand Down Expand Up @@ -938,7 +938,6 @@ runner-test-matrix:
test_env_type: docker
runs_on: ubuntu-latest
workflows:
- PR E2E CCIP Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPOffRampCapacityLimit$ -timeout 30m -count=1 -test.parallel=1 -json
test_env_vars:
Expand All @@ -949,7 +948,6 @@ runner-test-matrix:
test_env_type: docker
runs_on: ubuntu-latest
workflows:
- PR E2E CCIP Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPOffRampAggRateLimit$ -timeout 30m -count=1 -test.parallel=1 -json
test_env_vars:
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,21 @@ jobs:
id: changes
with:
filters: |
github_ci_changes:
- '.github/workflows/integration-tests.yml'
- '.github/workflows/run-e2e-tests-reusable-workflow.yml'
- '.github/e2e-tests.yml'
core_changes:
- '**/*.go'
- '**/*go.sum'
- '**/*go.mod'
- '.github/workflows/integration-tests.yml'
- '**/*Dockerfile'
- 'core/**/migrations/*.sql'
- 'core/**/config/**/*.toml'
- 'integration-tests/**/*.toml'
ccip_changes:
- '**/*ccip*'
- '**/*ccip*/**'
- '**/*ccip*/**'
- name: Ignore Filter On Workflow Dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
id: ignore-filter
Expand All @@ -120,6 +123,7 @@ jobs:
this-job-name: Check Paths That Require Tests To Run
continue-on-error: true
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 }}

Expand Down Expand Up @@ -193,7 +197,7 @@ jobs:
needs: [changes, enforce-ctf-version]
steps:
- name: Collect Metrics
if: needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch'
if: needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true' || github.event_name == 'workflow_dispatch'
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1
with:
Expand All @@ -218,7 +222,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
set-git-config: "true"
- name: Build Chainlink Image
if: needs.changes.outputs.core_changes == 'true' || github.event_name == 'workflow_dispatch'
if: needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true' || github.event_name == 'workflow_dispatch'
uses: ./.github/actions/build-chainlink-image
with:
tag_suffix: ${{ matrix.image.tag-suffix }}
Expand All @@ -237,7 +241,7 @@ jobs:
id-token: write
contents: read
needs: [build-chainlink, changes]
if: needs.changes.outputs.core_changes == 'true'
if: needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true'
uses: ./.github/workflows/run-e2e-tests-reusable-workflow.yml
with:
workflow_name: Run Core E2E Tests
Expand Down Expand Up @@ -273,7 +277,7 @@ jobs:
id-token: write
contents: read
needs: [build-chainlink, changes]
if: needs.changes.outputs.ccip_changes == 'true'
if: needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true'
uses: ./.github/workflows/run-e2e-tests-reusable-workflow.yml
with:
workflow_name: Run CCIP E2E Tests
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/run-e2e-tests-reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ on:
type: string
default: 'Run E2E Tests'
chainlink_version:
description: 'Enter Chainlink version to use for the tests. Example: "v2.10.0" or sha'
description: 'Enter Chainlink version to use for the tests. Example: v2.10.0, develop or commit sha'
required: false
type: string
chainlink_upgrade_version:
description: 'Enter Chainlink version to upgrade to for upgrade tests. Example: "v2.10.0" or sha'
description: 'Enter Chainlink version to use for the upgrade tests. Example: v2.10.0, develop or commit sha'
required: false
type: string
test_ids:
Expand Down Expand Up @@ -134,8 +134,8 @@ on:
env:
CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink
QA_CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink
GITHUB_SHA: ${{ github.sha }}
GITHUB_SHA_PLUGINS: ${{ github.sha }}-plugins
DEFAULT_CHAINLINK_VERSION: ${{ inputs.chainlink_version || github.sha }}
DEFAULT_CHAINLINK_PLUGINS_VERSION: ${{ inputs.chainlink_version != '' && format('{0}-plugins', inputs.chainlink_version) || format('{0}-plugins', github.sha) }}
CHAINLINK_ENV_USER: ${{ github.actor }}
CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }}
SELECTED_NETWORKS: SIMULATED
Expand Down Expand Up @@ -408,7 +408,7 @@ jobs:

# Run Docker tests
run-docker-tests:
name: Run ${{ matrix.tests.id }}
name: ${{ matrix.tests.id }}
needs: [load-test-configurations, require-chainlink-image-versions-in-qa-ecr, require-chainlink-plugin-versions-in-qa-ecr, get_latest_chainlink_release_version]
# Run when none of the needed jobs fail or are cancelled (skipped or successful jobs are ok)
if: ${{ needs.load-test-configurations.outputs.run-docker-tests == 'true' && always() && !failure() && !cancelled() }}
Expand All @@ -435,7 +435,7 @@ jobs:
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: ${{ inputs.workflow_name }} / Run ${{ matrix.tests.id }}
this-job-name: ${{ inputs.workflow_name }} / ${{ matrix.tests.id }}
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
continue-on-error: true

Expand Down Expand Up @@ -626,7 +626,7 @@ jobs:
run-k8s-runner-tests:
needs: [load-test-configurations, prepare-remote-runner-test-image, require-chainlink-image-versions-in-qa-ecr, require-chainlink-plugin-versions-in-qa-ecr, get_latest_chainlink_release_version]
if: ${{ needs.load-test-configurations.outputs.run-k8s-tests == 'true' && always() && !failure() && !cancelled() }}
name: Run ${{ matrix.tests.id }}
name: ${{ matrix.tests.id }}
runs-on: ${{ matrix.tests.runs_on }}
strategy:
fail-fast: false
Expand All @@ -650,7 +650,7 @@ jobs:
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: ${{ inputs.workflow_name }} / Run ${{ matrix.tests.id }}
this-job-name: ${{ inputs.workflow_name }} / ${{ matrix.tests.id }}
continue-on-error: true

- name: Checkout repository
Expand Down Expand Up @@ -769,7 +769,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ inputs.slack_notification_after_tests_name }} - ${{ steps.combine_results.outputs.result == 'failure' && 'Failed :x:' || steps.combine_results.outputs.result == 'cancelled' && 'Cancelled :warning:' || 'Passed :white_check_mark:' }}"
"text": "${{ inputs.slack_notification_after_tests_name }} - ${{ contains(join(needs.*.result, ','), 'failure') && 'Failed :x:' || contains(join(needs.*.result, ','), 'cancelled') && 'Cancelled :warning:' || 'Passed :white_check_mark:' }}"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-nightly-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: ./.github/workflows/run-e2e-tests-reusable-workflow.yml
with:
chainlink_version: develop
test_workflow: Run Nightly E2E Tests
test_workflow: Nightly E2E Tests
slack_notification_after_tests: true
slack_notification_after_tests_channel_id: "#team-test-tooling-internal"
slack_notification_after_tests_name: Nightly E2E Tests
Expand Down
59 changes: 48 additions & 11 deletions .github/workflows/solidity-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ jobs:
list-files: 'shell'
filters: |
non_src:
- '.github/workflows/solidity-foundry.yml'
- '.github/workflows/solidity-foundry.yml'
- 'contracts/foundry.toml'
- 'contracts/gas-snapshots/*.gas-snapshot'
- 'contracts/package.json'
sol:
- modified|added: 'contracts/src/v0.8/**/*.sol'
sol_mod_only:
- modified: 'contracts/src/v0.8/**/!(*.t).sol'
- modified: 'contracts/src/v0.8/**/!(tests|mocks)/!(*.t).sol'
not_test_sol:
- modified|added: 'contracts/src/v0.8/**/!(*.t).sol'
- modified|added: 'contracts/src/v0.8/**/!(tests|mocks)/!(*.t).sol'
automation:
- 'contracts/src/v0.8/automation/**/*.sol'
ccip:
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- 'contracts/src/v0.8/transmission/**/*.sol'
tests:
if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.sol_modified == 'true' }}
if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.sol_modified_added == 'true' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -425,8 +425,7 @@ jobs:
fi
else
echo "::error::Failed to find current commit's equivalent of $base_report (file $current_file doesn't exist, but should have been generated). Please check Slither logs."
exit 1
echo "::warning::Failed to find current commit's equivalent of $base_report (file $current_report doesn't exist, but should have been generated). Please check Slither logs."
fi
done
Expand Down Expand Up @@ -458,6 +457,49 @@ jobs:
contracts/slither-reports-current
retention-days: 7

- name: Find Slither comment in the PR
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.0.0
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: 'Static analysis results'

- name: Extract job summary URL
id: job-summary-url
uses: pl-strflt/job-summary-url-action@df2d22c5351f73e0a187d20879854b8d98e6e001 # v1.0.0
with:
job: 'Run static analysis'

- name: Build Slither reports artifacts URL
id: build-slither-artifact-url
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ARTIFACTS=$(gh api -X GET repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts)
ARTIFACT_ID=$(echo "$ARTIFACTS" | jq '.artifacts[] | select(.name=="slither-reports-${{ github.sha }}") | .id')
echo "Artifact ID: $ARTIFACT_ID"
slither_artifact_url="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/$ARTIFACT_ID"
echo "slither_artifact_url=$slither_artifact_url" >> $GITHUB_OUTPUT
- name: Create or update Slither comment in the PR
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## Static analysis results are available
Hey @${{ github.event.push && github.event.push.pusher && github.event.push.pusher.username || github.actor }}, you can view Slither reports in the job summary [here](${{ steps.job-summary-url.outputs.job_summary_url }}) or download them as artifact [here](${{ steps.build-slither-artifact-url.outputs.slither_artifact_url }}).
Please check them before merging and make sure you have addressed all issues.
edit-mode: replace

- name: Remove temp artifacts
uses: geekyeggo/delete-artifact@24928e75e6e6590170563b8ddae9fac674508aa1 # v5.0
with:
name: tmp-*

- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
Expand All @@ -469,11 +511,6 @@ jobs:
this-job-name: Run static analysis
continue-on-error: true

- name: Remove temp artifacts
uses: geekyeggo/delete-artifact@24928e75e6e6590170563b8ddae9fac674508aa1 # v5.0
with:
name: tmp-*

solidity-forge-fmt:
name: Forge fmt ${{ matrix.product.name }}
if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.not_test_sol_modified == 'true' }}
Expand Down
4 changes: 3 additions & 1 deletion .goreleaser.develop.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
project_name: chainlink

version: 2

env:
- ZIG_EXEC={{ if index .Env "ZIG_EXEC" }}{{ .Env.ZIG_EXEC }}{{ else }}zig{{ end }}
- IMAGE_PREFIX={{ if index .Env "IMAGE_PREFIX" }}{{ .Env.IMAGE_PREFIX }}{{ else }}localhost:5001{{ end }}
Expand Down Expand Up @@ -196,7 +198,7 @@ checksum:
name_template: "checksums.txt"

snapshot:
name_template: "{{ .Env.CHAINLINK_VERSION }}-{{ .ShortCommit }}"
version_template: "{{ .Env.CHAINLINK_VERSION }}-{{ .ShortCommit }}"

partial:
by: target
Expand Down
Loading

0 comments on commit 8cdda93

Please sign in to comment.