perf: cache block-level constants in executeEVMTxWithGigaExecutor#2899
Open
perf: cache block-level constants in executeEVMTxWithGigaExecutor#2899
executeEVMTxWithGigaExecutor#2899Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
8a8da09 to
2c835ac
Compare
executeEVMTxWithGigaExecutor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2899 +/- ##
=======================================
Coverage 57.21% 57.22%
=======================================
Files 2093 2093
Lines 171755 171750 -5
=======================================
+ Hits 98276 98285 +9
+ Misses 64709 64687 -22
- Partials 8770 8778 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Cache ChainID, BlockContext, ChainConfig, and BaseFee once per block instead of recomputing them for every transaction. These values are identical for all txs in a block but were previously causing redundant store reads, Keccak256 hashing, and big.Int allocations on every call. The cache is constructed as a local variable and passed as a parameter to executeEVMTxWithGigaExecutor, avoiding any mutable state on App. Both giga execution paths (synchronous and OCC) are covered. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9505077 to
fce7d6a
Compare
arajasek
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ChainID,BlockContext,ChainConfig,BaseFee) once per block, eliminating redundant store reads, Keccak256 hashing, andbig.Intallocations per transactionexecuteEVMTxWithGigaExecutorProcessTxsSynchronousGiga— sequential path (non-OCC)ProcessTXsWithOCCGiga— parallel OCC pathAllocation reduction (heap diff,
alloc_space)GetVMBlockContextVersionIndexedStore.UpdateReadSetVersionIndexedStore.GetDec.UnmarshalJSON(params)json.Unmarshal(params)gaskv.NewStoreTPS is roughly flat — the win is in reduced GC pressure from eliminating ~11 GB of redundant allocations per 300s run.
Test plan
go build ./app/...compiles cleanlygofmt -s -l app/app.goproduces no output🤖 Generated with Claude Code