Update state processing for v0.12

This commit is contained in:
Michael Sproul
2020-05-21 19:46:07 +10:00
parent dceab5e6ea
commit 8040b001f1
17 changed files with 222 additions and 174 deletions

View File

@@ -1,5 +1,5 @@
# Bump the test tag here and in .gitlab-ci.yml and CI will take care of updating the cached tarballs
TESTS_TAG := v0.11.1
TESTS_TAG := v0.12.0
TESTS = general minimal mainnet
TARBALLS = $(patsubst %,%-$(TESTS_TAG).tar.gz,$(TESTS))

View File

@@ -28,6 +28,25 @@ fn minimal_config_ok() {
config_test::<MinimalEthSpec>();
}
// Check that the hand-computed multiplications on EthSpec are correctly computed.
// This test lives here because one is most likely to be muck these up during a spec update.
fn check_typenum_values<E: EthSpec>() {
assert_eq!(
E::MaxPendingAttestations::to_u64(),
E::MaxAttestations::to_u64() * E::SlotsPerEpoch::to_u64()
);
assert_eq!(
E::SlotsPerEth1VotingPeriod::to_u64(),
E::EpochsPerEth1VotingPeriod::to_u64() * E::SlotsPerEpoch::to_u64()
);
}
#[test]
fn derived_typenum_values() {
check_typenum_values::<MinimalEthSpec>();
check_typenum_values::<MainnetEthSpec>();
}
#[test]
fn shuffling() {
ShufflingHandler::<MinimalEthSpec>::run();