Add historical summaries to state and processing (#11842)

* Add historical summaries to state and processing

* Process historical roots test

* Passing spec tests

* Fix shas and tests

* Fix mainnet spectest sha

* Fix tests

* Update beacon-chain/core/epoch/epoch_processing.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* Update beacon-chain/core/epoch/epoch_processing_test.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* Update proto/prysm/v1alpha1/beacon_state.proto

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* Update beacon-chain/state/state-native/hasher.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* Radek's feedback

* Getters error

* Dont return

* Fix else

* Fix tests

* Fix test

* Rm white space

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
terencechain
2023-01-11 14:20:15 -08:00
committed by GitHub
parent 81b9eceb50
commit 7fa3ebfaa8
44 changed files with 697 additions and 163 deletions

View File

@@ -336,8 +336,13 @@ func printStates(stateC <-chan *modifiedState, doneC chan<- bool) {
log.Infof("block_roots : size = %s, count = %d", humanize.Bytes(size), count)
size, count = sizeAndCountOfByteList(st.StateRoots())
log.Infof("state_roots : size = %s, count = %d", humanize.Bytes(size), count)
size, count = sizeAndCountOfByteList(st.HistoricalRoots())
log.Infof("historical_roots : size = %s, count = %d", humanize.Bytes(size), count)
roots, err := st.HistoricalRoots()
if err != nil {
log.WithError(err).Error("could not get historical roots")
} else {
size, count = sizeAndCountOfByteList(roots)
log.Infof("historical_roots : size = %s, count = %d", humanize.Bytes(size), count)
}
log.Infof("eth1_data : sizeSSZ = %s", humanize.Bytes(uint64(st.Eth1Data().SizeSSZ())))
size, count = sizeAndCountGeneric(st.Eth1DataVotes(), nil)
log.Infof("eth1_data_votes : sizeSSZ = %s, count = %d", humanize.Bytes(size), count)