go-ethereum/eth
Jonny Rhea 98b13f342f
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
miner: add OpenTelemetry spans for block building path (#33773)
Instruments the block building path with OpenTelemetry tracing spans.

- added spans in forkchoiceUpdated -> buildPayload -> background payload
loop -> generateWork iterations. Spans should look something like this:

```
jsonrpc.engine/forkchoiceUpdatedV3
|- rpc.runMethod
|  |- engine.forkchoiceUpdated
|     |- miner.buildPayload [payload.id, parent.hash, timestamp]
|        |- miner.generateWork [txs.count, gas.used, fees] (empty block)
|        |  |- miner.prepareWork
|        |  |- miner.FinalizeAndAssemble
|        |     |- consensus.beacon.FinalizeAndAssemble [block.number, txs.count, withdrawals.count]
|        |        |- consensus.beacon.Finalize
|        |        |- consensus.beacon.IntermediateRoot
|        |        |- consensus.beacon.NewBlock
|        |- miner.background [block.number, iterations.total, exit.reason, empty.delivered]
|           |- miner.buildIteration [iteration, update.accepted]
|           |  |- miner.generateWork [txs.count, gas.used, fees]
|           |     |- miner.prepareWork
|           |     |- miner.fillTransactions [pending.plain.count, pending.blob.count]
|           |     |  |- miner.commitTransactions.priority (if prio txs exist)
|           |     |  |  |- miner.commitTransactions
|           |     |  |     |- miner.commitTransaction (per tx)
|           |     |  |- miner.commitTransactions.normal (if normal txs exist)
|           |     |     |- miner.commitTransactions
|           |     |        |- miner.commitTransaction (per tx)
|           |     |- miner.FinalizeAndAssemble
|           |        |- consensus.beacon.FinalizeAndAssemble [block.number, txs.count, withdrawals.count]
|           |           |- consensus.beacon.Finalize
|           |           |- consensus.beacon.IntermediateRoot
|           |           |- consensus.beacon.NewBlock
|           |- miner.buildIteration [iteration, update.accepted]
|           |  |- ...
|           |- ...

```

- added simulated server spans in SimulatedBeacon.sealBlock so dev mode
(geth --dev) produces traces that mirror production Engine API calls
from a real consensus client.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2026-03-16 19:24:41 +01:00
..
catalyst miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00
downloader eth: resolve finalized from disk if it's not recently announced (#33150) 2026-03-11 11:23:00 +08:00
ethconfig cmd/utils, eth/ethconfig: change default cache settings (#33975) 2026-03-09 23:18:18 +08:00
fetcher eth/fetcher: fix flaky test by improving event unsubscription (#33950) 2026-03-05 11:48:44 +08:00
filters eth/filters: check history pruning cutoff in GetFilterLogs (#33823) 2026-03-13 13:26:20 +01:00
gasestimator core: implement eip-7778: block gas accounting without refunds (#33593) 2026-03-04 18:18:18 +08:00
gasprice eth/gasprice: reduce allocations (#33698) 2026-01-28 20:33:04 +01:00
protocols eth/protocols/eth: drop protocol version eth/68 (#33511) 2026-02-28 21:43:40 +01:00
syncer eth/downloader: keep current syncmode in downloader only (#33157) 2025-12-08 22:49:57 +01:00
tracers eth/tracers: fix accessList StorageKeys return null (#33976) 2026-03-11 11:46:49 +08:00
api_admin.go eth: ignore genesis block on importChain (#27956) 2023-08-21 13:32:34 -04:00
api_backend.go miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00
api_backend_test.go core/txpool: add eip2681 check for incoming transactions (#32726) 2025-09-25 13:15:12 +02:00
api_debug.go cmd, core, eth, tests: prevent state flushing in RPC (#33931) 2026-03-04 14:40:45 +08:00
api_debug_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
api_miner.go miner: refactor the miner, make the pending block on demand (#28623) 2024-03-06 14:45:03 +02:00
backend.go cmd, core, eth, tests: prevent state flushing in RPC (#33931) 2026-03-04 14:40:45 +08:00
dropper.go eth: fix panic in randomDuration when min equals max (#33193) 2025-11-19 01:54:53 +08:00
handler.go miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00
handler_eth.go eth/protocols/eth, eth/protocols/snap: delayed p2p message decoding (#33835) 2026-02-15 21:21:16 +08:00
handler_eth_test.go eth/protocols/eth: drop protocol version eth/68 (#33511) 2026-02-28 21:43:40 +01:00
handler_snap.go eth: check snap satelliteness, delegate drop to eth (#22235) 2021-02-02 10:44:36 +02:00
handler_test.go miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00
peer.go eth/protocols/eth: implement eth/69 (#29158) 2025-05-16 17:10:47 +02:00
peerset.go eth: stabilize tx relay peer selection (#31714) 2025-08-28 16:05:54 +02:00
state_accessor.go core: implement eip-7778: block gas accounting without refunds (#33593) 2026-03-04 18:18:18 +08:00
sync.go miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00
sync_test.go eth/protocols/eth: drop protocol version eth/68 (#33511) 2026-02-28 21:43:40 +01:00