Skip to content

Commit 6909f63

Browse files
committed
update adr
1 parent 9f12c6f commit 6909f63

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

docs/adr/solana-storage-architecture.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,11 @@ Programs reference `access_manager` pubkey in their state to validate permission
218218
219219
3. Acknowledge:
220220
- Verify ack proof against commitment
221-
- Close PacketCommitment PDA
222-
- Reclaim rent
221+
- Zero PacketCommitment PDA (PDA persists to prevent sequence reuse)
223222
224223
4. Timeout:
225224
- Verify non-receipt on destination
226-
- Close PacketCommitment PDA
227-
- Reclaim rent
225+
- Zero PacketCommitment PDA (PDA persists to prevent sequence reuse)
228226
```
229227

230228
### Client Update Lifecycle
@@ -260,23 +258,23 @@ Per account rent: ~0.01 SOL (refundable when account closed)
260258

261259
**Per-Packet Cost:**
262260
```
263-
- Commitment creation: ~0.01 SOL (refunded on ack/timeout)
261+
- Commitment creation: ~0.002 SOL (permanently locked — PDA persists after zeroing for replay protection)
264262
- Transaction fees: ~0.000005 SOL
265-
- Net cost after reclaim: ~0.000005 SOL
263+
- Net cost per packet: ~0.002 SOL
266264
```
267265

268266
**Key Insights:**
269267
- Cost scales roughly linearly with validator count (~5x validators = ~4x cost)
270-
- Chunk and commitment rent is fully refundable
271-
- Relayers must call cleanup instructions to reclaim rent
268+
- Chunk rent is fully refundable; commitment rent is permanently locked (replay protection trade-off)
269+
- Relayers must call cleanup instructions to reclaim chunk rent
272270

273271
## Security Considerations
274272

275273
1. **PDA Determinism**: Consistent seeds prevent duplicate accounts
276274
2. **Authority Checks**: Only authorized parties can modify state
277275
3. **Chunk Ownership**: Per-submitter PDAs prevent interference
278276
4. **Access Control**: Role-based permissions via access-manager
279-
5. **Commitment Integrity**: Only router can create/close commitment PDAs
277+
5. **Commitment Integrity**: Only router can create commitment PDAs; after ack/timeout the commitment is zeroed but the PDA persists, preventing sequence reuse via Anchor's `init` constraint
280278

281279
## Byte Encoding and Sequence Calculation
282280

0 commit comments

Comments
 (0)