* Bound precompile result caches to semantic-prefix slice
Each precompile already knows the fixed semantic input length its
implementation reads. Key the cache and store the cached input on
that prefix so bytes past the semantic length no longer distinguish
entries. Add a byte-weight cap (16 MB per cache, with Integer.BYTES
floor per entry) across all 14 caches for a uniform memory ceiling.
Also wire --cache-precompiles into evmtool state-test and block-test
sub-commands so reference-test runs can exercise the cache code path.
Signed-off-by: jflo <justin+github@florentine.us>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Centralize precompile cache builder; add BLS12 cache test
Address PR review feedback:
- Add `AbstractPrecompiledContract.resultCacheBuilder()` so the 14
cache definitions share one Caffeine config (cap and weigher).
Pairing/multi-exp callers chain `.expireAfterWrite(...)` on top.
- KZG, P256 and BLAKE2 now pass their fixed spec lengths (192, 160,
213) to `getCacheKey` instead of `input.size()`, documenting intent
even though prior validation makes the two equivalent today.
- `PrecompileCachePrefixBoundTest` adds a BLS12_G1ADD tail-padded
cache-hit test exercising the abstract BLS12 cache path, and XORs a
per-run nonce into each canonical input so the static caches no
longer cause order-dependent results across test invocations.
Signed-off-by: jflo <justin+github@florentine.us>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* resolve verbose conflict
Signed-off-by: jflo <justin+github@florentine.us>
* normalize recover ecross k1 and r1 implementations, remove dead code, perf:cache recovered senders
Signed-off-by: garyschulte <garyschulte@gmail.com>
---------
Signed-off-by: jflo <justin+github@florentine.us>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>