From af06bb9737f42caef48cb2f01b452541599b28fe Mon Sep 17 00:00:00 2001 From: Nishant Das Date: Thu, 20 Jan 2022 14:54:21 +0800 Subject: [PATCH] Do Not Copy State During Upgrade (#10102) * no copy * no copy Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> --- beacon-chain/core/altair/upgrade.go | 2 +- beacon-chain/core/execution/upgrade.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon-chain/core/altair/upgrade.go b/beacon-chain/core/altair/upgrade.go index 04912f6e9..6e1f5c974 100644 --- a/beacon-chain/core/altair/upgrade.go +++ b/beacon-chain/core/altair/upgrade.go @@ -95,7 +95,7 @@ func UpgradeToAltair(ctx context.Context, state state.BeaconState) (state.Beacon InactivityScores: make([]uint64, numValidators), } - newState, err := statealtair.InitializeFromProto(s) + newState, err := statealtair.InitializeFromProtoUnsafe(s) if err != nil { return nil, err } diff --git a/beacon-chain/core/execution/upgrade.go b/beacon-chain/core/execution/upgrade.go index 3a70f4b22..c040a2ff2 100644 --- a/beacon-chain/core/execution/upgrade.go +++ b/beacon-chain/core/execution/upgrade.go @@ -82,5 +82,5 @@ func UpgradeToMerge(ctx context.Context, state state.BeaconState) (state.BeaconS }, } - return v3.InitializeFromProto(s) + return v3.InitializeFromProtoUnsafe(s) }