mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
Add state diff serialization (#15250)
* Add serialization code for state diffs Adds serialization code for state diffs. Adds code to create and apply state diffs Adds fuzz tests and benchmarks for serialization/deserialization Co-authored-by: Claude <noreply@anthropic.com> * Add Fulu support * Review #1 * gazelle * Fix some fuzzers * Failing cases from the fuzzers in consensus-types/hdiff * Fix more fuzz tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * add comparison tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Use ConvertToElectra in UpgradeToElectra * Add comments on constants * Fix readEth1Data * remove colons from error messages * Add design doc * Apply suggestions from code review Bast Co-authored-by: Bastin <43618253+Inspector-Butters@users.noreply.github.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Preston Van Loon <preston@pvl.dev> Co-authored-by: Bastin <43618253+Inspector-Butters@users.noreply.github.com>
This commit is contained in:
@@ -650,6 +650,11 @@ func InitializeFromProtoUnsafeFulu(st *ethpb.BeaconStateFulu) (state.BeaconState
|
||||
for i, v := range st.ProposerLookahead {
|
||||
proposerLookahead[i] = primitives.ValidatorIndex(v)
|
||||
}
|
||||
// Proposer lookahead must be exactly 2 * SLOTS_PER_EPOCH in length. We fill in with zeroes instead of erroring out here
|
||||
for i := len(proposerLookahead); i < 2*fieldparams.SlotsPerEpoch; i++ {
|
||||
proposerLookahead = append(proposerLookahead, 0)
|
||||
}
|
||||
|
||||
fieldCount := params.BeaconConfig().BeaconStateFuluFieldCount
|
||||
b := &BeaconState{
|
||||
version: version.Fulu,
|
||||
|
||||
Reference in New Issue
Block a user