mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-29 10:54:24 +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:
@@ -21,6 +21,7 @@ use task_executor::ShutdownReason;
|
||||
use types::*;
|
||||
|
||||
const VALIDATOR_COUNT: usize = 32;
|
||||
const CGC: usize = 8;
|
||||
|
||||
type E = MainnetEthSpec;
|
||||
|
||||
@@ -1050,7 +1051,7 @@ async fn invalid_parent() {
|
||||
|
||||
// Ensure the block built atop an invalid payload is invalid for gossip.
|
||||
assert!(matches!(
|
||||
rig.harness.chain.clone().verify_block_for_gossip(block.clone()).await,
|
||||
rig.harness.chain.clone().verify_block_for_gossip(block.clone(), CGC).await,
|
||||
Err(BlockError::ParentExecutionPayloadInvalid { parent_root: invalid_root })
|
||||
if invalid_root == parent_root
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user