Repository navigation
Conversation
executeBlockOCC speculates every transaction and then hands every result that read a lower write to the serial frontier in validateBlockSTM, which reruns them one at a time with a parallel validation pass between reruns. On a block where many transactions chain through shared state that is slower than executing the block in order. The executor now speculates 256 of the block's transactions, in 16 runs of 16 consecutive transactions spaced evenly from its first transaction to its last (the whole block when it holds at most 256), so that a block whose dependent transactions sit in one part of it is measured as a whole. It measures from their read and write sets, in block order, how many read a key a lower one wrote and how long the longest such chain is, and runs the block on the sequential path when at least one in six does. Otherwise it speculates the transactions between the runs and continues on the frontier, keeping the results it already has. Fee credits to the coinbase are commutative deltas outside the write sets: they chain nothing between transactions that only pay fees, and a later read of the coinbase balance or account depends on every earlier non-zero credit, as it does in the frontier's validation. The decision uses only the executed state accesses, not calldata, so many calls to one function that each write the caller's own slot stay parallel. Blocks routed this way are counted as fallbacks with reason dependent.
PR SummaryMedium Risk Overview Refactors speculation into Reviewed by Cursor Bugbot for commit 79a4bd7. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
We truly appreciate your contribution and the time you’ve invested in this PR. |
79a4bd7 to
211e2fc
Compare
211e2fc to
79a4bd7
Compare
No description provided.