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

This commit is contained in:
Michael Sproul
2022-03-01 16:03:41 +11:00
209 changed files with 6107 additions and 1362 deletions

View File

@@ -2,7 +2,7 @@
name = "ef_tests"
version = "0.2.0"
authors = ["Paul Hauner <paul@paulhauner.com>"]
edition = "2018"
edition = "2021"
[features]
# `ef_tests` feature must be enabled to actually run the tests

View File

@@ -1,4 +1,4 @@
TESTS_TAG := v1.1.8
TESTS_TAG := v1.1.9
TESTS = general minimal mainnet
TARBALLS = $(patsubst %,%-$(TESTS_TAG).tar.gz,$(TESTS))

View File

@@ -260,10 +260,7 @@ impl<E: EthSpec, T: EpochTransition<E>> LoadCase for EpochProcessing<E, T> {
impl<E: EthSpec, T: EpochTransition<E>> Case for EpochProcessing<E, T> {
fn description(&self) -> String {
self.metadata
.description
.clone()
.unwrap_or_else(String::new)
self.metadata.description.clone().unwrap_or_default()
}
fn is_enabled_for_fork(fork_name: ForkName) -> bool {

View File

@@ -14,15 +14,15 @@ use ssz_derive::Decode;
use state_processing::state_advance::complete_state_advance;
use std::time::Duration;
use types::{
Attestation, BeaconBlock, BeaconState, Checkpoint, Epoch, EthSpec, ForkName, Hash256,
IndexedAttestation, SignedBeaconBlock, Slot, Uint256,
Attestation, BeaconBlock, BeaconState, Checkpoint, Epoch, EthSpec, ExecutionBlockHash,
ForkName, Hash256, IndexedAttestation, SignedBeaconBlock, Slot, Uint256,
};
#[derive(Default, Debug, PartialEq, Clone, Deserialize, Decode)]
#[serde(deny_unknown_fields)]
pub struct PowBlock {
pub block_hash: Hash256,
pub parent_hash: Hash256,
pub block_hash: ExecutionBlockHash,
pub parent_hash: ExecutionBlockHash,
pub total_difficulty: Uint256,
}

View File

@@ -308,10 +308,7 @@ impl<E: EthSpec, O: Operation<E>> LoadCase for Operations<E, O> {
impl<E: EthSpec, O: Operation<E>> Case for Operations<E, O> {
fn description(&self) -> String {
self.metadata
.description
.clone()
.unwrap_or_else(String::new)
self.metadata.description.clone().unwrap_or_default()
}
fn is_enabled_for_fork(fork_name: ForkName) -> bool {

View File

@@ -103,10 +103,7 @@ impl<E: EthSpec> LoadCase for RewardsTest<E> {
impl<E: EthSpec> Case for RewardsTest<E> {
fn description(&self) -> String {
self.metadata
.description
.clone()
.unwrap_or_else(String::new)
self.metadata.description.clone().unwrap_or_default()
}
fn result(&self, _case_index: usize, fork_name: ForkName) -> Result<(), Error> {

View File

@@ -56,10 +56,7 @@ impl<E: EthSpec> LoadCase for SanityBlocks<E> {
impl<E: EthSpec> Case for SanityBlocks<E> {
fn description(&self) -> String {
self.metadata
.description
.clone()
.unwrap_or_else(String::new)
self.metadata.description.clone().unwrap_or_default()
}
fn result(&self, _case_index: usize, fork_name: ForkName) -> Result<(), Error> {

View File

@@ -50,10 +50,7 @@ impl<E: EthSpec> LoadCase for SanitySlots<E> {
impl<E: EthSpec> Case for SanitySlots<E> {
fn description(&self) -> String {
self.metadata
.description
.clone()
.unwrap_or_else(String::new)
self.metadata.description.clone().unwrap_or_default()
}
fn result(&self, _case_index: usize, fork_name: ForkName) -> Result<(), Error> {

View File

@@ -307,11 +307,6 @@ pub struct RandomHandler<E>(PhantomData<E>);
impl<E: EthSpec + TypeName> Handler for RandomHandler<E> {
type Case = cases::SanityBlocks<E>;
// FIXME(merge): enable merge tests once available
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
fork_name != ForkName::Merge
}
fn config_name() -> &'static str {
E::name()
}