succinctlabs / rsp

A minimal implementation of ZKPs of Ethereum block execution using Reth. Supports both Ethereum and OP Stack.
Apache License 2.0
55 stars 19 forks source link

perf: more caching friendly with sorted storage keys #27

Closed xJonathanLEI closed 2 months ago

xJonathanLEI commented 2 months ago

RPC caches rely on requests being identical to effectively cache responses. Sorting the storage keys avoids cache misses arising from the fact that we're taking HashMap keys. This sorting only happens on the host side - so no perf hit on client.