This commit is contained in:
realbigsean
2023-03-15 15:32:22 -04:00
parent 34cea6d1c3
commit b303d2fb7e
9 changed files with 23 additions and 24 deletions

View File

@@ -4857,7 +4857,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
)),
)?;
kzg_utils::compute_blob_kzg_proof::<T::EthSpec>(kzg, blob, kzg_commitment.clone())
kzg_utils::compute_blob_kzg_proof::<T::EthSpec>(kzg, blob, *kzg_commitment)
.map_err(BlockProductionError::KzgError)
})
.collect::<Result<Vec<KzgProof>, BlockProductionError>>()

View File

@@ -3,7 +3,7 @@ use slot_clock::SlotClock;
use std::sync::Arc;
use crate::beacon_chain::{BeaconChain, BeaconChainTypes, MAXIMUM_GOSSIP_CLOCK_DISPARITY};
use crate::{kzg_utils, BeaconChainError};
use crate::BeaconChainError;
use state_processing::per_block_processing::eip4844::eip4844::verify_kzg_commitments_against_transactions;
use types::signed_beacon_block::BlobReconstructionError;
use types::{
@@ -116,11 +116,11 @@ pub fn validate_blob_for_gossip<T: BeaconChainTypes>(
}
fn verify_data_availability<T: BeaconChainTypes>(
blob_sidecar: &BlobsSidecar<T::EthSpec>,
_blob_sidecar: &BlobsSidecar<T::EthSpec>,
kzg_commitments: &[KzgCommitment],
transactions: &Transactions<T::EthSpec>,
block_slot: Slot,
block_root: Hash256,
_block_slot: Slot,
_block_root: Hash256,
chain: &BeaconChain<T>,
) -> Result<(), BlobError> {
if verify_kzg_commitments_against_transactions::<T::EthSpec>(transactions, kzg_commitments)
@@ -130,7 +130,7 @@ fn verify_data_availability<T: BeaconChainTypes>(
}
// Validatate that the kzg proof is valid against the commitments and blobs
let kzg = chain
let _kzg = chain
.kzg
.as_ref()
.ok_or(BlobError::TrustedSetupNotInitialized)?;