mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
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:
@@ -1,3 +1,4 @@
|
||||
use ssz_types::VariableList;
|
||||
use std::mem;
|
||||
use types::{BeaconState, BeaconStateCapella, BeaconStateError as Error, ChainSpec, EthSpec, Fork};
|
||||
|
||||
@@ -55,9 +56,10 @@ pub fn upgrade_to_capella<E: EthSpec>(
|
||||
next_sync_committee: pre.next_sync_committee.clone(),
|
||||
// Execution
|
||||
latest_execution_payload_header: pre.latest_execution_payload_header.upgrade_to_capella(),
|
||||
// Withdrawals
|
||||
// Capella
|
||||
next_withdrawal_index: 0,
|
||||
next_withdrawal_validator_index: 0,
|
||||
historical_summaries: VariableList::default(),
|
||||
// Caches
|
||||
total_active_balance: pre.total_active_balance,
|
||||
committee_caches: mem::take(&mut pre.committee_caches),
|
||||
|
||||
@@ -57,9 +57,10 @@ pub fn upgrade_to_eip4844<E: EthSpec>(
|
||||
next_sync_committee: pre.next_sync_committee.clone(),
|
||||
// Execution
|
||||
latest_execution_payload_header: pre.latest_execution_payload_header.upgrade_to_eip4844(),
|
||||
// Withdrawals
|
||||
// Capella
|
||||
next_withdrawal_index: pre.next_withdrawal_index,
|
||||
next_withdrawal_validator_index: pre.next_withdrawal_validator_index,
|
||||
historical_summaries: pre.historical_summaries.clone(),
|
||||
// Caches
|
||||
total_active_balance: pre.total_active_balance,
|
||||
committee_caches: mem::take(&mut pre.committee_caches),
|
||||
|
||||
Reference in New Issue
Block a user