Skip to content

fix: ccip settlement state#618

Open
0xHarbs wants to merge 2 commits intodevfrom
fix/solana-ccip-pda
Open

fix: ccip settlement state#618
0xHarbs wants to merge 2 commits intodevfrom
fix/solana-ccip-pda

Conversation

@0xHarbs
Copy link
Copy Markdown
Collaborator

@0xHarbs 0xHarbs commented Mar 25, 2026

🤖 Linear

Fixing evm to svm account storage issue by adjusting ccip message storage flow.

Copilot AI review requested due to automatic review settings March 25, 2026 11:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the Solana spoke’s CCIP settlement flow to avoid immediate intent-status PDA creation during ccip_receive by persisting settlement data in SpokeState and introducing a follow-up instruction to finalize delivery.

Changes:

  • Add pending_ccip_settlement to SpokeState and introduce a new settle_ccip_delivery instruction to create the intent_status_pda with Delivered status later.
  • Add a v2 spoke-state migration (migrate_spoke_state_v2) to realloc the state PDA for the new field.
  • Extend error handling and exports to support the new pending-settlement workflow.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/contracts/solana-spoke/programs/everclear_spoke/src/state.rs Adds pending_ccip_settlement to global state and updates the SIZE constant.
packages/contracts/solana-spoke/programs/everclear_spoke/src/lib.rs Exposes new settle_ccip_delivery and migrate_spoke_state_v2 entrypoints.
packages/contracts/solana-spoke/programs/everclear_spoke/src/instructions/state_migration.rs Implements the v2 realloc migration and adds size-consistency tests.
packages/contracts/solana-spoke/programs/everclear_spoke/src/instructions/receive_message/mod.rs Re-exports the new settle-delivery accounts context.
packages/contracts/solana-spoke/programs/everclear_spoke/src/instructions/receive_message/handle_cpi.rs Stores CCIP settlement in state and adds settle_ccip_delivery to write the intent status PDA later, plus tests.
packages/contracts/solana-spoke/programs/everclear_spoke/src/error.rs Adds errors for pending-settlement presence/absence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/contracts/solana-spoke/programs/everclear_spoke/src/state.rs Outdated
@0xHarbs 0xHarbs force-pushed the fix/solana-ccip-pda branch from eac4744 to aa7ed32 Compare March 27, 2026 13:00
Copy link
Copy Markdown
Contributor

@prathmeshkhandelwal1 prathmeshkhandelwal1 left a comment

Choose a reason for hiding this comment

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

LGTM

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