Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge CCIP capabilities latest [CCIP-2946] #14242

Closed
wants to merge 84 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
5491575
Misc onchain fixes (#1212)
RensR Aug 1, 2024
ee30649
Add missing type and version (#1243)
RayXpub Aug 1, 2024
3f7ec5d
Remove revert cases in exec race conditions (#1246)
RensR Aug 2, 2024
0a0f46b
Static analysis fixes (#1255)
RayXpub Aug 5, 2024
a31501b
Make router destination/source chain specific (#1242)
RyanRHall Aug 6, 2024
86a9d71
use transferFrom(pool -> receiver) over hop through offRamp (#1258)
RensR Aug 6, 2024
72eb7d8
Change RMN contract typeAndVersion (#1233)
lagoon0o0 Aug 8, 2024
3d148bb
feat: optimise EVM2EVMMultiOffRamp.executeSingleMessage (#1235)
0xsuryansh Aug 8, 2024
4b7c61e
undo transferFrom, assert balance in offRamp (#1273)
RensR Aug 9, 2024
076ebfe
Manual-execute-gas-overrides (#1256)
defistar Aug 9, 2024
9683da4
bump version to 1.5 (#1263)
RensR Aug 9, 2024
b9e2ba5
bump version to 1.5 (#1279)
RensR Aug 9, 2024
3a2d2df
update pool func visibility (#1283)
matYang Aug 12, 2024
7513608
open zeppelin v 5 migration (#1281)
RyanRHall Aug 12, 2024
b5a72ca
feat: rateLimiterConfig mapping of localToRemoteTokens to take bytes …
defistar Aug 14, 2024
c89e99b
Fix stale comment (#1296)
RensR Aug 15, 2024
c8d9bf2
add BurnWithFromMintTokenPoolAndProxy (#1287)
RensR Aug 15, 2024
09c3dce
Adding ooo flag to the PingPong (#1239)
0xnogo Aug 15, 2024
d43a018
fix hh compile and bump publish-prod version (#1299)
RensR Aug 16, 2024
c62013d
add getPreviousPool (#1312)
RensR Aug 16, 2024
4b5d63a
CCIP-2594 Add pagination based query of CCIPConfig (#1136)
defistar Aug 19, 2024
57e182f
feat: CCIP-1451 gasUsed for Execution to be emitted along with Execut…
defistar Aug 19, 2024
0601ba3
bump ccip version in license (#1309)
RensR Aug 19, 2024
af700b4
set more correct gas overheads (#1319)
RensR Aug 19, 2024
c4a233e
fix stale comment (#1327)
RensR Aug 20, 2024
b098521
Rename ramps and rmn (#1323)
RensR Aug 20, 2024
d8f2f20
feat: PriceRegistry conforms to keystone interface (#1208)
0xsuryansh Aug 22, 2024
6be912e
fix: CCIP-3095 fix flaky test assertions in offramp tests (#1357)
defistar Aug 23, 2024
ee9c39a
Comments cleanup (#1343)
RayXpub Aug 23, 2024
eee851a
RMN home & remote contracts (#1308)
gtklocker Aug 23, 2024
dfe6319
fix ping pong version (#1363)
RensR Aug 26, 2024
efb8a72
Port v1.5 fixes to v1.6 (#1286)
0xsuryansh Aug 26, 2024
6624e68
Remove vendor
asoliman92 Aug 27, 2024
7b0ec0e
Ignore vendor directory
asoliman92 Aug 27, 2024
1e1fd58
Remove liquidity manager
asoliman92 Aug 27, 2024
f9fbf12
Fixing dependencies
asoliman92 Aug 27, 2024
3e256b1
Fixing dependencies
asoliman92 Aug 27, 2024
fcbb876
Merge branch 'develop' into ccip/capabilities
asoliman92 Aug 27, 2024
ad24dee
Fix logger dependency
asoliman92 Aug 27, 2024
70e0799
Merge branch 'ccip/capabilities' of github.com:smartcontractkit/chain…
asoliman92 Aug 27, 2024
2e0747b
Remove ccip/scripts for now
asoliman92 Aug 27, 2024
fa9150d
core/services/ocr3/plugins/ccip_integration_tests: exec (#1238)
makramkd Aug 2, 2024
cf937a1
Make router destination/source chain specific (#1242)
RyanRHall Aug 6, 2024
006e0ed
core/capabilities/ccip: use OCR offchain config (#1264)
makramkd Aug 6, 2024
c46fb37
core/capabilities/ccip: bump chainlink-ccip (#1284)
makramkd Aug 12, 2024
c836083
core/capabilities/ccip: bump chainlink-ccip, fix tests (#1291)
makramkd Aug 14, 2024
47ea71d
Tooling deployment scaffolding (#1252)
connorwstein Aug 16, 2024
b112ab4
CCIP-2594 Add pagination based query of CCIPConfig (#1136)
defistar Aug 19, 2024
10f4ee6
core/capabilities/ccip: use commit plugin w/ state machine (#1321)
makramkd Aug 19, 2024
ea8dfd0
Rename ramps and rmn (#1323)
RensR Aug 20, 2024
c16532c
Add deployment tests in ci (#1337)
AnieeG Aug 21, 2024
bdd17eb
Remove old integration tests for v1.6 (#1346)
asoliman92 Aug 22, 2024
81675ce
Initialize reader configs when module loads. (#1353)
winder Aug 23, 2024
cb5f763
Port v1.5 fixes to v1.6 (#1286)
0xsuryansh Aug 26, 2024
40b908e
Bump chainlink-ccip to dev branch (#1365)
dimkouv Aug 27, 2024
b136555
fix dependencies and add .husky in contracts
asoliman92 Aug 27, 2024
6298da1
Ccip-3076 deployment package (#14209)
AnieeG Aug 26, 2024
5e5d592
modtidy
asoliman92 Aug 27, 2024
18ca7be
port deployments
asoliman92 Aug 27, 2024
64cb6fe
port contracts
asoliman92 Aug 27, 2024
3caf6ab
fix integration tests dependencies
asoliman92 Aug 27, 2024
a52b939
Rename PriceRegistry -> FeeQuoter (#1350)
RensR Aug 27, 2024
050ece8
fix: keystone_contracts_setup.setupConsumerContract
0xsuryansh Aug 27, 2024
d667d3a
Merge branch 'ccip/capabilities' of github.com:smartcontractkit/chain…
asoliman92 Aug 27, 2024
dbe9ffb
Run FOUNDRY_PROFILE=ccip forge fmt
asoliman92 Aug 27, 2024
3c7450d
Taking snapshots
asoliman92 Aug 27, 2024
afa3d5f
Merge branch 'develop' into ccip/capabilities
asoliman92 Aug 27, 2024
d6e0b04
Linting & Changeset
asoliman92 Aug 27, 2024
a3f33ec
Revert "Linting & Changeset"
asoliman92 Aug 27, 2024
8cd3fef
Add changeset
asoliman92 Aug 27, 2024
64f1203
Remove accidental package.json merge
asoliman92 Aug 27, 2024
82c1188
Add new changeset
asoliman92 Aug 27, 2024
724f54a
pnpm lint --fix
asoliman92 Aug 27, 2024
56e838b
fix failing tests
asoliman92 Aug 27, 2024
5744aff
Fix some CI failures
asoliman92 Aug 27, 2024
f12f35d
Lint
asoliman92 Aug 27, 2024
4aef7f8
Merge branch 'develop' into ccip/capabilities
asoliman92 Aug 27, 2024
2a0662a
testing keystone report name as empty
0xsuryansh Aug 28, 2024
7341b06
Copy contracts over from ccip
asoliman92 Aug 28, 2024
883470c
Merge remote-tracking branch 'origin/develop' into ccip/capabilities
asoliman92 Aug 28, 2024
8a248e4
Add changeset and gas snapshot
asoliman92 Aug 28, 2024
2cc51bc
Reverting KeystoneFeedsConsumer.sol until integration tests are fixed.
asoliman92 Aug 28, 2024
b42f1a6
Merge remote-tracking branch 'origin/develop' into ccip/capabilities
asoliman92 Aug 28, 2024
90b5466
Maintain parity between go_generate and makefile for contracts
asoliman92 Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/famous-plums-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#updated move latest capabilities code from ccip repo to chainlink repo [CCIP-2946]
11 changes: 9 additions & 2 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ jobs:
- cmd: go_core_tests
id: core_unit
os: ubuntu22.04-32cores-128GB
printResults: true
- cmd: go_core_ccip_deployment_tests
id: core_unit
os: ubuntu22.04-32cores-128GB
printResults: true
- cmd: go_core_race_tests
id: core_race
# use 64cores for overnight runs only due to massive number of runs from PRs
Expand Down Expand Up @@ -177,9 +182,11 @@ jobs:
CL_DATABASE_URL: ${{ env.DB_URL }}
run: ./tools/bin/${{ matrix.type.cmd }} ./...
- name: Print Filtered Test Results
if: ${{ failure() && matrix.type.cmd == 'go_core_tests' && needs.filter.outputs.changes == 'true' && steps.run-tests.conclusion == 'failure' }}
if: ${{ failure() && needs.filter.outputs.changes == 'true' && steps.run-tests.conclusion == 'failure' }}
run: |
cat output.txt | gotestloghelper -ci
if [[ "${{ matrix.type.printResults }}" == "true" ]]; then
cat output.txt | gotestloghelper -ci
fi
- name: Print Races
id: print-races
if: ${{ failure() && matrix.type.cmd == 'go_core_race_tests' && needs.filter.outputs.changes == 'true' }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,5 @@ override*.toml
.venv/

ocr_soak_report.csv

vendor/*
6 changes: 3 additions & 3 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,13 @@ packages:
outpkg: mock_contracts
interfaces:
CommitStoreInterface:
github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/price_registry:
github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter:
config:
dir: core/gethwrappers/ccip/mocks/
filename: price_registry_interface.go
filename: fee_quoter_interface.go
outpkg: mock_contracts
interfaces:
PriceRegistryInterface:
FeeQuoterInterface:
github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface:
config:
dir: core/gethwrappers/ccip/mocks/
Expand Down
5 changes: 5 additions & 0 deletions contracts/.changeset/quick-olives-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/contracts': minor
---

#updated move latest ccip contracts code from ccip repo to chainlink repo [CCIP-2946]
37 changes: 37 additions & 0 deletions contracts/.husky/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Husky git hooks
The folder contains [husky](https://github.com/typicode/husky) git hooks that automate pre-commit and pre-push commands.

## Setup

Create an `.env` file in this folder to enable hooks:

```sh
# Can be left blank to compile everything
FOUNDRY_PROFILE=ccip
HUSKY_ENABLE_PUSH_HOOKS=true
HUSKY_ENABLE_COMMIT_HOOKS=true
UPSTREAM_BRANCH=origin/ccip-develop
```

```sh
# Automatically ran after pnpm install
pnpm prepare
```

### Script procedure

The setup is done via the `prepare.sh` script, which installs husky and enables the hooks.

The prepare step is skipped if we are in CI. This is checked via the `CI=true` flag, which is always set to true on GitHub actions.

## Hooks & Scripts

### Pre-commit
Runs [lint-staged](https://github.com/lint-staged/lint-staged), which automatically detects `.sol` file changes and applies `forge fmt` only on the changed files.

Configured in `package.json` in the `lint-staged` field.

### Pre-push
Runs forge build, test, solhint and optionally suggests to generate snapshots and wrappers.

Due to a [git workflow limitation](https://stackoverflow.com/questions/21334493/git-commit-in-pre-push-hook), generating wrappers & snapshots requires resubmitting the push (via `--no-verify` or by skiping the snapshot / wrappers).
14 changes: 14 additions & 0 deletions contracts/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -e

source contracts/.husky/.env

# Only run hook on enabled
if ! [[ $HUSKY_ENABLE_COMMIT_HOOKS == "true" && -n $UPSTREAM_BRANCH ]]; then
exit 0
fi

cd contracts

# Run lint steps
pnpm lint-staged -v
47 changes: 47 additions & 0 deletions contracts/.husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash
set -e

source contracts/.husky/.env

# Only run hook on enabled
if ! [[ $HUSKY_ENABLE_PUSH_HOOKS == "true" && -n $UPSTREAM_BRANCH ]]; then
exit 0
fi

# Skip on no changes
current_branch=$(git branch --show-current)
changes_root=$(git diff --name-only $UPSTREAM_BRANCH...$current_branch -- "contracts/")

if ! [[ -n $changes_root ]]; then
echo "Pre-push hook for contracts skipped - no changes detected"
exit 0
fi

cd contracts

FOUNDRY_PROFILE=$FOUNDRY_PROFILE forge build
FOUNDRY_PROFILE=$FOUNDRY_PROFILE forge test
pnpm solhint

# Skip interactive commands if interactive mode (/dev/tty) is unavailable
# https://stackoverflow.com/a/69088164
if sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then
read -n1 -p "Re-generate snapshots & wrappers? (Y/n)" snapshot_answer < /dev/tty
echo $snapshot_answer

if [ "$snapshot_answer" != "${snapshot_answer#[Yy]}" ] ;then
# Create gas snapshot & commit gas snapshot
make snapshot
make wrappers

git add ./gas-snapshots
git add ../core/gethwrappers

# Check if commit is successful (non-empty)
if git commit -m "chore: update gas snapshots and wrappers"; then
# The commit is not included - need to push again (https://stackoverflow.com/questions/21334493/git-commit-in-pre-push-hook)
printf "\033[0;31m Snapshot commit created - run git push again \033[1;33m(skip snapshot, or use the --no-verify push option)\n"
exit 1
fi
fi
fi
19 changes: 19 additions & 0 deletions contracts/.husky/prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -e

# Detect if in CI to skip hooks
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
if [[ $CI == "true" ]]; then
exit 0
fi

# Skip hooks creation if unconfigured
if ! [ -f .husky/.env ]; then
printf "\033[1;33mNo .env file found in contracts/.husky, skipping hooks setup.\e[0m\n"
exit 0
fi

cd ../
chmod +x ./contracts/.husky/*.sh
pnpm husky ./contracts/.husky
echo "Husky hooks prepared."
20 changes: 20 additions & 0 deletions contracts/.husky/verify-changeset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
set -e

# Determine the current branch
current_branch=$(git branch --show-current)
upstream_branch="origin/ccip-develop"

# Compare the directory against the upstream branch
changes_root=$(git diff --name-only $upstream_branch...$current_branch -- ".changeset")

if ! [ -n "$changes_root" ]; then
printf "\033[1;33mRoot changeset changes not found, Consider running pnpm changeset in the root directory if there is significant off-chain impact.\e[0m\n"
fi

changes_contracts=$(git diff --name-only $upstream_branch...$current_branch -- "contracts/.changeset")

if ! [ -n "$changes_contracts" ]; then
printf "\033[0;31mContracts changeset changes not found, Make sure to run & commit \033[1;33mpnpm changeset\033[0;31m in the contracts directory.\n"
exit 1
fi
4 changes: 4 additions & 0 deletions contracts/.solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@
# Always ignore vendor
./src/v0.8/vendor
./node_modules/

# Ignore RMN contracts temporarily
./src/v0.8/ccip/RMNRemote.sol
./src/v0.8/ccip/RMNHome.sol
10 changes: 10 additions & 0 deletions contracts/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ wrappers-all: pnpmdep mockery abigen ## Recompiles solidity contracts and their
# go_generate contains a call to compile all contracts before generating wrappers
go generate ../core/gethwrappers/go_generate.go

# Use this to generate compiled JSON artifacts for gauntlet-plus-plus.
# This is currently only used for CCIP.
# example: make artifact-generate contract=LockReleaseTokenPoolAndProxy solcversion=0.8.24 artifactpath=../../gauntlet-plus-plus/packages-ethereum/operations-ccip/src/artifacts/1.5.0/lock-release-token-pool-and-proxy.json
artifact-generate: export FOUNDRY_PROFILE=ccip
.PHONY: artifact-generate
artifact-generate:
chmod +x ./scripts/generate_compiled_json_ccip.sh
./scripts/generate_compiled_json_ccip.sh $(contract) $(solcversion) $(artifactpath)


help:
@echo ""
@echo " .__ .__ .__ .__ __"
Expand Down
Loading
Loading