[r3.4] txpool: use poolDB tx for getCachedBlobTxnLocked#20489
Merged
AskAlexSharov merged 1 commit intorelease/3.4from Apr 11, 2026
Merged
[r3.4] txpool: use poolDB tx for getCachedBlobTxnLocked#20489AskAlexSharov merged 1 commit intorelease/3.4from
AskAlexSharov merged 1 commit intorelease/3.4from
Conversation
OnNewBlock was passing the chaindata coreTx into getCachedBlobTxnLocked, which reads kv.PoolTransaction — a table that lives in the txpool DB, not chaindata. This produced warnings like: [fetch] onNewBlock err="TxPool.getCachedBlobTxnLocked: Get: 32, label: chaindata, ... Open a RO tx on poolDB (before p.lock, preserving the existing lock ordering) and pass that instead.
c4d4345 to
c460956
Compare
Giulio2002
approved these changes
Apr 11, 2026
Collaborator
Giulio2002
left a comment
There was a problem hiding this comment.
LGTM \u2014 very small diff
AskAlexSharov
added a commit
that referenced
this pull request
Apr 13, 2026
`OnNewBlock` was passing the chaindata `coreTx` into `getCachedBlobTxnLocked`, but that function reads `kv.PoolTransaction` — a table that lives in the txpool DB, not chaindata. MDBX therefore can't find the table and the call fails on every blob-txn unwind path, producing warnings like: ``` [fetch] onNewBlock err="TxPool.getCachedBlobTxnLocked: Get: 32, label: chaindata, ... ``` Fix: open a RO tx on `poolDB` and pass that into `getCachedBlobTxnLocked`. The tx is opened before `p.lock` is acquired, which preserves the existing RoTx→p.lock ordering documented in `pool.go` to avoid deadlocks.
AskAlexSharov
added a commit
that referenced
this pull request
Apr 14, 2026
The cherry-picked PR #20489 added p.poolDB.BeginRo() in OnNewBlock, but several tests pass nil for poolDB since they don't exercise blob txn paths. Guard the BeginRo call and skip blob cache lookups when poolDB is nil.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 14, 2026
## Summary Cherry-pick latest 20 PRs from release/3.4 to main (15 already applied, 5 new): - #20399 — hive: pin more things - #20457 — up x deps - #20469 — attempt to drop oldPrune method - #20489 — txpool: use poolDB tx for getCachedBlobTxnLocked - #20517 — teach: Unwind beyond data in snapshots not allowed --------- Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Muzry <muzrry@gmail.com> Co-authored-by: muzry.li <muzry.li1@ambergroup.io> Co-authored-by: info@weblogix.biz <admin@10gbps.weblogix.it>
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
OnNewBlockwas passing the chaindatacoreTxintogetCachedBlobTxnLocked, but that function readskv.PoolTransaction— a table that lives in the txpool DB, not chaindata. MDBX therefore can't find the table and the call fails on every blob-txn unwind path, producing warnings like:Fix: open a RO tx on
poolDBand pass that intogetCachedBlobTxnLocked. The tx is opened beforep.lockis acquired, which preserves the existing RoTx→p.lock ordering documented inpool.goto avoid deadlocks.