Fixed Payload Reconstruction Bug (#3796)

This commit is contained in:
ethDreamer
2022-12-13 18:49:30 -06:00
committed by GitHub
parent b1c33361ea
commit 07d6ef749a
5 changed files with 55 additions and 12 deletions

View File

@@ -939,6 +939,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
Some(DatabaseBlock::Blinded(block)) => block,
None => return Ok(None),
};
let fork = blinded_block.fork_name(&self.spec)?;
// If we only have a blinded block, load the execution payload from the EL.
let block_message = blinded_block.message();
@@ -953,7 +954,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
.execution_layer
.as_ref()
.ok_or(Error::ExecutionLayerMissing)?
.get_payload_by_block_hash(exec_block_hash)
.get_payload_by_block_hash(exec_block_hash, fork)
.await
.map_err(|e| Error::ExecutionLayerErrorPayloadReconstruction(exec_block_hash, e))?
.ok_or(Error::BlockHashMissingFromExecutionLayer(exec_block_hash))?;

View File

@@ -207,6 +207,7 @@ pub enum BeaconChainError {
CommitteePromiseFailed(oneshot_broadcast::Error),
MaxCommitteePromises(usize),
BlsToExecutionChangeBadFork(ForkName),
InconsistentFork(InconsistentFork),
}
easy_from_to!(SlotProcessingError, BeaconChainError);
@@ -230,6 +231,7 @@ easy_from_to!(ForkChoiceStoreError, BeaconChainError);
easy_from_to!(HistoricalBlockError, BeaconChainError);
easy_from_to!(StateAdvanceError, BeaconChainError);
easy_from_to!(BlockReplayError, BeaconChainError);
easy_from_to!(InconsistentFork, BeaconChainError);
#[derive(Debug)]
pub enum BlockProductionError {