Skip to content

Commit

Permalink
Merge branch 'develop' into vrfv2plus-solc-0.8.19
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhoonbang committed Mar 20, 2024
2 parents b8eff1e + a6b6752 commit faffa56
Show file tree
Hide file tree
Showing 109 changed files with 2,031 additions and 2,749 deletions.
5 changes: 5 additions & 0 deletions .changeset/gentle-cups-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

added logic C contract to automation 2.3
12 changes: 12 additions & 0 deletions .changeset/hot-pets-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"chainlink": minor
---

- Misc VRF V2+ contract changes
- Reuse struct RequestCommitmentV2Plus from VRFTypes
- Fix interface name IVRFCoordinatorV2PlusFulfill in BatchVRFCoordinatorV2Plus to avoid confusion with IVRFCoordinatorV2Plus.sol
- Remove unused errors
- Rename variables for readability
- Fix comments
- Minor gas optimisation (++i)
- Fix integration tests
5 changes: 5 additions & 0 deletions .changeset/hungry-seas-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

refactor foundry tests for auto 2.3
20 changes: 10 additions & 10 deletions .github/actions/build-sign-publish-chainlink/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,24 +105,24 @@ runs:
- if: inputs.publish == 'true'
# Log in to AWS for publish to ECR
name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: ${{ inputs.aws-role-to-assume }}
role-duration-seconds: ${{ inputs.aws-role-duration-seconds }}
aws-region: ${{ inputs.aws-region }}

- if: inputs.publish == 'true'
name: Login to ECR
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: ${{ inputs.ecr-hostname }}

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0

- name: Generate docker metadata for root image
id: meta-root
uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5.5.0
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
env:
DOCKER_METADATA_PR_HEAD_SHA: "true"
with:
Expand All @@ -137,14 +137,14 @@ runs:
# To avoid rate limiting from Docker Hub, we login with a paid user account.
- name: Login to Docker Hub
if: inputs.dockerhub_username && inputs.dockerhub_password
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
username: ${{ inputs.dockerhub_username }}
password: ${{ inputs.dockerhub_password }}

- name: Build and push root docker image
id: buildpush-root
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
push: ${{ inputs.publish }}
context: .
Expand All @@ -166,7 +166,7 @@ runs:
- name: Generate docker metadata for non-root image
id: meta-nonroot
uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5.5.0
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
env:
DOCKER_METADATA_PR_HEAD_SHA: "true"
with:
Expand All @@ -180,14 +180,14 @@ runs:
# To avoid rate limiting from Docker Hub, we login with a paid user account.
- name: Login to Docker Hub
if: inputs.dockerhub_username && inputs.dockerhub_password
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
username: ${{ inputs.dockerhub_username }}
password: ${{ inputs.dockerhub_password }}

- name: Build and push non-root docker image
id: buildpush-nonroot
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
push: ${{ inputs.publish }}
context: .
Expand Down Expand Up @@ -227,7 +227,7 @@ runs:
- if: inputs.sign-images == 'true'
name: Install cosign
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
with:
cosign-release: "v1.6.0"

