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

CCIP-4420 Merging back CCIP codebase #15890

Merged
merged 1,599 commits into from
Jan 10, 2025
Merged

CCIP-4420 Merging back CCIP codebase #15890

merged 1,599 commits into from
Jan 10, 2025

Conversation

mateusz-sekara
Copy link
Collaborator

@mateusz-sekara mateusz-sekara commented Jan 10, 2025

This PR focuses on moving back the business logic of ccip. IntegrationTests and Scripts will be backported in the followup - I don't want to introduce too many changes at once and rather optimize for reviewable PRs which don't wait for too long to be merged.

Merging the following directories:

  • core/services/ocr2/plugins/ccip
  • core/services/relay/evm
  • core/chains/evm

Using state from the ccip repo at smartcontractkit/ccip@ecc1fb0

Merge was done using the following command

git remote add  upstream ****@github.com:smartcontractkit/ccip.git
git fetch --prune upstream
git merge upstream/ccip-develop

huangzhen1997 and others added 30 commits August 15, 2024 13:45
* add case for gnosis

* add changeset

* fix typo

* typo

---------

Co-authored-by: Prashant Yadav <34992934+prashantkumar1982@users.noreply.github.com>
* add error handling for service unavailable for arbitrum

* add changeset

* update error message

---------

Co-authored-by: Prashant Yadav <34992934+prashantkumar1982@users.noreply.github.com>
## Motivation
getPreviousPool was missing 

## Solution

Add getPreviousPool
- NOTE ~5k is generated protobuf code to unblock. That will be imported
once exposed.
- We put the deployment/configuration logic in integration-tests module
for a few reasons:
- Keeps the chain dependencies out of the core module, in particular
helpful for eventual cross family tests
- It can become the canonical deployment logic to be used for CRIB envs
as well (eventually can replace the actions + contracts dirs)
- To accomplish the lightweight tests (chainlink.Application +
simulated.Backend) we expose some test utilities in util/testutils/
- integration-tests/deployment holds product agnostic deployment
utilities including a general purpose environment structure to write
environment abstracted code against and migration output components
(address books, proposals etc)
- integration-tests/deployment/ccip holds all product specific
deployment code including
- Top level migrations and migration tests where a "migration" is
defined to be a function which operates against an environment and
outputs a MigrationOutput structure with one or more artifacts (MCMS
proposals, job specs). Notably migration tests can apply those outputs
to an ephemeral environment to ensure correctness. These migrations are
intended for export and use against real environments (testnet/mainnet).
- Re-usable product specific components of top level migrations and
associated tests

Next steps / follow up PRs:
- Port testutils export to chainlink repo
- Example solana setup
- Once cross family validated, start deeper testing and real CCIP use
cases

---------

Co-authored-by: Adam Hamrick <adam.hamrick@smartcontract.com>
Co-authored-by: AnieeG <anindita.ghosh@smartcontract.com>
## Motivation
Needed a script to update compiled json artifacts in G++ 

## Solution
Added few more options in solc compile 
Generated a shell script and make command to update artifacts in G++
path for specific contracts
## Motivation
CCIP Config can go to larger size and any query from offchain components
via rpc call can cause timeout issues

## Solution
add pagination to `getAllCCIPConfig` function which takes 
- pageSize
- startIndex

---------

Co-authored-by: app-token-issuer-infra-releng[bot] <120227048+app-token-issuer-infra-releng[bot]@users.noreply.github.com>
Co-authored-by: Makram Kamaleddine <makramkd@users.noreply.github.com>
#1310)

## Motivation
gasUsed for Execution to be emitted along with
ExecutionStateChangedEvent

## Solution
compute `gasUsed` for execution of a message in EVM2EVMMultiOffRamp
this change is applicable to only 1.6 version
Test Assertion must be added to assert the event body parameters
(excluding the gasUsed as it cant be hardcoded in tests)

** This is extension of the closed PR:
smartcontractkit/ccip#1297
got signature verification issue with other PR. so moving all changes
over here

---------

Co-authored-by: app-token-issuer-infra-releng[bot] <120227048+app-token-issuer-infra-releng[bot]@users.noreply.github.com>
Co-authored-by: Ryan <80392855+RayXpub@users.noreply.github.com>
## Motivation

