diff --git a/eip_7594/src/lib.rs b/eip_7594/src/lib.rs index dd56d8bc..8411996e 100644 --- a/eip_7594/src/lib.rs +++ b/eip_7594/src/lib.rs @@ -92,63 +92,6 @@ pub fn verify_sidecar_inclusion_proof( ); } -pub fn verify_data_column_sidecar_kzg_proofs( - sidecar: DataColumnSidecar

, -) -> Result { - assert!(sidecar.index < NumberOfColumns::U64); - assert!( - sidecar.column.len() == sidecar.kzg_commitments.len() - && sidecar.column.len() == sidecar.kzg_proofs.len() - ); - let mut row_ids = Vec::new(); - for i in 0..sidecar.column.len() { - row_ids.push(i as u64); - } - - let kzg_settings = load_kzg_settings()?; - - let column = sidecar - .column - .into_iter() - .map(|a| CKzgCell::from_bytes(&a.as_bytes()).map_err(Into::into)) - .collect::>>()?; - - let commitment = sidecar - .kzg_commitments - .iter() - .map(|a| Bytes48::from_bytes(a.as_bytes()).map_err(Into::into)) - .collect::>>()?; - - let kzg_proofs = sidecar - .kzg_proofs - .iter() - .map(|a| Bytes48::from_bytes(&a.as_bytes()).map_err(Into::into)) - .collect::>>()?; - - Ok(CKzgProof::verify_cell_proof_batch( - &commitment[..], - &row_ids, - &vec![sidecar.index], - &column[..], - &kzg_proofs, - &kzg_settings, - )?) -} - -pub fn verify_data_column_sidecar_inclusion_proof( - sidecar: DataColumnSidecar

, -) -> bool { - let index_at_commitment_depth = index_at_commitment_depth::

(sidecar.index); - - // is_valid_blob_sidecar_inclusion_proof - return is_valid_merkle_branch( - sidecar.kzg_commitments.hash_tree_root(), - sidecar.kzg_commitments_inclusion_proof, - index_at_commitment_depth, - sidecar.signed_block_header.message.body_root, - ); -} - pub fn get_custody_columns(node_id: NodeId, custody_subnet_count: u64) -> Vec { assert!(custody_subnet_count <= DATA_COLUMN_SIDECAR_SUBNET_COUNT); diff --git a/fork_choice_store/src/store.rs b/fork_choice_store/src/store.rs index b9d99375..2ad8b2a7 100644 --- a/fork_choice_store/src/store.rs +++ b/fork_choice_store/src/store.rs @@ -11,7 +11,6 @@ use std::{ use anyhow::{anyhow, bail, ensure, Result}; use arithmetic::NonZeroExt as _; use clock::Tick; -use eip_7594::{verify_data_column_sidecar_inclusion_proof, verify_data_column_sidecar_kzg_proofs}; use eip_7594::{verify_kzg_proofs, verify_sidecar_inclusion_proof}; use execution_engine::ExecutionEngine; use features::Feature; diff --git a/ssz/src/uint256.rs b/ssz/src/uint256.rs index 538f99cd..c95533fb 100644 --- a/ssz/src/uint256.rs +++ b/ssz/src/uint256.rs @@ -271,6 +271,7 @@ impl Uint256 { Self(self.into_raw().saturating_mul(rhs.into_raw())) } + #[must_use] pub const fn into_raw(self) -> RawUint256 { self.0 }