Skip to content

Gloas payload cache#9209

Open
dknopik wants to merge 102 commits intosigp:unstablefrom
dknopik:gloas-payload-cache
Open

Gloas payload cache#9209
dknopik wants to merge 102 commits intosigp:unstablefrom
dknopik:gloas-payload-cache

Conversation

@dknopik
Copy link
Copy Markdown
Member

@dknopik dknopik commented Apr 28, 2026

Vastly simplified (and renamed) data availability checker.

based on eitans PR and work in progress

Comment thread beacon_node/beacon_chain/src/pending_payload_cache/mod.rs Outdated
Comment thread beacon_node/beacon_chain/src/pending_payload_cache/mod.rs
.do_maintenance(block_epoch + 1)
.expect("maintenance should succeed");
assert_eq!(cache.block_cache_size(), 0);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Need to review this tests

Comment thread beacon_node/beacon_chain/src/beacon_chain.rs Outdated
Comment thread beacon_node/beacon_chain/src/data_availability_checker.rs Outdated
Comment thread beacon_node/network/src/network_beacon_processor/gossip_methods.rs Outdated
Comment thread beacon_node/network/src/network_beacon_processor/mod.rs
Comment thread beacon_node/network/src/sync/manager.rs
eserilev and others added 4 commits May 1, 2026 03:50
…ync)

Brings the FORK_NAME=gloas beacon_chain test suite from 31 failures to green:

- v1 KZG batch verifier couldn't verify Gloas columns. Added
  verify_columns_against_block helper that picks commitments per fork
  (Fulu: inline on column; Gloas: signed_execution_payload_bid).
- BeaconChainHarness::process_envelope didn't persist columns. Now mirrors
  what production does in import_available_execution_payload_envelope.
- get_or_reconstruct_blobs returned an error for Gloas. Now short-circuits to
  Ok(None); WSS test copies columns from source to dest directly.
- update_data_column_signed_header (block_verification tests) only handled
  Fulu shape. Added a Gloas branch that re-keys to canonical_root.
- BlockError::EnvelopeBlockRootUnknown changed to tuple variant.
- Removed duplicate process_payload_envelope_availability.
…ync)

Brings the FORK_NAME=gloas beacon_chain test suite from 31 failures to green:

- v1 KZG batch verifier couldn't verify Gloas columns. Added
  verify_columns_against_block helper that picks commitments per fork
  (Fulu: inline on column; Gloas: signed_execution_payload_bid).
- BeaconChainHarness::process_envelope didn't persist columns. Now mirrors
  what production does in import_available_execution_payload_envelope.
- get_or_reconstruct_blobs returned an error for Gloas. Now short-circuits to
  Ok(None); WSS test copies columns from source to dest directly.
- update_data_column_signed_header (block_verification tests) only handled
  Fulu shape. Added a Gloas branch that re-keys to canonical_root.
- BlockError::EnvelopeBlockRootUnknown changed to tuple variant.
- Removed duplicate process_payload_envelope_availability.
@dapplion dapplion force-pushed the gloas-payload-cache branch from 73ba763 to dac8a6e Compare May 1, 2026 08:07
- data_availability_checker.rs: use !gloas_enabled() instead of < ForkName::Gloas
  (jimmygchen, dapplion).
- beacon_chain.rs: get_data_columns checks data_availability_checker first,
  then pending_payload_cache (dapplion).
- pending_components.rs: merge_data_columns drops the unused Result return
  (jimmygchen). num_completed_columns uses filter() instead of filter_map (jimmygchen).
- pending_column.rs: TODO marker on the hard-coded Gloas variant in
  try_to_sidecar (jimmygchen).
- pending_payload_cache/mod.rs: gloas_spec test helper collapsed to
  ForkName::Gloas.make_genesis_spec(E::default_spec()) (jimmygchen).
- gossip_methods.rs / sync/manager.rs: replace UnknownBlockHashFromAttestation
  fallback with TODO(gloas) for proper Gloas lookup sync (dapplion).
dapplion and others added 4 commits May 1, 2026 10:28
- pending_column.rs: split try_to_sidecar into is_complete-checked to_sidecar
  with typed PendingColumnError so 'incomplete column' is no longer conflated
  with VariableList size-bound failures (jimmygchen, dapplion).
- pending_components.rs: get_cached_data_columns filters by is_complete first,
  then logs an error if a complete column fails to assemble (dknopik's sanity
  check on filter_map silent drops).
- data_column_verification.rs: add the missing column.slot == bid.slot
  consistency check in validate_data_column_sidecar_for_gossip_gloas, using
  the previously-defined-but-unused BlockSlotMismatch error variant
  (jimmygchen).
Comment thread beacon_node/beacon_chain/src/pending_payload_cache/mod.rs Outdated
Comment thread beacon_node/beacon_chain/src/data_column_verification.rs
eserilev and others added 3 commits May 1, 2026 11:10
Drops the standalone availability_cache_maintenance_service tokio loop and its
client/builder.rs spawn point. Pruning now runs inline in BeaconChain::after_finalization
where the (finalized_epoch + 1, min DA boundary) cutoff is naturally available.

Addresses dapplion's review comment 'Delete the background service, just call this
on finalization'.
…d blocking

- AvailableEnvelope::columns_available_timestamp was author-flagged dead with
  a TODO; remove the field and the unused new() arg (jimmygchen).
- load_gloas_payload_bid: document that the store fallback is a synchronous
  disk read called from async paths; mark the rework as TODO (jimmygchen).
@dapplion
Copy link
Copy Markdown
Collaborator

dapplion commented May 3, 2026

Suggested change: dapplion@7bd287a

Why: the shared sidecar duplicate gate currently treats fork_choice.contains_block(root) as fully imported, which is fine pre-GLOAS but wrong for GLOAS because the beacon block can already be in fork choice before payload/data availability is complete. This switches the gate to is_block_data_imported, using fork-choice payload_received for GLOAS instead of a store read.

@eserilev
Copy link
Copy Markdown
Member

eserilev commented May 4, 2026

Regarding your commit @dapplion is_block_data_imported isn't fallible I think, so no need to return a Result

I do agree that a helper function like that is helpful to prevent code duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

das Data Availability Sampling gloas waiting-on-author The reviewer has suggested changes and awaits thier implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants