Skip to content

core/txpool/blobpool: speed up serving pre eth/72 peers - #35543

Merged
rjl493456442 merged 2 commits into
ethereum:masterfrom
cskiraly:sparseblobs-fast-path
Aug 24, 2026
Merged

core/txpool/blobpool: speed up serving pre eth/72 peers#35543
rjl493456442 merged 2 commits into
ethereum:masterfrom
cskiraly:sparseblobs-fast-path

Conversation

@cskiraly

@cskiraly cskiraly commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Add cache for recovered cells.

Serving a blob tx to a legacy (pre eth/72) peer re-reads it from disk and
re-encodes its full blobs on every GetPooledTransactions request, even though
the same transaction is typically requested by multiple peers. The fast path
removed the KZG cost, but the disk read and blob re-encode would remain without
this. Enhance, a dedicated cache is added for this purpose.

@cskiraly
cskiraly force-pushed the sparseblobs-fast-path branch 2 times, most recently from 4f20f38 to 756d516 Compare August 18, 2026 04:49
Comment thread core/txpool/blobpool/blobpool.go Outdated
Serving a blob tx to a legacy (pre eth/72) peer re-reads it from disk and
re-encodes its full blobs on every GetPooledTransactions request, even though
the same transaction is typically requested by multiple peers. The fast path
removed the KZG cost, but the disk read and blob re-encode remain, and the KZG
cost would return for non-data custody.

Memoize the encoded wire response in a byte-bounded (16 MiB) LRU keyed by
(tx hash, whether full blobs are needed). The encoding is content-addressed and
stable while a tx is pooled, so a hit is served only after confirming the tx is
still present (a dropped tx must not be resurrected from the cache). eth/72+
requests (blob payload elided) are cached separately from legacy full-blob ones.
Adds blobpool/getrlp/{hit,miss} meters.
Requests for transactions the pool does not hold were marked as cache
misses, conflating 'not cached' with 'not ours' and skewing the hit
ratio the meter exists to expose. Mark a miss only once the transaction
is known to be pooled and about to be encoded.
@cskiraly
cskiraly force-pushed the sparseblobs-fast-path branch from 756d516 to a5fe5ac Compare August 19, 2026 13:31
@rjl493456442
rjl493456442 merged commit 7da8016 into ethereum:master Aug 24, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants