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

Open
wants to merge 1,599 commits into
base: develop
Choose a base branch
from
Open

CCIP-4420 Merging back CCIP codebase #15890

wants to merge 1,599 commits into from

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 <[email protected]>
* add error handling for service unavailable for arbitrum

* add changeset

* update error message

---------

Co-authored-by: Prashant Yadav <[email protected]>
## 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 <[email protected]>
Co-authored-by: AnieeG <[email protected]>
## 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 <[email protected]>
#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 <[email protected]>
## Motivation

Use the commit plugin state machine implementation.

## Solution

Use the commit plugin state machine implementation.
## 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 <[email protected]>

* Update common/client/node_lifecycle_test.go

Co-authored-by: amit-momin <[email protected]>

* Update common/client/node_lifecycle_test.go

Co-authored-by: amit-momin <[email protected]>

* rename HeadIsNotIncreasing to NoNewHead

* move and add docs for syncIssue consts

* rename syncIssue to syncStatus

---------

Co-authored-by: amit-momin <[email protected]>
* 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
## 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) <[email protected]>
Copy link
Contributor

github-actions bot commented Jan 10, 2025

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

Copy link
Contributor

github-actions bot commented Jan 10, 2025

AER Report: CI Core ran successfully ✅

aer_workflow , commit

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@mateusz-sekara mateusz-sekara force-pushed the ccip-merge branch 4 times, most recently from 1c77ede to c8095ea Compare January 10, 2025 12:53
@mateusz-sekara mateusz-sekara changed the title Ccip merge CCIP-4420 Merging back CCIP codebase Jan 10, 2025
@mateusz-sekara mateusz-sekara force-pushed the ccip-merge branch 2 times, most recently from 822789d to c5fc5e1 Compare January 10, 2025 14:47
// 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

@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

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.