-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Description
Description
When simulating identical Solana transactions, LiteSVM reports ~20% higher compute unit (CU) consumption compared to Mollusk-svm, despite both executing the same instruction sequence successfully. That percentage varies from every transaction. The CU reported by Mollusk is much more accurate to mainet.
Reproduction
Test case: 2-hop Meteora DLMM swap via custom program
| Simulator | CU Reported | Delta |
|---|---|---|
| Mollusk-svm 0.9.0 | 90,946 | baseline |
| LiteSVM 0.9.0 | 109,462 | +18,516 (+20.4%) |
CU Breakdown Analysis
| Component | Mollusk | LiteSVM | Delta |
|---|---|---|---|
| Outer program invoke | 87,022 | ~105,000 | +18k |
| First DLMM swap CPI | 41,002 | 41,002 | 0 |
| Second DLMM swap CPI | 40,879 | 40,879 | 0 |
| SPL Token transfers | ~12k | ~12k | 0 |
The inner CPI calls report identical CU consumption, but the outer program and transaction-level overhead differ significantly.
Root Cause Hypothesis
LiteSVM processes full transactions (send_transaction) while Mollusk processes single instructions (process_instruction). The overhead may come from:
- Transaction signature verification
- Account locking/unlocking overhead
- Transaction metadata tracking
- Different syscall implementations
- Fee calculation overhead
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels