mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Make max_blobs_per_block a config parameter (#6329)
* First pass
* Add restrictions to RuntimeVariableList api
* Use empty_uninitialized and fix warnings
* Fix some todos
* Merge branch 'unstable' into max-blobs-preset
* Fix take impl on RuntimeFixedList
* cleanup
* Fix test compilations
* Fix some more tests
* Fix test from unstable
* Merge branch 'unstable' into max-blobs-preset
* Merge remote-tracking branch 'origin/unstable' into max-blobs-preset
* Remove footgun function
* Minor simplifications
* Move from preset to config
* Fix typo
* Revert "Remove footgun function"
This reverts commit de01f923c7.
* Try fixing tests
* Thread through ChainSpec
* Fix release tests
* Move RuntimeFixedVector into module and rename
* Add test
* Remove empty RuntimeVarList awefullness
* Fix tests
* Simplify BlobSidecarListFromRoot
* Merge remote-tracking branch 'origin/unstable' into max-blobs-preset
* Bump quota to account for new target (6)
* Remove clone
* Fix issue from review
* Try to remove ugliness
* Merge branch 'unstable' into max-blobs-preset
* Fix max value
* Fix doctest
* Fix formatting
* Fix max check
* Delete hardcoded max_blobs_per_block in RPC limits
* Merge remote-tracking branch 'origin/unstable' into max-blobs-preset
This commit is contained in:
@@ -2317,7 +2317,12 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) {
|
||||
.get_full_block(&wss_block_root)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
let wss_blobs_opt = harness.chain.store.get_blobs(&wss_block_root).unwrap();
|
||||
let wss_blobs_opt = harness
|
||||
.chain
|
||||
.store
|
||||
.get_blobs(&wss_block_root)
|
||||
.unwrap()
|
||||
.blobs();
|
||||
let wss_state = full_store
|
||||
.get_state(&wss_state_root, Some(checkpoint_slot))
|
||||
.unwrap()
|
||||
@@ -2342,8 +2347,10 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) {
|
||||
|
||||
let kzg = get_kzg(&spec);
|
||||
|
||||
let mock =
|
||||
mock_execution_layer_from_parts(&harness.spec, harness.runtime.task_executor.clone());
|
||||
let mock = mock_execution_layer_from_parts(
|
||||
harness.spec.clone(),
|
||||
harness.runtime.task_executor.clone(),
|
||||
);
|
||||
|
||||
// Initialise a new beacon chain from the finalized checkpoint.
|
||||
// The slot clock must be set to a time ahead of the checkpoint state.
|
||||
@@ -2388,7 +2395,11 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) {
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
let store_wss_blobs_opt = beacon_chain.store.get_blobs(&wss_block_root).unwrap();
|
||||
let store_wss_blobs_opt = beacon_chain
|
||||
.store
|
||||
.get_blobs(&wss_block_root)
|
||||
.unwrap()
|
||||
.blobs();
|
||||
|
||||
assert_eq!(store_wss_block, wss_block);
|
||||
assert_eq!(store_wss_blobs_opt, wss_blobs_opt);
|
||||
@@ -2407,7 +2418,7 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) {
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
let blobs = harness.chain.get_blobs(&block_root).expect("blobs");
|
||||
let blobs = harness.chain.get_blobs(&block_root).expect("blobs").blobs();
|
||||
let slot = full_block.slot();
|
||||
let state_root = full_block.state_root();
|
||||
|
||||
@@ -2415,7 +2426,7 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) {
|
||||
beacon_chain
|
||||
.process_block(
|
||||
full_block.canonical_root(),
|
||||
RpcBlock::new(Some(block_root), Arc::new(full_block), Some(blobs)).unwrap(),
|
||||
RpcBlock::new(Some(block_root), Arc::new(full_block), blobs).unwrap(),
|
||||
NotifyExecutionLayer::Yes,
|
||||
BlockImportSource::Lookup,
|
||||
|| Ok(()),
|
||||
@@ -2469,13 +2480,13 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) {
|
||||
.await
|
||||
.expect("should get block")
|
||||
.expect("should get block");
|
||||
let blobs = harness.chain.get_blobs(&block_root).expect("blobs");
|
||||
let blobs = harness.chain.get_blobs(&block_root).expect("blobs").blobs();
|
||||
|
||||
if let MaybeAvailableBlock::Available(block) = harness
|
||||
.chain
|
||||
.data_availability_checker
|
||||
.verify_kzg_for_rpc_block(
|
||||
RpcBlock::new(Some(block_root), Arc::new(full_block), Some(blobs)).unwrap(),
|
||||
RpcBlock::new(Some(block_root), Arc::new(full_block), blobs).unwrap(),
|
||||
)
|
||||
.expect("should verify kzg")
|
||||
{
|
||||
@@ -3351,7 +3362,7 @@ fn check_blob_existence(
|
||||
.unwrap()
|
||||
.map(Result::unwrap)
|
||||
{
|
||||
if let Some(blobs) = harness.chain.store.get_blobs(&block_root).unwrap() {
|
||||
if let Some(blobs) = harness.chain.store.get_blobs(&block_root).unwrap().blobs() {
|
||||
assert!(should_exist, "blobs at slot {slot} exist but should not");
|
||||
blobs_seen += blobs.len();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user