mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 05:44:44 +00:00
Make BeaconChain::kzg field mandatory (#6267)
* make kzg field required * update todo * always load trusted setup WIP * fmt * use new rust_eth_kzg version * merge conlficts * add kzg fn with trusted setup disabled * as_slice * add kzg with no precomp * ignore udep for kzg * refactor kzg init * fix peerdas kzg schedule * fix * udeps * uuuudeps * merge conflict resolved * merge conflict * merge conflicts * resolve TODO * update * move kzg to a test util fn * remove trusted setup default impl * lint fmt * fix failing test * lint * fix test * Merge branch 'unstable' into beacon-chain-kzg-field-required
This commit is contained in:
@@ -52,12 +52,6 @@ pub enum GossipDataColumnError {
|
||||
data_column_slot: Slot,
|
||||
parent_slot: Slot,
|
||||
},
|
||||
/// `Kzg` struct hasn't been initialized. This is an internal error.
|
||||
///
|
||||
/// ## Peer scoring
|
||||
///
|
||||
/// The peer isn't faulty, This is an internal error.
|
||||
KzgNotInitialized,
|
||||
/// The kzg verification failed.
|
||||
///
|
||||
/// ## Peer scoring
|
||||
@@ -382,12 +376,8 @@ pub fn validate_data_column_sidecar_for_gossip<T: BeaconChainTypes>(
|
||||
let parent_block = verify_parent_block_and_finalized_descendant(data_column.clone(), chain)?;
|
||||
verify_slot_higher_than_parent(&parent_block, column_slot)?;
|
||||
verify_proposer_and_signature(&data_column, &parent_block, chain)?;
|
||||
|
||||
let kzg = chain
|
||||
.kzg
|
||||
.clone()
|
||||
.ok_or(GossipDataColumnError::KzgNotInitialized)?;
|
||||
let kzg_verified_data_column = verify_kzg_for_data_column(data_column.clone(), &kzg)
|
||||
let kzg = &chain.kzg;
|
||||
let kzg_verified_data_column = verify_kzg_for_data_column(data_column.clone(), kzg)
|
||||
.map_err(GossipDataColumnError::InvalidKzgProof)?;
|
||||
|
||||
chain
|
||||
|
||||
Reference in New Issue
Block a user