From 04e29d77fd5ac3038dbf65c0227f59b68a617f1c Mon Sep 17 00:00:00 2001 From: Leo Lara Date: Mon, 10 Jan 2022 23:47:30 +0700 Subject: [PATCH] #10036 Replace codename Merge with Bellatrix (1st step) (#10044) * Rename BeaconStateMerge to BeaconStateBellatrix * Rename version.Merge to version.Bellatrix * Rename ComputeFieldRootsWithHasherMerge to ComputeFieldRootsWithHasherBellatrix * Rename test names to Bellatrix * Rename comments and strings to Bellatrix * Fix formatting in a few files * Revert wrong renaming in test name * Revert renaming to Bellatrix in mainnet_config.go * Revert renaming of db key without migration * Regenerate from proto changes * Rename new use of already renamed symbols * gofmt and goimports after regenerating protofiles * revert weird imports Co-authored-by: prestonvanloon (cherry picked from commit b1c24546581d12ad9850fe8e1caf5be187b8fa3a) # Conflicts: # beacon-chain/cache/sync_committee_head_state.go # beacon-chain/core/execution/upgrade.go # beacon-chain/state-proto/v3/state_trie.go --- beacon-chain/blockchain/metrics.go | 2 +- .../cache/sync_committee_head_state_test.go | 12 +- beacon-chain/core/altair/epoch_precompute.go | 4 +- .../core/altair/epoch_precompute_test.go | 8 +- beacon-chain/core/altair/transition.go | 4 +- beacon-chain/core/altair/transition_test.go | 2 +- beacon-chain/core/blocks/attester_slashing.go | 2 +- .../core/blocks/attester_slashing_test.go | 2 +- beacon-chain/core/blocks/payload_test.go | 2 +- beacon-chain/core/blocks/proposer_slashing.go | 2 +- .../core/blocks/proposer_slashing_test.go | 2 +- .../core/epoch/precompute/attestation.go | 2 +- .../core/epoch/precompute/attestation_test.go | 4 +- beacon-chain/core/execution/upgrade.go | 2 +- beacon-chain/core/execution/upgrade_test.go | 2 +- beacon-chain/core/time/slot_epoch.go | 8 +- beacon-chain/core/time/slot_epoch_test.go | 10 +- beacon-chain/core/transition/transition.go | 4 +- .../transition/transition_no_verify_sig.go | 8 +- .../core/transition/transition_test.go | 8 +- beacon-chain/db/kv/block_merge_test.go | 32 +- beacon-chain/db/kv/blocks.go | 6 +- beacon-chain/db/kv/key.go | 4 +- beacon-chain/db/kv/schema.go | 4 +- beacon-chain/db/kv/state.go | 16 +- beacon-chain/db/kv/state_test.go | 6 +- .../state-native/stateutil/state_hasher.go | 12 +- beacon-chain/state-native/types/types.go | 6 +- .../state-native/v3/deprecated_getters.go | 4 +- .../v3/deprecated_getters_test.go | 4 +- .../state-native/v3/deprecated_setters.go | 10 +- .../v3/deprecated_setters_test.go | 8 +- beacon-chain/state-native/v3/field_roots.go | 6 +- .../state-native/v3/getters_block_test.go | 12 +- beacon-chain/state-native/v3/getters_misc.go | 2 +- beacon-chain/state-native/v3/getters_state.go | 8 +- beacon-chain/state-native/v3/getters_test.go | 4 +- beacon-chain/state-native/v3/setters_test.go | 6 +- beacon-chain/state-native/v3/state_trie.go | 18 +- .../state-native/v3/state_trie_test.go | 14 +- beacon-chain/state-native/v3/types.go | 4 +- .../state-proto/stateutil/state_hasher.go | 12 +- beacon-chain/state-proto/types/types.go | 6 +- .../state-proto/v3/deprecated_getters.go | 4 +- .../state-proto/v3/deprecated_getters_test.go | 4 +- .../state-proto/v3/deprecated_setters.go | 10 +- .../state-proto/v3/deprecated_setters_test.go | 8 +- beacon-chain/state-proto/v3/field_roots.go | 6 +- .../state-proto/v3/getters_block_test.go | 12 +- beacon-chain/state-proto/v3/getters_misc.go | 2 +- beacon-chain/state-proto/v3/getters_state.go | 8 +- beacon-chain/state-proto/v3/getters_test.go | 4 +- beacon-chain/state-proto/v3/setters_test.go | 6 +- beacon-chain/state-proto/v3/state_trie.go | 18 +- .../state-proto/v3/state_trie_test.go | 14 +- beacon-chain/state-proto/v3/types.go | 4 +- cmd/beacon-chain/flags/base.go | 2 +- config/params/config.go | 48 +- config/params/mainnet_config.go | 34 +- proto/eth/ext/options.pb.go | 14 +- proto/prysm/v1alpha1/BUILD.bazel | 2 +- proto/prysm/v1alpha1/beacon_block.proto | 6 +- proto/prysm/v1alpha1/beacon_state.pb.go | 410 +++++++++--------- proto/prysm/v1alpha1/beacon_state.proto | 4 +- proto/prysm/v1alpha1/cloners_test.go | 22 +- proto/prysm/v1alpha1/generated.ssz.go | 24 +- .../validator-client/keymanager.proto | 2 +- proto/prysm/v1alpha1/wrapper/beacon_block.go | 4 +- .../v1alpha1/wrapper/beacon_block_test.go | 70 +-- runtime/version/fork.go | 6 +- testing/util/merge_state.go | 14 +- testing/util/merge_state_test.go | 6 +- .../keymanager/remote-web3signer/client.go | 2 +- 73 files changed, 532 insertions(+), 532 deletions(-) diff --git a/beacon-chain/blockchain/metrics.go b/beacon-chain/blockchain/metrics.go index addd1fce7575..ec8dfadf4dc4 100644 --- a/beacon-chain/blockchain/metrics.go +++ b/beacon-chain/blockchain/metrics.go @@ -253,7 +253,7 @@ func reportEpochMetrics(ctx context.Context, postState, headState state.BeaconSt if err != nil { return err } - case version.Altair, version.Merge: + case version.Altair, version.Bellatrix: v, b, err = altair.InitializePrecomputeValidators(ctx, headState) if err != nil { return err diff --git a/beacon-chain/cache/sync_committee_head_state_test.go b/beacon-chain/cache/sync_committee_head_state_test.go index 0a50993926f8..2768f2685b71 100644 --- a/beacon-chain/cache/sync_committee_head_state_test.go +++ b/beacon-chain/cache/sync_committee_head_state_test.go @@ -28,7 +28,7 @@ func TestSyncCommitteeHeadState(t *testing.T) { }, }) require.NoError(t, err) - mergeState, err := v3.InitializeFromProto(ðpb.BeaconStateMerge{ + bellatrixState, err := v3.InitializeFromProto(ðpb.BeaconStateBellatrix{ Fork: ðpb.Fork{ PreviousVersion: params.BeaconConfig().GenesisForkVersion, CurrentVersion: params.BeaconConfig().GenesisForkVersion, @@ -91,22 +91,22 @@ func TestSyncCommitteeHeadState(t *testing.T) { want: beaconState, }, { - name: "not found when non-existent key in non-empty cache (merge state)", + name: "not found when non-existent key in non-empty cache (bellatrix state)", key: types.Slot(2), put: &put{ slot: types.Slot(1), - state: mergeState, + state: bellatrixState, }, wantErr: true, }, { - name: "found with key (merge state)", + name: "found with key (bellatrix state)", key: types.Slot(100), put: &put{ slot: types.Slot(100), - state: mergeState, + state: bellatrixState, }, - want: mergeState, + want: bellatrixState, }, } for _, tt := range tests { diff --git a/beacon-chain/core/altair/epoch_precompute.go b/beacon-chain/core/altair/epoch_precompute.go index 55d1df9c174d..6e13642db456 100644 --- a/beacon-chain/core/altair/epoch_precompute.go +++ b/beacon-chain/core/altair/epoch_precompute.go @@ -267,13 +267,13 @@ func AttestationsDelta(beaconState state.BeaconState, bal *precompute.Balance, v baseRewardMultiplier := increment * factor / math.IntegerSquareRoot(bal.ActiveCurrentEpoch) leak := helpers.IsInInactivityLeak(prevEpoch, finalizedEpoch) - // Modified in Altair and Merge. + // Modified in Altair and Bellatrix. var inactivityDenominator uint64 bias := cfg.InactivityScoreBias switch beaconState.Version() { case version.Altair: inactivityDenominator = bias * cfg.InactivityPenaltyQuotientAltair - case version.Merge: + case version.Bellatrix: inactivityDenominator = bias * cfg.InactivityPenaltyQuotientMerge default: return nil, nil, errors.Errorf("invalid state type version: %T", beaconState.Version()) diff --git a/beacon-chain/core/altair/epoch_precompute_test.go b/beacon-chain/core/altair/epoch_precompute_test.go index 6003fc8f1c44..39df4e7ba6a2 100644 --- a/beacon-chain/core/altair/epoch_precompute_test.go +++ b/beacon-chain/core/altair/epoch_precompute_test.go @@ -238,8 +238,8 @@ func TestAttestationsDelta(t *testing.T) { require.DeepEqual(t, want, penalties) } -func TestAttestationsDeltaMerge(t *testing.T) { - s, err := testStateMerge() +func TestAttestationsDeltaBellatrix(t *testing.T) { + s, err := testStateBellatrix() require.NoError(t, err) validators, balance, err := InitializePrecomputeValidators(context.Background(), s) require.NoError(t, err) @@ -493,7 +493,7 @@ func testState() (state.BeaconState, error) { }) } -func testStateMerge() (state.BeaconState, error) { +func testStateBellatrix() (state.BeaconState, error) { generateParticipation := func(flags ...uint8) byte { b := byte(0) var err error @@ -505,7 +505,7 @@ func testStateMerge() (state.BeaconState, error) { } return b } - return v3.InitializeFromProto(ðpb.BeaconStateMerge{ + return v3.InitializeFromProto(ðpb.BeaconStateBellatrix{ Slot: 2 * params.BeaconConfig().SlotsPerEpoch, Validators: []*ethpb.Validator{ {EffectiveBalance: params.BeaconConfig().MaxEffectiveBalance, ExitEpoch: params.BeaconConfig().FarFutureEpoch}, diff --git a/beacon-chain/core/altair/transition.go b/beacon-chain/core/altair/transition.go index aca5a9fb5ce5..45de75921370 100644 --- a/beacon-chain/core/altair/transition.go +++ b/beacon-chain/core/altair/transition.go @@ -69,7 +69,7 @@ func ProcessEpoch(ctx context.Context, state state.BeaconState) (state.BeaconSta return nil, errors.Wrap(err, "could not process registry updates") } - // Modified in Altair and Merge. + // Modified in Altair and Bellatrix. cfg := params.BeaconConfig() switch state.Version() { case version.Altair: @@ -77,7 +77,7 @@ func ProcessEpoch(ctx context.Context, state state.BeaconState) (state.BeaconSta if err != nil { return nil, err } - case version.Merge: + case version.Bellatrix: state, err = e.ProcessSlashings(state, cfg.ProportionalSlashingMultiplierMerge) if err != nil { return nil, err diff --git a/beacon-chain/core/altair/transition_test.go b/beacon-chain/core/altair/transition_test.go index 0c97b2ee9338..31f68c0503a2 100644 --- a/beacon-chain/core/altair/transition_test.go +++ b/beacon-chain/core/altair/transition_test.go @@ -42,7 +42,7 @@ func TestProcessEpoch_CanProcess(t *testing.T) { require.Equal(t, params.BeaconConfig().SyncCommitteeSize, uint64(len(sc.Pubkeys))) } -func TestProcessEpoch_CanProcessMerge(t *testing.T) { +func TestProcessEpoch_CanProcessBellatrix(t *testing.T) { st, _ := util.DeterministicGenesisStateMerge(t, params.BeaconConfig().MaxValidatorsPerCommittee) require.NoError(t, st.SetSlot(10*params.BeaconConfig().SlotsPerEpoch)) newState, err := altair.ProcessEpoch(context.Background(), st) diff --git a/beacon-chain/core/blocks/attester_slashing.go b/beacon-chain/core/blocks/attester_slashing.go index 0ea381fd68c0..a5c327242ee5 100644 --- a/beacon-chain/core/blocks/attester_slashing.go +++ b/beacon-chain/core/blocks/attester_slashing.go @@ -83,7 +83,7 @@ func ProcessAttesterSlashing( slashingQuotient = cfg.MinSlashingPenaltyQuotient case beaconState.Version() == version.Altair: slashingQuotient = cfg.MinSlashingPenaltyQuotientAltair - case beaconState.Version() == version.Merge: + case beaconState.Version() == version.Bellatrix: slashingQuotient = cfg.MinSlashingPenaltyQuotientMerge default: return nil, errors.New("unknown state version") diff --git a/beacon-chain/core/blocks/attester_slashing_test.go b/beacon-chain/core/blocks/attester_slashing_test.go index e7e260a93f9b..831dcdcdaafb 100644 --- a/beacon-chain/core/blocks/attester_slashing_test.go +++ b/beacon-chain/core/blocks/attester_slashing_test.go @@ -234,7 +234,7 @@ func TestProcessAttesterSlashings_AppliesCorrectStatusAltair(t *testing.T) { require.Equal(t, uint64(32000000000), newState.Balances()[2]) } -func TestProcessAttesterSlashings_AppliesCorrectStatusMerge(t *testing.T) { +func TestProcessAttesterSlashings_AppliesCorrectStatusBellatrix(t *testing.T) { beaconState, privKeys := util.DeterministicGenesisStateMerge(t, 100) for _, vv := range beaconState.Validators() { vv.WithdrawableEpoch = types.Epoch(params.BeaconConfig().SlotsPerEpoch) diff --git a/beacon-chain/core/blocks/payload_test.go b/beacon-chain/core/blocks/payload_test.go index 0fccb1d1dda8..f491d9fb9ee3 100644 --- a/beacon-chain/core/blocks/payload_test.go +++ b/beacon-chain/core/blocks/payload_test.go @@ -610,7 +610,7 @@ func Test_PayloadToHeader(t *testing.T) { require.Equal(t, h.Timestamp, uint64(0)) } -func BenchmarkMergeComplete(b *testing.B) { +func BenchmarkBellatrixComplete(b *testing.B) { st, _ := util.DeterministicGenesisStateMerge(b, 1) require.NoError(b, st.SetLatestExecutionPayloadHeader(emptyPayloadHeader())) diff --git a/beacon-chain/core/blocks/proposer_slashing.go b/beacon-chain/core/blocks/proposer_slashing.go index 3eb82348ec35..de5bb69b1a47 100644 --- a/beacon-chain/core/blocks/proposer_slashing.go +++ b/beacon-chain/core/blocks/proposer_slashing.go @@ -81,7 +81,7 @@ func ProcessProposerSlashing( slashingQuotient = cfg.MinSlashingPenaltyQuotient case beaconState.Version() == version.Altair: slashingQuotient = cfg.MinSlashingPenaltyQuotientAltair - case beaconState.Version() == version.Merge: + case beaconState.Version() == version.Bellatrix: slashingQuotient = cfg.MinSlashingPenaltyQuotientMerge default: return nil, errors.New("unknown state version") diff --git a/beacon-chain/core/blocks/proposer_slashing_test.go b/beacon-chain/core/blocks/proposer_slashing_test.go index 951e935d983e..ca19717d01a4 100644 --- a/beacon-chain/core/blocks/proposer_slashing_test.go +++ b/beacon-chain/core/blocks/proposer_slashing_test.go @@ -234,7 +234,7 @@ func TestProcessProposerSlashings_AppliesCorrectStatusAltair(t *testing.T) { require.Equal(t, uint64(32000000000), newState.Balances()[2]) } -func TestProcessProposerSlashings_AppliesCorrectStatusMerge(t *testing.T) { +func TestProcessProposerSlashings_AppliesCorrectStatusBellatrix(t *testing.T) { // We test the case when data is correct and verify the validator // registry has been updated. beaconState, privKeys := util.DeterministicGenesisStateMerge(t, 100) diff --git a/beacon-chain/core/epoch/precompute/attestation.go b/beacon-chain/core/epoch/precompute/attestation.go index 699680bf891a..54c8e17b5791 100644 --- a/beacon-chain/core/epoch/precompute/attestation.go +++ b/beacon-chain/core/epoch/precompute/attestation.go @@ -183,7 +183,7 @@ func UpdateBalance(vp []*Validator, bBal *Balance, stateVersion int) *Balance { if stateVersion == version.Phase0 && v.IsPrevEpochAttester { bBal.PrevEpochAttested += v.CurrentEpochEffectiveBalance } - if (stateVersion == version.Altair || stateVersion == version.Merge) && v.IsPrevEpochSourceAttester { + if (stateVersion == version.Altair || stateVersion == version.Bellatrix) && v.IsPrevEpochSourceAttester { bBal.PrevEpochAttested += v.CurrentEpochEffectiveBalance } if v.IsPrevEpochTargetAttester { diff --git a/beacon-chain/core/epoch/precompute/attestation_test.go b/beacon-chain/core/epoch/precompute/attestation_test.go index 0b16eb638546..3038c9641157 100644 --- a/beacon-chain/core/epoch/precompute/attestation_test.go +++ b/beacon-chain/core/epoch/precompute/attestation_test.go @@ -70,7 +70,7 @@ func TestUpdateBalance(t *testing.T) { assert.DeepEqual(t, wantedPBal, pBal, "Incorrect balance calculations") } -func TestUpdateBalanceMergeVersion(t *testing.T) { +func TestUpdateBalanceBellatrixVersion(t *testing.T) { vp := []*precompute.Validator{ {IsCurrentEpochAttester: true, CurrentEpochEffectiveBalance: 100 * params.BeaconConfig().EffectiveBalanceIncrement}, {IsCurrentEpochTargetAttester: true, IsCurrentEpochAttester: true, CurrentEpochEffectiveBalance: 100 * params.BeaconConfig().EffectiveBalanceIncrement}, @@ -90,7 +90,7 @@ func TestUpdateBalanceMergeVersion(t *testing.T) { PrevEpochTargetAttested: 100 * params.BeaconConfig().EffectiveBalanceIncrement, PrevEpochHeadAttested: 200 * params.BeaconConfig().EffectiveBalanceIncrement, } - pBal := precompute.UpdateBalance(vp, &precompute.Balance{}, version.Merge) + pBal := precompute.UpdateBalance(vp, &precompute.Balance{}, version.Bellatrix) assert.DeepEqual(t, wantedPBal, pBal, "Incorrect balance calculations") } diff --git a/beacon-chain/core/execution/upgrade.go b/beacon-chain/core/execution/upgrade.go index 2f60458352d9..6990362c09cf 100644 --- a/beacon-chain/core/execution/upgrade.go +++ b/beacon-chain/core/execution/upgrade.go @@ -36,7 +36,7 @@ func UpgradeToMerge(ctx context.Context, state state.BeaconState) (state.BeaconS return nil, err } - s := ðpb.BeaconStateMerge{ + s := ðpb.BeaconStateBellatrix{ GenesisTime: state.GenesisTime(), GenesisValidatorsRoot: state.GenesisValidatorRoot(), Slot: state.Slot(), diff --git a/beacon-chain/core/execution/upgrade_test.go b/beacon-chain/core/execution/upgrade_test.go index 54d0fb982ec7..3368ff580a86 100644 --- a/beacon-chain/core/execution/upgrade_test.go +++ b/beacon-chain/core/execution/upgrade_test.go @@ -12,7 +12,7 @@ import ( "github.com/prysmaticlabs/prysm/testing/util" ) -func TestUpgradeToMerge(t *testing.T) { +func TestUpgradeToBellatrix(t *testing.T) { st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().MaxValidatorsPerCommittee) preForkState := st.Copy() mSt, err := execution.UpgradeToMerge(context.Background(), st) diff --git a/beacon-chain/core/time/slot_epoch.go b/beacon-chain/core/time/slot_epoch.go index 8e0506d036e2..3561c02f7910 100644 --- a/beacon-chain/core/time/slot_epoch.go +++ b/beacon-chain/core/time/slot_epoch.go @@ -60,14 +60,14 @@ func CanUpgradeToAltair(slot types.Slot) bool { return epochStart && altairEpoch } -// CanUpgradeToMerge returns true if the input `slot` can upgrade to Bellatrix fork. +// CanUpgradeToBellatrix returns true if the input `slot` can upgrade to Bellatrix fork. // // Spec code: // If state.slot % SLOTS_PER_EPOCH == 0 and compute_epoch_at_slot(state.slot) == BELLATRIX_FORK_EPOCH -func CanUpgradeToMerge(slot types.Slot) bool { +func CanUpgradeToBellatrix(slot types.Slot) bool { epochStart := slots.IsEpochStart(slot) - mergeEpoch := slots.ToEpoch(slot) == params.BeaconConfig().BellatrixForkEpoch - return epochStart && mergeEpoch + bellatrixEpoch := slots.ToEpoch(slot) == params.BeaconConfig().BellatrixForkEpoch + return epochStart && bellatrixEpoch } // CanProcessEpoch checks the eligibility to process epoch. diff --git a/beacon-chain/core/time/slot_epoch_test.go b/beacon-chain/core/time/slot_epoch_test.go index 843bad5e3021..ce6fb6a12bca 100644 --- a/beacon-chain/core/time/slot_epoch_test.go +++ b/beacon-chain/core/time/slot_epoch_test.go @@ -115,7 +115,7 @@ func TestCanUpgradeToAltair(t *testing.T) { } } -func TestCanUpgradeToMerge(t *testing.T) { +func TestCanUpgradeBellatrix(t *testing.T) { params.SetupTestConfigCleanup(t) bc := params.BeaconConfig() bc.BellatrixForkEpoch = 5 @@ -131,20 +131,20 @@ func TestCanUpgradeToMerge(t *testing.T) { want: false, }, { - name: "not merge epoch", + name: "not bellatrix epoch", slot: params.BeaconConfig().SlotsPerEpoch, want: false, }, { - name: "merge epoch", + name: "bellatrix epoch", slot: types.Slot(params.BeaconConfig().BellatrixForkEpoch) * params.BeaconConfig().SlotsPerEpoch, want: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := CanUpgradeToMerge(tt.slot); got != tt.want { - t.Errorf("CanUpgradeToMerge() = %v, want %v", got, tt.want) + if got := CanUpgradeToBellatrix(tt.slot); got != tt.want { + t.Errorf("CanUpgradeToBellatrix() = %v, want %v", got, tt.want) } }) } diff --git a/beacon-chain/core/transition/transition.go b/beacon-chain/core/transition/transition.go index f4cba3b8aedf..1a040fc7e8d2 100644 --- a/beacon-chain/core/transition/transition.go +++ b/beacon-chain/core/transition/transition.go @@ -242,7 +242,7 @@ func ProcessSlots(ctx context.Context, state state.BeaconState, slot types.Slot) tracing.AnnotateError(span, err) return nil, errors.Wrap(err, "could not process epoch with optimizations") } - case version.Altair, version.Merge: + case version.Altair, version.Bellatrix: state, err = altair.ProcessEpoch(ctx, state) if err != nil { tracing.AnnotateError(span, err) @@ -265,7 +265,7 @@ func ProcessSlots(ctx context.Context, state state.BeaconState, slot types.Slot) } } - if time.CanUpgradeToMerge(state.Slot()) { + if time.CanUpgradeToBellatrix(state.Slot()) { state, err = execution.UpgradeToMerge(ctx, state) if err != nil { tracing.AnnotateError(span, err) diff --git a/beacon-chain/core/transition/transition_no_verify_sig.go b/beacon-chain/core/transition/transition_no_verify_sig.go index b33751e98d73..747009573fe9 100644 --- a/beacon-chain/core/transition/transition_no_verify_sig.go +++ b/beacon-chain/core/transition/transition_no_verify_sig.go @@ -152,7 +152,7 @@ func CalculateStateRoot( if err != nil { return [32]byte{}, errors.Wrap(err, "could not process block") } - if signed.Version() == version.Altair || signed.Version() == version.Merge { + if signed.Version() == version.Altair || signed.Version() == version.Bellatrix { sa, err := signed.Block().Body().SyncAggregate() if err != nil { return [32]byte{}, err @@ -198,7 +198,7 @@ func ProcessBlockNoVerifyAnySig( if err != nil { return nil, nil, err } - if signed.Version() == version.Altair || signed.Version() == version.Merge { + if signed.Version() == version.Altair || signed.Version() == version.Bellatrix { sa, err := signed.Block().Body().SyncAggregate() if err != nil { return nil, nil, err @@ -273,7 +273,7 @@ func ProcessOperationsNoVerifyAttsSigs( if err != nil { return nil, err } - case version.Altair, version.Merge: + case version.Altair, version.Bellatrix: state, err = altairOperations(ctx, state, signedBeaconBlock) if err != nil { return nil, err @@ -320,7 +320,7 @@ func ProcessBlockForStateRoot( return nil, errors.Wrap(err, "could not process block header") } - if state.Version() == version.Merge { + if state.Version() == version.Bellatrix { enabled, err := b.ExecutionEnabled(state, blk.Body()) if err != nil { return nil, errors.Wrap(err, "could not check if execution is enabled") diff --git a/beacon-chain/core/transition/transition_test.go b/beacon-chain/core/transition/transition_test.go index 8d55e38a5657..972dbd4a4f54 100644 --- a/beacon-chain/core/transition/transition_test.go +++ b/beacon-chain/core/transition/transition_test.go @@ -551,7 +551,7 @@ func TestProcessSlots_OnlyAltairEpoch(t *testing.T) { require.Equal(t, params.BeaconConfig().SyncCommitteeSize, uint64(len(sc.Pubkeys))) } -func TestProcessSlots_OnlyMergeEpoch(t *testing.T) { +func TestProcessSlots_OnlyBellatrixEpoch(t *testing.T) { transition.SkipSlotCache.Disable() conf := params.BeaconConfig() conf.BellatrixForkEpoch = 5 @@ -560,10 +560,10 @@ func TestProcessSlots_OnlyMergeEpoch(t *testing.T) { st, _ := util.DeterministicGenesisStateMerge(t, params.BeaconConfig().MaxValidatorsPerCommittee) require.NoError(t, st.SetSlot(params.BeaconConfig().SlotsPerEpoch*6)) - require.Equal(t, version.Merge, st.Version()) + require.Equal(t, version.Bellatrix, st.Version()) st, err := transition.ProcessSlots(context.Background(), st, params.BeaconConfig().SlotsPerEpoch*10) require.NoError(t, err) - require.Equal(t, version.Merge, st.Version()) + require.Equal(t, version.Bellatrix, st.Version()) require.Equal(t, params.BeaconConfig().SlotsPerEpoch*10, st.Slot()) @@ -598,7 +598,7 @@ func TestProcessSlots_ThroughMergeEpoch(t *testing.T) { st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().MaxValidatorsPerCommittee) st, err := transition.ProcessSlots(context.Background(), st, params.BeaconConfig().SlotsPerEpoch*10) require.NoError(t, err) - require.Equal(t, version.Merge, st.Version()) + require.Equal(t, version.Bellatrix, st.Version()) require.Equal(t, params.BeaconConfig().SlotsPerEpoch*10, st.Slot()) } diff --git a/beacon-chain/db/kv/block_merge_test.go b/beacon-chain/db/kv/block_merge_test.go index 224ee5998c64..631372556d19 100644 --- a/beacon-chain/db/kv/block_merge_test.go +++ b/beacon-chain/db/kv/block_merge_test.go @@ -18,7 +18,7 @@ import ( "google.golang.org/protobuf/proto" ) -func TestStore_SaveMergeBlock_NoDuplicates(t *testing.T) { +func TestStore_SaveBellatrixBlock_NoDuplicates(t *testing.T) { BlockCacheSize = 1 db := setupDB(t) slot := types.Slot(20) @@ -49,7 +49,7 @@ func TestStore_SaveMergeBlock_NoDuplicates(t *testing.T) { BlockCacheSize = 256 } -func TestStore_MergeBlocksCRUD(t *testing.T) { +func TestStore_BellatrixBlocksCRUD(t *testing.T) { db := setupDB(t) ctx := context.Background() @@ -73,7 +73,7 @@ func TestStore_MergeBlocksCRUD(t *testing.T) { assert.Equal(t, false, db.HasBlock(ctx, blockRoot), "Expected block to have been deleted from the db") } -func TestStore_MergeBlocksBatchDelete(t *testing.T) { +func TestStore_BellatrixBlocksBatchDelete(t *testing.T) { db := setupDB(t) ctx := context.Background() numBlocks := 10 @@ -112,7 +112,7 @@ func TestStore_MergeBlocksBatchDelete(t *testing.T) { } } -func TestStore_MergeBlocksHandleZeroCase(t *testing.T) { +func TestStore_BellatrixBlocksHandleZeroCase(t *testing.T) { db := setupDB(t) ctx := context.Background() numBlocks := 10 @@ -134,7 +134,7 @@ func TestStore_MergeBlocksHandleZeroCase(t *testing.T) { assert.Equal(t, 1, len(retrieved), "Unexpected number of blocks received, expected one") } -func TestStore_MergeBlocksHandleInvalidEndSlot(t *testing.T) { +func TestStore_BellatrixBlocksHandleInvalidEndSlot(t *testing.T) { db := setupDB(t) ctx := context.Background() numBlocks := 10 @@ -161,7 +161,7 @@ func TestStore_MergeBlocksHandleInvalidEndSlot(t *testing.T) { assert.Equal(t, 1, len(requested), "Unexpected number of blocks received, only expected two") } -func TestStore_MergeBlocksCRUD_NoCache(t *testing.T) { +func TestStore_BellatrixBlocksCRUD_NoCache(t *testing.T) { db := setupDB(t) ctx := context.Background() block := util.NewBeaconBlockMerge() @@ -184,7 +184,7 @@ func TestStore_MergeBlocksCRUD_NoCache(t *testing.T) { assert.Equal(t, false, db.HasBlock(ctx, blockRoot), "Expected block to have been deleted from the db") } -func TestStore_MergeBlocks_FiltersCorrectly(t *testing.T) { +func TestStore_BellatrixBlocks_FiltersCorrectly(t *testing.T) { db := setupDB(t) b4 := util.NewBeaconBlockMerge() b4.Block.Slot = 4 @@ -272,7 +272,7 @@ func TestStore_MergeBlocks_FiltersCorrectly(t *testing.T) { } } -func TestStore_MergeBlocks_VerifyBlockRoots(t *testing.T) { +func TestStore_BellatrixBlocks_VerifyBlockRoots(t *testing.T) { ctx := context.Background() db := setupDB(t) b1 := util.NewBeaconBlockMerge() @@ -297,7 +297,7 @@ func TestStore_MergeBlocks_VerifyBlockRoots(t *testing.T) { assert.DeepEqual(t, [][32]byte{r1, r2}, roots) } -func TestStore_MergeBlocks_Retrieve_SlotRange(t *testing.T) { +func TestStore_BellatrixBlocks_Retrieve_SlotRange(t *testing.T) { db := setupDB(t) totalBlocks := make([]block.SignedBeaconBlock, 500) for i := 0; i < 500; i++ { @@ -315,7 +315,7 @@ func TestStore_MergeBlocks_Retrieve_SlotRange(t *testing.T) { assert.Equal(t, 300, len(retrieved)) } -func TestStore_MergeBlocks_Retrieve_Epoch(t *testing.T) { +func TestStore_BellatrixBlocks_Retrieve_Epoch(t *testing.T) { db := setupDB(t) slots := params.BeaconConfig().SlotsPerEpoch.Mul(7) totalBlocks := make([]block.SignedBeaconBlock, slots) @@ -339,7 +339,7 @@ func TestStore_MergeBlocks_Retrieve_Epoch(t *testing.T) { assert.Equal(t, uint64(want), uint64(len(retrieved))) } -func TestStore_MergeBlocks_Retrieve_SlotRangeWithStep(t *testing.T) { +func TestStore_BellatrixBlocks_Retrieve_SlotRangeWithStep(t *testing.T) { db := setupDB(t) totalBlocks := make([]block.SignedBeaconBlock, 500) for i := 0; i < 500; i++ { @@ -361,7 +361,7 @@ func TestStore_MergeBlocks_Retrieve_SlotRangeWithStep(t *testing.T) { } } -func TestStore_SaveMergeBlock_CanGetHighestAt(t *testing.T) { +func TestStore_SaveBellatrixBlock_CanGetHighestAt(t *testing.T) { db := setupDB(t) ctx := context.Background() @@ -400,7 +400,7 @@ func TestStore_SaveMergeBlock_CanGetHighestAt(t *testing.T) { assert.Equal(t, true, proto.Equal(block2, highestAt[0].Proto()), "Wanted: %v, received: %v", block2, highestAt[0]) } -func TestStore_GenesisMergeBlock_CanGetHighestAt(t *testing.T) { +func TestStore_GenesisBellatrixBlock_CanGetHighestAt(t *testing.T) { db := setupDB(t) ctx := context.Background() @@ -428,7 +428,7 @@ func TestStore_GenesisMergeBlock_CanGetHighestAt(t *testing.T) { assert.Equal(t, true, proto.Equal(genesisBlock, highestAt[0].Proto()), "Wanted: %v, received: %v", genesisBlock, highestAt[0]) } -func TestStore_SaveMergeBlocks_HasCachedBlocks(t *testing.T) { +func TestStore_SaveBellatrixBlocks_HasCachedBlocks(t *testing.T) { db := setupDB(t) ctx := context.Background() @@ -451,7 +451,7 @@ func TestStore_SaveMergeBlocks_HasCachedBlocks(t *testing.T) { assert.Equal(t, 500, len(blks), "Did not get wanted blocks") } -func TestStore_SaveMergeBlocks_HasRootsMatched(t *testing.T) { +func TestStore_SaveBellatrixBlocks_HasRootsMatched(t *testing.T) { db := setupDB(t) ctx := context.Background() @@ -479,7 +479,7 @@ func TestStore_SaveMergeBlocks_HasRootsMatched(t *testing.T) { } } -func TestStore_MergeBlocksBySlot_BlockRootsBySlot(t *testing.T) { +func TestStore_BellatrixBlocksBySlot_BlockRootsBySlot(t *testing.T) { db := setupDB(t) ctx := context.Background() diff --git a/beacon-chain/db/kv/blocks.go b/beacon-chain/db/kv/blocks.go index 61f94eb81934..6d84f3342701 100644 --- a/beacon-chain/db/kv/blocks.go +++ b/beacon-chain/db/kv/blocks.go @@ -638,7 +638,7 @@ func unmarshalBlock(_ context.Context, enc []byte) (block.SignedBeaconBlock, err return wrapper.WrappedAltairSignedBeaconBlock(rawBlock) case hasMergeKey(enc): rawBlock := ðpb.SignedBeaconBlockMerge{} - err := rawBlock.UnmarshalSSZ(enc[len(mergeKey):]) + err := rawBlock.UnmarshalSSZ(enc[len(bellatrixKey):]) if err != nil { return nil, err } @@ -661,8 +661,8 @@ func marshalBlock(_ context.Context, blk block.SignedBeaconBlock) ([]byte, error return nil, err } switch blk.Version() { - case version.Merge: - return snappy.Encode(nil, append(mergeKey, obj...)), nil + case version.Bellatrix: + return snappy.Encode(nil, append(bellatrixKey, obj...)), nil case version.Altair: return snappy.Encode(nil, append(altairKey, obj...)), nil case version.Phase0: diff --git a/beacon-chain/db/kv/key.go b/beacon-chain/db/kv/key.go index 00aafe8aaa2a..cf18040c1a64 100644 --- a/beacon-chain/db/kv/key.go +++ b/beacon-chain/db/kv/key.go @@ -11,8 +11,8 @@ func hasAltairKey(enc []byte) bool { } func hasMergeKey(enc []byte) bool { - if len(mergeKey) >= len(enc) { + if len(bellatrixKey) >= len(enc) { return false } - return bytes.Equal(enc[:len(mergeKey)], mergeKey) + return bytes.Equal(enc[:len(bellatrixKey)], bellatrixKey) } diff --git a/beacon-chain/db/kv/schema.go b/beacon-chain/db/kv/schema.go index 40f4f4a6d450..f30e0c17e82c 100644 --- a/beacon-chain/db/kv/schema.go +++ b/beacon-chain/db/kv/schema.go @@ -46,8 +46,8 @@ var ( // Below keys are used to identify objects are to be fork compatible. // Objects that are only compatible with specific forks should be prefixed with such keys. - altairKey = []byte("altair") - mergeKey = []byte("merge") + altairKey = []byte("altair") + bellatrixKey = []byte("merge") // block root included in the beacon state used by weak subjectivity initial sync originBlockRootKey = []byte("origin-block-root") diff --git a/beacon-chain/db/kv/state.go b/beacon-chain/db/kv/state.go index 9e9101614313..94584918b0dc 100644 --- a/beacon-chain/db/kv/state.go +++ b/beacon-chain/db/kv/state.go @@ -161,7 +161,7 @@ func (s *Store) SaveStatesEfficient(ctx context.Context, states []state.ReadOnly return err } validators = pbState.Validators - case *ethpb.BeaconStateMerge: + case *ethpb.BeaconStateBellatrix: pbState, err := v3.ProtobufBeaconState(st.InnerStateUnsafe()) if err != nil { return err @@ -245,7 +245,7 @@ func (s *Store) SaveStatesEfficient(ctx context.Context, states []state.ReadOnly if err := valIdxBkt.Put(rt[:], validatorKeys[i]); err != nil { return err } - case *ethpb.BeaconStateMerge: + case *ethpb.BeaconStateBellatrix: pbState, err := v3.ProtobufBeaconState(rawType) if err != nil { return err @@ -259,7 +259,7 @@ func (s *Store) SaveStatesEfficient(ctx context.Context, states []state.ReadOnly if err != nil { return err } - encodedState := snappy.Encode(nil, append(mergeKey, rawObj...)) + encodedState := snappy.Encode(nil, append(bellatrixKey, rawObj...)) if err := bucket.Put(rt[:], encodedState); err != nil { return err } @@ -416,8 +416,8 @@ func (s *Store) unmarshalState(_ context.Context, enc []byte, validatorEntries [ switch { case hasMergeKey(enc): // Marshal state bytes to altair beacon state. - protoState := ðpb.BeaconStateMerge{} - if err := protoState.UnmarshalSSZ(enc[len(mergeKey):]); err != nil { + protoState := ðpb.BeaconStateBellatrix{} + if err := protoState.UnmarshalSSZ(enc[len(bellatrixKey):]); err != nil { return nil, errors.Wrap(err, "failed to unmarshal encoding for altair") } ok, err := s.isStateValidatorMigrationOver() @@ -481,8 +481,8 @@ func marshalState(ctx context.Context, st state.ReadOnlyBeaconState) ([]byte, er return nil, err } return snappy.Encode(nil, append(altairKey, rawObj...)), nil - case *ethpb.BeaconStateMerge: - rState, ok := st.InnerStateUnsafe().(*ethpb.BeaconStateMerge) + case *ethpb.BeaconStateBellatrix: + rState, ok := st.InnerStateUnsafe().(*ethpb.BeaconStateBellatrix) if !ok { return nil, errors.New("non valid inner state") } @@ -493,7 +493,7 @@ func marshalState(ctx context.Context, st state.ReadOnlyBeaconState) ([]byte, er if err != nil { return nil, err } - return snappy.Encode(nil, append(mergeKey, rawObj...)), nil + return snappy.Encode(nil, append(bellatrixKey, rawObj...)), nil default: return nil, errors.New("invalid inner state") } diff --git a/beacon-chain/db/kv/state_test.go b/beacon-chain/db/kv/state_test.go index 60bbacdd2326..a390955b077f 100644 --- a/beacon-chain/db/kv/state_test.go +++ b/beacon-chain/db/kv/state_test.go @@ -781,7 +781,7 @@ func checkStateReadTime(b *testing.B, saveCount int) { } } -func TestStateMerge_CanSaveRetrieveValidatorEntries(t *testing.T) { +func TestStateBellatrix_CanSaveRetrieveValidatorEntries(t *testing.T) { db := setupDB(t) // enable historical state representation flag to test this @@ -833,7 +833,7 @@ func TestStateMerge_CanSaveRetrieveValidatorEntries(t *testing.T) { require.NoError(t, err) } -func TestMergeState_CanSaveRetrieve(t *testing.T) { +func TestBellatrixState_CanSaveRetrieve(t *testing.T) { db := setupDB(t) r := [32]byte{'A'} @@ -856,7 +856,7 @@ func TestMergeState_CanSaveRetrieve(t *testing.T) { require.Equal(t, state.ReadOnlyBeaconState(nil), savedS, "Unsaved state should've been nil") } -func TestMergeState_CanDelete(t *testing.T) { +func TestBellatrixState_CanDelete(t *testing.T) { db := setupDB(t) r := [32]byte{'A'} diff --git a/beacon-chain/state-native/stateutil/state_hasher.go b/beacon-chain/state-native/stateutil/state_hasher.go index 8c901069d68a..2b010050ab06 100644 --- a/beacon-chain/state-native/stateutil/state_hasher.go +++ b/beacon-chain/state-native/stateutil/state_hasher.go @@ -18,8 +18,8 @@ import ( var ( // Set the map size as equal to that of the latest state field count. - leavesCache = make(map[string][][32]byte, params.BeaconConfig().BeaconStateMergeFieldCount) - layersCache = make(map[string][][][32]byte, params.BeaconConfig().BeaconStateMergeFieldCount) + leavesCache = make(map[string][][32]byte, params.BeaconConfig().BeaconStateBellatrixFieldCount) + layersCache = make(map[string][][][32]byte, params.BeaconConfig().BeaconStateBellatrixFieldCount) lock sync.RWMutex ) @@ -370,16 +370,16 @@ func (h *stateRootHasher) ComputeFieldRootsWithHasherAltair(ctx context.Context, return fieldRoots, nil } -// ComputeFieldRootsWithHasherMerge hashes the provided merge state and returns its respective field roots. -func (h *stateRootHasher) ComputeFieldRootsWithHasherMerge(ctx context.Context, state *ethpb.BeaconStateMerge) ([][]byte, error) { - _, span := trace.StartSpan(ctx, "hasher.ComputeFieldRootsWithHasherMerge") +// ComputeFieldRootsWithHasherBellatrix hashes the provided bellatrix state and returns its respective field roots. +func (h *stateRootHasher) ComputeFieldRootsWithHasherBellatrix(ctx context.Context, state *ethpb.BeaconStateBellatrix) ([][]byte, error) { + _, span := trace.StartSpan(ctx, "hasher.ComputeFieldRootsWithHasherBellatrix") defer span.End() if state == nil { return nil, errors.New("nil state") } hasher := hash.CustomSHA256Hasher() - fieldRoots := make([][]byte, params.BeaconConfig().BeaconStateMergeFieldCount) + fieldRoots := make([][]byte, params.BeaconConfig().BeaconStateBellatrixFieldCount) // Genesis time root. genesisRoot := ssz.Uint64Root(state.GenesisTime) diff --git a/beacon-chain/state-native/types/types.go b/beacon-chain/state-native/types/types.go index 53c025347192..aebe8e981080 100644 --- a/beacon-chain/state-native/types/types.go +++ b/beacon-chain/state-native/types/types.go @@ -59,12 +59,12 @@ func (f FieldIndex) String(stateVersion int) string { case Slashings: return "slashings" case PreviousEpochAttestations: - if version.Altair == stateVersion || version.Merge == stateVersion { + if version.Altair == stateVersion || version.Bellatrix == stateVersion { return "previousEpochParticipationBits" } return "previousEpochAttestations" case CurrentEpochAttestations: - if version.Altair == stateVersion || version.Merge == stateVersion { + if version.Altair == stateVersion || version.Bellatrix == stateVersion { return "currentEpochParticipationBits" } return "currentEpochAttestations" @@ -132,7 +132,7 @@ const ( InactivityScores CurrentSyncCommittee NextSyncCommittee - // State fields added in Merge. + // State fields added in Bellatrix. LatestExecutionPayloadHeader ) diff --git a/beacon-chain/state-native/v3/deprecated_getters.go b/beacon-chain/state-native/v3/deprecated_getters.go index 846ace35e294..d02110aeb6f0 100644 --- a/beacon-chain/state-native/v3/deprecated_getters.go +++ b/beacon-chain/state-native/v3/deprecated_getters.go @@ -7,10 +7,10 @@ import ( // PreviousEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) PreviousEpochAttestations() ([]*ethpb.PendingAttestation, error) { - return nil, errors.New("PreviousEpochAttestations is not supported for version Merge beacon state") + return nil, errors.New("PreviousEpochAttestations is not supported for version Bellatrix beacon state") } // CurrentEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) CurrentEpochAttestations() ([]*ethpb.PendingAttestation, error) { - return nil, errors.New("CurrentEpochAttestations is not supported for version Merge beacon state") + return nil, errors.New("CurrentEpochAttestations is not supported for version Bellatrix beacon state") } diff --git a/beacon-chain/state-native/v3/deprecated_getters_test.go b/beacon-chain/state-native/v3/deprecated_getters_test.go index 3488b284e5ba..0907bc639175 100644 --- a/beacon-chain/state-native/v3/deprecated_getters_test.go +++ b/beacon-chain/state-native/v3/deprecated_getters_test.go @@ -9,11 +9,11 @@ import ( func TestBeaconState_CurrentEpochAttestations(t *testing.T) { s := &BeaconState{} _, err := s.CurrentEpochAttestations() - require.ErrorContains(t, "CurrentEpochAttestations is not supported for version Merge beacon state", err) + require.ErrorContains(t, "CurrentEpochAttestations is not supported for version Bellatrix beacon state", err) } func TestBeaconState_PreviousEpochAttestations(t *testing.T) { s := &BeaconState{} _, err := s.PreviousEpochAttestations() - require.ErrorContains(t, "PreviousEpochAttestations is not supported for version Merge beacon state", err) + require.ErrorContains(t, "PreviousEpochAttestations is not supported for version Bellatrix beacon state", err) } diff --git a/beacon-chain/state-native/v3/deprecated_setters.go b/beacon-chain/state-native/v3/deprecated_setters.go index 53c61280fd37..42c867718630 100644 --- a/beacon-chain/state-native/v3/deprecated_setters.go +++ b/beacon-chain/state-native/v3/deprecated_setters.go @@ -7,25 +7,25 @@ import ( // SetPreviousEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) SetPreviousEpochAttestations(_ []*ethpb.PendingAttestation) error { - return errors.New("SetPreviousEpochAttestations is not supported for version Merge beacon state") + return errors.New("SetPreviousEpochAttestations is not supported for version Bellatrix beacon state") } // SetCurrentEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) SetCurrentEpochAttestations(_ []*ethpb.PendingAttestation) error { - return errors.New("SetCurrentEpochAttestations is not supported for version Merge beacon state") + return errors.New("SetCurrentEpochAttestations is not supported for version Bellatrix beacon state") } // AppendCurrentEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) AppendCurrentEpochAttestations(_ *ethpb.PendingAttestation) error { - return errors.New("AppendCurrentEpochAttestations is not supported for version Merge beacon state") + return errors.New("AppendCurrentEpochAttestations is not supported for version Bellatrix beacon state") } // AppendPreviousEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) AppendPreviousEpochAttestations(_ *ethpb.PendingAttestation) error { - return errors.New("AppendPreviousEpochAttestations is not supported for version Merge beacon state") + return errors.New("AppendPreviousEpochAttestations is not supported for version Bellatrix beacon state") } // RotateAttestations is not supported for HF1 beacon state. func (*BeaconState) RotateAttestations() error { - return errors.New("RotateAttestations is not supported for version Merge beacon state") + return errors.New("RotateAttestations is not supported for version Bellatrix beacon state") } diff --git a/beacon-chain/state-native/v3/deprecated_setters_test.go b/beacon-chain/state-native/v3/deprecated_setters_test.go index 4fbde1097db4..18c338f8bf90 100644 --- a/beacon-chain/state-native/v3/deprecated_setters_test.go +++ b/beacon-chain/state-native/v3/deprecated_setters_test.go @@ -8,20 +8,20 @@ import ( func TestBeaconState_AppendCurrentEpochAttestations(t *testing.T) { s := &BeaconState{} - require.ErrorContains(t, "AppendCurrentEpochAttestations is not supported for version Merge beacon state", s.AppendCurrentEpochAttestations(nil)) + require.ErrorContains(t, "AppendCurrentEpochAttestations is not supported for version Bellatrix beacon state", s.AppendCurrentEpochAttestations(nil)) } func TestBeaconState_AppendPreviousEpochAttestations(t *testing.T) { s := &BeaconState{} - require.ErrorContains(t, "AppendPreviousEpochAttestations is not supported for version Merge beacon state", s.AppendPreviousEpochAttestations(nil)) + require.ErrorContains(t, "AppendPreviousEpochAttestations is not supported for version Bellatrix beacon state", s.AppendPreviousEpochAttestations(nil)) } func TestBeaconState_SetCurrentEpochAttestations(t *testing.T) { s := &BeaconState{} - require.ErrorContains(t, "SetCurrentEpochAttestations is not supported for version Merge beacon state", s.SetCurrentEpochAttestations(nil)) + require.ErrorContains(t, "SetCurrentEpochAttestations is not supported for version Bellatrix beacon state", s.SetCurrentEpochAttestations(nil)) } func TestBeaconState_SetPreviousEpochAttestations(t *testing.T) { s := &BeaconState{} - require.ErrorContains(t, "SetPreviousEpochAttestations is not supported for version Merge beacon state", s.SetPreviousEpochAttestations(nil)) + require.ErrorContains(t, "SetPreviousEpochAttestations is not supported for version Bellatrix beacon state", s.SetPreviousEpochAttestations(nil)) } diff --git a/beacon-chain/state-native/v3/field_roots.go b/beacon-chain/state-native/v3/field_roots.go index 22527ba6b944..e558a369afaa 100644 --- a/beacon-chain/state-native/v3/field_roots.go +++ b/beacon-chain/state-native/v3/field_roots.go @@ -11,9 +11,9 @@ import ( // computeFieldRoots returns the hash tree root computations of every field in // the beacon state as a list of 32 byte roots. //nolint:deadcode -func computeFieldRoots(ctx context.Context, state *ethpb.BeaconStateMerge) ([][]byte, error) { +func computeFieldRoots(ctx context.Context, state *ethpb.BeaconStateBellatrix) ([][]byte, error) { if features.Get().EnableSSZCache { - return stateutil.CachedHasher.ComputeFieldRootsWithHasherMerge(ctx, state) + return stateutil.CachedHasher.ComputeFieldRootsWithHasherBellatrix(ctx, state) } - return stateutil.NocachedHasher.ComputeFieldRootsWithHasherMerge(ctx, state) + return stateutil.NocachedHasher.ComputeFieldRootsWithHasherBellatrix(ctx, state) } diff --git a/beacon-chain/state-native/v3/getters_block_test.go b/beacon-chain/state-native/v3/getters_block_test.go index bb0f88f7adad..1e328ee3015d 100644 --- a/beacon-chain/state-native/v3/getters_block_test.go +++ b/beacon-chain/state-native/v3/getters_block_test.go @@ -9,13 +9,13 @@ import ( ) func TestBeaconState_LatestBlockHeader(t *testing.T) { - s, err := InitializeFromProto(ðpb.BeaconStateMerge{}) + s, err := InitializeFromProto(ðpb.BeaconStateBellatrix{}) require.NoError(t, err) got := s.LatestBlockHeader() require.DeepEqual(t, (*ethpb.BeaconBlockHeader)(nil), got) want := ðpb.BeaconBlockHeader{Slot: 100} - s, err = InitializeFromProto(ðpb.BeaconStateMerge{LatestBlockHeader: want}) + s, err = InitializeFromProto(ðpb.BeaconStateBellatrix{LatestBlockHeader: want}) require.NoError(t, err) got = s.LatestBlockHeader() require.DeepEqual(t, want, got) @@ -26,13 +26,13 @@ func TestBeaconState_LatestBlockHeader(t *testing.T) { } func TestBeaconState_BlockRoots(t *testing.T) { - s, err := InitializeFromProto(ðpb.BeaconStateMerge{}) + s, err := InitializeFromProto(ðpb.BeaconStateBellatrix{}) require.NoError(t, err) got := s.BlockRoots() require.DeepEqual(t, ([][]byte)(nil), got) want := [][]byte{{'a'}} - s, err = InitializeFromProto(ðpb.BeaconStateMerge{BlockRoots: want}) + s, err = InitializeFromProto(ðpb.BeaconStateBellatrix{BlockRoots: want}) require.NoError(t, err) got = s.BlockRoots() require.DeepEqual(t, want, got) @@ -43,14 +43,14 @@ func TestBeaconState_BlockRoots(t *testing.T) { } func TestBeaconState_BlockRootAtIndex(t *testing.T) { - s, err := InitializeFromProto(ðpb.BeaconStateMerge{}) + s, err := InitializeFromProto(ðpb.BeaconStateBellatrix{}) require.NoError(t, err) got, err := s.BlockRootAtIndex(0) require.NoError(t, err) require.DeepEqual(t, ([]byte)(nil), got) r := [][]byte{{'a'}} - s, err = InitializeFromProto(ðpb.BeaconStateMerge{BlockRoots: r}) + s, err = InitializeFromProto(ðpb.BeaconStateBellatrix{BlockRoots: r}) require.NoError(t, err) got, err = s.BlockRootAtIndex(0) require.NoError(t, err) diff --git a/beacon-chain/state-native/v3/getters_misc.go b/beacon-chain/state-native/v3/getters_misc.go index 99f82adb3b71..e84d682d03f3 100644 --- a/beacon-chain/state-native/v3/getters_misc.go +++ b/beacon-chain/state-native/v3/getters_misc.go @@ -112,7 +112,7 @@ func (b *BeaconState) parentRoot() [32]byte { // is strictly meant to be used without a lock // internally. func (_ *BeaconState) Version() int { - return version.Merge + return version.Bellatrix } // Slot of the current beacon chain state. diff --git a/beacon-chain/state-native/v3/getters_state.go b/beacon-chain/state-native/v3/getters_state.go index 71604daae4d9..8ebd8642e121 100644 --- a/beacon-chain/state-native/v3/getters_state.go +++ b/beacon-chain/state-native/v3/getters_state.go @@ -23,7 +23,7 @@ func (b *BeaconState) CloneInnerState() interface{} { b.lock.RLock() defer b.lock.RUnlock() - return ðpb.BeaconStateMerge{ + return ðpb.BeaconStateBellatrix{ GenesisTime: b.genesisTime(), GenesisValidatorsRoot: b.genesisValidatorRoot(), Slot: b.slot(), @@ -118,10 +118,10 @@ func (b *BeaconState) MarshalSSZ() ([]byte, error) { // ProtobufBeaconState transforms an input into beacon state Merge in the form of protobuf. // Error is returned if the input is not type protobuf beacon state. -func ProtobufBeaconState(s interface{}) (*ethpb.BeaconStateMerge, error) { - pbState, ok := s.(*ethpb.BeaconStateMerge) +func ProtobufBeaconState(s interface{}) (*ethpb.BeaconStateBellatrix, error) { + pbState, ok := s.(*ethpb.BeaconStateBellatrix) if !ok { - return nil, errors.New("input is not type pb.BeaconStateMerge") + return nil, errors.New("input is not type pb.BeaconStateBellatrix") } return pbState, nil } diff --git a/beacon-chain/state-native/v3/getters_test.go b/beacon-chain/state-native/v3/getters_test.go index c96bb51b27a6..c89e7bde10c0 100644 --- a/beacon-chain/state-native/v3/getters_test.go +++ b/beacon-chain/state-native/v3/getters_test.go @@ -12,7 +12,7 @@ import ( ) func TestBeaconState_SlotDataRace(t *testing.T) { - headState, err := InitializeFromProto(ðpb.BeaconStateMerge{Slot: 1}) + headState, err := InitializeFromProto(ðpb.BeaconStateBellatrix{Slot: 1}) require.NoError(t, err) wg := sync.WaitGroup{} @@ -180,7 +180,7 @@ func TestBeaconState_ValidatorByPubkey(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - s, err := InitializeFromProto(ðpb.BeaconStateMerge{}) + s, err := InitializeFromProto(ðpb.BeaconStateBellatrix{}) require.NoError(t, err) nKey := keyCreator([]byte{'A'}) tt.modifyFunc(s, nKey) diff --git a/beacon-chain/state-native/v3/setters_test.go b/beacon-chain/state-native/v3/setters_test.go index e32bcceab030..8b9d2307f563 100644 --- a/beacon-chain/state-native/v3/setters_test.go +++ b/beacon-chain/state-native/v3/setters_test.go @@ -42,7 +42,7 @@ func TestAppendBeyondIndicesLimit(t *testing.T) { BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, 32), } - st, err := InitializeFromProto(ðpb.BeaconStateMerge{ + st, err := InitializeFromProto(ðpb.BeaconStateBellatrix{ Slot: 1, CurrentEpochParticipation: []byte{}, PreviousEpochParticipation: []byte{}, @@ -56,7 +56,7 @@ func TestAppendBeyondIndicesLimit(t *testing.T) { require.NoError(t, err) _, err = st.HashTreeRoot(context.Background()) require.NoError(t, err) - for i := stateTypes.FieldIndex(0); i < stateTypes.FieldIndex(params.BeaconConfig().BeaconStateMergeFieldCount); i++ { + for i := stateTypes.FieldIndex(0); i < stateTypes.FieldIndex(params.BeaconConfig().BeaconStateBellatrixFieldCount); i++ { st.dirtyFields[i] = true } _, err = st.HashTreeRoot(context.Background()) @@ -124,7 +124,7 @@ func TestBeaconState_AppendBalanceWithTrie(t *testing.T) { BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, 32), } - st, err := InitializeFromProto(ðpb.BeaconStateMerge{ + st, err := InitializeFromProto(ðpb.BeaconStateBellatrix{ Slot: 1, GenesisValidatorsRoot: make([]byte, 32), Fork: ðpb.Fork{ diff --git a/beacon-chain/state-native/v3/state_trie.go b/beacon-chain/state-native/v3/state_trie.go index b2419abbb419..5a3c6f3c0406 100644 --- a/beacon-chain/state-native/v3/state_trie.go +++ b/beacon-chain/state-native/v3/state_trie.go @@ -23,18 +23,18 @@ import ( ) // InitializeFromProto the beacon state from a protobuf representation. -func InitializeFromProto(st *ethpb.BeaconStateMerge) (*BeaconState, error) { - return InitializeFromProtoUnsafe(proto.Clone(st).(*ethpb.BeaconStateMerge)) +func InitializeFromProto(st *ethpb.BeaconStateBellatrix) (*BeaconState, error) { + return InitializeFromProtoUnsafe(proto.Clone(st).(*ethpb.BeaconStateBellatrix)) } // InitializeFromProtoUnsafe directly uses the beacon state protobuf pointer // and sets it as the inner state of the BeaconState type. -func InitializeFromProtoUnsafe(st *ethpb.BeaconStateMerge) (*BeaconState, error) { +func InitializeFromProtoUnsafe(st *ethpb.BeaconStateBellatrix) (*BeaconState, error) { if st == nil { return nil, errors.New("received nil state") } - fieldCount := params.BeaconConfig().BeaconStateMergeFieldCount + fieldCount := params.BeaconConfig().BeaconStateBellatrixFieldCount b := &BeaconState{ state: st, dirtyFields: make(map[types.FieldIndex]bool, fieldCount), @@ -68,7 +68,7 @@ func InitializeFromProtoUnsafe(st *ethpb.BeaconStateMerge) (*BeaconState, error) b.sharedFieldReferences[balances] = stateutil.NewRef(1) b.sharedFieldReferences[inactivityScores] = stateutil.NewRef(1) // New in Altair. b.sharedFieldReferences[historicalRoots] = stateutil.NewRef(1) - b.sharedFieldReferences[latestExecutionPayloadHeader] = stateutil.NewRef(1) // New in Merge. + b.sharedFieldReferences[latestExecutionPayloadHeader] = stateutil.NewRef(1) // New in Bellatrix. sharedstate.StateCount.Inc() return b, nil } @@ -81,10 +81,10 @@ func (b *BeaconState) Copy() state.BeaconState { b.lock.RLock() defer b.lock.RUnlock() - fieldCount := params.BeaconConfig().BeaconStateMergeFieldCount + fieldCount := params.BeaconConfig().BeaconStateBellatrixFieldCount dst := &BeaconState{ - state: ðpb.BeaconStateMerge{ + state: ðpb.BeaconStateBellatrix{ // Primitive types, safe to copy. GenesisTime: b.state.GenesisTime, Slot: b.state.Slot, @@ -195,7 +195,7 @@ func (b *BeaconState) Copy() state.BeaconState { // HashTreeRoot of the beacon state retrieves the Merkle root of the trie // representation of the beacon state based on the eth2 Simple Serialize specification. func (b *BeaconState) HashTreeRoot(ctx context.Context) ([32]byte, error) { - _, span := trace.StartSpan(ctx, "BeaconStateMerge.HashTreeRoot") + _, span := trace.StartSpan(ctx, "BeaconStateBellatrix.HashTreeRoot") defer span.End() b.lock.Lock() @@ -208,7 +208,7 @@ func (b *BeaconState) HashTreeRoot(ctx context.Context) ([32]byte, error) { } layers := stateutil.Merkleize(fieldRoots) b.merkleLayers = layers - b.dirtyFields = make(map[types.FieldIndex]bool, params.BeaconConfig().BeaconStateMergeFieldCount) + b.dirtyFields = make(map[types.FieldIndex]bool, params.BeaconConfig().BeaconStateBellatrixFieldCount) } for field := range b.dirtyFields { diff --git a/beacon-chain/state-native/v3/state_trie_test.go b/beacon-chain/state-native/v3/state_trie_test.go index 0743e2469a35..d800565d6893 100644 --- a/beacon-chain/state-native/v3/state_trie_test.go +++ b/beacon-chain/state-native/v3/state_trie_test.go @@ -52,7 +52,7 @@ func TestValidatorMap_DistinctCopy(t *testing.T) { func TestInitializeFromProto(t *testing.T) { type test struct { name string - state *ethpb.BeaconStateMerge + state *ethpb.BeaconStateBellatrix error string } initTests := []test{ @@ -63,14 +63,14 @@ func TestInitializeFromProto(t *testing.T) { }, { name: "nil validators", - state: ðpb.BeaconStateMerge{ + state: ðpb.BeaconStateBellatrix{ Slot: 4, Validators: nil, }, }, { name: "empty state", - state: ðpb.BeaconStateMerge{}, + state: ðpb.BeaconStateBellatrix{}, }, } for _, tt := range initTests { @@ -104,7 +104,7 @@ func TestBeaconState_NoDeadlock(t *testing.T) { WithdrawableEpoch: 1, }) } - st, err := InitializeFromProtoUnsafe(ðpb.BeaconStateMerge{ + st, err := InitializeFromProtoUnsafe(ðpb.BeaconStateBellatrix{ Validators: vals, }) assert.NoError(t, err) @@ -142,7 +142,7 @@ func TestBeaconState_NoDeadlock(t *testing.T) { func TestInitializeFromProtoUnsafe(t *testing.T) { type test struct { name string - state *ethpb.BeaconStateMerge + state *ethpb.BeaconStateBellatrix error string } initTests := []test{ @@ -153,14 +153,14 @@ func TestInitializeFromProtoUnsafe(t *testing.T) { }, { name: "nil validators", - state: ðpb.BeaconStateMerge{ + state: ðpb.BeaconStateBellatrix{ Slot: 4, Validators: nil, }, }, { name: "empty state", - state: ðpb.BeaconStateMerge{}, + state: ðpb.BeaconStateBellatrix{}, }, // TODO: Add full state. Blocked by testutil migration. } diff --git a/beacon-chain/state-native/v3/types.go b/beacon-chain/state-native/v3/types.go index 519200719cf0..3368c95a6b3b 100644 --- a/beacon-chain/state-native/v3/types.go +++ b/beacon-chain/state-native/v3/types.go @@ -12,7 +12,7 @@ import ( ) func init() { - fieldMap = make(map[types.FieldIndex]types.DataType, params.BeaconConfig().BeaconStateMergeFieldCount) + fieldMap = make(map[types.FieldIndex]types.DataType, params.BeaconConfig().BeaconStateBellatrixFieldCount) // Initialize the fixed sized arrays. fieldMap[types.BlockRoots] = types.BasicArray @@ -65,7 +65,7 @@ var ErrNilInnerState = errors.New("nil inner state") // BeaconState defines a struct containing utilities for the eth2 chain state, defining // getters and setters for its respective values and helpful functions such as HashTreeRoot(). type BeaconState struct { - state *ethpb.BeaconStateMerge + state *ethpb.BeaconStateBellatrix lock sync.RWMutex dirtyFields map[types.FieldIndex]bool dirtyIndices map[types.FieldIndex][]uint64 diff --git a/beacon-chain/state-proto/stateutil/state_hasher.go b/beacon-chain/state-proto/stateutil/state_hasher.go index 8c901069d68a..2b010050ab06 100644 --- a/beacon-chain/state-proto/stateutil/state_hasher.go +++ b/beacon-chain/state-proto/stateutil/state_hasher.go @@ -18,8 +18,8 @@ import ( var ( // Set the map size as equal to that of the latest state field count. - leavesCache = make(map[string][][32]byte, params.BeaconConfig().BeaconStateMergeFieldCount) - layersCache = make(map[string][][][32]byte, params.BeaconConfig().BeaconStateMergeFieldCount) + leavesCache = make(map[string][][32]byte, params.BeaconConfig().BeaconStateBellatrixFieldCount) + layersCache = make(map[string][][][32]byte, params.BeaconConfig().BeaconStateBellatrixFieldCount) lock sync.RWMutex ) @@ -370,16 +370,16 @@ func (h *stateRootHasher) ComputeFieldRootsWithHasherAltair(ctx context.Context, return fieldRoots, nil } -// ComputeFieldRootsWithHasherMerge hashes the provided merge state and returns its respective field roots. -func (h *stateRootHasher) ComputeFieldRootsWithHasherMerge(ctx context.Context, state *ethpb.BeaconStateMerge) ([][]byte, error) { - _, span := trace.StartSpan(ctx, "hasher.ComputeFieldRootsWithHasherMerge") +// ComputeFieldRootsWithHasherBellatrix hashes the provided bellatrix state and returns its respective field roots. +func (h *stateRootHasher) ComputeFieldRootsWithHasherBellatrix(ctx context.Context, state *ethpb.BeaconStateBellatrix) ([][]byte, error) { + _, span := trace.StartSpan(ctx, "hasher.ComputeFieldRootsWithHasherBellatrix") defer span.End() if state == nil { return nil, errors.New("nil state") } hasher := hash.CustomSHA256Hasher() - fieldRoots := make([][]byte, params.BeaconConfig().BeaconStateMergeFieldCount) + fieldRoots := make([][]byte, params.BeaconConfig().BeaconStateBellatrixFieldCount) // Genesis time root. genesisRoot := ssz.Uint64Root(state.GenesisTime) diff --git a/beacon-chain/state-proto/types/types.go b/beacon-chain/state-proto/types/types.go index 53c025347192..aebe8e981080 100644 --- a/beacon-chain/state-proto/types/types.go +++ b/beacon-chain/state-proto/types/types.go @@ -59,12 +59,12 @@ func (f FieldIndex) String(stateVersion int) string { case Slashings: return "slashings" case PreviousEpochAttestations: - if version.Altair == stateVersion || version.Merge == stateVersion { + if version.Altair == stateVersion || version.Bellatrix == stateVersion { return "previousEpochParticipationBits" } return "previousEpochAttestations" case CurrentEpochAttestations: - if version.Altair == stateVersion || version.Merge == stateVersion { + if version.Altair == stateVersion || version.Bellatrix == stateVersion { return "currentEpochParticipationBits" } return "currentEpochAttestations" @@ -132,7 +132,7 @@ const ( InactivityScores CurrentSyncCommittee NextSyncCommittee - // State fields added in Merge. + // State fields added in Bellatrix. LatestExecutionPayloadHeader ) diff --git a/beacon-chain/state-proto/v3/deprecated_getters.go b/beacon-chain/state-proto/v3/deprecated_getters.go index 846ace35e294..d02110aeb6f0 100644 --- a/beacon-chain/state-proto/v3/deprecated_getters.go +++ b/beacon-chain/state-proto/v3/deprecated_getters.go @@ -7,10 +7,10 @@ import ( // PreviousEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) PreviousEpochAttestations() ([]*ethpb.PendingAttestation, error) { - return nil, errors.New("PreviousEpochAttestations is not supported for version Merge beacon state") + return nil, errors.New("PreviousEpochAttestations is not supported for version Bellatrix beacon state") } // CurrentEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) CurrentEpochAttestations() ([]*ethpb.PendingAttestation, error) { - return nil, errors.New("CurrentEpochAttestations is not supported for version Merge beacon state") + return nil, errors.New("CurrentEpochAttestations is not supported for version Bellatrix beacon state") } diff --git a/beacon-chain/state-proto/v3/deprecated_getters_test.go b/beacon-chain/state-proto/v3/deprecated_getters_test.go index 3488b284e5ba..0907bc639175 100644 --- a/beacon-chain/state-proto/v3/deprecated_getters_test.go +++ b/beacon-chain/state-proto/v3/deprecated_getters_test.go @@ -9,11 +9,11 @@ import ( func TestBeaconState_CurrentEpochAttestations(t *testing.T) { s := &BeaconState{} _, err := s.CurrentEpochAttestations() - require.ErrorContains(t, "CurrentEpochAttestations is not supported for version Merge beacon state", err) + require.ErrorContains(t, "CurrentEpochAttestations is not supported for version Bellatrix beacon state", err) } func TestBeaconState_PreviousEpochAttestations(t *testing.T) { s := &BeaconState{} _, err := s.PreviousEpochAttestations() - require.ErrorContains(t, "PreviousEpochAttestations is not supported for version Merge beacon state", err) + require.ErrorContains(t, "PreviousEpochAttestations is not supported for version Bellatrix beacon state", err) } diff --git a/beacon-chain/state-proto/v3/deprecated_setters.go b/beacon-chain/state-proto/v3/deprecated_setters.go index 53c61280fd37..42c867718630 100644 --- a/beacon-chain/state-proto/v3/deprecated_setters.go +++ b/beacon-chain/state-proto/v3/deprecated_setters.go @@ -7,25 +7,25 @@ import ( // SetPreviousEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) SetPreviousEpochAttestations(_ []*ethpb.PendingAttestation) error { - return errors.New("SetPreviousEpochAttestations is not supported for version Merge beacon state") + return errors.New("SetPreviousEpochAttestations is not supported for version Bellatrix beacon state") } // SetCurrentEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) SetCurrentEpochAttestations(_ []*ethpb.PendingAttestation) error { - return errors.New("SetCurrentEpochAttestations is not supported for version Merge beacon state") + return errors.New("SetCurrentEpochAttestations is not supported for version Bellatrix beacon state") } // AppendCurrentEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) AppendCurrentEpochAttestations(_ *ethpb.PendingAttestation) error { - return errors.New("AppendCurrentEpochAttestations is not supported for version Merge beacon state") + return errors.New("AppendCurrentEpochAttestations is not supported for version Bellatrix beacon state") } // AppendPreviousEpochAttestations is not supported for HF1 beacon state. func (*BeaconState) AppendPreviousEpochAttestations(_ *ethpb.PendingAttestation) error { - return errors.New("AppendPreviousEpochAttestations is not supported for version Merge beacon state") + return errors.New("AppendPreviousEpochAttestations is not supported for version Bellatrix beacon state") } // RotateAttestations is not supported for HF1 beacon state. func (*BeaconState) RotateAttestations() error { - return errors.New("RotateAttestations is not supported for version Merge beacon state") + return errors.New("RotateAttestations is not supported for version Bellatrix beacon state") } diff --git a/beacon-chain/state-proto/v3/deprecated_setters_test.go b/beacon-chain/state-proto/v3/deprecated_setters_test.go index 4fbde1097db4..18c338f8bf90 100644 --- a/beacon-chain/state-proto/v3/deprecated_setters_test.go +++ b/beacon-chain/state-proto/v3/deprecated_setters_test.go @@ -8,20 +8,20 @@ import ( func TestBeaconState_AppendCurrentEpochAttestations(t *testing.T) { s := &BeaconState{} - require.ErrorContains(t, "AppendCurrentEpochAttestations is not supported for version Merge beacon state", s.AppendCurrentEpochAttestations(nil)) + require.ErrorContains(t, "AppendCurrentEpochAttestations is not supported for version Bellatrix beacon state", s.AppendCurrentEpochAttestations(nil)) } func TestBeaconState_AppendPreviousEpochAttestations(t *testing.T) { s := &BeaconState{} - require.ErrorContains(t, "AppendPreviousEpochAttestations is not supported for version Merge beacon state", s.AppendPreviousEpochAttestations(nil)) + require.ErrorContains(t, "AppendPreviousEpochAttestations is not supported for version Bellatrix beacon state", s.AppendPreviousEpochAttestations(nil)) } func TestBeaconState_SetCurrentEpochAttestations(t *testing.T) { s := &BeaconState{} - require.ErrorContains(t, "SetCurrentEpochAttestations is not supported for version Merge beacon state", s.SetCurrentEpochAttestations(nil)) + require.ErrorContains(t, "SetCurrentEpochAttestations is not supported for version Bellatrix beacon state", s.SetCurrentEpochAttestations(nil)) } func TestBeaconState_SetPreviousEpochAttestations(t *testing.T) { s := &BeaconState{} - require.ErrorContains(t, "SetPreviousEpochAttestations is not supported for version Merge beacon state", s.SetPreviousEpochAttestations(nil)) + require.ErrorContains(t, "SetPreviousEpochAttestations is not supported for version Bellatrix beacon state", s.SetPreviousEpochAttestations(nil)) } diff --git a/beacon-chain/state-proto/v3/field_roots.go b/beacon-chain/state-proto/v3/field_roots.go index 7eb1c9d0751a..a7a87ccf0731 100644 --- a/beacon-chain/state-proto/v3/field_roots.go +++ b/beacon-chain/state-proto/v3/field_roots.go @@ -11,9 +11,9 @@ import ( // computeFieldRoots returns the hash tree root computations of every field in // the beacon state as a list of 32 byte roots. //nolint:deadcode -func computeFieldRoots(ctx context.Context, state *ethpb.BeaconStateMerge) ([][]byte, error) { +func computeFieldRoots(ctx context.Context, state *ethpb.BeaconStateBellatrix) ([][]byte, error) { if features.Get().EnableSSZCache { - return stateutil.CachedHasher.ComputeFieldRootsWithHasherMerge(ctx, state) + return stateutil.CachedHasher.ComputeFieldRootsWithHasherBellatrix(ctx, state) } - return stateutil.NocachedHasher.ComputeFieldRootsWithHasherMerge(ctx, state) + return stateutil.NocachedHasher.ComputeFieldRootsWithHasherBellatrix(ctx, state) } diff --git a/beacon-chain/state-proto/v3/getters_block_test.go b/beacon-chain/state-proto/v3/getters_block_test.go index bb0f88f7adad..1e328ee3015d 100644 --- a/beacon-chain/state-proto/v3/getters_block_test.go +++ b/beacon-chain/state-proto/v3/getters_block_test.go @@ -9,13 +9,13 @@ import ( ) func TestBeaconState_LatestBlockHeader(t *testing.T) { - s, err := InitializeFromProto(ðpb.BeaconStateMerge{}) + s, err := InitializeFromProto(ðpb.BeaconStateBellatrix{}) require.NoError(t, err) got := s.LatestBlockHeader() require.DeepEqual(t, (*ethpb.BeaconBlockHeader)(nil), got) want := ðpb.BeaconBlockHeader{Slot: 100} - s, err = InitializeFromProto(ðpb.BeaconStateMerge{LatestBlockHeader: want}) + s, err = InitializeFromProto(ðpb.BeaconStateBellatrix{LatestBlockHeader: want}) require.NoError(t, err) got = s.LatestBlockHeader() require.DeepEqual(t, want, got) @@ -26,13 +26,13 @@ func TestBeaconState_LatestBlockHeader(t *testing.T) { } func TestBeaconState_BlockRoots(t *testing.T) { - s, err := InitializeFromProto(ðpb.BeaconStateMerge{}) + s, err := InitializeFromProto(ðpb.BeaconStateBellatrix{}) require.NoError(t, err) got := s.BlockRoots() require.DeepEqual(t, ([][]byte)(nil), got) want := [][]byte{{'a'}} - s, err = InitializeFromProto(ðpb.BeaconStateMerge{BlockRoots: want}) + s, err = InitializeFromProto(ðpb.BeaconStateBellatrix{BlockRoots: want}) require.NoError(t, err) got = s.BlockRoots() require.DeepEqual(t, want, got) @@ -43,14 +43,14 @@ func TestBeaconState_BlockRoots(t *testing.T) { } func TestBeaconState_BlockRootAtIndex(t *testing.T) { - s, err := InitializeFromProto(ðpb.BeaconStateMerge{}) + s, err := InitializeFromProto(ðpb.BeaconStateBellatrix{}) require.NoError(t, err) got, err := s.BlockRootAtIndex(0) require.NoError(t, err) require.DeepEqual(t, ([]byte)(nil), got) r := [][]byte{{'a'}} - s, err = InitializeFromProto(ðpb.BeaconStateMerge{BlockRoots: r}) + s, err = InitializeFromProto(ðpb.BeaconStateBellatrix{BlockRoots: r}) require.NoError(t, err) got, err = s.BlockRootAtIndex(0) require.NoError(t, err) diff --git a/beacon-chain/state-proto/v3/getters_misc.go b/beacon-chain/state-proto/v3/getters_misc.go index 99f82adb3b71..e84d682d03f3 100644 --- a/beacon-chain/state-proto/v3/getters_misc.go +++ b/beacon-chain/state-proto/v3/getters_misc.go @@ -112,7 +112,7 @@ func (b *BeaconState) parentRoot() [32]byte { // is strictly meant to be used without a lock // internally. func (_ *BeaconState) Version() int { - return version.Merge + return version.Bellatrix } // Slot of the current beacon chain state. diff --git a/beacon-chain/state-proto/v3/getters_state.go b/beacon-chain/state-proto/v3/getters_state.go index 71604daae4d9..8ebd8642e121 100644 --- a/beacon-chain/state-proto/v3/getters_state.go +++ b/beacon-chain/state-proto/v3/getters_state.go @@ -23,7 +23,7 @@ func (b *BeaconState) CloneInnerState() interface{} { b.lock.RLock() defer b.lock.RUnlock() - return ðpb.BeaconStateMerge{ + return ðpb.BeaconStateBellatrix{ GenesisTime: b.genesisTime(), GenesisValidatorsRoot: b.genesisValidatorRoot(), Slot: b.slot(), @@ -118,10 +118,10 @@ func (b *BeaconState) MarshalSSZ() ([]byte, error) { // ProtobufBeaconState transforms an input into beacon state Merge in the form of protobuf. // Error is returned if the input is not type protobuf beacon state. -func ProtobufBeaconState(s interface{}) (*ethpb.BeaconStateMerge, error) { - pbState, ok := s.(*ethpb.BeaconStateMerge) +func ProtobufBeaconState(s interface{}) (*ethpb.BeaconStateBellatrix, error) { + pbState, ok := s.(*ethpb.BeaconStateBellatrix) if !ok { - return nil, errors.New("input is not type pb.BeaconStateMerge") + return nil, errors.New("input is not type pb.BeaconStateBellatrix") } return pbState, nil } diff --git a/beacon-chain/state-proto/v3/getters_test.go b/beacon-chain/state-proto/v3/getters_test.go index c96bb51b27a6..c89e7bde10c0 100644 --- a/beacon-chain/state-proto/v3/getters_test.go +++ b/beacon-chain/state-proto/v3/getters_test.go @@ -12,7 +12,7 @@ import ( ) func TestBeaconState_SlotDataRace(t *testing.T) { - headState, err := InitializeFromProto(ðpb.BeaconStateMerge{Slot: 1}) + headState, err := InitializeFromProto(ðpb.BeaconStateBellatrix{Slot: 1}) require.NoError(t, err) wg := sync.WaitGroup{} @@ -180,7 +180,7 @@ func TestBeaconState_ValidatorByPubkey(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - s, err := InitializeFromProto(ðpb.BeaconStateMerge{}) + s, err := InitializeFromProto(ðpb.BeaconStateBellatrix{}) require.NoError(t, err) nKey := keyCreator([]byte{'A'}) tt.modifyFunc(s, nKey) diff --git a/beacon-chain/state-proto/v3/setters_test.go b/beacon-chain/state-proto/v3/setters_test.go index e8c3f582396e..5d4bfc28dcbe 100644 --- a/beacon-chain/state-proto/v3/setters_test.go +++ b/beacon-chain/state-proto/v3/setters_test.go @@ -42,7 +42,7 @@ func TestAppendBeyondIndicesLimit(t *testing.T) { BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, 32), } - st, err := InitializeFromProto(ðpb.BeaconStateMerge{ + st, err := InitializeFromProto(ðpb.BeaconStateBellatrix{ Slot: 1, CurrentEpochParticipation: []byte{}, PreviousEpochParticipation: []byte{}, @@ -56,7 +56,7 @@ func TestAppendBeyondIndicesLimit(t *testing.T) { require.NoError(t, err) _, err = st.HashTreeRoot(context.Background()) require.NoError(t, err) - for i := stateTypes.FieldIndex(0); i < stateTypes.FieldIndex(params.BeaconConfig().BeaconStateMergeFieldCount); i++ { + for i := stateTypes.FieldIndex(0); i < stateTypes.FieldIndex(params.BeaconConfig().BeaconStateBellatrixFieldCount); i++ { st.dirtyFields[i] = true } _, err = st.HashTreeRoot(context.Background()) @@ -124,7 +124,7 @@ func TestBeaconState_AppendBalanceWithTrie(t *testing.T) { BlockHash: make([]byte, 32), TransactionsRoot: make([]byte, 32), } - st, err := InitializeFromProto(ðpb.BeaconStateMerge{ + st, err := InitializeFromProto(ðpb.BeaconStateBellatrix{ Slot: 1, GenesisValidatorsRoot: make([]byte, 32), Fork: ðpb.Fork{ diff --git a/beacon-chain/state-proto/v3/state_trie.go b/beacon-chain/state-proto/v3/state_trie.go index 3170ef3578ac..71a77c0de428 100644 --- a/beacon-chain/state-proto/v3/state_trie.go +++ b/beacon-chain/state-proto/v3/state_trie.go @@ -23,18 +23,18 @@ import ( ) // InitializeFromProto the beacon state from a protobuf representation. -func InitializeFromProto(st *ethpb.BeaconStateMerge) (*BeaconState, error) { - return InitializeFromProtoUnsafe(proto.Clone(st).(*ethpb.BeaconStateMerge)) +func InitializeFromProto(st *ethpb.BeaconStateBellatrix) (*BeaconState, error) { + return InitializeFromProtoUnsafe(proto.Clone(st).(*ethpb.BeaconStateBellatrix)) } // InitializeFromProtoUnsafe directly uses the beacon state protobuf pointer // and sets it as the inner state of the BeaconState type. -func InitializeFromProtoUnsafe(st *ethpb.BeaconStateMerge) (*BeaconState, error) { +func InitializeFromProtoUnsafe(st *ethpb.BeaconStateBellatrix) (*BeaconState, error) { if st == nil { return nil, errors.New("received nil state") } - fieldCount := params.BeaconConfig().BeaconStateMergeFieldCount + fieldCount := params.BeaconConfig().BeaconStateBellatrixFieldCount b := &BeaconState{ state: st, dirtyFields: make(map[types.FieldIndex]bool, fieldCount), @@ -68,7 +68,7 @@ func InitializeFromProtoUnsafe(st *ethpb.BeaconStateMerge) (*BeaconState, error) b.sharedFieldReferences[balances] = stateutil.NewRef(1) b.sharedFieldReferences[inactivityScores] = stateutil.NewRef(1) // New in Altair. b.sharedFieldReferences[historicalRoots] = stateutil.NewRef(1) - b.sharedFieldReferences[latestExecutionPayloadHeader] = stateutil.NewRef(1) // New in Merge. + b.sharedFieldReferences[latestExecutionPayloadHeader] = stateutil.NewRef(1) // New in Bellatrix. sharedstate.StateCount.Inc() return b, nil } @@ -81,10 +81,10 @@ func (b *BeaconState) Copy() state.BeaconState { b.lock.RLock() defer b.lock.RUnlock() - fieldCount := params.BeaconConfig().BeaconStateMergeFieldCount + fieldCount := params.BeaconConfig().BeaconStateBellatrixFieldCount dst := &BeaconState{ - state: ðpb.BeaconStateMerge{ + state: ðpb.BeaconStateBellatrix{ // Primitive types, safe to copy. GenesisTime: b.state.GenesisTime, Slot: b.state.Slot, @@ -195,7 +195,7 @@ func (b *BeaconState) Copy() state.BeaconState { // HashTreeRoot of the beacon state retrieves the Merkle root of the trie // representation of the beacon state based on the eth2 Simple Serialize specification. func (b *BeaconState) HashTreeRoot(ctx context.Context) ([32]byte, error) { - _, span := trace.StartSpan(ctx, "BeaconStateMerge.HashTreeRoot") + _, span := trace.StartSpan(ctx, "BeaconStateBellatrix.HashTreeRoot") defer span.End() b.lock.Lock() @@ -208,7 +208,7 @@ func (b *BeaconState) HashTreeRoot(ctx context.Context) ([32]byte, error) { } layers := stateutil.Merkleize(fieldRoots) b.merkleLayers = layers - b.dirtyFields = make(map[types.FieldIndex]bool, params.BeaconConfig().BeaconStateMergeFieldCount) + b.dirtyFields = make(map[types.FieldIndex]bool, params.BeaconConfig().BeaconStateBellatrixFieldCount) } for field := range b.dirtyFields { diff --git a/beacon-chain/state-proto/v3/state_trie_test.go b/beacon-chain/state-proto/v3/state_trie_test.go index 62b528226490..870ae98167ef 100644 --- a/beacon-chain/state-proto/v3/state_trie_test.go +++ b/beacon-chain/state-proto/v3/state_trie_test.go @@ -52,7 +52,7 @@ func TestValidatorMap_DistinctCopy(t *testing.T) { func TestInitializeFromProto(t *testing.T) { type test struct { name string - state *ethpb.BeaconStateMerge + state *ethpb.BeaconStateBellatrix error string } initTests := []test{ @@ -63,14 +63,14 @@ func TestInitializeFromProto(t *testing.T) { }, { name: "nil validators", - state: ðpb.BeaconStateMerge{ + state: ðpb.BeaconStateBellatrix{ Slot: 4, Validators: nil, }, }, { name: "empty state", - state: ðpb.BeaconStateMerge{}, + state: ðpb.BeaconStateBellatrix{}, }, } for _, tt := range initTests { @@ -104,7 +104,7 @@ func TestBeaconState_NoDeadlock(t *testing.T) { WithdrawableEpoch: 1, }) } - st, err := InitializeFromProtoUnsafe(ðpb.BeaconStateMerge{ + st, err := InitializeFromProtoUnsafe(ðpb.BeaconStateBellatrix{ Validators: vals, }) assert.NoError(t, err) @@ -142,7 +142,7 @@ func TestBeaconState_NoDeadlock(t *testing.T) { func TestInitializeFromProtoUnsafe(t *testing.T) { type test struct { name string - state *ethpb.BeaconStateMerge + state *ethpb.BeaconStateBellatrix error string } initTests := []test{ @@ -153,14 +153,14 @@ func TestInitializeFromProtoUnsafe(t *testing.T) { }, { name: "nil validators", - state: ðpb.BeaconStateMerge{ + state: ðpb.BeaconStateBellatrix{ Slot: 4, Validators: nil, }, }, { name: "empty state", - state: ðpb.BeaconStateMerge{}, + state: ðpb.BeaconStateBellatrix{}, }, // TODO: Add full state. Blocked by testutil migration. } diff --git a/beacon-chain/state-proto/v3/types.go b/beacon-chain/state-proto/v3/types.go index 9b16629ad4f2..f2d4f5a3abad 100644 --- a/beacon-chain/state-proto/v3/types.go +++ b/beacon-chain/state-proto/v3/types.go @@ -12,7 +12,7 @@ import ( ) func init() { - fieldMap = make(map[types.FieldIndex]types.DataType, params.BeaconConfig().BeaconStateMergeFieldCount) + fieldMap = make(map[types.FieldIndex]types.DataType, params.BeaconConfig().BeaconStateBellatrixFieldCount) // Initialize the fixed sized arrays. fieldMap[types.BlockRoots] = types.BasicArray @@ -65,7 +65,7 @@ var ErrNilInnerState = errors.New("nil inner state") // BeaconState defines a struct containing utilities for the eth2 chain state, defining // getters and setters for its respective values and helpful functions such as HashTreeRoot(). type BeaconState struct { - state *ethpb.BeaconStateMerge + state *ethpb.BeaconStateBellatrix lock sync.RWMutex dirtyFields map[types.FieldIndex]bool dirtyIndices map[types.FieldIndex][]uint64 diff --git a/cmd/beacon-chain/flags/base.go b/cmd/beacon-chain/flags/base.go index 6a4f50d5746b..8f754b7acdc5 100644 --- a/cmd/beacon-chain/flags/base.go +++ b/cmd/beacon-chain/flags/base.go @@ -214,7 +214,7 @@ var ( // FeeRecipient specifies the fee recipient for the transaction fees. FeeRecipient = &cli.StringFlag{ Name: "fee-recipient", - Usage: "Post merge, this address will receive the transaction fees produced by any blocks from this node. Default to junk whilst merge is in development state.", + Usage: "Post bellatrix, this address will receive the transaction fees produced by any blocks from this node. Default to junk whilst bellatrix is in development state.", Value: hex.EncodeToString([]byte("0x0000000000000000000000000000000000000001")), } ) diff --git a/config/params/config.go b/config/params/config.go index c18ac59a73bb..89e517248cfc 100644 --- a/config/params/config.go +++ b/config/params/config.go @@ -106,21 +106,21 @@ type BeaconChainConfig struct { DomainContributionAndProof [4]byte `yaml:"DOMAIN_CONTRIBUTION_AND_PROOF" spec:"true"` // DomainAggregateAndProof defines the BLS signature domain for contribution and proof. // Prysm constants. - GweiPerEth uint64 // GweiPerEth is the amount of gwei corresponding to 1 eth. - BLSSecretKeyLength int // BLSSecretKeyLength defines the expected length of BLS secret keys in bytes. - BLSPubkeyLength int // BLSPubkeyLength defines the expected length of BLS public keys in bytes. - DefaultBufferSize int // DefaultBufferSize for channels across the Prysm repository. - ValidatorPrivkeyFileName string // ValidatorPrivKeyFileName specifies the string name of a validator private key file. - WithdrawalPrivkeyFileName string // WithdrawalPrivKeyFileName specifies the string name of a withdrawal private key file. - RPCSyncCheck time.Duration // Number of seconds to query the sync service, to find out if the node is synced or not. - EmptySignature [96]byte // EmptySignature is used to represent a zeroed out BLS Signature. - DefaultPageSize int // DefaultPageSize defines the default page size for RPC server request. - MaxPeersToSync int // MaxPeersToSync describes the limit for number of peers in round robin sync. - SlotsPerArchivedPoint types.Slot // SlotsPerArchivedPoint defines the number of slots per one archived point. - GenesisCountdownInterval time.Duration // How often to log the countdown until the genesis time is reached. - BeaconStateFieldCount int // BeaconStateFieldCount defines how many fields are in beacon state. - BeaconStateAltairFieldCount int // BeaconStateAltairFieldCount defines how many fields are in beacon state hard fork 1. - BeaconStateMergeFieldCount int // BeaconStateMergeFieldCount defines how many fields are in beacon state post upgrade to the Merge. + GweiPerEth uint64 // GweiPerEth is the amount of gwei corresponding to 1 eth. + BLSSecretKeyLength int // BLSSecretKeyLength defines the expected length of BLS secret keys in bytes. + BLSPubkeyLength int // BLSPubkeyLength defines the expected length of BLS public keys in bytes. + DefaultBufferSize int // DefaultBufferSize for channels across the Prysm repository. + ValidatorPrivkeyFileName string // ValidatorPrivKeyFileName specifies the string name of a validator private key file. + WithdrawalPrivkeyFileName string // WithdrawalPrivKeyFileName specifies the string name of a withdrawal private key file. + RPCSyncCheck time.Duration // Number of seconds to query the sync service, to find out if the node is synced or not. + EmptySignature [96]byte // EmptySignature is used to represent a zeroed out BLS Signature. + DefaultPageSize int // DefaultPageSize defines the default page size for RPC server request. + MaxPeersToSync int // MaxPeersToSync describes the limit for number of peers in round robin sync. + SlotsPerArchivedPoint types.Slot // SlotsPerArchivedPoint defines the number of slots per one archived point. + GenesisCountdownInterval time.Duration // How often to log the countdown until the genesis time is reached. + BeaconStateFieldCount int // BeaconStateFieldCount defines how many fields are in beacon state. + BeaconStateAltairFieldCount int // BeaconStateAltairFieldCount defines how many fields are in beacon state hard fork 1. + BeaconStateBellatrixFieldCount int // BeaconStateBellatrixFieldCount defines how many fields are in beacon state post upgrade to the Bellatrix. // Slasher constants. WeakSubjectivityPeriod types.Epoch // WeakSubjectivityPeriod defines the time period expressed in number of epochs were proof of stake network should validate block headers and attestations for slashable events. @@ -133,13 +133,13 @@ type BeaconChainConfig struct { GenesisForkVersion []byte `yaml:"GENESIS_FORK_VERSION" spec:"true"` // GenesisForkVersion is used to track fork version between state transitions. AltairForkVersion []byte `yaml:"ALTAIR_FORK_VERSION" spec:"true"` // AltairForkVersion is used to represent the fork version for altair. AltairForkEpoch types.Epoch `yaml:"ALTAIR_FORK_EPOCH" spec:"true"` // AltairForkEpoch is used to represent the assigned fork epoch for altair. - BellatrixForkVersion []byte `yaml:"BELLATRIX_FORK_VERSION" spec:"true"` // BellatrixForkVersion is used to represent the fork version for the merge. - BellatrixForkEpoch types.Epoch `yaml:"BELLATRIX_FORK_EPOCH" spec:"true"` // BellatrixForkEpoch is used to represent the assigned fork epoch for the merge. + BellatrixForkVersion []byte `yaml:"BELLATRIX_FORK_VERSION" spec:"true"` // BellatrixForkVersion is used to represent the fork version for bellatrix. + BellatrixForkEpoch types.Epoch `yaml:"BELLATRIX_FORK_EPOCH" spec:"true"` // BellatrixForkEpoch is used to represent the assigned fork epoch for bellatrix. ShardingForkVersion []byte `yaml:"SHARDING_FORK_VERSION" spec:"true"` // ShardingForkVersion is used to represent the fork version for sharding. ShardingForkEpoch types.Epoch `yaml:"SHARDING_FORK_EPOCH" spec:"true"` // ShardingForkEpoch is used to represent the assigned fork epoch for sharding. ForkVersionSchedule map[[4]byte]types.Epoch // Schedule of fork epochs by version. - MinAnchorPowBlockDifficulty uint64 `yaml:"MIN_ANCHOR_POW_BLOCK_DIFFICULTY" spec:"true"` // MinAnchorPowBlockDifficulty specifies the target chain difficulty at the time of the merge. - TransitionTotalDifficulty uint64 `yaml:"TRANSITION_TOTAL_DIFFICULTY" spec:"true"` // TransitionTotalDifficulty is part of the experimental merge spec. This value is not used (yet) and is expected to be a uint256. + MinAnchorPowBlockDifficulty uint64 `yaml:"MIN_ANCHOR_POW_BLOCK_DIFFICULTY" spec:"true"` // MinAnchorPowBlockDifficulty specifies the target chain difficulty at the time of bellatrix. + TransitionTotalDifficulty uint64 `yaml:"TRANSITION_TOTAL_DIFFICULTY" spec:"true"` // TransitionTotalDifficulty is part of the experimental bellatrix spec. This value is not used (yet) and is expected to be a uint256. // Weak subjectivity values. SafetyDecay uint64 // SafetyDecay is defined as the loss in the 1/3 consensus safety margin of the casper FFG mechanism. @@ -173,17 +173,17 @@ type BeaconChainConfig struct { InactivityPenaltyQuotientAltair uint64 `yaml:"INACTIVITY_PENALTY_QUOTIENT_ALTAIR" spec:"true"` // InactivityPenaltyQuotientAltair for penalties during inactivity post Altair hard fork. MinSlashingPenaltyQuotientAltair uint64 `yaml:"MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR" spec:"true"` // MinSlashingPenaltyQuotientAltair for slashing penalties post Altair hard fork. ProportionalSlashingMultiplierAltair uint64 `yaml:"PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR" spec:"true"` // ProportionalSlashingMultiplierAltair for slashing penalties' multiplier post Alair hard fork. - MinSlashingPenaltyQuotientMerge uint64 `yaml:"MIN_SLASHING_PENALTY_QUOTIENT_MERGE" spec:"true"` // MinSlashingPenaltyQuotientMerge for slashing penalties post Merge hard fork. - ProportionalSlashingMultiplierMerge uint64 `yaml:"PROPORTIONAL_SLASHING_MULTIPLIER_MERGE" spec:"true"` // ProportionalSlashingMultiplierMerge for slashing penalties' multiplier post Merge hard fork. - InactivityPenaltyQuotientMerge uint64 `yaml:"INACTIVITY_PENALTY_QUOTIENT_MERGE" spec:"true"` // InactivityPenaltyQuotientMerge for penalties during inactivity post Merge hard fork. + MinSlashingPenaltyQuotientMerge uint64 `yaml:"MIN_SLASHING_PENALTY_QUOTIENT_MERGE" spec:"true"` // MinSlashingPenaltyQuotientMerge for slashing penalties post Bellatrix hard fork. + ProportionalSlashingMultiplierMerge uint64 `yaml:"PROPORTIONAL_SLASHING_MULTIPLIER_MERGE" spec:"true"` // ProportionalSlashingMultiplierMerge for slashing penalties' multiplier post Bellatrix hard fork. + InactivityPenaltyQuotientMerge uint64 `yaml:"INACTIVITY_PENALTY_QUOTIENT_MERGE" spec:"true"` // InactivityPenaltyQuotientMerge for penalties during inactivity post Bellatrix hard fork. // Light client MinSyncCommitteeParticipants uint64 `yaml:"MIN_SYNC_COMMITTEE_PARTICIPANTS" spec:"true"` // MinSyncCommitteeParticipants defines the minimum amount of sync committee participants for which the light client acknowledges the signature. - // Merge + // Bellatrix TerminalBlockHash common.Hash `yaml:"TERMINAL_BLOCK_HASH" spec:"true"` // TerminalBlockHash of beacon chain. TerminalBlockHashActivationEpoch types.Epoch `yaml:"TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH" spec:"true"` // TerminalBlockHashActivationEpoch of beacon chain. - TerminalTotalDifficulty uint64 `yaml:"TERMINAL_TOTAL_DIFFICULTY" spec:"true"` // TerminalTotalDifficulty is part of the experimental merge spec. This value is type is currently TBD: https://github.com/ethereum/consensus-specs/blob/dev/specs/merge/beacon-chain.md#transition-settings + TerminalTotalDifficulty uint64 `yaml:"TERMINAL_TOTAL_DIFFICULTY" spec:"true"` // TerminalTotalDifficulty is part of Bellatrixexperimental bellatrix spec. This value is type is currently TBD: https://github.com/ethereum/consensus-specs/blob/dev/specs/merge/beacon-chain.md#transition-settings FeeRecipient common.Address // FeeRecipient where the transaction fee goes to. } diff --git a/config/params/mainnet_config.go b/config/params/mainnet_config.go index 6d7abeb5ecb2..a0f2cc56c51b 100644 --- a/config/params/mainnet_config.go +++ b/config/params/mainnet_config.go @@ -161,23 +161,23 @@ var mainnetBeaconConfig = &BeaconChainConfig{ DomainContributionAndProof: bytesutil.ToBytes4(bytesutil.Bytes4(9)), // Prysm constants. - GweiPerEth: 1000000000, - BLSSecretKeyLength: 32, - BLSPubkeyLength: 48, - DefaultBufferSize: 10000, - WithdrawalPrivkeyFileName: "/shardwithdrawalkey", - ValidatorPrivkeyFileName: "/validatorprivatekey", - RPCSyncCheck: 1, - EmptySignature: [96]byte{}, - DefaultPageSize: 250, - MaxPeersToSync: 15, - SlotsPerArchivedPoint: 2048, - GenesisCountdownInterval: time.Minute, - ConfigName: ConfigNames[Mainnet], - PresetBase: "mainnet", - BeaconStateFieldCount: 21, - BeaconStateAltairFieldCount: 24, - BeaconStateMergeFieldCount: 25, + GweiPerEth: 1000000000, + BLSSecretKeyLength: 32, + BLSPubkeyLength: 48, + DefaultBufferSize: 10000, + WithdrawalPrivkeyFileName: "/shardwithdrawalkey", + ValidatorPrivkeyFileName: "/validatorprivatekey", + RPCSyncCheck: 1, + EmptySignature: [96]byte{}, + DefaultPageSize: 250, + MaxPeersToSync: 15, + SlotsPerArchivedPoint: 2048, + GenesisCountdownInterval: time.Minute, + ConfigName: ConfigNames[Mainnet], + PresetBase: "mainnet", + BeaconStateFieldCount: 21, + BeaconStateAltairFieldCount: 24, + BeaconStateBellatrixFieldCount: 25, // Slasher related values. WeakSubjectivityPeriod: 54000, diff --git a/proto/eth/ext/options.pb.go b/proto/eth/ext/options.pb.go index 09e4ffef1bbc..f200d053e564 100755 --- a/proto/eth/ext/options.pb.go +++ b/proto/eth/ext/options.pb.go @@ -10,9 +10,9 @@ import ( reflect "reflect" proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" ) const ( @@ -28,7 +28,7 @@ const _ = proto.ProtoPackageIsVersion4 var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{ { - ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 50000, Name: "ethereum.eth.ext.cast_type", @@ -36,7 +36,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "proto/eth/ext/options.proto", }, { - ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 50001, Name: "ethereum.eth.ext.ssz_size", @@ -44,7 +44,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "proto/eth/ext/options.proto", }, { - ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 50002, Name: "ethereum.eth.ext.ssz_max", @@ -52,7 +52,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "proto/eth/ext/options.proto", }, { - ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 50003, Name: "ethereum.eth.ext.spec_name", @@ -61,7 +61,7 @@ var file_proto_eth_ext_options_proto_extTypes = []protoimpl.ExtensionInfo{ }, } -// Extension fields to descriptorpb.FieldOptions. +// Extension fields to descriptor.FieldOptions. var ( // optional string cast_type = 50000; E_CastType = &file_proto_eth_ext_options_proto_extTypes[0] @@ -108,7 +108,7 @@ var file_proto_eth_ext_options_proto_rawDesc = []byte{ } var file_proto_eth_ext_options_proto_goTypes = []interface{}{ - (*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions + (*descriptor.FieldOptions)(nil), // 0: google.protobuf.FieldOptions } var file_proto_eth_ext_options_proto_depIdxs = []int32{ 0, // 0: ethereum.eth.ext.cast_type:extendee -> google.protobuf.FieldOptions diff --git a/proto/prysm/v1alpha1/BUILD.bazel b/proto/prysm/v1alpha1/BUILD.bazel index a9aa86a030aa..261ef8214632 100644 --- a/proto/prysm/v1alpha1/BUILD.bazel +++ b/proto/prysm/v1alpha1/BUILD.bazel @@ -97,7 +97,7 @@ ssz_gen_marshal( "Status", "BeaconState", "BeaconStateAltair", - "BeaconStateMerge", + "BeaconStateBellatrix", "SigningData", "SyncCommittee", "SyncAggregatorSelectionData", diff --git a/proto/prysm/v1alpha1/beacon_block.proto b/proto/prysm/v1alpha1/beacon_block.proto index 511b9728f79a..f66cf1ed8b6e 100644 --- a/proto/prysm/v1alpha1/beacon_block.proto +++ b/proto/prysm/v1alpha1/beacon_block.proto @@ -33,7 +33,7 @@ message GenericSignedBeaconBlock { // Representing a signed, post-Altair fork beacon block. SignedBeaconBlockAltair altair = 2; - // Representing a signed, post-Merge fork beacon block. + // Representing a signed, post-Bellatrix fork beacon block. SignedBeaconBlockMerge merge = 3; } } @@ -46,7 +46,7 @@ message GenericBeaconBlock { // Representing a post-Altair fork beacon block. BeaconBlockAltair altair = 2; - // Representing a post-Merge fork beacon block. + // Representing a post-Bellatrix fork beacon block. BeaconBlockMerge merge = 3; } } @@ -354,7 +354,7 @@ message BeaconBlockBodyMerge { // Sync aggregate object for the beacon chain to track sync committee votes. New in Altair network upgrade. SyncAggregate sync_aggregate = 9; - // Execution payload from the execution chain. New in Merge network upgrade. + // Execution payload from the execution chain. New in Bellatrix network upgrade. ExecutionPayload execution_payload = 10; } diff --git a/proto/prysm/v1alpha1/beacon_state.pb.go b/proto/prysm/v1alpha1/beacon_state.pb.go index 1248628294aa..d8f9efc9f30a 100755 --- a/proto/prysm/v1alpha1/beacon_state.pb.go +++ b/proto/prysm/v1alpha1/beacon_state.pb.go @@ -1073,7 +1073,7 @@ func (x *SyncAggregatorSelectionData) GetSubcommitteeIndex() uint64 { return 0 } -type BeaconStateMerge struct { +type BeaconStateBellatrix struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1105,8 +1105,8 @@ type BeaconStateMerge struct { LatestExecutionPayloadHeader *ExecutionPayloadHeader `protobuf:"bytes,10001,opt,name=latest_execution_payload_header,json=latestExecutionPayloadHeader,proto3" json:"latest_execution_payload_header,omitempty"` } -func (x *BeaconStateMerge) Reset() { - *x = BeaconStateMerge{} +func (x *BeaconStateBellatrix) Reset() { + *x = BeaconStateBellatrix{} if protoimpl.UnsafeEnabled { mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1114,13 +1114,13 @@ func (x *BeaconStateMerge) Reset() { } } -func (x *BeaconStateMerge) String() string { +func (x *BeaconStateBellatrix) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BeaconStateMerge) ProtoMessage() {} +func (*BeaconStateBellatrix) ProtoMessage() {} -func (x *BeaconStateMerge) ProtoReflect() protoreflect.Message { +func (x *BeaconStateBellatrix) ProtoReflect() protoreflect.Message { mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1132,180 +1132,180 @@ func (x *BeaconStateMerge) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BeaconStateMerge.ProtoReflect.Descriptor instead. -func (*BeaconStateMerge) Descriptor() ([]byte, []int) { +// Deprecated: Use BeaconStateBellatrix.ProtoReflect.Descriptor instead. +func (*BeaconStateBellatrix) Descriptor() ([]byte, []int) { return file_proto_prysm_v1alpha1_beacon_state_proto_rawDescGZIP(), []int{12} } -func (x *BeaconStateMerge) GetGenesisTime() uint64 { +func (x *BeaconStateBellatrix) GetGenesisTime() uint64 { if x != nil { return x.GenesisTime } return 0 } -func (x *BeaconStateMerge) GetGenesisValidatorsRoot() []byte { +func (x *BeaconStateBellatrix) GetGenesisValidatorsRoot() []byte { if x != nil { return x.GenesisValidatorsRoot } return nil } -func (x *BeaconStateMerge) GetSlot() github_com_prysmaticlabs_eth2_types.Slot { +func (x *BeaconStateBellatrix) GetSlot() github_com_prysmaticlabs_eth2_types.Slot { if x != nil { return x.Slot } return github_com_prysmaticlabs_eth2_types.Slot(0) } -func (x *BeaconStateMerge) GetFork() *Fork { +func (x *BeaconStateBellatrix) GetFork() *Fork { if x != nil { return x.Fork } return nil } -func (x *BeaconStateMerge) GetLatestBlockHeader() *BeaconBlockHeader { +func (x *BeaconStateBellatrix) GetLatestBlockHeader() *BeaconBlockHeader { if x != nil { return x.LatestBlockHeader } return nil } -func (x *BeaconStateMerge) GetBlockRoots() [][]byte { +func (x *BeaconStateBellatrix) GetBlockRoots() [][]byte { if x != nil { return x.BlockRoots } return nil } -func (x *BeaconStateMerge) GetStateRoots() [][]byte { +func (x *BeaconStateBellatrix) GetStateRoots() [][]byte { if x != nil { return x.StateRoots } return nil } -func (x *BeaconStateMerge) GetHistoricalRoots() [][]byte { +func (x *BeaconStateBellatrix) GetHistoricalRoots() [][]byte { if x != nil { return x.HistoricalRoots } return nil } -func (x *BeaconStateMerge) GetEth1Data() *Eth1Data { +func (x *BeaconStateBellatrix) GetEth1Data() *Eth1Data { if x != nil { return x.Eth1Data } return nil } -func (x *BeaconStateMerge) GetEth1DataVotes() []*Eth1Data { +func (x *BeaconStateBellatrix) GetEth1DataVotes() []*Eth1Data { if x != nil { return x.Eth1DataVotes } return nil } -func (x *BeaconStateMerge) GetEth1DepositIndex() uint64 { +func (x *BeaconStateBellatrix) GetEth1DepositIndex() uint64 { if x != nil { return x.Eth1DepositIndex } return 0 } -func (x *BeaconStateMerge) GetValidators() []*Validator { +func (x *BeaconStateBellatrix) GetValidators() []*Validator { if x != nil { return x.Validators } return nil } -func (x *BeaconStateMerge) GetBalances() []uint64 { +func (x *BeaconStateBellatrix) GetBalances() []uint64 { if x != nil { return x.Balances } return nil } -func (x *BeaconStateMerge) GetRandaoMixes() [][]byte { +func (x *BeaconStateBellatrix) GetRandaoMixes() [][]byte { if x != nil { return x.RandaoMixes } return nil } -func (x *BeaconStateMerge) GetSlashings() []uint64 { +func (x *BeaconStateBellatrix) GetSlashings() []uint64 { if x != nil { return x.Slashings } return nil } -func (x *BeaconStateMerge) GetPreviousEpochParticipation() []byte { +func (x *BeaconStateBellatrix) GetPreviousEpochParticipation() []byte { if x != nil { return x.PreviousEpochParticipation } return nil } -func (x *BeaconStateMerge) GetCurrentEpochParticipation() []byte { +func (x *BeaconStateBellatrix) GetCurrentEpochParticipation() []byte { if x != nil { return x.CurrentEpochParticipation } return nil } -func (x *BeaconStateMerge) GetJustificationBits() github_com_prysmaticlabs_go_bitfield.Bitvector4 { +func (x *BeaconStateBellatrix) GetJustificationBits() github_com_prysmaticlabs_go_bitfield.Bitvector4 { if x != nil { return x.JustificationBits } return github_com_prysmaticlabs_go_bitfield.Bitvector4(nil) } -func (x *BeaconStateMerge) GetPreviousJustifiedCheckpoint() *Checkpoint { +func (x *BeaconStateBellatrix) GetPreviousJustifiedCheckpoint() *Checkpoint { if x != nil { return x.PreviousJustifiedCheckpoint } return nil } -func (x *BeaconStateMerge) GetCurrentJustifiedCheckpoint() *Checkpoint { +func (x *BeaconStateBellatrix) GetCurrentJustifiedCheckpoint() *Checkpoint { if x != nil { return x.CurrentJustifiedCheckpoint } return nil } -func (x *BeaconStateMerge) GetFinalizedCheckpoint() *Checkpoint { +func (x *BeaconStateBellatrix) GetFinalizedCheckpoint() *Checkpoint { if x != nil { return x.FinalizedCheckpoint } return nil } -func (x *BeaconStateMerge) GetInactivityScores() []uint64 { +func (x *BeaconStateBellatrix) GetInactivityScores() []uint64 { if x != nil { return x.InactivityScores } return nil } -func (x *BeaconStateMerge) GetCurrentSyncCommittee() *SyncCommittee { +func (x *BeaconStateBellatrix) GetCurrentSyncCommittee() *SyncCommittee { if x != nil { return x.CurrentSyncCommittee } return nil } -func (x *BeaconStateMerge) GetNextSyncCommittee() *SyncCommittee { +func (x *BeaconStateBellatrix) GetNextSyncCommittee() *SyncCommittee { if x != nil { return x.NextSyncCommittee } return nil } -func (x *BeaconStateMerge) GetLatestExecutionPayloadHeader() *ExecutionPayloadHeader { +func (x *BeaconStateBellatrix) GetLatestExecutionPayloadHeader() *ExecutionPayloadHeader { if x != nil { return x.LatestExecutionPayloadHeader } @@ -1780,168 +1780,168 @@ var file_proto_prysm_v1alpha1_beacon_state_proto_rawDesc = []byte{ 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xaf, 0x0e, 0x0a, 0x10, 0x42, 0x65, 0x61, - 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x12, 0x22, 0x0a, - 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0xe9, 0x07, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0xea, 0x07, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, 0x67, 0x65, 0x6e, - 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, - 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, - 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, - 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x18, 0xec, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, - 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, - 0x6b, 0x52, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x12, 0x59, 0x0a, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, - 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0xd1, - 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, - 0x11, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x73, 0x18, 0xd2, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, - 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, - 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, - 0x18, 0xd3, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, - 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, - 0x12, 0x40, 0x0a, 0x10, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, - 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd4, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, - 0x04, 0x3f, 0x2c, 0x33, 0x32, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, - 0x36, 0x52, 0x0f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6f, - 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0xb9, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, - 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x52, 0x0a, 0x0f, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76, - 0x6f, 0x74, 0x65, 0x73, 0x18, 0xba, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x92, 0xb5, - 0x18, 0x04, 0x32, 0x30, 0x34, 0x38, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, - 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xbb, 0x17, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x10, 0x65, 0x74, 0x68, 0x31, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x54, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x18, 0xa1, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x11, 0x92, 0xb5, 0x18, - 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x0a, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0xa2, 0x1f, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, - 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, - 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x72, 0x61, - 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x73, 0x18, 0x89, 0x27, 0x20, 0x03, 0x28, - 0x0c, 0x42, 0x0c, 0x8a, 0xb5, 0x18, 0x08, 0x36, 0x35, 0x35, 0x33, 0x36, 0x2c, 0x33, 0x32, 0x52, - 0x0b, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x4d, 0x69, 0x78, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x09, - 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0xf1, 0x2e, 0x20, 0x03, 0x28, 0x04, - 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x38, 0x31, 0x39, 0x32, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x54, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, - 0x73, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xd9, 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, 0xb5, - 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, - 0x1a, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, - 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x1b, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xda, 0x36, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, - 0x37, 0x37, 0x37, 0x36, 0x52, 0x19, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x68, 0x0a, 0x12, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0xc1, 0x3e, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x8a, 0xb5, - 0x18, 0x01, 0x31, 0x82, 0xb5, 0x18, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, - 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x52, 0x11, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x66, 0x0a, 0x1d, 0x70, 0x72, 0x65, - 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc2, 0x3e, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, - 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x12, 0x64, 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x18, 0xc3, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xb3, 0x0e, 0x0a, 0x14, 0x42, 0x65, 0x61, + 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, + 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, + 0x15, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0xeb, + 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, + 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x6f, 0x72, + 0x6b, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1a, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, - 0xc4, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3f, - 0x0a, 0x11, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, - 0x72, 0x65, 0x73, 0x18, 0xa9, 0x46, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, - 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x10, 0x69, - 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, - 0x5b, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0xaa, 0x46, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x52, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, - 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x55, 0x0a, 0x13, - 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x65, 0x18, 0xab, 0x46, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x12, 0x59, 0x0a, 0x13, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0xd1, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x52, 0x11, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd2, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, + 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd3, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, + 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x10, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, + 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd4, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, + 0x14, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x33, 0x32, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, + 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x0f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, + 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0xb9, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, - 0x52, 0x11, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x65, 0x12, 0x75, 0x0a, 0x1f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x91, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, + 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x0f, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0xba, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, + 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x32, 0x30, 0x34, 0x38, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x31, + 0x44, 0x61, 0x74, 0x61, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x74, 0x68, + 0x31, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0xbb, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x74, 0x68, 0x31, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x54, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0xa1, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x1c, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xb5, 0x04, 0x0a, 0x16, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, - 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2b, - 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x32, 0x30, 0x52, 0x0c, 0x66, - 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x5f, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, - 0x52, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, - 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x07, 0x8a, 0xb5, 0x18, 0x03, 0x32, 0x35, 0x36, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x73, - 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x1e, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x06, 0x72, - 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, - 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, - 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x25, - 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, - 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x10, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, - 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, - 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, - 0x33, 0x32, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x33, 0x0a, - 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, - 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, - 0x6f, 0x74, 0x42, 0x98, 0x01, 0x0a, 0x19, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x42, 0x10, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, - 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x15, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, + 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, + 0x37, 0x36, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2e, + 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0xa2, 0x1f, 0x20, 0x03, 0x28, + 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, + 0x37, 0x37, 0x37, 0x36, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x30, + 0x0a, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x73, 0x18, 0x89, + 0x27, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0c, 0x8a, 0xb5, 0x18, 0x08, 0x36, 0x35, 0x35, 0x33, 0x36, + 0x2c, 0x33, 0x32, 0x52, 0x0b, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x4d, 0x69, 0x78, 0x65, 0x73, + 0x12, 0x27, 0x0a, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0xf1, 0x2e, + 0x20, 0x03, 0x28, 0x04, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x38, 0x31, 0x39, 0x32, 0x52, 0x09, + 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x54, 0x0a, 0x1c, 0x70, 0x72, 0x65, + 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, + 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xd9, 0x36, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, + 0x37, 0x37, 0x36, 0x52, 0x1a, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x52, 0x0a, 0x1b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xda, + 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, + 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x19, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x12, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0xc1, 0x3e, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x38, 0x8a, 0xb5, 0x18, 0x01, 0x31, 0x82, 0xb5, 0x18, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, + 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x52, 0x11, 0x6a, 0x75, 0x73, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x66, 0x0a, + 0x1d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc2, + 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, + 0x75, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc3, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x14, 0x66, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0xc4, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, 0x66, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x11, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, + 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0xa9, 0x46, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, + 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, + 0x36, 0x52, 0x10, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, + 0x72, 0x65, 0x73, 0x12, 0x5b, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, + 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0xaa, 0x46, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x52, 0x14, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, + 0x12, 0x55, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0xab, 0x46, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x65, 0x52, 0x11, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x75, 0x0a, 0x1f, 0x6c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x91, 0x4e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x52, 0x1c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xb5, + 0x04, 0x0a, 0x16, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, + 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x2b, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, + 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x32, + 0x30, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, + 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x33, 0x32, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0x8a, 0xb5, 0x18, 0x03, 0x32, 0x35, 0x36, 0x52, 0x09, + 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x12, 0x1e, 0x0a, 0x06, 0x72, 0x61, 0x6e, + 0x64, 0x6f, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, + 0x32, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, + 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, + 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, + 0x55, 0x73, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x25, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x10, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0d, 0x62, 0x61, 0x73, + 0x65, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x47, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, + 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x33, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x33, 0x32, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x42, 0x98, 0x01, 0x0a, 0x19, 0x6f, 0x72, 0x67, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, + 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, + 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65, 0x74, + 0x68, 0xaa, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, + 0x2e, 0x56, 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1970,7 +1970,7 @@ var file_proto_prysm_v1alpha1_beacon_state_proto_goTypes = []interface{}{ (*DepositMessage)(nil), // 9: ethereum.eth.v1alpha1.DepositMessage (*SyncCommittee)(nil), // 10: ethereum.eth.v1alpha1.SyncCommittee (*SyncAggregatorSelectionData)(nil), // 11: ethereum.eth.v1alpha1.SyncAggregatorSelectionData - (*BeaconStateMerge)(nil), // 12: ethereum.eth.v1alpha1.BeaconStateMerge + (*BeaconStateBellatrix)(nil), // 12: ethereum.eth.v1alpha1.BeaconStateBellatrix (*ExecutionPayloadHeader)(nil), // 13: ethereum.eth.v1alpha1.ExecutionPayloadHeader (*BeaconBlockHeader)(nil), // 14: ethereum.eth.v1alpha1.BeaconBlockHeader (*Eth1Data)(nil), // 15: ethereum.eth.v1alpha1.Eth1Data @@ -2001,17 +2001,17 @@ var file_proto_prysm_v1alpha1_beacon_state_proto_depIdxs = []int32{ 10, // 19: ethereum.eth.v1alpha1.BeaconStateAltair.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee 18, // 20: ethereum.eth.v1alpha1.PendingAttestation.data:type_name -> ethereum.eth.v1alpha1.AttestationData 2, // 21: ethereum.eth.v1alpha1.CheckPtInfo.fork:type_name -> ethereum.eth.v1alpha1.Fork - 2, // 22: ethereum.eth.v1alpha1.BeaconStateMerge.fork:type_name -> ethereum.eth.v1alpha1.Fork - 14, // 23: ethereum.eth.v1alpha1.BeaconStateMerge.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader - 15, // 24: ethereum.eth.v1alpha1.BeaconStateMerge.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 15, // 25: ethereum.eth.v1alpha1.BeaconStateMerge.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data - 16, // 26: ethereum.eth.v1alpha1.BeaconStateMerge.validators:type_name -> ethereum.eth.v1alpha1.Validator - 17, // 27: ethereum.eth.v1alpha1.BeaconStateMerge.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 17, // 28: ethereum.eth.v1alpha1.BeaconStateMerge.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 17, // 29: ethereum.eth.v1alpha1.BeaconStateMerge.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 10, // 30: ethereum.eth.v1alpha1.BeaconStateMerge.current_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee - 10, // 31: ethereum.eth.v1alpha1.BeaconStateMerge.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee - 13, // 32: ethereum.eth.v1alpha1.BeaconStateMerge.latest_execution_payload_header:type_name -> ethereum.eth.v1alpha1.ExecutionPayloadHeader + 2, // 22: ethereum.eth.v1alpha1.BeaconStateBellatrix.fork:type_name -> ethereum.eth.v1alpha1.Fork + 14, // 23: ethereum.eth.v1alpha1.BeaconStateBellatrix.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 15, // 24: ethereum.eth.v1alpha1.BeaconStateBellatrix.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 15, // 25: ethereum.eth.v1alpha1.BeaconStateBellatrix.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data + 16, // 26: ethereum.eth.v1alpha1.BeaconStateBellatrix.validators:type_name -> ethereum.eth.v1alpha1.Validator + 17, // 27: ethereum.eth.v1alpha1.BeaconStateBellatrix.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 17, // 28: ethereum.eth.v1alpha1.BeaconStateBellatrix.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 17, // 29: ethereum.eth.v1alpha1.BeaconStateBellatrix.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 10, // 30: ethereum.eth.v1alpha1.BeaconStateBellatrix.current_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee + 10, // 31: ethereum.eth.v1alpha1.BeaconStateBellatrix.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee + 13, // 32: ethereum.eth.v1alpha1.BeaconStateBellatrix.latest_execution_payload_header:type_name -> ethereum.eth.v1alpha1.ExecutionPayloadHeader 33, // [33:33] is the sub-list for method output_type 33, // [33:33] is the sub-list for method input_type 33, // [33:33] is the sub-list for extension type_name @@ -2173,7 +2173,7 @@ func file_proto_prysm_v1alpha1_beacon_state_proto_init() { } } file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BeaconStateMerge); i { + switch v := v.(*BeaconStateBellatrix); i { case 0: return &v.state case 1: diff --git a/proto/prysm/v1alpha1/beacon_state.proto b/proto/prysm/v1alpha1/beacon_state.proto index 5991afa7fdaa..06c897d15c38 100644 --- a/proto/prysm/v1alpha1/beacon_state.proto +++ b/proto/prysm/v1alpha1/beacon_state.proto @@ -187,7 +187,7 @@ message SyncAggregatorSelectionData { uint64 subcommittee_index = 2; } -message BeaconStateMerge { +message BeaconStateBellatrix { // Versioning [1001-2000] uint64 genesis_time = 1001; bytes genesis_validators_root = 1002 [(ethereum.eth.ext.ssz_size) = "32"]; @@ -231,7 +231,7 @@ message BeaconStateMerge { SyncCommittee current_sync_committee = 9002; // [New in Altair] SyncCommittee next_sync_committee = 9003; // [New in Altair] - // Merge fields [10001-11000] + // Bellatrix fields [10001-11000] ExecutionPayloadHeader latest_execution_payload_header = 10001; // [New in Merge] } diff --git a/proto/prysm/v1alpha1/cloners_test.go b/proto/prysm/v1alpha1/cloners_test.go index c14e0a2cbebe..059a0a511284 100644 --- a/proto/prysm/v1alpha1/cloners_test.go +++ b/proto/prysm/v1alpha1/cloners_test.go @@ -318,8 +318,8 @@ func TestCopyPayloadHeader(t *testing.T) { assert.NotEmpty(t, got, "Copied execution payload header has empty fields") } -func TestCopySignedBeaconBlockMerge(t *testing.T) { - sbb := genSignedBeaconBlockMerge() +func TestCopySignedBeaconBlockBellatrix(t *testing.T) { + sbb := genSignedBeaconBlockBellatrix() got := v1alpha1.CopySignedBeaconBlockMerge(sbb) if !reflect.DeepEqual(got, sbb) { @@ -328,8 +328,8 @@ func TestCopySignedBeaconBlockMerge(t *testing.T) { assert.NotEmpty(t, sbb, "Copied signed beacon block Merge has empty fields") } -func TestCopyBeaconBlockMerge(t *testing.T) { - b := genBeaconBlockMerge() +func TestCopyBeaconBlockBellatrix(t *testing.T) { + b := genBeaconBlockBellatrix() got := v1alpha1.CopyBeaconBlockMerge(b) if !reflect.DeepEqual(got, b) { @@ -338,8 +338,8 @@ func TestCopyBeaconBlockMerge(t *testing.T) { assert.NotEmpty(t, b, "Copied beacon block Merge has empty fields") } -func TestCopyBeaconBlockBodyMerge(t *testing.T) { - bb := genBeaconBlockBodyMerge() +func TestCopyBeaconBlockBodyBellatrix(t *testing.T) { + bb := genBeaconBlockBodyBellatrix() got := v1alpha1.CopyBeaconBlockBodyMerge(bb) if !reflect.DeepEqual(got, bb) { @@ -604,7 +604,7 @@ func genSignedBeaconBlockAltair() *v1alpha1.SignedBeaconBlockAltair { } } -func genBeaconBlockBodyMerge() *v1alpha1.BeaconBlockBodyMerge { +func genBeaconBlockBodyBellatrix() *v1alpha1.BeaconBlockBodyMerge { return &v1alpha1.BeaconBlockBodyMerge{ RandaoReveal: bytes(), Eth1Data: genEth1Data(), @@ -619,19 +619,19 @@ func genBeaconBlockBodyMerge() *v1alpha1.BeaconBlockBodyMerge { } } -func genBeaconBlockMerge() *v1alpha1.BeaconBlockMerge { +func genBeaconBlockBellatrix() *v1alpha1.BeaconBlockMerge { return &v1alpha1.BeaconBlockMerge{ Slot: 123455, ProposerIndex: 55433, ParentRoot: bytes(), StateRoot: bytes(), - Body: genBeaconBlockBodyMerge(), + Body: genBeaconBlockBodyBellatrix(), } } -func genSignedBeaconBlockMerge() *v1alpha1.SignedBeaconBlockMerge { +func genSignedBeaconBlockBellatrix() *v1alpha1.SignedBeaconBlockMerge { return &v1alpha1.SignedBeaconBlockMerge{ - Block: genBeaconBlockMerge(), + Block: genBeaconBlockBellatrix(), Signature: bytes(), } } diff --git a/proto/prysm/v1alpha1/generated.ssz.go b/proto/prysm/v1alpha1/generated.ssz.go index 9f5863f149e4..1afa9e0292af 100644 --- a/proto/prysm/v1alpha1/generated.ssz.go +++ b/proto/prysm/v1alpha1/generated.ssz.go @@ -6451,13 +6451,13 @@ func (s *SyncAggregatorSelectionData) HashTreeRootWith(hh *ssz.Hasher) (err erro return } -// MarshalSSZ ssz marshals the BeaconStateMerge object -func (b *BeaconStateMerge) MarshalSSZ() ([]byte, error) { +// MarshalSSZ ssz marshals the BeaconStateBellatrix object +func (b *BeaconStateBellatrix) MarshalSSZ() ([]byte, error) { return ssz.MarshalSSZ(b) } -// MarshalSSZTo ssz marshals the BeaconStateMerge object to a target array -func (b *BeaconStateMerge) MarshalSSZTo(buf []byte) (dst []byte, err error) { +// MarshalSSZTo ssz marshals the BeaconStateBellatrix object to a target array +func (b *BeaconStateBellatrix) MarshalSSZTo(buf []byte) (dst []byte, err error) { dst = buf offset := int(2736633) @@ -6706,8 +6706,8 @@ func (b *BeaconStateMerge) MarshalSSZTo(buf []byte) (dst []byte, err error) { return } -// UnmarshalSSZ ssz unmarshals the BeaconStateMerge object -func (b *BeaconStateMerge) UnmarshalSSZ(buf []byte) error { +// UnmarshalSSZ ssz unmarshals the BeaconStateBellatrix object +func (b *BeaconStateBellatrix) UnmarshalSSZ(buf []byte) error { var err error size := uint64(len(buf)) if size < 2736633 { @@ -6994,8 +6994,8 @@ func (b *BeaconStateMerge) UnmarshalSSZ(buf []byte) error { return err } -// SizeSSZ returns the ssz encoded size in bytes for the BeaconStateMerge object -func (b *BeaconStateMerge) SizeSSZ() (size int) { +// SizeSSZ returns the ssz encoded size in bytes for the BeaconStateBellatrix object +func (b *BeaconStateBellatrix) SizeSSZ() (size int) { size = 2736633 // Field (7) 'HistoricalRoots' @@ -7028,13 +7028,13 @@ func (b *BeaconStateMerge) SizeSSZ() (size int) { return } -// HashTreeRoot ssz hashes the BeaconStateMerge object -func (b *BeaconStateMerge) HashTreeRoot() ([32]byte, error) { +// HashTreeRoot ssz hashes the BeaconStateBellatrix object +func (b *BeaconStateBellatrix) HashTreeRoot() ([32]byte, error) { return ssz.HashWithDefaultHasher(b) } -// HashTreeRootWith ssz hashes the BeaconStateMerge object with a hasher -func (b *BeaconStateMerge) HashTreeRootWith(hh *ssz.Hasher) (err error) { +// HashTreeRootWith ssz hashes the BeaconStateBellatrix object with a hasher +func (b *BeaconStateBellatrix) HashTreeRootWith(hh *ssz.Hasher) (err error) { indx := hh.Index() // Field (0) 'GenesisTime' diff --git a/proto/prysm/v1alpha1/validator-client/keymanager.proto b/proto/prysm/v1alpha1/validator-client/keymanager.proto index 087d16780b73..b5ad65815472 100644 --- a/proto/prysm/v1alpha1/validator-client/keymanager.proto +++ b/proto/prysm/v1alpha1/validator-client/keymanager.proto @@ -75,7 +75,7 @@ message SignRequest { ethereum.eth.v1alpha1.ContributionAndProof contribution_and_proof = 109; bytes sync_message_block_root = 110; - // Merge objects. + // Bellatrix objects. ethereum.eth.v1alpha1.BeaconBlockMerge blockV3 = 111; } ethereum.eth.v1alpha1.Fork fork = 4; diff --git a/proto/prysm/v1alpha1/wrapper/beacon_block.go b/proto/prysm/v1alpha1/wrapper/beacon_block.go index 2ca3b4d37668..ea31eea003ca 100644 --- a/proto/prysm/v1alpha1/wrapper/beacon_block.go +++ b/proto/prysm/v1alpha1/wrapper/beacon_block.go @@ -633,7 +633,7 @@ func (_ mergeSignedBeaconBlock) PbAltairBlock() (*eth.SignedBeaconBlockAltair, e // Version of the underlying protobuf object. func (_ mergeSignedBeaconBlock) Version() int { - return version.Merge + return version.Bellatrix } func (w mergeSignedBeaconBlock) Header() (*eth.SignedBeaconBlockHeader, error) { @@ -735,7 +735,7 @@ func (w mergeBeaconBlock) Proto() proto.Message { // Version of the underlying protobuf object. func (_ mergeBeaconBlock) Version() int { - return version.Merge + return version.Bellatrix } // mergeBeaconBlockBody is a wrapper of a beacon block body. diff --git a/proto/prysm/v1alpha1/wrapper/beacon_block_test.go b/proto/prysm/v1alpha1/wrapper/beacon_block_test.go index 465984cd8a39..fea23ace2eaa 100644 --- a/proto/prysm/v1alpha1/wrapper/beacon_block_test.go +++ b/proto/prysm/v1alpha1/wrapper/beacon_block_test.go @@ -335,7 +335,7 @@ func TestPhase0SignedBeaconBlock_Header(t *testing.T) { assert.DeepEqual(t, signature, header.Signature) } -func TestMergeSignedBeaconBlock_Header(t *testing.T) { +func TestBellatrixSignedBeaconBlock_Header(t *testing.T) { root := bytesutil.PadTo([]byte("root"), 32) signature := bytesutil.PadTo([]byte("sig"), 96) body := ðpb.BeaconBlockBodyMerge{} @@ -365,7 +365,7 @@ func TestMergeSignedBeaconBlock_Header(t *testing.T) { assert.DeepEqual(t, signature, header.Signature) } -func TestMergeSignedBeaconBlock_Signature(t *testing.T) { +func TestBellatrixSignedBeaconBlock_Signature(t *testing.T) { sig := []byte{0x11, 0x22} wsb, err := wrapper.WrappedMergeSignedBeaconBlock(ðpb.SignedBeaconBlockMerge{Block: ðpb.BeaconBlockMerge{}, Signature: sig}) require.NoError(t, err) @@ -375,7 +375,7 @@ func TestMergeSignedBeaconBlock_Signature(t *testing.T) { } } -func TestMergeSignedBeaconBlock_Block(t *testing.T) { +func TestBellatrixSignedBeaconBlock_Block(t *testing.T) { blk := ðpb.BeaconBlockMerge{Slot: 54} wsb, err := wrapper.WrappedMergeSignedBeaconBlock(ðpb.SignedBeaconBlockMerge{Block: blk}) require.NoError(t, err) @@ -383,7 +383,7 @@ func TestMergeSignedBeaconBlock_Block(t *testing.T) { assert.DeepEqual(t, blk, wsb.Block().Proto()) } -func TestMergeSignedBeaconBlock_IsNil(t *testing.T) { +func TestBellatrixSignedBeaconBlock_IsNil(t *testing.T) { _, err := wrapper.WrappedMergeSignedBeaconBlock(nil) require.Equal(t, wrapper.ErrNilObjectWrapped, err) @@ -393,11 +393,11 @@ func TestMergeSignedBeaconBlock_IsNil(t *testing.T) { assert.Equal(t, false, wsb.IsNil()) } -func TestMergeSignedBeaconBlock_Copy(t *testing.T) { +func TestBellatrixSignedBeaconBlock_Copy(t *testing.T) { t.Skip("TODO: Missing mutation evaluation helpers") } -func TestMergeSignedBeaconBlock_Proto(t *testing.T) { +func TestBellatrixSignedBeaconBlock_Proto(t *testing.T) { sb := ðpb.SignedBeaconBlockMerge{ Block: ðpb.BeaconBlockMerge{Slot: 66}, Signature: []byte{0x11, 0x22}, @@ -408,7 +408,7 @@ func TestMergeSignedBeaconBlock_Proto(t *testing.T) { assert.Equal(t, sb, wsb.Proto()) } -func TestMergeSignedBeaconBlock_PbPhase0Block(t *testing.T) { +func TestBellatrixSignedBeaconBlock_PbPhase0Block(t *testing.T) { wsb, err := wrapper.WrappedMergeSignedBeaconBlock(ðpb.SignedBeaconBlockMerge{Block: ðpb.BeaconBlockMerge{}}) require.NoError(t, err) @@ -417,7 +417,7 @@ func TestMergeSignedBeaconBlock_PbPhase0Block(t *testing.T) { } } -func TestMergeSignedBeaconBlock_PbMergeBlock(t *testing.T) { +func TestBellatrixSignedBeaconBlock_PbMergeBlock(t *testing.T) { sb := ðpb.SignedBeaconBlockMerge{ Block: ðpb.BeaconBlockMerge{Slot: 66}, Signature: []byte{0x11, 0x22}, @@ -430,7 +430,7 @@ func TestMergeSignedBeaconBlock_PbMergeBlock(t *testing.T) { assert.Equal(t, sb, got) } -func TestMergeSignedBeaconBlock_MarshalSSZTo(t *testing.T) { +func TestBellatrixSignedBeaconBlock_MarshalSSZTo(t *testing.T) { wsb, err := wrapper.WrappedMergeSignedBeaconBlock(util.HydrateSignedBeaconBlockMerge(ðpb.SignedBeaconBlockMerge{})) assert.NoError(t, err) @@ -440,7 +440,7 @@ func TestMergeSignedBeaconBlock_MarshalSSZTo(t *testing.T) { assert.NotEqual(t, 0, len(b)) } -func TestMergeSignedBeaconBlock_SSZ(t *testing.T) { +func TestBellatrixSignedBeaconBlock_SSZ(t *testing.T) { wsb, err := wrapper.WrappedMergeSignedBeaconBlock(util.HydrateSignedBeaconBlockMerge(ðpb.SignedBeaconBlockMerge{})) assert.NoError(t, err) @@ -453,14 +453,14 @@ func TestMergeSignedBeaconBlock_SSZ(t *testing.T) { assert.NoError(t, wsb.UnmarshalSSZ(b)) } -func TestMergeSignedBeaconBlock_Version(t *testing.T) { +func TestBellatrixSignedBeaconBlock_Version(t *testing.T) { wsb, err := wrapper.WrappedMergeSignedBeaconBlock(ðpb.SignedBeaconBlockMerge{Block: ðpb.BeaconBlockMerge{}}) require.NoError(t, err) - assert.Equal(t, version.Merge, wsb.Version()) + assert.Equal(t, version.Bellatrix, wsb.Version()) } -func TestMergeBeaconBlock_Slot(t *testing.T) { +func TestBellatrixBeaconBlock_Slot(t *testing.T) { slot := types.Slot(546) wb, err := wrapper.WrappedMergeBeaconBlock(ðpb.BeaconBlockMerge{Slot: slot}) require.NoError(t, err) @@ -468,7 +468,7 @@ func TestMergeBeaconBlock_Slot(t *testing.T) { assert.Equal(t, slot, wb.Slot()) } -func TestMergeBeaconBlock_ProposerIndex(t *testing.T) { +func TestBellatrixBeaconBlock_ProposerIndex(t *testing.T) { pi := types.ValidatorIndex(555) wb, err := wrapper.WrappedMergeBeaconBlock(ðpb.BeaconBlockMerge{ProposerIndex: pi}) require.NoError(t, err) @@ -476,7 +476,7 @@ func TestMergeBeaconBlock_ProposerIndex(t *testing.T) { assert.Equal(t, pi, wb.ProposerIndex()) } -func TestMergeBeaconBlock_ParentRoot(t *testing.T) { +func TestBellatrixBeaconBlock_ParentRoot(t *testing.T) { root := []byte{0xAA, 0xBF, 0x33, 0x01} wb, err := wrapper.WrappedMergeBeaconBlock(ðpb.BeaconBlockMerge{ParentRoot: root}) require.NoError(t, err) @@ -484,7 +484,7 @@ func TestMergeBeaconBlock_ParentRoot(t *testing.T) { assert.DeepEqual(t, root, wb.ParentRoot()) } -func TestMergeBeaconBlock_StateRoot(t *testing.T) { +func TestBellatrixBeaconBlock_StateRoot(t *testing.T) { root := []byte{0xAA, 0xBF, 0x33, 0x01} wb, err := wrapper.WrappedMergeBeaconBlock(ðpb.BeaconBlockMerge{StateRoot: root}) require.NoError(t, err) @@ -492,7 +492,7 @@ func TestMergeBeaconBlock_StateRoot(t *testing.T) { assert.DeepEqual(t, root, wb.StateRoot()) } -func TestMergeBeaconBlock_Body(t *testing.T) { +func TestBellatrixBeaconBlock_Body(t *testing.T) { body := ðpb.BeaconBlockBodyMerge{Graffiti: []byte{0x44}} wb, err := wrapper.WrappedMergeBeaconBlock(ðpb.BeaconBlockMerge{Body: body}) require.NoError(t, err) @@ -500,7 +500,7 @@ func TestMergeBeaconBlock_Body(t *testing.T) { assert.Equal(t, body, wb.Body().Proto()) } -func TestMergeBeaconBlock_IsNil(t *testing.T) { +func TestBellatrixBeaconBlock_IsNil(t *testing.T) { _, err := wrapper.WrappedMergeBeaconBlock(nil) require.Equal(t, wrapper.ErrNilObjectWrapped, err) @@ -510,7 +510,7 @@ func TestMergeBeaconBlock_IsNil(t *testing.T) { assert.Equal(t, false, wb.IsNil()) } -func TestMergeBeaconBlock_HashTreeRoot(t *testing.T) { +func TestBellatrixBeaconBlock_HashTreeRoot(t *testing.T) { wb, err := wrapper.WrappedMergeBeaconBlock(util.HydrateBeaconBlockMerge(ðpb.BeaconBlockMerge{})) require.NoError(t, err) @@ -519,7 +519,7 @@ func TestMergeBeaconBlock_HashTreeRoot(t *testing.T) { assert.NotEmpty(t, rt) } -func TestMergeBeaconBlock_Proto(t *testing.T) { +func TestBellatrixBeaconBlock_Proto(t *testing.T) { blk := ðpb.BeaconBlockMerge{ProposerIndex: 234} wb, err := wrapper.WrappedMergeBeaconBlock(blk) require.NoError(t, err) @@ -527,7 +527,7 @@ func TestMergeBeaconBlock_Proto(t *testing.T) { assert.Equal(t, blk, wb.Proto()) } -func TestMergeBeaconBlock_SSZ(t *testing.T) { +func TestBellatrixBeaconBlock_SSZ(t *testing.T) { wb, err := wrapper.WrappedMergeBeaconBlock(util.HydrateBeaconBlockMerge(ðpb.BeaconBlockMerge{})) assert.NoError(t, err) @@ -540,14 +540,14 @@ func TestMergeBeaconBlock_SSZ(t *testing.T) { assert.NoError(t, wb.UnmarshalSSZ(b)) } -func TestMergeBeaconBlock_Version(t *testing.T) { +func TestBellatrixBeaconBlock_Version(t *testing.T) { wb, err := wrapper.WrappedMergeBeaconBlock(ðpb.BeaconBlockMerge{}) require.NoError(t, err) - assert.Equal(t, version.Merge, wb.Version()) + assert.Equal(t, version.Bellatrix, wb.Version()) } -func TestMergeBeaconBlockBody_RandaoReveal(t *testing.T) { +func TestBellatrixBeaconBlockBody_RandaoReveal(t *testing.T) { root := []byte{0xAA, 0xBF, 0x33, 0x01} wbb, err := wrapper.WrappedMergeBeaconBlockBody(ðpb.BeaconBlockBodyMerge{RandaoReveal: root}) require.NoError(t, err) @@ -555,7 +555,7 @@ func TestMergeBeaconBlockBody_RandaoReveal(t *testing.T) { assert.DeepEqual(t, root, wbb.RandaoReveal()) } -func TestMergeBeaconBlockBody_Eth1Data(t *testing.T) { +func TestBellatrixBeaconBlockBody_Eth1Data(t *testing.T) { data := ðpb.Eth1Data{} body := ðpb.BeaconBlockBodyMerge{ Eth1Data: data, @@ -565,7 +565,7 @@ func TestMergeBeaconBlockBody_Eth1Data(t *testing.T) { assert.Equal(t, data, wbb.Eth1Data()) } -func TestMergeBeaconBlockBody_Graffiti(t *testing.T) { +func TestBellatrixBeaconBlockBody_Graffiti(t *testing.T) { graffiti := []byte{0x66, 0xAA} body := ðpb.BeaconBlockBodyMerge{Graffiti: graffiti} wbb, err := wrapper.WrappedMergeBeaconBlockBody(body) @@ -574,7 +574,7 @@ func TestMergeBeaconBlockBody_Graffiti(t *testing.T) { assert.DeepEqual(t, graffiti, wbb.Graffiti()) } -func TestMergeBeaconBlockBody_ProposerSlashings(t *testing.T) { +func TestBellatrixBeaconBlockBody_ProposerSlashings(t *testing.T) { ps := []*ethpb.ProposerSlashing{ {Header_1: ðpb.SignedBeaconBlockHeader{ Signature: []byte{0x11, 0x20}, @@ -587,7 +587,7 @@ func TestMergeBeaconBlockBody_ProposerSlashings(t *testing.T) { assert.DeepEqual(t, ps, wbb.ProposerSlashings()) } -func TestMergeBeaconBlockBody_AttesterSlashings(t *testing.T) { +func TestBellatrixBeaconBlockBody_AttesterSlashings(t *testing.T) { as := []*ethpb.AttesterSlashing{ {Attestation_1: ðpb.IndexedAttestation{Signature: []byte{0x11}}}, } @@ -598,7 +598,7 @@ func TestMergeBeaconBlockBody_AttesterSlashings(t *testing.T) { assert.DeepEqual(t, as, wbb.AttesterSlashings()) } -func TestMergeBeaconBlockBody_Attestations(t *testing.T) { +func TestBellatrixBeaconBlockBody_Attestations(t *testing.T) { atts := []*ethpb.Attestation{{Signature: []byte{0x88}}} body := ðpb.BeaconBlockBodyMerge{Attestations: atts} @@ -608,7 +608,7 @@ func TestMergeBeaconBlockBody_Attestations(t *testing.T) { assert.DeepEqual(t, atts, wbb.Attestations()) } -func TestMergeBeaconBlockBody_Deposits(t *testing.T) { +func TestBellatrixBeaconBlockBody_Deposits(t *testing.T) { deposits := []*ethpb.Deposit{ {Proof: [][]byte{{0x54, 0x10}}}, } @@ -619,7 +619,7 @@ func TestMergeBeaconBlockBody_Deposits(t *testing.T) { assert.DeepEqual(t, deposits, wbb.Deposits()) } -func TestMergeBeaconBlockBody_VoluntaryExits(t *testing.T) { +func TestBellatrixBeaconBlockBody_VoluntaryExits(t *testing.T) { exits := []*ethpb.SignedVoluntaryExit{ {Exit: ðpb.VoluntaryExit{Epoch: 54}}, } @@ -630,7 +630,7 @@ func TestMergeBeaconBlockBody_VoluntaryExits(t *testing.T) { assert.DeepEqual(t, exits, wbb.VoluntaryExits()) } -func TestMergeBeaconBlockBody_IsNil(t *testing.T) { +func TestBellatrixBeaconBlockBody_IsNil(t *testing.T) { _, err := wrapper.WrappedMergeBeaconBlockBody(nil) require.Equal(t, wrapper.ErrNilObjectWrapped, err) @@ -640,7 +640,7 @@ func TestMergeBeaconBlockBody_IsNil(t *testing.T) { } -func TestMergeBeaconBlockBody_HashTreeRoot(t *testing.T) { +func TestBellatrixBeaconBlockBody_HashTreeRoot(t *testing.T) { wb, err := wrapper.WrappedMergeBeaconBlockBody(util.HydrateBeaconBlockBodyMerge(ðpb.BeaconBlockBodyMerge{})) assert.NoError(t, err) @@ -649,7 +649,7 @@ func TestMergeBeaconBlockBody_HashTreeRoot(t *testing.T) { assert.NotEmpty(t, rt) } -func TestMergeBeaconBlockBody_Proto(t *testing.T) { +func TestBellatrixBeaconBlockBody_Proto(t *testing.T) { body := ðpb.BeaconBlockBodyMerge{Graffiti: []byte{0x66, 0xAA}} wbb, err := wrapper.WrappedMergeBeaconBlockBody(body) require.NoError(t, err) @@ -657,7 +657,7 @@ func TestMergeBeaconBlockBody_Proto(t *testing.T) { assert.Equal(t, body, wbb.Proto()) } -func TestMergeBeaconBlockBody_ExecutionPayload(t *testing.T) { +func TestBellatrixBeaconBlockBody_ExecutionPayload(t *testing.T) { payloads := ðpb.ExecutionPayload{ BlockNumber: 100, } diff --git a/runtime/version/fork.go b/runtime/version/fork.go index 311c47c23fc9..2ce11ff5faf6 100644 --- a/runtime/version/fork.go +++ b/runtime/version/fork.go @@ -3,7 +3,7 @@ package version const ( Phase0 = iota Altair - Merge + Bellatrix ) func String(version int) string { @@ -12,8 +12,8 @@ func String(version int) string { return "phase0" case Altair: return "altair" - case Merge: - return "merge" + case Bellatrix: + return "bellatrix" default: return "unknown version" } diff --git a/testing/util/merge_state.go b/testing/util/merge_state.go index b1c29155bd73..421f142168a5 100644 --- a/testing/util/merge_state.go +++ b/testing/util/merge_state.go @@ -26,7 +26,7 @@ func DeterministicGenesisStateMerge(t testing.TB, numValidators uint64) (state.B if err != nil { t.Fatal(errors.Wrapf(err, "failed to get eth1data for %d deposits", numValidators)) } - beaconState, err := genesisBeaconStateMerge(context.Background(), deposits, uint64(0), eth1Data) + beaconState, err := genesisBeaconStateBellatrix(context.Background(), deposits, uint64(0), eth1Data) if err != nil { t.Fatal(errors.Wrapf(err, "failed to get genesis beacon state of %d validators", numValidators)) } @@ -34,8 +34,8 @@ func DeterministicGenesisStateMerge(t testing.TB, numValidators uint64) (state.B return beaconState, privKeys } -// genesisBeaconStateMerge returns the genesis beacon state. -func genesisBeaconStateMerge(ctx context.Context, deposits []*ethpb.Deposit, genesisTime uint64, eth1Data *ethpb.Eth1Data) (state.BeaconState, error) { +// genesisBeaconStateBellatrix returns the genesis beacon state. +func genesisBeaconStateBellatrix(ctx context.Context, deposits []*ethpb.Deposit, genesisTime uint64, eth1Data *ethpb.Eth1Data) (state.BeaconState, error) { st, err := emptyGenesisStateMerge() if err != nil { return nil, err @@ -52,12 +52,12 @@ func genesisBeaconStateMerge(ctx context.Context, deposits []*ethpb.Deposit, gen return nil, errors.Wrap(err, "could not process validator deposits") } - return buildGenesisBeaconStateMerge(genesisTime, st, st.Eth1Data()) + return buildGenesisBeaconStateBellatrix(genesisTime, st, st.Eth1Data()) } // emptyGenesisStateMerge returns an empty genesis state in Merge format. func emptyGenesisStateMerge() (state.BeaconState, error) { - st := ðpb.BeaconStateMerge{ + st := ðpb.BeaconStateBellatrix{ // Misc fields. Slot: 0, Fork: ðpb.Fork{ @@ -85,7 +85,7 @@ func emptyGenesisStateMerge() (state.BeaconState, error) { return v3.InitializeFromProto(st) } -func buildGenesisBeaconStateMerge(genesisTime uint64, preState state.BeaconState, eth1Data *ethpb.Eth1Data) (state.BeaconState, error) { +func buildGenesisBeaconStateBellatrix(genesisTime uint64, preState state.BeaconState, eth1Data *ethpb.Eth1Data) (state.BeaconState, error) { if eth1Data == nil { return nil, errors.New("no eth1data provided for genesis state") } @@ -133,7 +133,7 @@ func buildGenesisBeaconStateMerge(genesisTime uint64, preState state.BeaconState if err != nil { return nil, err } - st := ðpb.BeaconStateMerge{ + st := ðpb.BeaconStateBellatrix{ // Misc fields. Slot: 0, GenesisTime: genesisTime, diff --git a/testing/util/merge_state_test.go b/testing/util/merge_state_test.go index 1d4abaa3723c..bffd50d2c5c8 100644 --- a/testing/util/merge_state_test.go +++ b/testing/util/merge_state_test.go @@ -8,20 +8,20 @@ import ( "github.com/prysmaticlabs/prysm/testing/require" ) -func TestDeterministicGenesisStateMerge(t *testing.T) { +func TestDeterministicGenesisStateBellatrix(t *testing.T) { st, k := DeterministicGenesisStateMerge(t, params.BeaconConfig().MaxCommitteesPerSlot) require.Equal(t, params.BeaconConfig().MaxCommitteesPerSlot, uint64(len(k))) require.Equal(t, params.BeaconConfig().MaxCommitteesPerSlot, uint64(st.NumValidators())) } -func TestGenesisBeaconStateMerge(t *testing.T) { +func TestGenesisBeaconStateBellatrix(t *testing.T) { ctx := context.Background() deposits, _, err := DeterministicDepositsAndKeys(params.BeaconConfig().MaxCommitteesPerSlot) require.NoError(t, err) eth1Data, err := DeterministicEth1Data(len(deposits)) require.NoError(t, err) gt := uint64(10000) - st, err := genesisBeaconStateMerge(ctx, deposits, gt, eth1Data) + st, err := genesisBeaconStateBellatrix(ctx, deposits, gt, eth1Data) require.NoError(t, err) require.Equal(t, gt, st.GenesisTime()) require.Equal(t, params.BeaconConfig().MaxCommitteesPerSlot, uint64(st.NumValidators())) diff --git a/validator/keymanager/remote-web3signer/client.go b/validator/keymanager/remote-web3signer/client.go index b09561a7c8d2..0c59a3f61ac8 100644 --- a/validator/keymanager/remote-web3signer/client.go +++ b/validator/keymanager/remote-web3signer/client.go @@ -55,7 +55,7 @@ type SignRequest struct { AggregationSlot *AggregationSlot `json:"aggregation_slot"` } -// ForkInfo a sub property object of the Sign request,in the future before the merge to remove the need to send the entire block body and just use the block_body_root. +// ForkInfo a sub property object of the Sign request,in the future before bellatrix to remove the need to send the entire block body and just use the block_body_root. type ForkInfo struct { Fork *Fork `json:"fork"` GenesisValidatorsRoot string `json:"genesis_validators_root"`