Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- SDK (EVM): `getLogs` treats `maximum [from, to] blocks distance: N` (mova, JSON-RPC `-32000`) as a block-range error and pages with at most N blocks. Before, it failed every call with its default 10000-block page. A depth limit, such as `fromBlock is too far from the latest block`, is still not a range error, because a smaller page does not fix it
- SDK (EVM, Solana, TON): a failed `getBlockInfo` for a tag (`latest`, `finalized`) or a depth is no longer also an unhandled promise rejection. micro-memoize's `forceUpdate` cached a wrapper of each forced call that nothing read, and that wrapper rethrew the failure; after one successful call for a tag, every failed one leaked. `getBlockInfo` now caches only positive block numbers and calls the RPC for tags and depths, as before
- Solana: `execute` (`manual-exec`) no longer scans the wallet's history after a successful execution. It ran `cleanUpBuffers`, one `getTransaction` per transaction of the wallet's last up to 1000, sequentially, before returning: minutes to tens of minutes on a rate-limited RPC, for an execution already landed. A successful execution still closes its buffer. Leftover buffers and lookup tables are now closed only by an explicit `cleanUpBuffers`, or `manual-exec --clear-leftover-accounts`, which runs it after a successful execution. `execute`'s `waitDeactivation` option is deprecated and has no effect; pass it to `cleanUpBuffers`

## [1.18.0] - 2026-11-20

Expand Down
2 changes: 1 addition & 1 deletion ccip-api-ref/docs-cli/manual-exec.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ Solana transactions have size limits. For large messages:
| 2 | `--force-lookup-table` | Creates address lookup table for accounts |
| 3 | `--clear-leftover-accounts` | Cleans up from aborted attempts |

After successful execution, buffers auto-clear. Lookup tables require a grace period before deletion.
After successful execution, buffers auto-clear. A lookup table created for the execution is deactivated, and requires a grace period (~513 slots) before deletion. Leftovers of earlier attempts are only looked for with `--clear-leftover-accounts`, which scans the wallet's recent transactions after a successful execution; this can be slow on a rate-limited RPC.

## Canton Considerations

Expand Down
8 changes: 5 additions & 3 deletions ccip-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,11 @@ exec callback. Tokens gas limit override estimation is not supported for estimat
the transaction.

If a solana message fails serialization, it's recommended to try with buffer first, then with lookup
table. The former gets auto-cleared upon successful execution, while the latter needs a grace period
to be cleared.
`--clear-leftover-accounts` can be used to scan and wait for the accounts to be cleared, after exec.
table. The former gets auto-cleared upon successful execution, while the latter is deactivated, and
needs a grace period (~513 slots) to be closed.
`--clear-leftover-accounts` resets a buffer left by an aborted attempt, and after a successful
execution scans the wallet's recent transactions for leftover buffers and lookup tables to close
(which can be slow on a rate-limited RPC).

#### Sui Special Cases

Expand Down
15 changes: 14 additions & 1 deletion ccip-cli/src/commands/manual-exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
CCIPInteractiveRequiredError,
CCIPMessageIdNotFoundError,
CCIPTransactionNotFoundError,
SolanaChain,
discoverOffRamp,
estimateReceiveExecution,
isSupportedTxHash,
Expand Down Expand Up @@ -119,7 +120,7 @@ export const builder = (yargs: Argv) =>
'clear-leftover-accounts': {
type: 'boolean',
describe:
'Clears buffers (if a previous attempt was aborted) or any ALT owned by this sender.',
"Solana: resets a buffer left by an aborted attempt, and after a successful execution scans the wallet's recent transactions (can be slow) to close its leftover buffers and lookup tables.",
},
'receiver-object-ids': {
type: 'array',
Expand Down Expand Up @@ -347,6 +348,18 @@ async function manualExec(
output.write(jsonStringify({ request, receipt }, 2))
break
}

if (argv.clearLeftoverAccounts) {
if (dest instanceof SolanaChain) {
// after a success only: a failed execution's buffer is picked up by a retry
logger.info('Scanning recent transactions for leftover buffers and lookup tables…')
await dest
.cleanUpBuffers({ wallet })
.catch((err: unknown) => logger.warn('Error while cleaning up leftover accounts:', err))
} else {
logger.warn('--clear-leftover-accounts only applies to Solana destinations; ignored')
}
}
}

// TODO: re-implement executing `sender` queue
17 changes: 10 additions & 7 deletions ccip-sdk/src/solana/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1758,13 +1758,19 @@ export class SolanaChain extends Chain<typeof ChainFamily.Solana> {
* CCIP 2.0 messages are executed through `execute_v2`, which is permissionless: the wallet only
* signs and pays for it. Execution inputs too large for a transaction are written to an
* execution inputs buffer first, which a retry picks up from if the execution fails.
*
* A successful execution closes its buffer. It doesn't look for leftovers of earlier attempts,
* nor close a lookup table it created: see {@link SolanaChain.cleanUpBuffers}.
* @throws {@link CCIPWalletInvalidError} if wallet is not a valid Solana wallet
* @throws {@link CCIPPartialTransactionSubmissionError} if a transaction fails after earlier
* ones (e.g. buffering) confirmed, and no retry strategy is left
*/
async execute(
opts: Parameters<Chain['execute']>[0] & {
// when cleaning leftover LookUp Tables, wait deactivation grace period (~513 slots) then close ALT
/**
* @deprecated No effect: `execute` no longer cleans up lookup tables. Pass it to
* {@link SolanaChain.cleanUpBuffers} instead.
*/
waitDeactivation?: boolean
clearLeftoverAccounts?: boolean
},
Expand Down Expand Up @@ -1816,11 +1822,6 @@ export class SolanaChain extends Chain<typeof ChainFamily.Solana> {
}
}

try {
await this.cleanUpBuffers(opts)
} catch (err) {
this.logger.warn('Error while trying to clean up buffers:', err)
}
const tx = await this.getTransaction(hash)
return this.getExecutionReceiptInTx(tx)
}
Expand Down Expand Up @@ -1938,7 +1939,9 @@ export class SolanaChain extends Chain<typeof ChainFamily.Solana> {
}

/**
* Clean up and recycle buffers and address lookup tables owned by wallet
* Clean up and recycle buffers and address lookup tables owned by wallet, e.g. left by aborted
* or failed executions. Scans the wallet's recent history (its last up to 1000 transactions,
* fetched one by one), so it can take long on a rate-limited RPC; `execute` doesn't call it.
* @param opts - cleanUp options
* - wallet - wallet instance to sign txs
* - waitDeactivation - Whether to wait for lookup table deactivation cool down period
Expand Down
Loading