mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 14:28:37 +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:
@@ -25,7 +25,7 @@ async fn blob_sidecar_event_on_process_gossip_blob() {
|
||||
let mut blob_event_receiver = event_handler.subscribe_blob_sidecar();
|
||||
|
||||
// build and process a gossip verified blob
|
||||
let kzg = harness.chain.kzg.as_ref().unwrap();
|
||||
let kzg = harness.chain.kzg.as_ref();
|
||||
let mut rng = StdRng::seed_from_u64(0xDEADBEEF0BAD5EEDu64);
|
||||
let sidecar = BlobSidecar::random_valid(&mut rng, kzg)
|
||||
.map(Arc::new)
|
||||
@@ -59,7 +59,7 @@ async fn blob_sidecar_event_on_process_rpc_blobs() {
|
||||
let mut blob_event_receiver = event_handler.subscribe_blob_sidecar();
|
||||
|
||||
// build and process multiple rpc blobs
|
||||
let kzg = harness.chain.kzg.as_ref().unwrap();
|
||||
let kzg = harness.chain.kzg.as_ref();
|
||||
let mut rng = StdRng::seed_from_u64(0xDEADBEEF0BAD5EEDu64);
|
||||
|
||||
let mut blob_1 = BlobSidecar::random_valid(&mut rng, kzg).unwrap();
|
||||
|
||||
@@ -7,8 +7,8 @@ use beacon_chain::data_availability_checker::AvailableBlock;
|
||||
use beacon_chain::schema_change::migrate_schema;
|
||||
use beacon_chain::test_utils::SyncCommitteeStrategy;
|
||||
use beacon_chain::test_utils::{
|
||||
mock_execution_layer_from_parts, test_spec, AttestationStrategy, BeaconChainHarness,
|
||||
BlockStrategy, DiskHarnessType, KZG,
|
||||
get_kzg, mock_execution_layer_from_parts, test_spec, AttestationStrategy, BeaconChainHarness,
|
||||
BlockStrategy, DiskHarnessType,
|
||||
};
|
||||
use beacon_chain::{
|
||||
data_availability_checker::MaybeAvailableBlock, historical_blocks::HistoricalBlockError,
|
||||
@@ -164,7 +164,7 @@ async fn light_client_bootstrap_test() {
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
|
||||
let kzg = spec.deneb_fork_epoch.map(|_| KZG.clone());
|
||||
let kzg = get_kzg(&spec);
|
||||
|
||||
let mock =
|
||||
mock_execution_layer_from_parts(&harness.spec, harness.runtime.task_executor.clone());
|
||||
@@ -180,7 +180,7 @@ async fn light_client_bootstrap_test() {
|
||||
|
||||
let (shutdown_tx, _shutdown_rx) = futures::channel::mpsc::channel(1);
|
||||
|
||||
let beacon_chain = BeaconChainBuilder::<DiskHarnessType<E>>::new(MinimalEthSpec)
|
||||
let beacon_chain = BeaconChainBuilder::<DiskHarnessType<E>>::new(MinimalEthSpec, kzg)
|
||||
.store(store.clone())
|
||||
.custom_spec(test_spec::<E>())
|
||||
.task_executor(harness.chain.task_executor.clone())
|
||||
@@ -203,7 +203,6 @@ async fn light_client_bootstrap_test() {
|
||||
1,
|
||||
)))
|
||||
.execution_layer(Some(mock.el))
|
||||
.kzg(kzg)
|
||||
.build()
|
||||
.expect("should build");
|
||||
|
||||
@@ -299,7 +298,7 @@ async fn light_client_updates_test() {
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
|
||||
let kzg = spec.deneb_fork_epoch.map(|_| KZG.clone());
|
||||
let kzg = get_kzg(&spec);
|
||||
|
||||
let mock =
|
||||
mock_execution_layer_from_parts(&harness.spec, harness.runtime.task_executor.clone());
|
||||
@@ -324,7 +323,7 @@ async fn light_client_updates_test() {
|
||||
|
||||
let (shutdown_tx, _shutdown_rx) = futures::channel::mpsc::channel(1);
|
||||
|
||||
let beacon_chain = BeaconChainBuilder::<DiskHarnessType<E>>::new(MinimalEthSpec)
|
||||
let beacon_chain = BeaconChainBuilder::<DiskHarnessType<E>>::new(MinimalEthSpec, kzg)
|
||||
.store(store.clone())
|
||||
.custom_spec(test_spec::<E>())
|
||||
.task_executor(harness.chain.task_executor.clone())
|
||||
@@ -347,7 +346,6 @@ async fn light_client_updates_test() {
|
||||
1,
|
||||
)))
|
||||
.execution_layer(Some(mock.el))
|
||||
.kzg(kzg)
|
||||
.build()
|
||||
.expect("should build");
|
||||
|
||||
@@ -2680,7 +2678,8 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) {
|
||||
let store = get_store(&temp2);
|
||||
let spec = test_spec::<E>();
|
||||
let seconds_per_slot = spec.seconds_per_slot;
|
||||
let kzg = spec.deneb_fork_epoch.map(|_| KZG.clone());
|
||||
|
||||
let kzg = get_kzg(&spec);
|
||||
|
||||
let mock =
|
||||
mock_execution_layer_from_parts(&harness.spec, harness.runtime.task_executor.clone());
|
||||
@@ -2694,7 +2693,7 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) {
|
||||
);
|
||||
slot_clock.set_slot(harness.get_current_slot().as_u64());
|
||||
|
||||
let beacon_chain = BeaconChainBuilder::<DiskHarnessType<E>>::new(MinimalEthSpec)
|
||||
let beacon_chain = BeaconChainBuilder::<DiskHarnessType<E>>::new(MinimalEthSpec, kzg)
|
||||
.store(store.clone())
|
||||
.custom_spec(test_spec::<E>())
|
||||
.task_executor(harness.chain.task_executor.clone())
|
||||
@@ -2717,7 +2716,6 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) {
|
||||
1,
|
||||
)))
|
||||
.execution_layer(Some(mock.el))
|
||||
.kzg(kzg)
|
||||
.build()
|
||||
.expect("should build");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user