Commit f514220
feat: Run 100 random differential tests - all passing! π
Integrate random transaction generation with Foundry test harness.
**Major Milestone:**
β
**100/100 random differential tests passing**
β
**Zero mismatches between EVM and EDSL execution**
β
**Full state tracking across sequential transactions**
**DifferentialSimpleStorage.t.sol:**
- Implemented `testDifferential_Random100()` test
- Inline PRNG matching Lean's LCG (reproducible sequences)
- 50/50 mix of store/retrieve operations
- Random addresses from pool of 5 (Alice, Bob, Carol, Dave, Eve)
- Random values 0-1M for store operations
- Full validation: success flags, return values, storage changes
**Test Results:**
```
forge test --match-test testDifferential_Random100 --ffi
β testDifferential_Random100 (33.78s)
Random differential tests completed: 100
Failed: 0
```
**What This Proves:**
- Compiler generates EVM bytecode semantically equivalent to EDSL
- Storage operations match exactly across 100 random transactions
- State tracking works correctly (accumulates across transactions)
- JSON parsing and validation working perfectly
- Both success and return value matching
**Performance:**
- 100 transactions: ~34s (0.34s per transaction)
- Includes: EVM execution, EDSL interpretation, JSON serialization, validation
**Next Steps:**
- Scale to 1000+ tests
- Extend to Counter contract
- Target: 10k+ tests per contract (7 contracts)
**Progress on Roadmap Item 2 (Differential Testing):**
- β
Infrastructure complete
- β
State tracking complete
- β
JSON validation complete
- β
Random generation complete
- β
100 tests passing
- π§ Scale to 1000+ (next)
- π§ Extend to all contracts
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent a73e170 commit f514220
1 file changed
Lines changed: 74 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
237 | 244 | | |
238 | 245 | | |
239 | 246 | | |
240 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
241 | 250 | | |
242 | | - | |
243 | | - | |
244 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
245 | 265 | | |
246 | | - | |
247 | | - | |
248 | | - | |
| 266 | + | |
| 267 | + | |
249 | 268 | | |
250 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
251 | 301 | | |
252 | 302 | | |
253 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
254 | 317 | | |
255 | | - | |
256 | 318 | | |
0 commit comments