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

Onramp upgrade & rollback flows [NONEVM-1297] #603

Merged
merged 8 commits into from
Feb 13, 2025

Conversation

toblich
Copy link
Contributor

@toblich toblich commented Feb 12, 2025

This PR supports emulating a CCIP minor version bump on the onramp. The bump is done per-lane (so, per dest-chain for the onramp). To do the bump, the owner should:

  • Update the dest-chain configuration as needed (mostly in fee quoter)
  • Invoke the new bump method in the router/onramp, which mostly just resets the sequence number for that lane

Then, to rollback, the owner should:

  • Update the dest-chain configuration as needed (mostly in fee quoter)
  • Invoke the new rollback method in the router/onramp, which mostly just restores the sequence number for that lane that was there before the last upgrade.

Caveats:

  • As upgrades of CCIP minor version are not too often, we only support one consecutive rollback. We don't expect nor support rolling-back twice in a row, without having bumped again at least once in between
  • It is up to the admin to update the fee quoter config accordingly with each operation, and bundling all changes in a single tx

@toblich toblich marked this pull request as ready for review February 12, 2025 19:19
@toblich toblich requested a review from a team as a code owner February 12, 2025 19:20
@@ -81,6 +86,44 @@ pub fn update_dest_chain_config(
Ok(())
}

pub fn bump_ccip_version_for_dest_chain(
Copy link
Contributor Author

@toblich toblich Feb 12, 2025

Choose a reason for hiding this comment

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

@RensR if you want to review, this is the implementation of the onramp upgrade/rollback which we talked about and how to handle the sequence number accordingly. Just looking at this file is enough I think, no need to worry about the rest.

PabloMansanet
PabloMansanet previously approved these changes Feb 13, 2025
Copy link
Contributor

@PabloMansanet PabloMansanet left a comment

Choose a reason for hiding this comment

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

LGTM! Just two minor points on comments/clarity.

chains/solana/contracts/programs/ccip-router/src/lib.rs Outdated Show resolved Hide resolved
chains/solana/contracts/programs/ccip-router/src/state.rs Outdated Show resolved Hide resolved
Copy link

Metric tobi/onramp-upgrade-rollback main
Coverage 74.1% 74.0%

@toblich toblich merged commit bb00d60 into main Feb 13, 2025
17 checks passed
@toblich toblich deleted the tobi/onramp-upgrade-rollback branch February 13, 2025 19:58
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.

3 participants