Parallel transaction execution in zig-evm
DevelopmentComments
Memory safety is a distraction. The real win is Zig's ability to map closely to the hardware without a borrow checker getting in the way of complex pointer arithmetic.
I wonder if that 5-6x speedup holds up under heavy state contention... like if every transaction hits the same hot contract... would the wave-based approach still be that fast?
Wave-based execution usually mitigates this by batching non-conflicting txs first. If the benchmark used a diverse trace, the speedup is a reasonable baseline for the VM overhead.
does zig's memory model actually provide a safety win over rust here?
We saw similar claims during the early Move-based chain hype, where parallelism worked great until you hit a real-world DeFi bottleneck. The Zig implementation is cleaner, but state conflict is a ghost that never stays buried.
The repo mentions that it avoids a global lock for state access by using a versioned state tree. That is the actual technical lift here, rather than just the parallel loop.
This is essentially an application of optimistic concurrency control (OCC) at the VM level. By treating transactions as speculative until the conflict check, it mimics how high-performance database kernels handle multi-versioning.