mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +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:
@@ -1,11 +1,11 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use beacon_chain::kzg_utils::{blobs_to_data_column_sidecars, reconstruct_data_columns};
|
||||
use beacon_chain::test_utils::get_kzg;
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
|
||||
use bls::Signature;
|
||||
use eth2_network_config::TRUSTED_SETUP_BYTES;
|
||||
use kzg::{Kzg, KzgCommitment, TrustedSetup};
|
||||
use kzg::KzgCommitment;
|
||||
use types::{
|
||||
beacon_block_body::KzgCommitments, BeaconBlock, BeaconBlockDeneb, Blob, BlobsList, ChainSpec,
|
||||
EmptyBlock, EthSpec, MainnetEthSpec, SignedBeaconBlock,
|
||||
@@ -35,11 +35,7 @@ fn all_benches(c: &mut Criterion) {
|
||||
type E = MainnetEthSpec;
|
||||
let spec = Arc::new(E::default_spec());
|
||||
|
||||
let trusted_setup: TrustedSetup = serde_json::from_reader(TRUSTED_SETUP_BYTES)
|
||||
.map_err(|e| format!("Unable to read trusted setup file: {}", e))
|
||||
.expect("should have trusted setup");
|
||||
let kzg = Arc::new(Kzg::new_from_trusted_setup(trusted_setup).expect("should create kzg"));
|
||||
|
||||
let kzg = get_kzg(&spec);
|
||||
for blob_count in [1, 2, 3, 6] {
|
||||
let kzg = kzg.clone();
|
||||
let (signed_block, blob_sidecars) = create_test_block_and_blobs::<E>(blob_count, &spec);
|
||||
|
||||
Reference in New Issue
Block a user