V1.0.6 txpool#4
Closed
cffls wants to merge 2 commits into
Closed
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #4 +/- ##
==========================================
+ Coverage 56.78% 57.30% +0.51%
==========================================
Files 611 650 +39
Lines 71390 117803 +46413
==========================================
+ Hits 40536 67502 +26966
- Misses 27391 46405 +19014
- Partials 3463 3896 +433
☔ View full report in Codecov by Sentry. |
|
This PR is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
|
This PR was closed because it has been stalled for 35 days with no activity. |
cffls
added a commit
that referenced
this pull request
May 1, 2026
…rnal review An external reviewer found six issues in V2's correctness/operability surface. Fixes for each, plus targeted regression tests. #1 (CRITICAL) — V2 swallowed ApplyMessage errors. applyMessage at core/parallel_state_processor.go:735 ignored execErr when result==nil, so a tx with a consensus-level error (bad nonce, intrinsic gas under- flow, insufficient upfront gas, blob fork-gating violation, etc.) settled as a zero-gas successful no-op. Serial returns the error and aborts the block (state_processor.go:222). V2 now records execErr on the PDB, the settle path skips the tx, and Process surfaces the error to BlockChain so it can fall back to serial — same behaviour as the panicked-PDB path. Test: TestV2StateProcessor_ApplyMessageErrorFailsBlock. #2 (CRITICAL) — SelfDestruct not published to MVStore. FlushToMVStore wrote nonces, storage, code, created, balance deltas, but never the destructed set. Cross-tx readers saw destroyed accounts as still alive with stale code/storage/nonce. Pre-EIP-6780 chains: tx B reading a just-destroyed account got base-state values; SetStorageDirectWithOrigins at settle time would resurrect the account. Fix: publish destructions under SuicidePath (the same flag V1 already uses on its MVHashMap), and gate Exist/GetCode/GetCodeHash/GetState/GetCommittedState/GetNonce on priorDestructed so cross-tx reads return defaults. priorDestructed is cached per-tx so the four getters share one MVStore lookup per address. Test: TestPDB_CrossTxSelfDestructVisibility. #3 (HIGH) — V2 receipts had zero BlockHash. buildV2Receipt didn't set BlockHash and passed common.Hash{} to GetLogs. Receipt-trie consensus was unaffected (BlockHash is not in the consensus encoding) but RPC consumers got 0x000…0 for blockHash on V2-processed blocks. Thread block.Hash() through ExecuteV2BlockSTM → newV2SettleFn → buildV2Receipt and into GetLogs. Test: TestV2StateProcessor_ReceiptHasBlockHash. #4 (HIGH) — V2 executor ignored cancellation. core/blockstm/v2_executor.go had no context plumbing, so when serial won the parallel-vs-serial race and BlockChain called cancel(), V2 ran to completion (~50–200ms) before the import could continue; if V2 hung, the import couldn't return. Add ctx.Context to ExecuteV2BlockSTM, plumb it through to the dispatcher and validation loop, check at task-boundary and validation boundaries. Updated the misleading "<1ms" comment in blockchain.go. Test: TestExecuteV2BlockSTM_HonoursCancellation. #5 (MEDIUM) — numWorkers <= 0 deadlocked the executor. The dispatcher window collapsed to 0 and the very first task waited forever on an execDone channel no worker would close (v2_executor.go:355). Clamp to runtime.NumCPU() in NewV2StateProcessor with a comment explaining the failure mode. Test: TestNewV2StateProcessor_ClampsNumWorkers. 0xPolygon#6 (LOW, comment-only) — Biased pathdb cache lock removal. The Has → Set race exists but is benign because reader.Node hash-checks every cache hit (Verkle-only noHashCheck doesn't apply to Bor). The previous comment claimed "self-corrects on the next disk read" — actually it self-corrects via the hash check in reader.go:72. Tightened the comment. Verified: ./core/, ./core/state/, ./core/blockstm/ tests pass; the V2 backbone TestV2BlockSTMAllBlocks passes (165s). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Description
Please provide a detailed description of what was done in this PR
Changes
Breaking changes
Please complete this section if any breaking changes have been made, otherwise delete it
Nodes audience
In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)
Checklist
Cross repository changes
Testing
Manual tests
Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it
Additional comments
Please post additional comments in this section if you have them, otherwise delete it