Expand Down
12 changes: 6 additions & 6 deletions .github/actions/build-test-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
# Base Test Image Logic
- name: Get CTF Version
id: version
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/mod-version@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/mod-version@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9
with:
go-project-path: ./integration-tests
module-name: github.com/smartcontractkit/chainlink-testing-framework
Expand All @@ -51,7 +51,7 @@ runs:
echo "short_sha=${short_sha}" >> "$GITHUB_OUTPUT"
- name: Checkout chainlink-testing-framework
if: steps.version.outputs.is_semantic == 'false'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
repository: smartcontractkit/chainlink-testing-framework
ref: main
Expand All @@ -71,15 +71,15 @@ runs:
- name: Check if test base image exists
if: steps.version.outputs.is_semantic == 'false'
id: check-base-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9
with:
repository: ${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/test-base-image
tag: ${{ steps.long_sha.outputs.long_sha }}
AWS_REGION: ${{ inputs.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }}
- name: Build Base Image
if: steps.version.outputs.is_semantic == 'false' && steps.check-base-image.outputs.exists == 'false'
uses: smartcontractkit/chainlink-github-actions/docker/build-push@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6
uses: smartcontractkit/chainlink-github-actions/docker/build-push@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9
env:
BASE_IMAGE_NAME: ${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/test-base-image:${{ steps.long_sha.outputs.long_sha }}
with:
Expand All @@ -92,15 +92,15 @@ runs:
# Test Runner Logic
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9
with:
repository: ${{ inputs.repository }}
tag: ${{ inputs.tag }}
AWS_REGION: ${{ inputs.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }}
- name: Build and Publish Test Runner
if: steps.check-image.outputs.exists == 'false'
uses: smartcontractkit/chainlink-github-actions/docker/build-push@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6
uses: smartcontractkit/chainlink-github-actions/docker/build-push@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9
with:
tags: |
${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/${{ inputs.repository }}:${{ inputs.tag }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/delete-deployments/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
with:
version: ^8.0.0

- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: "18"
cache: "pnpm"
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/golangci-lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Setup Go
uses: ./.github/actions/setup-go
with:
Expand All @@ -48,7 +48,7 @@ runs:
shell: bash
run: go build ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
with:
version: v1.55.2
# We already cache these directories in setup-go
Expand All @@ -60,7 +60,7 @@ runs:
working-directory: ${{ inputs.go-directory }}
- name: Store lint report artifact
if: always()
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: golangci-lint-report
path: ${{ inputs.go-directory }}/golangci-lint-report.xml
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/goreleaser-build-sign-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ runs:
using: composite
steps:
- name: Setup docker buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0
- name: Set up qemu
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- name: Setup go
Expand All @@ -89,12 +89,12 @@ runs:
version: ${{ inputs.zig-version }}
- name: Setup cosign
if: inputs.enable-cosign == 'true'
uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 # v3.3.0
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
with:
cosign-release: ${{ inputs.cosign-version }}
- name: Login to docker registry
if: inputs.enable-docker-publish == 'true'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: ${{ inputs.docker-registry }}
- name: Goreleaser release
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/notify-slack-jobs-result/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ runs:
echo results=$CLEAN_RESULTS >> $GITHUB_OUTPUT
- name: Post Results
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
env:
SLACK_BOT_TOKEN: ${{ inputs.slack_bot_token }}
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
- name: Get branch name
if: ${{ inputs.only-modules == 'false' }}
id: branch-name
uses: tj-actions/branch-names@2e5354c6733793113f416314375826df030ada23 #v6.5
uses: tj-actions/branch-names@6871f53176ad61624f978536bbf089c574dc19a2 # v8.0.1

- name: Set go cache keys
shell: bash
Expand All @@ -40,7 +40,7 @@ runs:
shell: bash
run: echo "path=./${{ inputs.go-module-file }}" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
name: Cache Go Modules
with:
path: |
Expand All @@ -51,7 +51,7 @@ runs:
restore-keys: |
${{ runner.os }}-gomod-${{ inputs.cache-version }}-
- uses: actions/cache@v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
if: ${{ inputs.only-modules == 'false' }}
name: Cache Go Build Outputs
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/setup-hardhat/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ runs:
using: composite
steps:
- name: Cache Compilers
uses: actions/cache@v3
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
with:
path: ~/.cache/hardhat-nodejs/
key: contracts-compilers-${{ runner.os }}-${{ inputs.cache-version }}-${{ hashFiles('contracts/pnpm-lock.yaml', 'contracts/hardhat.config.ts') }}

- name: Cache contracts build outputs
uses: actions/cache@v3
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
with:
path: |
contracts/cache/
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-nodejs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:
with:
version: ^7.0.0

- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: "16"
cache: "pnpm"
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-solana/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Setup solana CLI
runs:
using: composite
steps:
- uses: actions/cache@v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
id: cache
name: Cache solana CLI
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-wasmd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Setup Cosmos wasmd, used for integration tests
runs:
using: composite
steps:
- uses: actions/cache@v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
id: cache
name: Cache wasmd-build
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/split-tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ outputs:
runs:
using: composite
steps:
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd #v2.2.4
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: ^7.0.0

- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: "16"
cache: "pnpm"
Expand Down
23 changes: 21 additions & 2 deletions .github/actions/version-file-bump/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
outputs:
result:
value: ${{ steps.compare.outputs.result }}
description: 'Result of the comparison'
description: "Result of the comparison"
runs:
using: composite
steps:
Expand All @@ -31,21 +31,40 @@ runs:
current_version=$(head -n1 ./VERSION)
echo "current_version=${current_version}" | tee -a "$GITHUB_OUTPUT"
- name: Compare semantic versions
uses: smartcontractkit/chainlink-github-actions/semver-compare@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6
uses: smartcontractkit/chainlink-github-actions/semver-compare@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9
id: compare
with:
version1: ${{ steps.get-current-version.outputs.current_version }}
operator: eq
version2: ${{ steps.get-latest-version.outputs.latest_version }}
# The follow two steps are temp until we migrate to use version from package.json as the source of truth
- name: Get package version
id: get-package-version
shell: bash
run: |
package_version=$(jq -r '.version' ./package.json)
echo "package_version=${package_version}" | tee -a "$GITHUB_OUTPUT"
- name: Diff versions
uses: smartcontractkit/chainlink-github-actions/semver-compare@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6
id: diff
with:
version1: ${{ steps.get-current-version.outputs.current_version }}
operator: eq
version2: ${{ steps.get-package-version.outputs.package_version }}
- name: Fail if version not bumped
# XXX: The reason we are not checking if the current is greater than the
# latest release is to account for hot fixes which may have been branched
# from a previous tag.
shell: bash
env:
VERSION_NOT_BUMPED: ${{ steps.compare.outputs.result }}
VERSION_SAME: ${{ steps.diff.outputs.result }}
run: |
if [[ "${VERSION_NOT_BUMPED:-}" = "true" ]]; then
echo "Version file not bumped since last release. Please bump the ./VERSION file in the root of the repo and commit the change."
exit 1
fi
if [[ "${VERSION_SAME:-}" = "false" ]]; then
echo "The version in the VERSION file is not the same as the version in package.json file. Please fix by running `pnpm changeset version`."
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/automation-benchmark-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
REF_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- name: Checkout the repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
ref: ${{ env.REF_NAME }}
- name: Get Slack config and mask base64 config
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
suites: benchmark chaos reorg load
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9
env:
DETACH_RUNNER: true
TEST_SUITE: benchmark
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/automation-load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
REF_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- name: Checkout the repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
ref: ${{ env.REF_NAME }}
- name: Get Slack config and mask base64 config
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
suites: benchmark chaos reorg load
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@c67a09566412d153ff7640d99f96b43aa03abc04 # v2.3.6
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5bee84d30d90295010bda68b0cd46be3a1eea917 # v2.3.9
env:
RR_CPU: 4000m
RR_MEM: 4Gi
Expand Down
Loading

0 comments on commit faffa56

Please sign in to comment.