Skip to content

Commit ab36399

Browse files
vaporifsrdtrk
andauthored
fix(solana/docs): update ADR for universal error ack (#1011)
Co-authored-by: srdtrk <59252793+srdtrk@users.noreply.github.com>
1 parent 35707a5 commit ab36399

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

docs/adr/solana-ics27-gmp-architecture.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ See [Per-Sender Sequence Counter](solana-storage-architecture.md#per-sender-sequ
546546
- **CPI Depth**: 2 levels for target programs (vs unlimited on Ethereum)
547547
- **Account Pre-declaration**: All accounts must be known upfront
548548
- **Transaction Size**: 1232-byte limit constrains complexity
549+
- **No error ack on CPI failure**: If the target app reverts, the whole tx rolls back - no error ack, packet stuck until timeout. See [IFT ADR](./solana-ift-architecture.md#limitations).
549550

550551
### Mitigation Strategies
551552

docs/adr/solana-ift-architecture.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ This PDA-based validation is more efficient and Solana-native than instruction s
273273

274274
1. **Mint Authority Transfer**: For existing tokens, authority must be transferred to IFT PDA (recoverable via `revoke_mint_authority`)
275275
2. **No WSOL**: Native SOL bridging requires ICS-20
276+
3. **No error ack on CPI failure**: On Ethereum the router can catch an app revert and still write an error ack. Solana doesn't work that way - a failed CPI takes down the whole transaction, so the router never gets a chance to write anything. The `Err` branch in `recv_packet.rs` is `unreachable!()`. If `ift_mint` or any callback keeps reverting, the packet just sits there until timeout. Relayers should cap retries and simulate first.
276277

277278
## References
278279

programs/solana/programs/ics26-router/src/instructions/recv_packet.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ use solana_ibc_types::ics24;
1414
///
1515
/// Remaining accounts carry payload chunks, proof chunks and any extra
1616
/// accounts forwarded to the IBC app.
17+
///
18+
/// # CPI failure = entire tx reverts
19+
///
20+
/// Solana has no try/catch for CPI. If the app reverts, the whole transaction
21+
/// rolls back and the packet stays unacknowledged (timeout is the only recovery).
22+
/// See `docs/adr/solana-ift-architecture.md` limitations section.
1723
#[derive(Accounts)]
1824
#[instruction(msg: MsgRecvPacket)]
1925
pub struct RecvPacket<'info> {

0 commit comments

Comments
 (0)