Skip to content

Consolidate CS to enable lane between an existing EVM chain and solana #17607

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

Merged
merged 15 commits into from
May 8, 2025

Conversation

AnieeG
Copy link
Contributor

@AnieeG AnieeG commented May 6, 2025

This assumes that EVM chain and solana chain is already added to CCIP Home and the ocr3 configs are set. It's just enabling wiring between existing EVM and Solana chain

There are subsequent work after this PR. Follow up work - Need to change all granular changeset to convert into Operation so that the Operation can be reusable from multiple changesets directly or as part of sequence.

Comment on lines +51 to +62
updateEVMOnRampReport, err := operations.ExecuteOperation(b, operations.NewOperation(
"updateEVMOnRamp",
semver.MustParse("1.0.0"),
"Updates EVM OnRamps with Destination Chain Configs for Solana",
func(b operations.Bundle, deps Dependencies, input v1_6.UpdateOnRampDestsConfig) ([]mcmslib.TimelockProposal, error) {
output, err := v1_6.UpdateOnRampsDestsChangeset(deps.Env, input)
if err != nil {
return nil, err
}
return output.MCMSTimelockProposals, nil
},
), deps, deps.changesetInput.evmOnRampInput)
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to declare each operation outside of the ExecuteOperation function for reusability.

semver.MustParse("1.0.0"),
"Updates EVM OnRamps with Destination Chain Configs for Solana",
func(b operations.Bundle, deps Dependencies, input v1_6.UpdateOnRampDestsConfig) ([]mcmslib.TimelockProposal, error) {
output, err := v1_6.UpdateOnRampsDestsChangeset(deps.Env, input)
Copy link
Contributor

Choose a reason for hiding this comment

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

An Operation should have a single side effect, but this changeset does alot of things, which makes it hard to see where something goes wrong. Consider splitting up this changeset into modular operations, and then create a sequence. Sequences can be nested within each other as well, so this gives you the composability to share sequences

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed offline , creating a follow up ticket to wrap all changesets with corresponding atomic operation instead of directly calling changesets from Operation

@AnieeG AnieeG marked this pull request as ready for review May 8, 2025 18:02
@AnieeG AnieeG requested review from a team as code owners May 8, 2025 18:02
@AnieeG AnieeG requested review from dimkouv, 0xAustinWang and 0xnogo May 8, 2025 18:02
@cl-sonarqube-production
Copy link

Copy link
Contributor

@kylesmartin kylesmartin left a comment

Choose a reason for hiding this comment

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

I think it will become really hard to grok these changesets if ops & sequences & changesets are all defined in a single file. I'm thinking we should create three different packages:

  • ccip/operation
  • ccip/sequence
  • ccip/changeset

And have each entity properly versioned within a subfolder. That way, the sequence package imports operations and the changeset package imports sequences and we are protected from cyclic imports. There is also a clear indication of what imports what. Wdyt?

Copy link
Contributor

@kylesmartin kylesmartin left a comment

Choose a reason for hiding this comment

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

No comments outside of what I've left above, which will be addressed in later PR: https://smartcontract-it.atlassian.net/browse/CCIP-5847

@AnieeG
Copy link
Contributor Author

AnieeG commented May 8, 2025

There are subsequent work after this PR. Follow up work - Need to change all granular changeset to convert into Operation so that the Operation can be reusable from multiple changesets directly or as part of sequence.

Agreed. I will try to give it this structure as part of the follow up work.

@AnieeG AnieeG enabled auto-merge May 8, 2025 19:58
@AnieeG AnieeG added this pull request to the merge queue May 8, 2025
Merged via the queue into develop with commit 1e33565 May 8, 2025
133 checks passed
@AnieeG AnieeG deleted the trial-ops branch May 8, 2025 20:46
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.

5 participants