Skip to content

Gloas lookup sync boilerplate#9322

Merged
mergify[bot] merged 5 commits into
sigp:unstablefrom
dapplion:gloas-lookup-sync-boilerplate
May 20, 2026
Merged

Gloas lookup sync boilerplate#9322
mergify[bot] merged 5 commits into
sigp:unstablefrom
dapplion:gloas-lookup-sync-boilerplate

Conversation

@dapplion
Copy link
Copy Markdown
Collaborator

Issue Addressed

Implements the boring boilerplate to send envelopes by root requests and process them. Pre-step to

dapplion added 5 commits May 20, 2026 04:14
Wire the beacon processor (Work::RpcEnvelope queue + dispatcher),
SyncRequestId::SinglePayloadEnvelope, BlockProcessType::SinglePayloadEnvelope,
SyncMessage::RpcPayloadEnvelope, router dispatch for PayloadEnvelopesByRoot
responses, send_lookup_envelope work-spawn, and the new
PayloadEnvelopesByRoot request module. Processing/state-machine logic is
stubbed with TODO(gloas) markers; this is plumbing only so the lookup
sync rewrite from sigp#9155 can land additively on top.
- payload_envelopes_by_root_requests ActiveRequests field, plumbed
  through peer_disconnected and active_request_count_by_peer.
- payload_lookup_request, on_single_payload_envelope_response,
  send_payload_for_processing, and a spec() helper.
- Re-export PayloadEnvelopesByRootSingleRequest.

Drive-by: drop stale `rpc_blob_queue` comment on Work::RpcEnvelope
(separate queue is used) and collapse the PayloadEnvelopesByRoot
router match to a single ok-case with default error arm.
- manager: on_single_payload_envelope_response now calls into
  network_context to drive ActiveRequests bookkeeping + per-chunk
  verification; TODO marks the missing block_lookups dispatch.
- sync_methods: process_lookup_envelope mirrors process_lookup_block —
  chain.verify_envelope_for_gossip + chain.process_execution_payload_envelope
  with BlockImportSource::Lookup, folding EnvelopeError through
  BlockError::InternalError until the structured classifier lands with
  the state machine.
- router: drop the low-signal trace! on PayloadEnvelopesByRoot.
- Drop now-stale #[allow(dead_code)] / unused_imports gates on the
  request module and on on_single_payload_envelope_response.
The PR's callers live in the lookup state machine we deliberately
didn't copy; nothing in the present scaffold uses it.
It's reached transitively via send_lookup_envelope, which itself is
reached by send_payload_for_processing (the actual topmost dead node).
One allow at the top of the chain is enough.
@dapplion dapplion requested a review from jxs as a code owner May 20, 2026 03:10
@dapplion dapplion added syncing ready-for-review The code is ready for review labels May 20, 2026
let result = match self
.chain
.clone()
.verify_envelope_for_gossip(envelope.clone())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verify_envelope_for_gossip also checks that the envelope is not from a finalized portion of the chain and requires that the envelopes beacon block root is known to us. not sure if that causes issues with lookup sync but wanted to flag it just in case

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an edge case we need to look into. I'll add a TODO(gloas) in the full impl

Copy link
Copy Markdown
Member

@eserilev eserilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dapplion dapplion added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels May 20, 2026
@mergify mergify Bot added the queued label May 20, 2026
@mergify
Copy link
Copy Markdown

mergify Bot commented May 20, 2026

Merge Queue Status

This pull request spent 30 minutes 50 seconds in the queue, including 28 minutes 10 seconds running CI.

Required conditions to merge

mergify Bot added a commit that referenced this pull request May 20, 2026
@mergify mergify Bot merged commit 2c76ee5 into sigp:unstable May 20, 2026
38 checks passed
@mergify mergify Bot removed the queued label May 20, 2026
dapplion added a commit to dapplion/lighthouse that referenced this pull request Jun 1, 2026
Brings in the gossip-blob deprecation (sigp#9126) and 17 other unstable
commits. Conflict resolutions (8 files):

- Kept our unified `SyncMessage::UnknownParentSidecarHeader` design over
  unstable's separate `UnknownParentDataColumn`/`UnknownParentPartialDataColumn`
  variants (gossip_methods, manager, single_block_lookup, mod, tests).
- Adopted unstable's gossip-blob deprecation: dropped `process_gossip_blob`,
  `process_gossip_verified_blob`, and the blob parent-unknown test path.
- Took unstable's `process_gossip_verified_data_column` (Result-returning
  `to_partial`), router PayloadEnvelopesByRoot flattened match, and combined
  `BlockProcessType::id` arm.
- Dropped unstable's gloas-lookup-sync boilerplate stubs (sigp#9322) that
  duplicated our real impls: `process_lookup_envelope`,
  `rpc_payload_envelope_received`, `on_single_payload_envelope_response`,
  and the `SinglePayloadEnvelope` processing-result arm.

cargo check -p network passes clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge This PR is ready to merge. syncing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants