mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 06:18:31 +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:
@@ -65,12 +65,13 @@ async fn get_chain_segment() -> (Vec<BeaconSnapshot<E>>, Vec<Option<BlobSidecarL
|
||||
beacon_block: Arc::new(full_block),
|
||||
beacon_state: snapshot.beacon_state,
|
||||
});
|
||||
segment_blobs.push(Some(
|
||||
segment_blobs.push(
|
||||
harness
|
||||
.chain
|
||||
.get_blobs(&snapshot.beacon_block_root)
|
||||
.unwrap(),
|
||||
))
|
||||
.unwrap()
|
||||
.blobs(),
|
||||
);
|
||||
}
|
||||
(segment, segment_blobs)
|
||||
}
|
||||
@@ -110,8 +111,9 @@ async fn get_chain_segment_with_blob_sidecars(
|
||||
let blob_sidecars = harness
|
||||
.chain
|
||||
.get_blobs(&snapshot.beacon_block_root)
|
||||
.unwrap();
|
||||
segment_blobs.push(Some(blob_sidecars))
|
||||
.unwrap()
|
||||
.blobs();
|
||||
segment_blobs.push(blob_sidecars)
|
||||
}
|
||||
(segment, segment_blobs)
|
||||
}
|
||||
@@ -206,7 +208,7 @@ fn update_blob_signed_header<E: EthSpec>(
|
||||
signed_block: &SignedBeaconBlock<E>,
|
||||
blobs: &mut BlobSidecarList<E>,
|
||||
) {
|
||||
for old_blob_sidecar in blobs.iter_mut() {
|
||||
for old_blob_sidecar in blobs.as_mut_slice() {
|
||||
let new_blob = Arc::new(BlobSidecar::<E> {
|
||||
index: old_blob_sidecar.index,
|
||||
blob: old_blob_sidecar.blob.clone(),
|
||||
@@ -1223,7 +1225,7 @@ async fn verify_block_for_gossip_slashing_detection() {
|
||||
let slasher = Arc::new(
|
||||
Slasher::open(
|
||||
SlasherConfig::new(slasher_dir.path().into()),
|
||||
spec,
|
||||
spec.clone(),
|
||||
test_logger(),
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -1247,7 +1249,7 @@ async fn verify_block_for_gossip_slashing_detection() {
|
||||
|
||||
if let Some((kzg_proofs, blobs)) = blobs1 {
|
||||
let sidecars =
|
||||
BlobSidecar::build_sidecars(blobs, verified_block.block(), kzg_proofs).unwrap();
|
||||
BlobSidecar::build_sidecars(blobs, verified_block.block(), kzg_proofs, &spec).unwrap();
|
||||
for sidecar in sidecars {
|
||||
let blob_index = sidecar.index;
|
||||
let verified_blob = harness
|
||||
|
||||
Reference in New Issue
Block a user