On main (0f5b8e5), RequestHandler's block lookup callbacks are never assigned outside of tests, so a running node cannot serve BlocksByRoot or BlocksByRange.
The three callbacks
LiveEventSource has no set_block_by_slot_lookup — the string by_slot does not occur in live.py at all.
Consequence
handle_blocks_by_range always takes its first branch and replies SERVER_ERROR:
|
if self.block_by_slot_lookup is None: |
|
logger.warning("BlocksByRange request received but no block_by_slot_lookup configured") |
|
await response.send_error(ResponseCode.SERVER_ERROR, "Block lookup not available") |
|
return |
Meanwhile the client side is wired into the production path:
BackfillSync.request_blocks_by_range → SyncService → Node
So a leanSpec node issues range requests that no other leanSpec node can answer, and backfill sync between two of them cannot complete.
Note
The material for the by-root lookup already exists — signed_block_for_root reads from sync_service.store.blocks, but is passed only to ApiServer, not to the ReqResp handler.
On
main(0f5b8e5),RequestHandler's block lookup callbacks are never assigned outside of tests, so a running node cannot serveBlocksByRootorBlocksByRange.The three callbacks
src/?block_by_slot_lookuphandler.py#L179test_handler.pyblock_lookup(by root)handler.py#L176set_block_lookupexists but its only caller istest_live.py#L144current_slot_lookuphandler.py#L182run.py#L111LiveEventSourcehas noset_block_by_slot_lookup— the stringby_slotdoes not occur inlive.pyat all.Consequence
handle_blocks_by_rangealways takes its first branch and repliesSERVER_ERROR:leanSpec/src/lean_spec/node/networking/reqresp/handler.py
Lines 281 to 284 in 0f5b8e5
Meanwhile the client side is wired into the production path:
BackfillSync.request_blocks_by_range→SyncService→NodeSo a leanSpec node issues range requests that no other leanSpec node can answer, and backfill sync between two of them cannot complete.
Note
The material for the by-root lookup already exists —
signed_block_for_rootreads fromsync_service.store.blocks, but is passed only toApiServer, not to the ReqResp handler.