SolanaTestForge (@SolanaTestForge) header
SolanaTestForge (@SolanaTestForge) profile picture

Fork state | fuzz hard | catch bugs before mainnet Foundry instincts | solana reality

Ukraine
Joined April 2025
Photo by SolanaTestForge (@SolanaTestForge)Photo by SolanaTestForge (@SolanaTestForge)Photo by SolanaTestForge (@SolanaTestForge)Photo by SolanaTestForge (@SolanaTestForge)Photo by SolanaTestForge (@SolanaTestForge)Photo by SolanaTestForge (@SolanaTestForge)Photo by SolanaTestForge (@SolanaTestForge)Photo by SolanaTestForge (@SolanaTestForge)Photo by SolanaTestForge (@SolanaTestForge)Photo by SolanaTestForge (@SolanaTestForge)
current workflow: fork mainnet run security scan fuzz weird execution paths export report before deployment ever touches production.
7
forking mainnet does not just make tests more realistic. it removes assumptions. same program. same instructions. completely different outcomes once real state is involved. demo: economicfuzz.vercel.app
7
some teams treat testing like confirmation. we treat it like adversarial research. if the protocol survives weird timing, weird state, and weird inputs, then the real confidence starts.
5
current workflow inside SolanaTestForge: fork state run scanner fuzz instructions export report all before deployment touches mainnet.
1
26
local validator: everything green. forked mainnet: slot mismatch, oracle drift, unexpected CPI path. same program. different reality.
1
12
most teams test happy paths. some test failure paths. almost nobody tests timing. oracle lag. slot delay. account sync. that is where things break.
2
7
instruction passed all checks. post-state matched expectations. except one thing: rent-exempt threshold dropped below minimum after transfer. not caught in test. caught in fork. yes, that is a bug.
2
7
SolanaTestForge retweeted
“Solana’s really the home for everything, every asset that you can imagine” - Vibhu
136
93
17
758
71,570
coming from Foundry? fuzzing on solana is not just calldata mutation. you are mutating: - account state - signer flags - cpi boundaries same idea. different failure modes.
1
17
forking mainnet does not just give you real state. it removes assumptions. most programs pass on local validator. fail within 20s on fork. that is the gap people underestimate.
1
8
found this after ~420k iterations. cpi call succeeded. state updated. event emitted. authority check failed silently. yes, that is a bug.
1
10
SolanaTestForge retweeted
443
411
258
2,965
557,217
Testing Solana CPIs is hard: inner instructions are hidden from logs by default, transaction-level pre/post checks miss intermediate state bugs, and target programs often only exist on mainnet. Forking solves the mainnet issue, but the first two are on you.
2
18
coming from Foundry? here is the rough mapping. forge test → solforge test vm.deal() → forked account state with whatever lamports you want vm.prank() → no direct equivalent. CPI authority is checked at instruction boundary, not impersonated at runtime.
2
21
ran security check on a hackathon program last week. signer_check failed on withdraw. authority account had no isSigner flag. 2 critical, 1 high, 0 minutes to find. the report was longer than the program. yes, that is a bug. fixed before submission.
4
37
submitting solanatestforge to @colosseum. `forge test --fork mainnet --fuzz 800000` ~30 seconds. 2 critical bugs. 1 unexpected revert path. demo will be live.
1
4
54
found this edge case after 600k iterations. instruction succeeded. state updated. lamports not synced for one slot. yes, that is a bug. fix shipped in v0.5.3.
16
14
234
testing against local validators is where most issues hide. forking mainnet state usually breaks assumptions in under 30s.
6
8
105
v0.5.2. fix for the lamport edge case from monday. plus added support for forking custom token programs. changelog in the repo.
19
16
206