From 110f853715b03061ec92fe27f546644d2da5af9e Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 20 Feb 2023 15:31:47 +1100 Subject: [PATCH] Add paranoid check for eip4844 code This is not technically necessary, but I think it's nice to be explicit about EIP4844 consensus code for the time being. --- consensus/state_processing/src/per_block_processing.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/consensus/state_processing/src/per_block_processing.rs b/consensus/state_processing/src/per_block_processing.rs index e12fb59565..4f686200b0 100644 --- a/consensus/state_processing/src/per_block_processing.rs +++ b/consensus/state_processing/src/per_block_processing.rs @@ -180,7 +180,11 @@ pub fn per_block_processing>( )?; } - process_blob_kzg_commitments(block.body())?; + // Eip4844 specifications are not yet released so additional care is taken + // to ensure the code does not run in production. + if matches!(block, BeaconBlockRef::Eip4844(_)) { + process_blob_kzg_commitments(block.body())?; + } Ok(()) }