Remove KZG verification from local block production and blobs fetched from the EL (#7713)

#7700


  As described in title, the EL already performs KZG verification on all blobs when they entered the mempool, so it's redundant to perform extra validation on blobs returned from the EL.

This PR removes
- KZG verification for both blobs and data columns during block production
- KZG verification for data columns after fetch engine blobs call. I have not done this for blobs because it requires extra changes to check the observed cache, and doesn't feel like it's a worthy optimisation given the number of blobs per block.

This PR does not remove KZG verification on the block publishing path yet.
This commit is contained in:
Jimmy Chen
2025-07-22 20:48:49 +10:00
committed by GitHub
parent 4a3e248b7e
commit b48879a566
6 changed files with 32 additions and 80 deletions

View File

@@ -1,4 +1,3 @@
use crate::data_column_verification::KzgVerifiedDataColumn;
use crate::fetch_blobs::fetch_blobs_beacon_adapter::MockFetchBlobsBeaconAdapter;
use crate::fetch_blobs::{
fetch_and_process_engine_blobs_inner, EngineGetBlobsOutput, FetchEngineBlobError,
@@ -156,7 +155,7 @@ mod get_blobs_v2 {
mock_fork_choice_contains_block(&mut mock_adapter, vec![]);
// All data columns already seen on gossip
mock_adapter
.expect_known_for_proposal()
.expect_data_column_known_for_proposal()
.returning(|_| Some(hashset![0, 1, 2]));
// No blobs should be processed
mock_adapter.expect_process_engine_blobs().times(0);
@@ -192,17 +191,12 @@ mod get_blobs_v2 {
// All blobs returned, fork choice doesn't contain block
mock_get_blobs_v2_response(&mut mock_adapter, Some(blobs_and_proofs));
mock_fork_choice_contains_block(&mut mock_adapter, vec![]);
mock_adapter.expect_known_for_proposal().returning(|_| None);
mock_adapter
.expect_data_column_known_for_proposal()
.returning(|_| None);
mock_adapter
.expect_cached_data_column_indexes()
.returning(|_| None);
mock_adapter
.expect_verify_data_columns_kzg()
.returning(|c| {
Ok(c.into_iter()
.map(KzgVerifiedDataColumn::__new_for_testing)
.collect())
});
mock_process_engine_blobs_result(
&mut mock_adapter,
Ok(AvailabilityProcessingStatus::Imported(block_root)),