mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
Update spec tests to v1.1.0-beta.4 (#2548)
## Proposed Changes
Bump the spec tests to beta.4, including the new randomised tests (which all pass 🎉)
This commit is contained in:
@@ -37,7 +37,7 @@ pub trait Handler {
|
||||
};
|
||||
|
||||
let handler_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("eth2.0-spec-tests")
|
||||
.join("consensus-spec-tests")
|
||||
.join("tests")
|
||||
.join(Self::config_name())
|
||||
.join(fork_name_str)
|
||||
@@ -82,10 +82,6 @@ macro_rules! bls_handler {
|
||||
impl Handler for $runner_name {
|
||||
type Case = cases::$case_name;
|
||||
|
||||
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
|
||||
fork_name == ForkName::Base
|
||||
}
|
||||
|
||||
fn runner_name() -> &'static str {
|
||||
"bls"
|
||||
}
|
||||
@@ -110,6 +106,16 @@ bls_handler!(
|
||||
BlsFastAggregateVerify,
|
||||
"fast_aggregate_verify"
|
||||
);
|
||||
bls_handler!(
|
||||
BlsEthAggregatePubkeysHandler,
|
||||
BlsEthAggregatePubkeys,
|
||||
"eth_aggregate_pubkeys"
|
||||
);
|
||||
bls_handler!(
|
||||
BlsEthFastAggregateVerifyHandler,
|
||||
BlsEthFastAggregateVerify,
|
||||
"eth_fast_aggregate_verify"
|
||||
);
|
||||
|
||||
/// Handler for SSZ types.
|
||||
pub struct SszStaticHandler<T, E> {
|
||||
@@ -258,8 +264,8 @@ impl<E: EthSpec + TypeName> Handler for SanityBlocksHandler<E> {
|
||||
}
|
||||
|
||||
fn is_enabled_for_fork(&self, _fork_name: ForkName) -> bool {
|
||||
// FIXME(altair): v1.1.0-alpha.3 doesn't mark the historical blocks test as
|
||||
// requiring real crypto, so only run these tests with real crypto for now.
|
||||
// NOTE: v1.1.0-beta.4 doesn't mark the historical blocks test as requiring real crypto, so
|
||||
// only run these tests with real crypto for now.
|
||||
cfg!(not(feature = "fake_crypto"))
|
||||
}
|
||||
}
|
||||
@@ -284,6 +290,26 @@ impl<E: EthSpec + TypeName> Handler for SanitySlotsHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
pub struct RandomHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for RandomHandler<E> {
|
||||
type Case = cases::SanityBlocks<E>;
|
||||
|
||||
fn config_name() -> &'static str {
|
||||
E::name()
|
||||
}
|
||||
|
||||
fn runner_name() -> &'static str {
|
||||
"random"
|
||||
}
|
||||
|
||||
fn handler_name(&self) -> String {
|
||||
"random".into()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
pub struct EpochProcessingHandler<E, T>(PhantomData<(E, T)>);
|
||||
|
||||
Reference in New Issue
Block a user