mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 06:18:31 +00:00
Remove CGC from data_availability checker (#7033)
- Part of https://github.com/sigp/lighthouse/issues/6767 Validator custody makes the CGC and set of sampling columns dynamic. Right now this information is stored twice: - in the data availability checker - in the network globals If that state becomes dynamic we must make sure it is in sync updating it twice, or guarding it behind a mutex. However, I noted that we don't really have to keep the CGC inside the data availability checker. All consumers can actually read it from the network globals, and we can update `make_available` to read the expected count of data columns from the block.
This commit is contained in:
@@ -137,7 +137,8 @@ pub async fn publish_block<T: BeaconChainTypes, B: IntoGossipVerifiedBlock<T>>(
|
||||
spawn_build_data_sidecar_task(chain.clone(), block.clone(), unverified_blobs)?;
|
||||
|
||||
// Gossip verify the block and blobs/data columns separately.
|
||||
let gossip_verified_block_result = unverified_block.into_gossip_verified_block(&chain);
|
||||
let gossip_verified_block_result = unverified_block
|
||||
.into_gossip_verified_block(&chain, network_globals.custody_columns_count() as usize);
|
||||
let block_root = block_root.unwrap_or_else(|| {
|
||||
gossip_verified_block_result.as_ref().map_or_else(
|
||||
|_| block.canonical_root(),
|
||||
|
||||
Reference in New Issue
Block a user