Repository navigation
Fix: Correct gas estimate for 2.0 solana receiver - #566
PabloMansanet wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
👋 PabloMansanet, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
CI Test Report❌ Lint ( Lint failure output (npm run check) |
andrevmatos
left a comment
There was a problem hiding this comment.
The callback selection follows the separation in #531 and #537. Select the lane first, then use the destination OffRamp version to decide whether to read the receiver registry.
Please fix the missing v2 callback fields and update the manual-exec output. Add a test through the public estimator with one router serving both OffRamps. Verify that 1.6 skips the registry and 2.0 reads it. Cover a writable receiver account and a non-default token delivery mode.
All 102 focused tests and the SDK type check passed locally. Mocked RPC checks confirmed the missing callback fields.
| } | ||
| } | ||
| return estimateExecComputeUnits({ | ||
| connection: this.connection, |
There was a problem hiding this comment.
P1 — Use the v2 destination data to build the callback. This picks the right instruction, but the public estimator does not read the accounts or writable bitmap from executorArgs or destBlob. It also does not pass the token delivery mode or read the signed receiver from tokenAmounts[0].tokenReceiver.
I captured the callback through the public estimator with one writable account. Both the pre-send and post-send paths passed only the three fixed accounts. The post-send token callback also encoded the zero receiver and DeriveAtaAndCreate instead of the message's receiver and UseAsIs.
Please decode executorArgs before send and the signed destBlob after send. Use the decoded accounts and delivery mode for the callback and token setup. Keep the legacy account handling unchanged for a 1.6 OffRamp.
| computeUnits: opts.txGasLimit ?? opts.gasLimit, | ||
| // only the transaction's limit: `gasLimit` is the receiver callback's budget, which a | ||
| // signed 2.0 message fixes, and is far below what the whole `execute_v2` consumes | ||
| computeUnits: opts.txGasLimit, |
There was a problem hiding this comment.
P2 — Update manual-exec to match this change. ccip-cli/src/commands/manual-exec.ts:279 prints Estimated gasLimit override and sets argv.gasLimit when the estimate exceeds the signed budget. Solana v2 now correctly ignores that field, so the CLI reports an override it does not apply. Please report the receiver estimate as advisory for Solana v2. Note that --tx-gas-limit controls the transaction budget, not the signed receiver budget.
No description provided.