Merge pull request #3201 from ethereum/fix-fork-historical-summaries

Add `historical_summaries` setup to `fork.md`
This commit is contained in:
Danny Ryan 2023-01-11 13:24:55 -07:00 committed by GitHub
commit 71d66afc0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -129,8 +129,10 @@ def upgrade_to_capella(pre: bellatrix.BeaconState) -> BeaconState:
# Execution-layer
latest_execution_payload_header=latest_execution_payload_header,
# Withdrawals
next_withdrawal_index=WithdrawalIndex(0),
next_withdrawal_validator_index=ValidatorIndex(0),
next_withdrawal_index=WithdrawalIndex(0), # [New in Capella]
next_withdrawal_validator_index=ValidatorIndex(0), # [New in Capella]
# Deep history valid from Capella onwards
historical_summaries=List[HistoricalSummary, HISTORICAL_ROOTS_LIMIT]([]), # [New in Capella]
)
return post

View File

@ -131,6 +131,8 @@ def upgrade_to_eip4844(pre: capella.BeaconState) -> BeaconState:
# Withdrawals
next_withdrawal_index=pre.next_withdrawal_index,
next_withdrawal_validator_index=pre.next_withdrawal_validator_index,
# Deep history valid from Capella onwards
historical_summaries=pre.historical_summaries,
)
return post