Proving Solana Transactions
Last updated
Last updated
To integrate ZKPs seamlessly into Solana, Termina has the ability to generate proofs for any type of SVM transaction, such as account creation, SPL token transfers, or arbitrary program execution.
There were several issues that had to be resolved to integrate the SVM with a zkVM like SP1. At a high-level, these include:
Randomness and Time: Adjusting Solana’s use of time and randomness to remove nondeterminism.
Threads and Files: Adapting multithreaded processes and file-based operations to work seamlessly within the constraints of the zkVM.
Bit Depth: Resolving memory access differences between the SVM’s eBPF interpreter’s 64-bit architecture and SP1’s 32-bit environment.
For additional information on the challenges above, please see this technical blog.
To share a few benchmark numbers, 100 iterations of a 3-instruction SOL transaction take 2B cycles to prove while 100 iterations of an 8-instruction SPL transaction take 7B cycles. From recent blockchain data, the average size of a Solana transaction on mainnet consists of around 4 instructions.
Transaction Count
100
100
16
Cycle Count
7,000M
840M
280M
Proving Time (Succinct’s Public Prover Network)
2300s
280s
90s
Dollar Cost
$5.32
$0.64
$0.21
Running on Succinct’s Prover Network, it takes less than an hour and only around five USD to generate a proof for a block of 100 complex SPL transactions. This means that it’s now possible to drastically reduce the challenge window for fraud proofs from a week to just a few hours.
Note that the above values are rapidly changing as both prover hardware and software are making significant leaps in latency and cost.