Merge remote-tracking branch 'origin/unstable' into tree-states

This commit is contained in:
Michael Sproul
2022-05-24 10:01:05 +10:00
237 changed files with 8506 additions and 3598 deletions

View File

@@ -338,7 +338,11 @@ impl<E: EthSpec> Tester<E> {
// function.
if !valid {
// A missing parent block whilst `valid == false` means the test should pass.
if let Some(parent_block) = self.harness.chain.get_block(&block.parent_root()).unwrap()
if let Some(parent_block) = self
.harness
.chain
.get_blinded_block(&block.parent_root())
.unwrap()
{
let parent_state_root = parent_block.state_root();
let mut state = self

View File

@@ -20,8 +20,8 @@ use state_processing::{
use std::fmt::Debug;
use std::path::Path;
use types::{
Attestation, AttesterSlashing, BeaconBlock, BeaconState, ChainSpec, Deposit, EthSpec,
ExecutionPayload, ForkName, ProposerSlashing, SignedVoluntaryExit, SyncAggregate,
Attestation, AttesterSlashing, BeaconBlock, BeaconState, ChainSpec, Deposit, EthSpec, ForkName,
FullPayload, ProposerSlashing, SignedVoluntaryExit, SyncAggregate,
};
#[derive(Debug, Clone, Default, Deserialize)]
@@ -187,7 +187,13 @@ impl<E: EthSpec> Operation<E> for BeaconBlock<E> {
_: &Operations<E, Self>,
) -> Result<(), BlockProcessingError> {
let mut ctxt = ConsensusContext::new(state.slot());
process_block_header(state, self.to_ref(), VerifyBlockRoot::True, &mut ctxt, spec)?;
process_block_header(
state,
self.to_ref().temporary_block_header(),
VerifyBlockRoot::True,
&mut ctxt,
spec,
)?;
Ok(())
}
}
@@ -220,7 +226,7 @@ impl<E: EthSpec> Operation<E> for SyncAggregate<E> {
}
}
impl<E: EthSpec> Operation<E> for ExecutionPayload<E> {
impl<E: EthSpec> Operation<E> for FullPayload<E> {
fn handler_name() -> String {
"execution_payload".into()
}

View File

@@ -54,6 +54,7 @@ type_name!(DepositData);
type_name!(DepositMessage);
type_name!(Eth1Data);
type_name_generic!(ExecutionPayload);
type_name_generic!(FullPayload, "ExecutionPayload");
type_name_generic!(ExecutionPayloadHeader);
type_name!(Fork);
type_name!(ForkData);