mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
replace reth BlobTransactionSidecar with alloy's (#8135)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use alloy_primitives::hex;
|
||||
use c_kzg::{KzgCommitment, KzgSettings};
|
||||
use c_kzg::KzgSettings;
|
||||
use criterion::{
|
||||
criterion_group, criterion_main, measurement::WallTime, BenchmarkGroup, Criterion,
|
||||
};
|
||||
@ -10,8 +11,7 @@ use proptest::{
|
||||
test_runner::{RngAlgorithm, TestRng, TestRunner},
|
||||
};
|
||||
use reth_primitives::{
|
||||
constants::eip4844::MAINNET_KZG_TRUSTED_SETUP, eip4844::kzg_to_versioned_hash,
|
||||
BlobTransactionSidecar, TxEip4844,
|
||||
constants::eip4844::MAINNET_KZG_TRUSTED_SETUP, BlobTransactionSidecar, TxEip4844,
|
||||
};
|
||||
use revm_primitives::MAX_BLOB_NUMBER_PER_BLOCK;
|
||||
use std::sync::Arc;
|
||||
@ -62,13 +62,7 @@ fn validate_blob_tx(
|
||||
}
|
||||
}
|
||||
|
||||
tx.blob_versioned_hashes = blob_sidecar
|
||||
.commitments
|
||||
.iter()
|
||||
.map(|commitment| {
|
||||
kzg_to_versioned_hash(KzgCommitment::from_bytes(&commitment.into_inner()).unwrap())
|
||||
})
|
||||
.collect();
|
||||
tx.blob_versioned_hashes = blob_sidecar.versioned_hashes().collect();
|
||||
|
||||
(tx, blob_sidecar)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user