Skip to content

Commit

Permalink
Merge branch 'develop' into fix/BCI-4095-rpc-deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaidashenko authored Aug 26, 2024
2 parents a56f4ee + 95ae744 commit 50d423d
Show file tree
Hide file tree
Showing 45 changed files with 6,473 additions and 1,746 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ core/scripts/functions @smartcontractkit/functions
core/scripts/gateway @smartcontractkit/functions

# Contracts
/contracts/ @RensR
/contracts/ @RensR @matYang @RayXpub @elatoskinas

# First we match on project names to catch files like the compilation scripts,
# gas snapshots and other files not places in the project directories.
Expand All @@ -74,7 +74,7 @@ core/scripts/gateway @smartcontractkit/functions
/contracts/src/v0.8/llo-feeds @smartcontractkit/mercury-team
# TODO: mocks folder, folder should be removed and files moved to the correct folders
/contracts/src/v0.8/operatorforwarder @smartcontractkit/data-feeds-engineers
/contracts/src/v0.8/shared @RensR
/contracts/src/v0.8/shared @RensR @matYang @RayXpub @elatoskinas
# TODO: tests folder, folder should be removed and files moved to the correct folders
# TODO: transmission folder, owner should be found
/contracts/src/v0.8/vrf @smartcontractkit/vrf-team
Expand Down
34 changes: 18 additions & 16 deletions .github/workflows/solidity-foundry-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
name: Detect changes
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.sol }}
product_changes: ${{ steps.changes-transform.outputs.product_changes }}
product_files: ${{ steps.changes-transform.outputs.product_files }}
changeset_changes: ${{ steps.changes-dorny.outputs.changeset }}
Expand All @@ -46,10 +45,11 @@ jobs:
ref: ${{ inputs.commit_to_use || github.sha }}
- name: Find modified contracts
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
id: changes-dorny
with:
list-files: 'csv'
base: ${{ inputs.base_ref }}
# This is a valid input, see https://github.com/dorny/paths-filter/pull/226
predicate-quantifier: every
filters: |
ignored: &ignored
Expand Down Expand Up @@ -81,33 +81,33 @@ jobs:
run: |
if [ "${{ inputs.product }}" = "shared" ]; then
echo "::debug:: Product is shared, transforming changes"
if [[ "${{ steps.changes.outputs.product }}" == "true" && "${{ steps.changes.outputs.other_shared }}" == "true" ]]; then
if [[ "${{ steps.changes-dorny.outputs.product }}" == "true" && "${{ steps.changes-dorny.outputs.other_shared }}" == "true" ]]; then
echo "::debug:: Changes were found in 'shared' folder and in 'interfaces' and root folders"
echo "product_changes=true" >> $GITHUB_OUTPUT
echo "product_files=${{ steps.changes.outputs.product_files }},${{ steps.changes.outputs.other_shared_files }}" >> $GITHUB_OUTPUT
elif [[ "${{ steps.changes.outputs.product }}" == "false" && "${{ steps.changes.outputs.other_shared }}" == "true" ]]; then
echo "product_files=${{ steps.changes-dorny.outputs.product_files }},${{ steps.changes-dorny.outputs.other_shared_files }}" >> $GITHUB_OUTPUT
elif [[ "${{ steps.changes-dorny.outputs.product }}" == "false" && "${{ steps.changes-dorny.outputs.other_shared }}" == "true" ]]; then
echo "::debug:: Only contracts in' interfaces' and root folders were modified"
echo "product_changes=true" >> $GITHUB_OUTPUT
echo "product_files=${{ steps.changes.outputs.other_shared_files }}" >> $GITHUB_OUTPUT
elif [[ "${{ steps.changes.outputs.product }}" == "true" && "${{ steps.changes.outputs.other_shared }}" == "false" ]]; then
echo "product_files=${{ steps.changes-dorny.outputs.other_shared_files }}" >> $GITHUB_OUTPUT
elif [[ "${{ steps.changes-dorny.outputs.product }}" == "true" && "${{ steps.changes-dorny.outputs.other_shared }}" == "false" ]]; then
echo "::debug:: Only contracts in 'shared' folder were modified"
echo "product_changes=true" >> $GITHUB_OUTPUT
echo "product_files=${{ steps.changes.outputs.product_files }}" >> $GITHUB_OUTPUT
echo "product_files=${{ steps.changes-dorny.outputs.product_files }}" >> $GITHUB_OUTPUT
else
echo "::debug:: No contracts were modified"
echo "product_changes=false" >> $GITHUB_OUTPUT
echo "product_files=" >> $GITHUB_OUTPUT
fi
else
echo "product_changes=${{ steps.changes.outputs.product }}" >> $GITHUB_OUTPUT
echo "product_files=${{ steps.changes.outputs.product_files }}" >> $GITHUB_OUTPUT
echo "product_changes=${{ steps.changes-dorny.outputs.product }}" >> $GITHUB_OUTPUT
echo "product_files=${{ steps.changes-dorny.outputs.product_files }}" >> $GITHUB_OUTPUT
fi
- name: Check for changes outside of artifact scope
uses: ./.github/actions/validate-artifact-scope
if: ${{ steps.changes.outputs.sol == 'true' }}
if: ${{ steps.changes-dorny.outputs.sol == 'true' }}
with:
sol_files: ${{ steps.changes.outputs.sol_files }}
sol_files: ${{ steps.changes-dorny.outputs.sol_files }}
product: ${{ inputs.product }}

