From f601fb3b7e21f4bf897c32375762cd2796797b2e Mon Sep 17 00:00:00 2001 From: realbigsean Date: Tue, 22 Nov 2022 20:13:51 -0500 Subject: [PATCH] ef-test updates --- lcli/Cargo.toml | 2 ++ lcli/src/parse_ssz.rs | 10 ++++++++-- testing/ef_tests/src/cases/epoch_processing.rs | 3 +-- testing/ef_tests/src/cases/fork.rs | 5 ++--- testing/ef_tests/src/handler.rs | 5 ----- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lcli/Cargo.toml b/lcli/Cargo.toml index b4f630ae1..00e7fe912 100644 --- a/lcli/Cargo.toml +++ b/lcli/Cargo.toml @@ -8,6 +8,8 @@ edition = "2021" [features] portable = ["bls/supranational-portable"] fake_crypto = ['bls/fake_crypto'] +withdrawals = ["types/withdrawals", "beacon_chain/withdrawals", "store/withdrawals", "state_processing/withdrawals"] +withdrawals-processing = ["beacon_chain/withdrawals-processing", "store/withdrawals-processing", "state_processing/withdrawals-processing"] [dependencies] bls = { path = "../crypto/bls" } diff --git a/lcli/src/parse_ssz.rs b/lcli/src/parse_ssz.rs index 5d988ee18..69fc05ca9 100644 --- a/lcli/src/parse_ssz.rs +++ b/lcli/src/parse_ssz.rs @@ -44,19 +44,25 @@ pub fn run_parse_ssz(matches: &ArgMatches) -> Result<(), String> { bytes }; - info!("Using {} spec", T::spec_name()); - info!("Type: {:?}", type_str); + println!("Using {} spec", T::spec_name()); + println!("Type: {:?}", type_str); match type_str { "signed_block_base" => decode_and_print::>(&bytes, format)?, "signed_block_altair" => decode_and_print::>(&bytes, format)?, "signed_block_merge" => decode_and_print::>(&bytes, format)?, + "signed_block_capella" => decode_and_print::>(&bytes, format)?, + "signed_block_eip4844" => decode_and_print::>(&bytes, format)?, "block_base" => decode_and_print::>(&bytes, format)?, "block_altair" => decode_and_print::>(&bytes, format)?, "block_merge" => decode_and_print::>(&bytes, format)?, + "block_capella" => decode_and_print::>(&bytes, format)?, + "block_eip4844" => decode_and_print::>(&bytes, format)?, "state_base" => decode_and_print::>(&bytes, format)?, "state_altair" => decode_and_print::>(&bytes, format)?, "state_merge" => decode_and_print::>(&bytes, format)?, + "state_capella" => decode_and_print::>(&bytes, format)?, + "state_eip4844" => decode_and_print::>(&bytes, format)?, other => return Err(format!("Unknown type: {}", other)), }; diff --git a/testing/ef_tests/src/cases/epoch_processing.rs b/testing/ef_tests/src/cases/epoch_processing.rs index b0e16e12c..3a4b18217 100644 --- a/testing/ef_tests/src/cases/epoch_processing.rs +++ b/testing/ef_tests/src/cases/epoch_processing.rs @@ -289,10 +289,9 @@ impl> Case for EpochProcessing { && T::name() != "participation_flag_updates" } // No phase0 tests for Altair and later. - ForkName::Altair | ForkName::Merge | ForkName::Capella => { + ForkName::Altair | ForkName::Merge | ForkName::Capella | ForkName::Eip4844=> { T::name() != "participation_record_updates" } - ForkName::Eip4844 => false, // TODO: revisit when tests are out } } diff --git a/testing/ef_tests/src/cases/fork.rs b/testing/ef_tests/src/cases/fork.rs index f79e13005..4f3c5fc54 100644 --- a/testing/ef_tests/src/cases/fork.rs +++ b/testing/ef_tests/src/cases/fork.rs @@ -3,7 +3,7 @@ use crate::case_result::compare_beacon_state_results_without_caches; use crate::cases::common::previous_fork; use crate::decode::{ssz_decode_state, yaml_decode_file}; use serde_derive::Deserialize; -use state_processing::upgrade::{upgrade_to_altair, upgrade_to_bellatrix, upgrade_to_capella}; +use state_processing::upgrade::{upgrade_to_altair, upgrade_to_bellatrix, upgrade_to_capella, upgrade_to_eip4844}; use types::{BeaconState, ForkName}; #[derive(Debug, Clone, Default, Deserialize)] @@ -62,8 +62,7 @@ impl Case for ForkTest { ForkName::Altair => upgrade_to_altair(&mut result_state, spec).map(|_| result_state), ForkName::Merge => upgrade_to_bellatrix(&mut result_state, spec).map(|_| result_state), ForkName::Capella => upgrade_to_capella(&mut result_state, spec).map(|_| result_state), - ForkName::Eip4844 => panic!("eip4844 not supported"), - }; + ForkName::Eip4844 => upgrade_to_eip4844(&mut result_state, spec).map(|_| result_state), }; compare_beacon_state_results_without_caches(&mut result, &mut expected) } diff --git a/testing/ef_tests/src/handler.rs b/testing/ef_tests/src/handler.rs index ed376af44..a27df28f9 100644 --- a/testing/ef_tests/src/handler.rs +++ b/testing/ef_tests/src/handler.rs @@ -24,11 +24,6 @@ pub trait Handler { fn run(&self) { for fork_name in ForkName::list_all() { - // FIXME(eip4844): enable eip4844 - if fork_name == ForkName::Eip4844 { - continue; - } - if self.is_enabled_for_fork(fork_name) { self.run_for_fork(fork_name) }