feat: blockstm remove incarnation cache#26048
Conversation
Greptile SummaryThis PR removes the incarnation cache from BlockSTM, eliminating a shared mutable cache that was passed between transaction incarnations during parallel block execution. The cache was previously used to deduplicate signature verification, but its last consumer was removed in #25912 due to indeterminism bugs, leaving the mechanism with no active users. Key changes:
Minor issues found:
Confidence Score: 4/5
Sequence DiagramsequenceDiagram
participant STMRunner
participant deliverTx as DeliverTxFunc
participant RunTx as BaseApp.RunTx
participant Context as sdk.Context
Note over STMRunner: Before this PR
STMRunner->>STMRunner: init incarnationCache[]
STMRunner->>deliverTx: deliverTx(tx, memTx, ms, idx, cache)
deliverTx->>RunTx: RunTx(mode, tx, memTx, idx, ms, cache)
RunTx->>Context: ctx.WithIncarnationCache(cache)
Context-->>RunTx: ctx with cache
RunTx-->>deliverTx: result
Note over STMRunner: After this PR
STMRunner->>deliverTx: deliverTx(tx, memTx, ms, idx)
deliverTx->>RunTx: RunTx(mode, tx, memTx, idx, ms)
RunTx-->>deliverTx: result
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26048 +/- ##
==========================================
- Coverage 59.88% 59.78% -0.11%
==========================================
Files 982 966 -16
Lines 65193 64267 -926
==========================================
- Hits 39038 38419 -619
+ Misses 26155 25848 -307
🚀 New features to boost your workflow:
|
|
we met nondeterministic isssue in ibc test before, but thinking it's ok to keep the interface to support eth signature-result cache later. |
|
EVM tx signature verification is one use case, if we don't do it in with incarnation cache, we might want to have a special pipeline for signature verification, because in block-stm, it'll make it heavier to re-execute aborted transactions. |
|
We'll keep this here for now--caching signature validation should be stateless (in the sense of not requiring store access) and so should be safe for caching. |
Description
Removes incarnation cache from blockstm.
Reasoning being that we've just removed the usage of incarnation cache for caching signature verification checks. This was removed in #25912 due to caching causing indeterminism bugs.
After this there are no current usages of the cache, and in general the cache promotes patterns which are likely to cause indeterminism and app hashes.