gather-basic-info:
Expand All @@ -134,7 +134,7 @@ jobs:
run: |
mkdir -p contracts/changesets
files="${{ needs.changes.outputs.changeset_files }}"
IFS=",'
IFS=","
for changeset in $files; do
echo "::debug:: Copying $changeset"
cp $changeset contracts/changesets
Expand Down Expand Up @@ -303,14 +303,17 @@ jobs:
# modify remappings so that solc can find dependencies
./contracts/scripts/ci/modify_remappings.sh contracts contracts/remappings.txt
mv remappings_modified.txt remappings.txt
mv remappings_modified.txt remappings.txt
./contracts/scripts/ci/generate_uml.sh "./" "contracts/uml-diagrams" "$contract_list"
- name: Generate Slither Markdown reports
run: |
contract_list="${{ needs.changes.outputs.product_files }}"
# without it Slither sometimes fails to use remappings correctly
cp contracts/foundry.toml foundry.toml
echo "::debug::Processing contracts: $contract_list"
./contracts/scripts/ci/generate_slither_report.sh "${{ github.server_url }}/${{ github.repository }}/blob/${{ inputs.commit_to_use || github.sha }}/" contracts/configs/slither/.slither.config-artifacts.json "." "$contract_list" "contracts/slither-reports" "--solc-remaps @=contracts/node_modules/@"
Expand Down Expand Up @@ -349,9 +352,8 @@ jobs:
- name: Upload all artifacts as single package
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: review-artifacts-${{ inputs.product }}-${{ inputs.commit_to_use || github.sha }}
name: review-artifacts-${{ inputs.product }}-${{ inputs.base_ref }}-${{ inputs.commit_to_use || github.sha }}
path: review_artifacts
retention-days: 60

- name: Remove temporary artifacts
uses: geekyeggo/delete-artifact@24928e75e6e6590170563b8ddae9fac674508aa1 # v5.0
Expand Down
37 changes: 32 additions & 5 deletions .github/workflows/solidity-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
{ "name": "liquiditymanager", "setup": { "run-coverage": true, "min-coverage": 46.3, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "llo-feeds", "setup": { "run-coverage": true, "min-coverage": 49.3, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "operatorforwarder", "setup": { "run-coverage": true, "min-coverage": 55.7, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "shared", "setup": { "run-coverage": true, "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "shared", "setup": { "run-coverage": true, "extra-coverage-params": "--no-match-path='*CallWithExactGas*'", "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "transmission", "setup": { "run-coverage": true, "min-coverage": 65.6, "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 }}
]
Expand All @@ -62,13 +62,14 @@ jobs:
sol_modified_added_files: ${{ steps.changes.outputs.sol_files }}
sol_mod_only: ${{ steps.changes.outputs.sol_mod_only }}
sol_mod_only_files: ${{ steps.changes.outputs.sol_mod_only_files }}
not_test_sol_modified: ${{ steps.changes.outputs.not_test_sol }}
not_test_sol_modified_files: ${{ steps.changes.outputs.not_test_sol_files }}
not_test_sol_modified: ${{ steps.changes-non-test.outputs.not_test_sol }}
not_test_sol_modified_files: ${{ steps.changes-non-test.outputs.not_test_sol_files }}
all_changes: ${{ steps.changes.outputs.changes }}
steps:
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
- name: Detect changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
list-files: 'shell'
Expand Down Expand Up @@ -111,6 +112,26 @@ jobs:
transmission:
- 'contracts/src/v0.8/transmission/**/*.sol'
- name: Detect non-test changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes-non-test
with:
list-files: 'shell'
# This is a valid input, see https://github.com/dorny/paths-filter/pull/226
predicate-quantifier: every
filters: |
not_test_sol:
- modified|added: 'contracts/src/v0.8/**/!(*.t).sol'
- '!contracts/src/v0.8/**/test/**'
- '!contracts/src/v0.8/**/tests/**'
- '!contracts/src/v0.8/**/mock/**'
- '!contracts/src/v0.8/**/mocks/**'
- '!contracts/src/v0.8/**/*.t.sol'
- '!contracts/src/v0.8/*.t.sol'
- '!contracts/src/v0.8/**/testhelpers/**'
- '!contracts/src/v0.8/testhelpers/**'
- '!contracts/src/v0.8/vendor/**'
tests:
if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.sol_modified_added == 'true' }}
strategy:
Expand Down Expand Up @@ -198,7 +219,13 @@ jobs:
|| needs.changes.outputs.non_src_changes == 'true')
&& matrix.product.setup.run-coverage }}
working-directory: contracts
run: forge coverage --report lcov
shell: bash
run: |
if [[ -n "${{ matrix.product.setup.extra-coverage-params }}" ]]; then
forge coverage --report lcov ${{ matrix.product.setup.extra-coverage-params }}
else
forge coverage --report lcov
fi
env:
FOUNDRY_PROFILE: ${{ matrix.product.name }}

Expand Down
5 changes: 5 additions & 0 deletions contracts/.changeset/few-camels-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/contracts': patch
---

bump dependencies
2 changes: 1 addition & 1 deletion contracts/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ mockery: $(mockery) ## Install mockery.

.PHONY: foundry
foundry: ## Install foundry.
foundryup --version nightly-de33b6af53005037b463318d2628b5cfcaf39916
foundryup --version nightly-515a4cc8aba1627a717a1057ff4f09c8cd3bf51f

.PHONY: foundry-refresh
foundry-refresh: foundry
Expand Down
Loading

0 comments on commit 50d423d

Please sign in to comment.