go-ethereum/eth/catalyst
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
..
api.go miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00
api_test.go miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00
api_testing.go eth/catalyst: implement testing_buildBlockV1 (#33656) 2026-02-23 15:56:31 +01:00
api_testing_test.go eth/catalyst: implement testing_buildBlockV1 (#33656) 2026-02-23 15:56:31 +01:00
metrics.go eth/catalyst: implement getBlobsV3 (#33404) 2025-12-31 09:48:50 +08:00
queue.go cmd/geth: implement dev mode for post-merge (#27327) 2023-07-06 04:42:34 -04:00
simulated_beacon.go miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00
simulated_beacon_api.go eth/catalyst: abort dev mode block commit if shut down is triggered (#32166) 2025-07-08 22:15:53 +09:00
simulated_beacon_test.go eth/catalyst: set FeeRecipient in dev mode (#31316) 2025-03-17 09:32:44 +01:00
witness.go miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00