go-ethereum/eth/catalyst
ozpool 20d6757391 internal/ethapi, eth: only gate eth_syncing when Engine API is registered
The previous version of this change unconditionally returned the progress
map until the consensus client had driven the node at least once. That
broke ethclient.TestEthClient/StatusFunctions and any other backend that
runs without a consensus client (in-process tests, --dev mode without
catalyst, light/legacy backends), where reporting "syncing" forever is
clearly wrong.

Split the gate into two flags:

  - clExpected: set in eth/catalyst.Register, the only entry point that
    attaches the Engine API to a node. If a backend never calls Register,
    it is not paired with a consensus client.
  - clContacted: set on every Engine API call (forkchoiceUpdated and
    newPayload), unchanged from before.

Replace ConsensusContacted on the Backend interface with ConsensusReady,
which folds the two flags into the question eth_syncing actually wants
answered: "is the synced claim meaningful right now?" Backends that
never expect a CL answer yes immediately, preserving legacy behavior.
Backends that do expect one answer yes only after the first FCU/NewPayload.

  - eth/backend.go: clExpected, clContacted, MarkConsensusExpected,
    MarkConsensusContacted, ConsensusReady on (*Ethereum)
  - eth/catalyst/api.go: backend.MarkConsensusExpected() in Register
  - eth/api_backend.go: ConsensusReady delegates to (*Ethereum)
  - internal/ethapi/backend.go: rename interface method to ConsensusReady
  - internal/ethapi/api.go: Syncing checks ConsensusReady
  - internal/ethapi/{api_test,transaction_args_test}.go: rename the test
    mock methods (default to true so existing tests are unaffected)
  - internal/ethapi/syncing_test.go: rename the helper field; tests now
    cover (a) CL-paired node before handshake -> truthy, (b) ready node
    -> false, (c) active sync -> progress map regardless of gate

Refs #33687.
2026-05-13 12:03:50 +05:30
..
api.go internal/ethapi, eth: only gate eth_syncing when Engine API is registered 2026-05-13 12:03:50 +05:30
api_test.go cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
api_testing.go eth/catalyst: respect slot num if specified in payload attributes for testing_buildBlockV1 (#34722) 2026-04-14 19:00:29 -04: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