add historical summaries (#3865)

* add historical summaries

* fix tree hash caching, disable the sanity slots test with fake crypto

* add ssz static HistoricalSummary

* only store historical summaries after capella

* Teach `UpdatePattern` about Capella

* Tidy EF tests

* Clippy

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
realbigsean
2023-01-10 20:40:21 -05:00
committed by GitHub
parent 87c44697d0
commit 98b11bbd3f
21 changed files with 424 additions and 50 deletions

View File

@@ -215,6 +215,7 @@ macro_rules! ssz_static_test_no_run {
#[cfg(feature = "fake_crypto")]
mod ssz_static {
use ef_tests::{Handler, SszStaticHandler, SszStaticTHCHandler, SszStaticWithSpecHandler};
use types::historical_summary::HistoricalSummary;
use types::*;
ssz_static_test!(aggregate_and_proof, AggregateAndProof<_>);
@@ -357,6 +358,12 @@ mod ssz_static {
SszStaticHandler::<SignedBlsToExecutionChange, MinimalEthSpec>::capella_only().run();
SszStaticHandler::<SignedBlsToExecutionChange, MainnetEthSpec>::capella_only().run();
}
#[test]
fn historical_summary() {
SszStaticHandler::<HistoricalSummary, MinimalEthSpec>::capella_only().run();
SszStaticHandler::<HistoricalSummary, MainnetEthSpec>::capella_only().run();
}
}
#[test]
@@ -423,6 +430,12 @@ fn epoch_processing_historical_roots_update() {
EpochProcessingHandler::<MainnetEthSpec, HistoricalRootsUpdate>::default().run();
}
#[test]
fn epoch_processing_historical_summaries_update() {
EpochProcessingHandler::<MinimalEthSpec, HistoricalSummariesUpdate>::default().run();
EpochProcessingHandler::<MainnetEthSpec, HistoricalSummariesUpdate>::default().run();
}
#[test]
fn epoch_processing_participation_record_updates() {
EpochProcessingHandler::<MinimalEthSpec, ParticipationRecordUpdates>::default().run();