go-ethereum/core
Bosul Mun e595aedcd0
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
core/txpool/blobpool: add cache for GetBlobs request (#35124)
This PR introduces a cache for GetBlobs request.

The main purpose of this PR is to reduce the getBlobs latency by reading and
decoding blobs from the pool in advance of the actual query. This is important
especially in the context of a sparse blobpool, since it may be necessary to
recover blobs from cells on a getBlobs request.

Previously, the Engine API read and decoded blobs from the pool on every call.
Now those calls check the cache and only fall back to the pool on a miss.

The cache has two modes:

- In topK mode (default), it wakes up periodically, picks the most profitable
  pending blob transactions up to the current fork's maxBlobsPerBlock, and loads
  their blobs. The selection logic is shared with the miner's block-building
  logic. The selection size is derived from eip4844.MaxBlobsPerBlock at the
  current head.
- When the CL calls HasBlobs, the cache switches to hasBlobs mode and tries to
  pin the set it just reported as available. Cache updates (read, decode, and
  optionally conversion in the future) run in background goroutines.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2026-06-11 17:26:15 +02:00
..
filtermaps all: fix all typos, as reported by crates-ci/typos (#35008) 2026-06-10 18:50:51 +02:00
forkid params: set osaka and BPO1 & BPO2 mainnet dates (#33063) 2025-11-03 17:41:22 +01:00
history cmd/geth: add Prague pruning points for hoodi (#34714) 2026-04-14 14:58:27 +02:00
overlay cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
rawdb core, eth/protocols/snap, eth/downloader: snap/2 sync logic (#34626) 2026-06-11 14:45:07 +08:00
state all: fix all typos, as reported by crates-ci/typos (#35008) 2026-06-10 18:50:51 +02:00
stateless eth/catalyst: implement engine_newPayloadWithWitnessV5 and use witness field spec ordering (#35009) 2026-05-21 21:00:57 +02:00
tracing core: introduce GasChangeHook v2 (#34946) 2026-05-13 10:53:47 +02:00
txpool core/txpool/blobpool: add cache for GetBlobs request (#35124) 2026-06-11 17:26:15 +02:00
types core/types/bal: improve the bal validation (#35110) 2026-06-05 10:44:41 +08:00
vm all: fix all typos, as reported by crates-ci/typos (#35008) 2026-06-10 18:50:51 +02:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
bal_test.go core, cmd, internal: rework BAL json marshalling to adhere EELS (#34972) 2026-05-20 09:12:13 -04:00
bench_test.go core: implement eip-7981: Increase Access List Cost (#34755) 2026-05-06 12:03:11 +02:00
bintrie_witness_test.go core, consensus, internal, eth, miner: construct block accessList (#34957) 2026-05-19 21:51:53 +08:00
block_validator.go core/types/bal: add additional static validation for access lists (#34967) 2026-05-20 09:35:28 +08:00
block_validator_test.go eth/catalyst: add initial OpenTelemetry tracing for newPayload (#33521) 2026-02-17 17:08:57 +01:00
blockchain.go core, eth/protocols/snap, eth/downloader: snap/2 sync logic (#34626) 2026-06-11 14:45:07 +08:00
blockchain_insert.go core: remove unused peek function in insertIterator (#33155) 2025-11-12 15:30:16 +08:00
blockchain_reader.go eth/protocols/eth: implement eth71 bal response (#34879) 2026-05-19 20:25:13 +02:00
blockchain_repair_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
blockchain_sethead_test.go core, miner, tests: introduce codedb and simplify cachingDB (#33816) 2026-03-10 08:29:21 +01:00
blockchain_snapshot_test.go triedb/pathdb, eth: use double-buffer mechanism in pathdb (#30464) 2025-06-22 20:40:54 +08:00
blockchain_stats.go core: add code cache hit/miss meters (#34821) 2026-05-22 11:33:21 +08:00
blockchain_test.go all: fix all typos, as reported by crates-ci/typos (#35008) 2026-06-10 18:50:51 +02:00
chain_makers.go core: add slot number (#35036) 2026-05-26 12:27:07 +02:00
chain_makers_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
dao_test.go all: fix all typos, as reported by crates-ci/typos (#35008) 2026-06-10 18:50:51 +02:00
error.go core, internal/ethapi: fix incorrect max-initcode RPC error mapping (#34067) 2026-03-23 22:10:32 +08:00
eth_transfer_logs_test.go core, core/vm: implement EIP-7708 (#33645) 2026-03-23 22:29:53 +08:00
events.go ethstats: report newPayload processing time to stats server (#33395) 2026-01-05 17:49:30 +01:00
evm.go core: use uint256 in core.Message (#34934) 2026-05-11 22:25:57 +08:00
gaspool.go core: implement eip-7778: block gas accounting without refunds (#33593) 2026-03-04 18:18:18 +08:00
gen_genesis.go core/vm: implement eip-7843: SLOTNUM (#33589) 2026-02-26 13:53:46 +01:00
genesis.go core, consensus, internal, eth, miner: construct block accessList (#34957) 2026-05-19 21:51:53 +08:00
genesis_alloc.go params: add hoodi testnet definition (#31406) 2025-03-18 12:07:49 +01:00
genesis_test.go accounts/abi, core, metrics, miner, rlp, signer, triedb: fix all incorrect variable usages in error strings (#35121) 2026-06-08 12:39:10 +02:00
headerchain.go core/rawdb: reduce allocations in rawdb.ReadHeaderNumber (#31913) 2025-07-15 15:48:36 +02:00
headerchain_test.go core/state, core/tracing: new state update hook (#33490) 2026-01-08 11:07:19 +08:00
jumpdest.go core/vm: global cache for jumpdest bitmaps (#34850) 2026-05-27 09:01:05 +02:00
mkalloc.go accounts, cmd/geth, core: close opened files (#29598) 2024-04-30 15:47:21 +02:00
rlp_test.go crypto/keccak: vendor in golang.org/x/crypto/sha3 (#33323) 2026-02-03 14:55:27 -07:00
sender_cacher.go core: use sync.Once for SenderCacher initialization (#31029) 2025-01-16 14:36:45 +01:00
state_prefetcher.go core/vm: global cache for jumpdest bitmaps (#34850) 2026-05-27 09:01:05 +02:00
state_processor.go rpc, internal/telemetry: trace JSON-RPC response writes (#35049) 2026-06-02 14:13:06 +02:00
state_processor_test.go core/vm: implement eip-7843: SLOTNUM (#33589) 2026-02-26 13:53:46 +01:00
state_transition.go all: fix all typos, as reported by crates-ci/typos (#35008) 2026-06-10 18:50:51 +02:00
state_transition_test.go core: implement eip-7981: Increase Access List Cost (#34755) 2026-05-06 12:03:11 +02:00
stateless.go all: fix all typos, as reported by crates-ci/typos (#35008) 2026-06-10 18:50:51 +02:00
txindexer.go core, core/txpool, eth: move subscriptions to constructor (#35048) 2026-06-01 08:13:59 +08:00
txindexer_test.go core/rawdb: integrate eradb backend for RPC (#31604) 2025-06-03 10:47:38 +02:00
types.go core/vm: global cache for jumpdest bitmaps (#34850) 2026-05-27 09:01:05 +02:00