keep verification of payloads pre 4844
This commit is contained in:
parent
2645249eb5
commit
37e7c1d5c7
@ -1026,22 +1026,19 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
//FIXME(sean) avoid the clone by comparing refs to headers (`as_execution_payload_header` method ?)
|
//FIXME(sean) avoid the clone by comparing refs to headers (`as_execution_payload_header` method ?)
|
||||||
let full_payload: FullPayload<T::EthSpec> = execution_payload.clone().into();
|
let full_payload: FullPayload<T::EthSpec> = execution_payload.clone().into();
|
||||||
|
|
||||||
// Verify payload integrity.
|
//FIXME(sean) we're not decoding blobs txs correctly yet
|
||||||
let header_from_payload = full_payload.to_execution_payload_header();
|
if !matches!(execution_payload, ExecutionPayload::Eip4844(_)) {
|
||||||
if header_from_payload != execution_payload_header {
|
// Verify payload integrity.
|
||||||
for txn in execution_payload.transactions() {
|
let header_from_payload = full_payload.to_execution_payload_header();
|
||||||
debug!(
|
if header_from_payload != execution_payload_header {
|
||||||
self.log,
|
for txn in execution_payload.transactions() {
|
||||||
"Reconstructed txn";
|
debug!(
|
||||||
"bytes" => format!("0x{}", hex::encode(&**txn)),
|
self.log,
|
||||||
);
|
"Reconstructed txn";
|
||||||
}
|
"bytes" => format!("0x{}", hex::encode(&**txn)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if execution_payload_header.transactions_root()
|
|
||||||
!= header_from_payload.transactions_root()
|
|
||||||
{
|
|
||||||
//FIXME(sean) we're not decoding blobs txs correctly yet
|
|
||||||
} else {
|
|
||||||
return Err(Error::InconsistentPayloadReconstructed {
|
return Err(Error::InconsistentPayloadReconstructed {
|
||||||
slot: blinded_block.slot(),
|
slot: blinded_block.slot(),
|
||||||
exec_block_hash,
|
exec_block_hash,
|
||||||
|
@ -31,8 +31,7 @@ use tokio::sync::mpsc::{self, Receiver, Sender};
|
|||||||
use tokio::time::error::Error as TimeError;
|
use tokio::time::error::Error as TimeError;
|
||||||
use tokio_util::time::delay_queue::{DelayQueue, Key as DelayKey};
|
use tokio_util::time::delay_queue::{DelayQueue, Key as DelayKey};
|
||||||
use types::{
|
use types::{
|
||||||
Attestation, EthSpec, Hash256, LightClientOptimisticUpdate, SignedAggregateAndProof,
|
Attestation, EthSpec, Hash256, LightClientOptimisticUpdate, SignedAggregateAndProof, SubnetId,
|
||||||
SubnetId,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const TASK_NAME: &str = "beacon_processor_reprocess_queue";
|
const TASK_NAME: &str = "beacon_processor_reprocess_queue";
|
||||||
|
@ -24,9 +24,10 @@ use metastruct::metastruct;
|
|||||||
///
|
///
|
||||||
/// Credit to Reth for the type definition.
|
/// Credit to Reth for the type definition.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||||
#[metastruct(mappings(
|
#[metastruct(mappings(map_execution_block_header_fields_except_withdrawals(exclude(
|
||||||
map_execution_block_header_fields_except_withdrawals(exclude(withdrawals_root, excess_data_gas)),
|
withdrawals_root,
|
||||||
))]
|
excess_data_gas
|
||||||
|
)),))]
|
||||||
pub struct ExecutionBlockHeader {
|
pub struct ExecutionBlockHeader {
|
||||||
pub parent_hash: Hash256,
|
pub parent_hash: Hash256,
|
||||||
pub ommers_hash: Hash256,
|
pub ommers_hash: Hash256,
|
||||||
|
Loading…
Reference in New Issue
Block a user