add shanghai fork version and epoch

This commit is contained in:
realbigsean
2022-02-19 11:42:11 -07:00
parent 7125f0e3c6
commit 4cdf1b546d
18 changed files with 121 additions and 68 deletions

View File

@@ -78,6 +78,6 @@ pub fn previous_fork(fork_name: ForkName) -> ForkName {
ForkName::Base => ForkName::Base,
ForkName::Altair => ForkName::Base,
ForkName::Merge => ForkName::Altair, // TODO: Check this when tests are released..
ForkName::Dank => ForkName::Merge, // TODO: Check this when tests are released..
ForkName::Shanghai => ForkName::Merge, // TODO: Check this when tests are released..
}
}

View File

@@ -278,7 +278,7 @@ impl<E: EthSpec, T: EpochTransition<E>> Case for EpochProcessing<E, T> {
}
// No phase0 tests for Altair and later.
ForkName::Altair | ForkName::Merge => T::name() != "participation_record_updates",
ForkName::Dank => false, // TODO: revisit when tests are out
ForkName::Shanghai => false, // TODO: revisit when tests are out
}
}

View File

@@ -61,7 +61,7 @@ impl<E: EthSpec> Case for ForkTest<E> {
ForkName::Base => panic!("phase0 not supported"),
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::Dank => panic!("danksharding not supported"),
ForkName::Shanghai => panic!("shanghai not supported"),
};
compare_beacon_state_results_without_caches(&mut result, &mut expected)

View File

@@ -42,10 +42,9 @@ impl<E: EthSpec> LoadCase for TransitionTest<E> {
spec.altair_fork_epoch = Some(Epoch::new(0));
spec.bellatrix_fork_epoch = Some(metadata.fork_epoch);
}
//TODO(sean): fix
ForkName::Dank => {
spec.altair_fork_epoch = Some(Epoch::new(0));
spec.bellatrix_fork_epoch = Some(metadata.fork_epoch);
ForkName::Shanghai => {
spec.bellatrix_fork_epoch = Some(Epoch::new(0));
spec.shanghai_fork_epoch = Some(metadata.fork_epoch);
}
}