Files
lighthouse/consensus/state_processing/src/per_block_processing/deneb.rs
Mac L 1abc41e337 Cleanup consensus/types re-exports (#8643)
Removes some of the temporary re-exports in `consensus/types`.

I am doing this in multiple parts to keep each diff small.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-01-15 02:23:55 +00:00

9 lines
386 B
Rust

use ethereum_hashing::hash_fixed;
use types::{VersionedHash, kzg_ext::KzgCommitment, kzg_ext::consts::VERSIONED_HASH_VERSION_KZG};
pub fn kzg_commitment_to_versioned_hash(kzg_commitment: &KzgCommitment) -> VersionedHash {
let mut hashed_commitment = hash_fixed(&kzg_commitment.0);
hashed_commitment[0] = VERSIONED_HASH_VERSION_KZG;
VersionedHash::from(hashed_commitment)
}