Use the commit plugin state machine implementation.

## Solution

Use the commit plugin state machine implementation.
Signed-off-by: chainchad <96362174+chainchad@users.noreply.github.com>
## Motivation


## Solution
Cleanup & more realistic values for gas overheads
* No new finalized Heads Implementation

* fixed tests

* update defaults for NoNewFinalizedHeadsThreshold

* Update common/client/node_lifecycle.go

Co-authored-by: amit-momin <108959691+amit-momin@users.noreply.github.com>

* Update common/client/node_lifecycle_test.go

Co-authored-by: amit-momin <108959691+amit-momin@users.noreply.github.com>

* Update common/client/node_lifecycle_test.go

Co-authored-by: amit-momin <108959691+amit-momin@users.noreply.github.com>

* rename HeadIsNotIncreasing to NoNewHead

* move and add docs for syncIssue consts

* rename syncIssue to syncStatus

---------

Co-authored-by: amit-momin <108959691+amit-momin@users.noreply.github.com>
* allow to configure RPCTimeouts

* Custom (30s) timeout for Hedera RPC requests with large payloads (SendTransaction, CallContext, etc.)

* fix linter
* Added post-broadcast nonce validation for Hedera

* Added changeset

* Updated chaintype docs for Hedera

* Fixed lint errors

* Added condition to handle on-chain seq less than tx seq and updated comment
* Custom Astar finality

* fix merge artifact

* fix lint issue

* simplify isRequestingFinalizedBlock

* avoid iterating through the whole batch again

* fix errors wrapping
Cherry pick of #14132

Co-authored-by: amit-momin <108959691+amit-momin@users.noreply.github.com>
## Motivation
Cherry-pick of #14021
cherry-pick of #13957
cherry-pick of #13876
cherry-pick of #13907
Cherry-Pick: classify arbitrum sequencer inaccessible error as retryable
(#14100)
Cherry-Pick: fix unhandled already seen tx error for gnosis chiado
(#14099)

Requires:
“alreadyknown” is properly classified
Errors are classified to be Retryable
## Motivation
Want to be maximally defensive for the address book to prevent
corruption.

## Solution
- Type contract and version
- Let products compose type and version at deploy/state gen time to
avoid a combinatorial number of strings
## Motivation

There were many transactions which needed to be executed.

## Solution

Finish the work that @dimkouv started in #631

---------

Co-authored-by: Abdelrahman Soliman (Boda) <2677789+asoliman92@users.noreply.github.com>
// getMantleTokenRatio Requests and returns a token ratio value for the Mantle chain.
func (i *Interceptor) getMantleTokenRatio(ctx context.Context) (*big.Int, error) {
// FIXME it's removed from chainlink repo
// precompile := common.HexToAddress(rollups.OPGasOracleAddress)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matYang @amit-momin hey folks, you are the ones who might have a context on that, could you please help resolve that conflict? It seems that the code in the chainlink repository is completely different from what we have in ccip

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This I don't have much context on so I'll defer to Matt on this. Although, I might be missing something but I don't think I see the estimatorconfig directory in the chainlink repo

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given it is Mantle specific, let's use a constant address here 0x420000000000000000000000000000000000000F for simplicity

@mateusz-sekara mateusz-sekara force-pushed the ccip-merge branch 6 times, most recently from 4c75674 to 143d5cd Compare January 10, 2025 16:16
@mateusz-sekara mateusz-sekara marked this pull request as ready for review January 10, 2025 16:28
@mateusz-sekara mateusz-sekara requested review from a team as code owners January 10, 2025 16:28
@mateusz-sekara mateusz-sekara requested a review from Atrax1 January 10, 2025 16:28
@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
24.8% Duplication on New Code (required ≤ 10%)

See analysis details on SonarQube

@mateusz-sekara mateusz-sekara changed the base branch from develop to ccip-merge-branch January 10, 2025 18:46
@mateusz-sekara mateusz-sekara merged commit 79d0e20 into ccip-merge-branch Jan 10, 2025
186 of 188 checks passed
@mateusz-sekara mateusz-sekara deleted the ccip-merge branch January 10, 2025 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.