From 57038551d6e5eeeb4aed62f2e01aa22910fb966e Mon Sep 17 00:00:00 2001 From: terence tsao Date: Sun, 2 Dec 2018 18:17:48 -0800 Subject: [PATCH] Update ValidatorRecord Proto (#1030) --- .../chaintest/backend/simulated_backend.go | 9 +- beacon-chain/core/incentives/incentives.go | 24 +- beacon-chain/core/state/processing_test.go | 8 +- .../core/state/validity_conditions.go | 2 +- .../core/state/validity_conditions_test.go | 2 +- beacon-chain/core/types/state.go | 12 +- .../core/validators/committees_test.go | 10 +- beacon-chain/core/validators/validator.go | 40 +- .../core/validators/validator_test.go | 68 +-- proto/beacon/p2p/v1/types.pb.go | 552 ++++++++++-------- proto/beacon/p2p/v1/types.proto | 29 +- 11 files changed, 401 insertions(+), 355 deletions(-) diff --git a/beacon-chain/chaintest/backend/simulated_backend.go b/beacon-chain/chaintest/backend/simulated_backend.go index d591cfcc3a..0733ed7869 100644 --- a/beacon-chain/chaintest/backend/simulated_backend.go +++ b/beacon-chain/chaintest/backend/simulated_backend.go @@ -69,11 +69,10 @@ func (sb *SimulatedBackend) RunChainTest(testCase *ChainTestCase) error { validators := make([]*pb.ValidatorRecord, testCase.Config.ValidatorCount) for i := uint64(0); i < testCase.Config.ValidatorCount; i++ { validators[i] = &pb.ValidatorRecord{ - Status: uint64(params.Active), - Balance: c.DepositSize * c.Gwei, - WithdrawalAddress: []byte{}, - Pubkey: []byte{}, - RandaoCommitment: randaoReveal[:], + Status: uint64(params.Active), + Balance: c.DepositSize * c.Gwei, + Pubkey: []byte{}, + RandaoCommitmentHash32: randaoReveal[:], } } // TODO(#718): Next step is to update and save the blocks specified diff --git a/beacon-chain/core/incentives/incentives.go b/beacon-chain/core/incentives/incentives.go index 381fad15d2..6e6f3a5ad6 100644 --- a/beacon-chain/core/incentives/incentives.go +++ b/beacon-chain/core/incentives/incentives.go @@ -169,13 +169,11 @@ func RewardValidatorCrosslink( currentBalance := int64(validator.Balance) currentBalance += int64(currentBalance) / int64(rewardQuotient) * (2*int64(participatedDeposits) - int64(totalDeposit)) / int64(totalDeposit) return &pb.ValidatorRecord{ - Pubkey: validator.Pubkey, - WithdrawalShard: validator.WithdrawalShard, - WithdrawalAddress: validator.WithdrawalAddress, - RandaoCommitment: validator.RandaoCommitment, - Balance: uint64(currentBalance), - Status: validator.Status, - ExitSlot: validator.ExitSlot, + Pubkey: validator.Pubkey, + RandaoCommitmentHash32: validator.RandaoCommitmentHash32, + Balance: uint64(currentBalance), + Status: validator.Status, + LatestStatusChangeSlot: validator.LatestStatusChangeSlot, } } @@ -189,12 +187,10 @@ func PenaliseValidatorCrosslink( quadraticQuotient := QuadraticPenaltyQuotient() newBalance -= newBalance/rewardQuotient + newBalance*timeSinceLastConfirmation/quadraticQuotient return &pb.ValidatorRecord{ - Pubkey: validator.Pubkey, - WithdrawalShard: validator.WithdrawalShard, - WithdrawalAddress: validator.WithdrawalAddress, - RandaoCommitment: validator.RandaoCommitment, - Balance: uint64(newBalance), - Status: validator.Status, - ExitSlot: validator.ExitSlot, + Pubkey: validator.Pubkey, + RandaoCommitmentHash32: validator.RandaoCommitmentHash32, + Balance: uint64(newBalance), + Status: validator.Status, + LatestStatusChangeSlot: validator.LatestStatusChangeSlot, } } diff --git a/beacon-chain/core/state/processing_test.go b/beacon-chain/core/state/processing_test.go index 1719f2c36b..55872d54ac 100644 --- a/beacon-chain/core/state/processing_test.go +++ b/beacon-chain/core/state/processing_test.go @@ -119,13 +119,13 @@ func TestProcessSpecialRecords(t *testing.T) { if newValidators[4].Status != uint64(params.PendingExit) { t.Error("Validator 4 status is not PendingExit") } - if newValidators[4].ExitSlot != 99 { - t.Error("Validator 4 exit slot is not 99") + if newValidators[4].LatestStatusChangeSlot != 99 { + t.Error("Validator 4 last status change slot is not 99") } if newValidators[5].Status != uint64(params.PendingExit) { t.Error("Validator 5 status is not PendingExit") } - if newValidators[5].ExitSlot != 99 { - t.Error("Validator 5 exit slot is not 99") + if newValidators[5].LatestStatusChangeSlot != 99 { + t.Error("Validator 5 last status change slot is not 99") } } diff --git a/beacon-chain/core/state/validity_conditions.go b/beacon-chain/core/state/validity_conditions.go index c7d695932a..3e76c4ed6f 100644 --- a/beacon-chain/core/state/validity_conditions.go +++ b/beacon-chain/core/state/validity_conditions.go @@ -56,7 +56,7 @@ func IsValidBlock( return fmt.Errorf("could not get proposer index: %v", err) } - stateProposerRandaoSeed := beaconState.Validators()[proposerIndex].RandaoCommitment + stateProposerRandaoSeed := beaconState.Validators()[proposerIndex].RandaoCommitmentHash32 blockRandaoReveal := block.RandaoReveal() // If this is a block created by the simulator service (while in development diff --git a/beacon-chain/core/state/validity_conditions_test.go b/beacon-chain/core/state/validity_conditions_test.go index 071fb85da3..c198de3fbe 100644 --- a/beacon-chain/core/state/validity_conditions_test.go +++ b/beacon-chain/core/state/validity_conditions_test.go @@ -44,7 +44,7 @@ func TestBlockValidity(t *testing.T) { randaoPreCommit := [32]byte{'A'} hashedRandaoPreCommit := hashutil.Hash(randaoPreCommit[:]) validators := beaconState.Validators() - validators[1].RandaoCommitment = hashedRandaoPreCommit[:] + validators[1].RandaoCommitmentHash32 = hashedRandaoPreCommit[:] beaconState.SetValidators(validators) beaconState.SetLatestBlockHashes(recentBlockHashes) diff --git a/beacon-chain/core/types/state.go b/beacon-chain/core/types/state.go index 17950d653c..5ae0bd047a 100644 --- a/beacon-chain/core/types/state.go +++ b/beacon-chain/core/types/state.go @@ -83,13 +83,11 @@ func (b *BeaconState) CopyState() *BeaconState { validators := make([]*pb.ValidatorRecord, len(b.Validators())) for index, validator := range b.Validators() { validators[index] = &pb.ValidatorRecord{ - Pubkey: validator.GetPubkey(), - WithdrawalShard: validator.GetWithdrawalShard(), - WithdrawalAddress: validator.GetWithdrawalAddress(), - RandaoCommitment: validator.GetRandaoCommitment(), - Balance: validator.GetBalance(), - Status: validator.GetStatus(), - ExitSlot: validator.GetExitSlot(), + Pubkey: validator.GetPubkey(), + RandaoCommitmentHash32: validator.GetRandaoCommitmentHash32(), + Balance: validator.GetBalance(), + Status: validator.GetStatus(), + LatestStatusChangeSlot: validator.GetLatestStatusChangeSlot(), } } diff --git a/beacon-chain/core/validators/committees_test.go b/beacon-chain/core/validators/committees_test.go index 6332935ac3..4009ba6d8d 100644 --- a/beacon-chain/core/validators/committees_test.go +++ b/beacon-chain/core/validators/committees_test.go @@ -41,7 +41,7 @@ func TestExceedingMaxValidatorsFails(t *testing.T) { // Create more validators than ModuloBias defined in config, this should fail. size := params.BeaconConfig().ModuloBias + 1 validators := make([]*pb.ValidatorRecord, size) - validator := &pb.ValidatorRecord{WithdrawalShard: 0, Status: uint64(params.Active)} + validator := &pb.ValidatorRecord{Status: uint64(params.Active)} for i := uint64(0); i < size; i++ { validators[i] = validator } @@ -54,7 +54,7 @@ func TestExceedingMaxValidatorsFails(t *testing.T) { func BenchmarkMaxValidators(b *testing.B) { var validators []*pb.ValidatorRecord - validator := &pb.ValidatorRecord{WithdrawalShard: 0} + validator := &pb.ValidatorRecord{} for i := uint64(0); i < params.BeaconConfig().ModuloBias; i++ { validators = append(validators, validator) } @@ -69,7 +69,7 @@ func TestInitialShardAndCommiteeForSlots(t *testing.T) { // Create 1000 validators in ActiveValidators. var validators []*pb.ValidatorRecord for i := 0; i < 1000; i++ { - validator := &pb.ValidatorRecord{WithdrawalShard: 0} + validator := &pb.ValidatorRecord{} validators = append(validators, validator) } shardAndCommitteeArray, err := InitialShardAndCommitteesForSlots(validators) @@ -86,7 +86,7 @@ func TestShuffleActiveValidators(t *testing.T) { // Create 1000 validators in ActiveValidators. var validators []*pb.ValidatorRecord for i := 0; i < 1000; i++ { - validator := &pb.ValidatorRecord{WithdrawalShard: 0} + validator := &pb.ValidatorRecord{} validators = append(validators, validator) } @@ -103,7 +103,7 @@ func TestSmallSampleValidators(t *testing.T) { // Create a small number of validators validators in ActiveValidators. var validators []*pb.ValidatorRecord for i := 0; i < 20; i++ { - validator := &pb.ValidatorRecord{WithdrawalShard: 0} + validator := &pb.ValidatorRecord{} validators = append(validators, validator) } diff --git a/beacon-chain/core/validators/validator.go b/beacon-chain/core/validators/validator.go index 93339cc842..73884aaa49 100644 --- a/beacon-chain/core/validators/validator.go +++ b/beacon-chain/core/validators/validator.go @@ -27,11 +27,10 @@ func InitialValidators() []*pb.ValidatorRecord { validators := make([]*pb.ValidatorRecord, config.BootstrappedValidatorsCount) for i := uint64(0); i < config.BootstrappedValidatorsCount; i++ { validators[i] = &pb.ValidatorRecord{ - Status: uint64(params.Active), - Balance: config.DepositSize * config.Gwei, - WithdrawalAddress: []byte{}, - Pubkey: []byte{}, - RandaoCommitment: randaoReveal[:], + Status: uint64(params.Active), + Balance: config.DepositSize * config.Gwei, + Pubkey: []byte{}, + RandaoCommitmentHash32: randaoReveal[:], } } return validators @@ -226,21 +225,16 @@ func VotedBalanceInAttestation(validators []*pb.ValidatorRecord, indices []uint3 func AddPendingValidator( validators []*pb.ValidatorRecord, pubKey []byte, - withdrawalShard uint64, - withdrawalAddr []byte, randaoCommitment []byte, status uint64) []*pb.ValidatorRecord { // TODO(#633): Use BLS to verify signature proof of possession and pubkey and hash of pubkey. newValidatorRecord := &pb.ValidatorRecord{ - Pubkey: pubKey, - WithdrawalShard: withdrawalShard, - WithdrawalAddress: withdrawalAddr, - RandaoCommitment: randaoCommitment, - Balance: params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei, - Status: status, - ExitSlot: 0, + Pubkey: pubKey, + RandaoCommitmentHash32: randaoCommitment, + Balance: params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei, + Status: status, } index := minEmptyValidator(validators) @@ -260,7 +254,7 @@ func ExitValidator( currentSlot uint64, panalize bool) *pb.ValidatorRecord { // TODO(#614): Add validator set change - validator.ExitSlot = currentSlot + validator.LatestStatusChangeSlot = currentSlot if panalize { validator.Status = uint64(params.Penalized) } else { @@ -290,7 +284,7 @@ func ChangeValidators(currentSlot uint64, totalPenalties uint64, validators []*p } if validators[i].Status == uint64(params.PendingExit) { validators[i].Status = uint64(params.PendingWithdraw) - validators[i].ExitSlot = currentSlot + validators[i].LatestStatusChangeSlot = currentSlot totalChanged += validators[i].Balance // TODO(#614): Add validator set change. @@ -305,7 +299,7 @@ func ChangeValidators(currentSlot uint64, totalPenalties uint64, validators []*p for i := 0; i < len(validators); i++ { isPendingWithdraw := validators[i].Status == uint64(params.PendingWithdraw) isPenalized := validators[i].Status == uint64(params.Penalized) - withdrawalSlot := validators[i].ExitSlot + params.BeaconConfig().MinWithdrawalPeriod + withdrawalSlot := validators[i].LatestStatusChangeSlot + params.BeaconConfig().MinWithdrawalPeriod if (isPendingWithdraw || isPenalized) && currentSlot >= withdrawalSlot { penaltyFactor := totalPenalties * 3 @@ -330,13 +324,11 @@ func CopyValidators(validatorSet []*pb.ValidatorRecord) []*pb.ValidatorRecord { for i, validator := range validatorSet { newValidatorSet[i] = &pb.ValidatorRecord{ - Pubkey: validator.Pubkey, - WithdrawalShard: validator.WithdrawalShard, - WithdrawalAddress: validator.WithdrawalAddress, - RandaoCommitment: validator.RandaoCommitment, - Balance: validator.Balance, - Status: validator.Status, - ExitSlot: validator.ExitSlot, + Pubkey: validator.Pubkey, + RandaoCommitmentHash32: validator.RandaoCommitmentHash32, + Balance: validator.Balance, + Status: validator.Status, + LatestStatusChangeSlot: validator.LatestStatusChangeSlot, } } return newValidatorSet diff --git a/beacon-chain/core/validators/validator_test.go b/beacon-chain/core/validators/validator_test.go index 0905001414..812054ea48 100644 --- a/beacon-chain/core/validators/validator_test.go +++ b/beacon-chain/core/validators/validator_test.go @@ -315,30 +315,24 @@ func TestAddValidators(t *testing.T) { } // Create a new validator. - validators := AddPendingValidator(existingValidators, []byte{'A'}, 99, []byte{'B'}, []byte{'C'}, uint64(params.PendingActivation)) + validators := AddPendingValidator(existingValidators, []byte{'A'}, []byte{'C'}, uint64(params.PendingActivation)) // The newly added validator should be indexed 10. if validators[10].Status != uint64(params.PendingActivation) { t.Errorf("Newly added validator should be pending") } - if validators[10].WithdrawalShard != 99 { - t.Errorf("Newly added validator's withdrawal shard should be 99. Got: %d", validators[10].WithdrawalShard) - } if validators[10].Balance != uint64(params.BeaconConfig().DepositSize*params.BeaconConfig().Gwei) { t.Errorf("Incorrect deposit size") } // Set validator 6 to withdrawn existingValidators[5].Status = uint64(params.Withdrawn) - validators = AddPendingValidator(existingValidators, []byte{'D'}, 100, []byte{'E'}, []byte{'F'}, uint64(params.PendingActivation)) + validators = AddPendingValidator(existingValidators, []byte{'E'}, []byte{'F'}, uint64(params.PendingActivation)) // The newly added validator should be indexed 5. if validators[5].Status != uint64(params.PendingActivation) { t.Errorf("Newly added validator should be pending") } - if validators[5].WithdrawalShard != 100 { - t.Errorf("Newly added validator's withdrawal shard should be 100. Got: %d", validators[10].WithdrawalShard) - } if validators[5].Balance != uint64(params.BeaconConfig().DepositSize*params.BeaconConfig().Gwei) { t.Errorf("Incorrect deposit size") } @@ -346,12 +340,12 @@ func TestAddValidators(t *testing.T) { func TestChangeValidators(t *testing.T) { existingValidators := []*pb.ValidatorRecord{ - {Pubkey: []byte{1}, Status: uint64(params.PendingActivation), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), ExitSlot: params.BeaconConfig().MinWithdrawalPeriod}, - {Pubkey: []byte{2}, Status: uint64(params.PendingExit), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), ExitSlot: params.BeaconConfig().MinWithdrawalPeriod}, - {Pubkey: []byte{3}, Status: uint64(params.PendingActivation), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), ExitSlot: params.BeaconConfig().MinWithdrawalPeriod}, - {Pubkey: []byte{4}, Status: uint64(params.PendingExit), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), ExitSlot: params.BeaconConfig().MinWithdrawalPeriod}, - {Pubkey: []byte{5}, Status: uint64(params.PendingActivation), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), ExitSlot: params.BeaconConfig().MinWithdrawalPeriod}, - {Pubkey: []byte{6}, Status: uint64(params.PendingExit), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), ExitSlot: params.BeaconConfig().MinWithdrawalPeriod}, + {Pubkey: []byte{1}, Status: uint64(params.PendingActivation), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), LatestStatusChangeSlot: params.BeaconConfig().MinWithdrawalPeriod}, + {Pubkey: []byte{2}, Status: uint64(params.PendingExit), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), LatestStatusChangeSlot: params.BeaconConfig().MinWithdrawalPeriod}, + {Pubkey: []byte{3}, Status: uint64(params.PendingActivation), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), LatestStatusChangeSlot: params.BeaconConfig().MinWithdrawalPeriod}, + {Pubkey: []byte{4}, Status: uint64(params.PendingExit), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), LatestStatusChangeSlot: params.BeaconConfig().MinWithdrawalPeriod}, + {Pubkey: []byte{5}, Status: uint64(params.PendingActivation), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), LatestStatusChangeSlot: params.BeaconConfig().MinWithdrawalPeriod}, + {Pubkey: []byte{6}, Status: uint64(params.PendingExit), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei), LatestStatusChangeSlot: params.BeaconConfig().MinWithdrawalPeriod}, {Pubkey: []byte{7}, Status: uint64(params.PendingWithdraw), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei)}, {Pubkey: []byte{8}, Status: uint64(params.PendingWithdraw), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei)}, {Pubkey: []byte{9}, Status: uint64(params.Penalized), Balance: uint64(params.BeaconConfig().DepositSize * params.BeaconConfig().Gwei)}, @@ -373,8 +367,8 @@ func TestChangeValidators(t *testing.T) { if validators[1].Status != uint64(params.PendingWithdraw) { t.Errorf("Wanted status PendingWithdraw. Got: %d", validators[1].Status) } - if validators[1].ExitSlot != params.BeaconConfig().MinWithdrawalPeriod+1 { - t.Errorf("Failed to set validator exit slot") + if validators[1].LatestStatusChangeSlot != params.BeaconConfig().MinWithdrawalPeriod+1 { + t.Errorf("Failed to set validator lastest status change slot") } if validators[2].Status != uint64(params.Active) { t.Errorf("Wanted status Active. Got: %d", validators[2].Status) @@ -385,8 +379,8 @@ func TestChangeValidators(t *testing.T) { if validators[3].Status != uint64(params.PendingWithdraw) { t.Errorf("Wanted status PendingWithdraw. Got: %d", validators[3].Status) } - if validators[3].ExitSlot != params.BeaconConfig().MinWithdrawalPeriod+1 { - t.Errorf("Failed to set validator exit slot") + if validators[3].LatestStatusChangeSlot != params.BeaconConfig().MinWithdrawalPeriod+1 { + t.Errorf("Failed to set validator lastest status change slot") } // Reach max validation rotation case, this validator couldn't be rotated. if validators[5].Status != uint64(params.PendingExit) { @@ -418,8 +412,8 @@ func TestValidatorMinDeposit(t *testing.T) { if newValidators[2].Status != uint64(params.PendingExit) { t.Error("Validator should be pending exit") } - if newValidators[2].ExitSlot != currentSlot { - t.Errorf("Validator's exit slot should be %d got %d", currentSlot, newValidators[2].ExitSlot) + if newValidators[2].LatestStatusChangeSlot != currentSlot { + t.Errorf("Validator's lastest status change slot should be %d got %d", currentSlot, newValidators[2].LatestStatusChangeSlot) } } @@ -442,13 +436,11 @@ func TestMinEmptyValidator(t *testing.T) { func TestDeepCopyValidators(t *testing.T) { var validators []*pb.ValidatorRecord defaultValidator := &pb.ValidatorRecord{ - Pubkey: []byte{'k', 'e', 'y'}, - WithdrawalShard: 2, - WithdrawalAddress: []byte{'a', 'd', 'd', 'r', 'e', 's', 's'}, - RandaoCommitment: []byte{'r', 'a', 'n', 'd', 'a', 'o'}, - Balance: uint64(1e9), - Status: uint64(params.Active), - ExitSlot: 10, + Pubkey: []byte{'k', 'e', 'y'}, + RandaoCommitmentHash32: []byte{'r', 'a', 'n', 'd', 'a', 'o'}, + Balance: uint64(1e9), + Status: uint64(params.Active), + LatestStatusChangeSlot: 10, } for i := 0; i < 100; i++ { validators = append(validators, defaultValidator) @@ -457,12 +449,10 @@ func TestDeepCopyValidators(t *testing.T) { newValidatorSet := CopyValidators(validators) defaultValidator.Pubkey = []byte{'n', 'e', 'w', 'k', 'e', 'y'} - defaultValidator.WithdrawalShard = 3 - defaultValidator.WithdrawalAddress = []byte{'n', 'e', 'w', 'a', 'd', 'd', 'r', 'e', 's', 's'} - defaultValidator.RandaoCommitment = []byte{'n', 'e', 'w', 'r', 'a', 'n', 'd', 'a', 'o'} + defaultValidator.RandaoCommitmentHash32 = []byte{'n', 'e', 'w', 'r', 'a', 'n', 'd', 'a', 'o'} defaultValidator.Balance = uint64(2e9) defaultValidator.Status = uint64(params.PendingExit) - defaultValidator.ExitSlot = 5 + defaultValidator.LatestStatusChangeSlot = 5 if len(newValidatorSet) != len(validators) { t.Fatalf("validator set length is unequal, copy of set failed: %d", len(newValidatorSet)) @@ -473,16 +463,8 @@ func TestDeepCopyValidators(t *testing.T) { t.Errorf("validator with index %d was unable to have their pubkey copied correctly %v", i, validator.Pubkey) } - if validator.WithdrawalShard == defaultValidator.WithdrawalShard { - t.Errorf("validator with index %d was unable to have their withdrawal shard copied correctly %v", i, validator.WithdrawalShard) - } - - if bytes.Equal(validator.WithdrawalAddress, defaultValidator.WithdrawalAddress) { - t.Errorf("validator with index %d was unable to have their withdrawal address copied correctly %v", i, validator.WithdrawalAddress) - } - - if bytes.Equal(validator.RandaoCommitment, defaultValidator.RandaoCommitment) { - t.Errorf("validator with index %d was unable to have their randao commitment copied correctly %v", i, validator.RandaoCommitment) + if bytes.Equal(validator.RandaoCommitmentHash32, defaultValidator.RandaoCommitmentHash32) { + t.Errorf("validator with index %d was unable to have their randao commitment copied correctly %v", i, validator.RandaoCommitmentHash32) } if validator.Balance == defaultValidator.Balance { @@ -493,8 +475,8 @@ func TestDeepCopyValidators(t *testing.T) { t.Errorf("validator with index %d was unable to have their status copied correctly %d", i, validator.Status) } - if validator.ExitSlot == defaultValidator.ExitSlot { - t.Errorf("validator with index %d was unable to have their exit slot copied correctly %d", i, validator.ExitSlot) + if validator.LatestStatusChangeSlot == defaultValidator.LatestStatusChangeSlot { + t.Errorf("validator with index %d was unable to have their lastest status change slot copied correctly %d", i, validator.LatestStatusChangeSlot) } } diff --git a/proto/beacon/p2p/v1/types.pb.go b/proto/beacon/p2p/v1/types.pb.go index 5565bb5843..76ebf8276f 100644 --- a/proto/beacon/p2p/v1/types.pb.go +++ b/proto/beacon/p2p/v1/types.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: proto/beacon/p2p/v1/types.proto +// source: types.proto package v1 @@ -19,55 +19,96 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +// Possible validator status code: +// https://github.com/ethereum/eth2.0-specs/blob/master/specs/core/0_beacon-chain.md#constants +type ValidatorRecord_ValiatorStateCode int32 + +const ( + ValidatorRecord_pending_activation ValidatorRecord_ValiatorStateCode = 0 + ValidatorRecord_active ValidatorRecord_ValiatorStateCode = 1 + ValidatorRecord_exited_without_penalty ValidatorRecord_ValiatorStateCode = 2 + ValidatorRecord_exited_with_penalty ValidatorRecord_ValiatorStateCode = 3 +) + +var ValidatorRecord_ValiatorStateCode_name = map[int32]string{ + 0: "pending_activation", + 1: "active", + 2: "exited_without_penalty", + 3: "exited_with_penalty", +} +var ValidatorRecord_ValiatorStateCode_value = map[string]int32{ + "pending_activation": 0, + "active": 1, + "exited_without_penalty": 2, + "exited_with_penalty": 3, +} + +func (x ValidatorRecord_ValiatorStateCode) String() string { + return proto.EnumName(ValidatorRecord_ValiatorStateCode_name, int32(x)) +} +func (ValidatorRecord_ValiatorStateCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_types_6a68660b78fb3fe8, []int{5, 0} +} + type BeaconState struct { - ValidatorRegistry []*ValidatorRecord `protobuf:"bytes,1,rep,name=validator_registry,json=validatorRegistry,proto3" json:"validator_registry,omitempty"` - ValidatorRegistryLastChangeSlot uint64 `protobuf:"varint,2,opt,name=validator_registry_last_change_slot,json=validatorRegistryLastChangeSlot,proto3" json:"validator_registry_last_change_slot,omitempty"` - ValidatorRegistryExitCount uint64 `protobuf:"varint,3,opt,name=validator_registry_exit_count,json=validatorRegistryExitCount,proto3" json:"validator_registry_exit_count,omitempty"` - ValidatorRegistryDeltaChainTipHash32 []byte `protobuf:"bytes,4,opt,name=validator_registry_delta_chain_tip_hash32,json=validatorRegistryDeltaChainTipHash32,proto3" json:"validator_registry_delta_chain_tip_hash32,omitempty"` - RandaoMixHash32 []byte `protobuf:"bytes,1001,opt,name=randao_mix_hash32,json=randaoMixHash32,proto3" json:"randao_mix_hash32,omitempty"` - NextSeedHash32 []byte `protobuf:"bytes,1002,opt,name=next_seed_hash32,json=nextSeedHash32,proto3" json:"next_seed_hash32,omitempty"` - ShardAndCommitteesForSlots []*ShardAndCommitteeArray `protobuf:"bytes,1003,rep,name=shard_and_committees_for_slots,json=shardAndCommitteesForSlots,proto3" json:"shard_and_committees_for_slots,omitempty"` - PersistentCommittees []uint32 `protobuf:"varint,1004,rep,packed,name=persistent_committees,json=persistentCommittees,proto3" json:"persistent_committees,omitempty"` // Deprecated: Do not use. - PersistentCommitteeReassignments []*ShardReassignmentRecord `protobuf:"bytes,1005,rep,name=persistent_committee_reassignments,json=persistentCommitteeReassignments,proto3" json:"persistent_committee_reassignments,omitempty"` - PreviousJustifiedSlot uint64 `protobuf:"varint,2001,opt,name=previous_justified_slot,json=previousJustifiedSlot,proto3" json:"previous_justified_slot,omitempty"` - JustifiedSlot uint64 `protobuf:"varint,2002,opt,name=justified_slot,json=justifiedSlot,proto3" json:"justified_slot,omitempty"` - JustifiedSlotBitfield uint64 `protobuf:"varint,2003,opt,name=justified_slot_bitfield,json=justifiedSlotBitfield,proto3" json:"justified_slot_bitfield,omitempty"` - FinalizedSlot uint64 `protobuf:"varint,2004,opt,name=finalized_slot,json=finalizedSlot,proto3" json:"finalized_slot,omitempty"` - LatestCrosslinks []*CrosslinkRecord `protobuf:"bytes,3001,rep,name=latest_crosslinks,json=latestCrosslinks,proto3" json:"latest_crosslinks,omitempty"` - LastStateRecalculationSlot uint64 `protobuf:"varint,3002,opt,name=last_state_recalculation_slot,json=lastStateRecalculationSlot,proto3" json:"last_state_recalculation_slot,omitempty"` - LatestBlockHash32S [][]byte `protobuf:"bytes,3003,rep,name=latest_block_hash32s,json=latestBlockHash32s,proto3" json:"latest_block_hash32s,omitempty"` - LatestPenalizedExitBalances []uint64 `protobuf:"varint,3004,rep,packed,name=latest_penalized_exit_balances,json=latestPenalizedExitBalances,proto3" json:"latest_penalized_exit_balances,omitempty"` - LatestAttestations []*PendingAttestationRecord `protobuf:"bytes,3005,rep,name=latest_attestations,json=latestAttestations,proto3" json:"latest_attestations,omitempty"` - ProcessedPowReceiptRootHash32 [][]byte `protobuf:"bytes,4001,rep,name=processed_pow_receipt_root_hash32,json=processedPowReceiptRootHash32,proto3" json:"processed_pow_receipt_root_hash32,omitempty"` - CandidatePowReceiptRoots []*CandidatePoWReceiptRootRecord `protobuf:"bytes,4002,rep,name=candidate_pow_receipt_roots,json=candidatePowReceiptRoots,proto3" json:"candidate_pow_receipt_roots,omitempty"` - GenesisTime uint64 `protobuf:"varint,5001,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - ForkData *ForkData `protobuf:"bytes,5002,opt,name=fork_data,json=forkData,proto3" json:"fork_data,omitempty"` - Validators []*ValidatorRecord `protobuf:"bytes,10000,rep,name=validators,proto3" json:"validators,omitempty"` // Deprecated: Do not use. - ValidatorSetChangeSlot uint64 `protobuf:"varint,10001,opt,name=validator_set_change_slot,json=validatorSetChangeSlot,proto3" json:"validator_set_change_slot,omitempty"` // Deprecated: Do not use. - Crosslinks []*CrosslinkRecord `protobuf:"bytes,10002,rep,name=crosslinks,proto3" json:"crosslinks,omitempty"` // Deprecated: Do not use. - RandaoMix []byte `protobuf:"bytes,10003,opt,name=randao_mix,json=randaoMix,proto3" json:"randao_mix,omitempty"` // Deprecated: Do not use. - PersistentCommitteeReassignment []*ShardReassignmentRecord `protobuf:"bytes,10004,rep,name=persistent_committee_reassignment,json=persistentCommitteeReassignment,proto3" json:"persistent_committee_reassignment,omitempty"` // Deprecated: Do not use. - LastFinalizedSlot uint64 `protobuf:"varint,10005,opt,name=last_finalized_slot,json=lastFinalizedSlot,proto3" json:"last_finalized_slot,omitempty"` // Deprecated: Do not use. - LastJustifiedSlot uint64 `protobuf:"varint,10006,opt,name=last_justified_slot,json=lastJustifiedSlot,proto3" json:"last_justified_slot,omitempty"` // Deprecated: Do not use. - JustifiedStreak uint64 `protobuf:"varint,10007,opt,name=justified_streak,json=justifiedStreak,proto3" json:"justified_streak,omitempty"` // Deprecated: Do not use. - NextShufflingSeed []byte `protobuf:"bytes,10008,opt,name=next_shuffling_seed,json=nextShufflingSeed,proto3" json:"next_shuffling_seed,omitempty"` // Deprecated: Do not use. - DepositsPenalizedInPeriod []uint64 `protobuf:"varint,10009,rep,packed,name=deposits_penalized_in_period,json=depositsPenalizedInPeriod,proto3" json:"deposits_penalized_in_period,omitempty"` // Deprecated: Do not use. - ValidatorDeltaHashChain []byte `protobuf:"bytes,10010,opt,name=validator_delta_hash_chain,json=validatorDeltaHashChain,proto3" json:"validator_delta_hash_chain,omitempty"` // Deprecated: Do not use. - CurrentExitSeq uint64 `protobuf:"varint,10011,opt,name=current_exit_seq,json=currentExitSeq,proto3" json:"current_exit_seq,omitempty"` // Deprecated: Do not use. - KnownPowReceiptRoot []byte `protobuf:"bytes,10012,opt,name=known_pow_receipt_root,json=knownPowReceiptRoot,proto3" json:"known_pow_receipt_root,omitempty"` // Deprecated: Do not use. - CandidatePowReceiptRoot []byte `protobuf:"bytes,10013,opt,name=candidate_pow_receipt_root,json=candidatePowReceiptRoot,proto3" json:"candidate_pow_receipt_root,omitempty"` // Deprecated: Do not use. - CandidatePowReceiptRootVotes uint64 `protobuf:"varint,10014,opt,name=candidate_pow_receipt_root_votes,json=candidatePowReceiptRootVotes,proto3" json:"candidate_pow_receipt_root_votes,omitempty"` // Deprecated: Do not use. - PendingAttestations []*AggregatedAttestation `protobuf:"bytes,10018,rep,name=pending_attestations,json=pendingAttestations,proto3" json:"pending_attestations,omitempty"` // Deprecated: Do not use. - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Validator registry [1-1000] + ValidatorRegistry []*ValidatorRecord `protobuf:"bytes,1,rep,name=validator_registry,json=validatorRegistry,proto3" json:"validator_registry,omitempty"` + ValidatorRegistryLastChangeSlot uint64 `protobuf:"varint,2,opt,name=validator_registry_last_change_slot,json=validatorRegistryLastChangeSlot,proto3" json:"validator_registry_last_change_slot,omitempty"` + ValidatorRegistryExitCount uint64 `protobuf:"varint,3,opt,name=validator_registry_exit_count,json=validatorRegistryExitCount,proto3" json:"validator_registry_exit_count,omitempty"` + ValidatorRegistryDeltaChainTipHash32 []byte `protobuf:"bytes,4,opt,name=validator_registry_delta_chain_tip_hash32,json=validatorRegistryDeltaChainTipHash32,proto3" json:"validator_registry_delta_chain_tip_hash32,omitempty"` + // Randomness and committees [1001-2000] + RandaoMixHash32 []byte `protobuf:"bytes,1001,opt,name=randao_mix_hash32,json=randaoMixHash32,proto3" json:"randao_mix_hash32,omitempty"` + NextSeedHash32 []byte `protobuf:"bytes,1002,opt,name=next_seed_hash32,json=nextSeedHash32,proto3" json:"next_seed_hash32,omitempty"` + ShardAndCommitteesForSlots []*ShardAndCommitteeArray `protobuf:"bytes,1003,rep,name=shard_and_committees_for_slots,json=shardAndCommitteesForSlots,proto3" json:"shard_and_committees_for_slots,omitempty"` + // TODO(781): Persistent committees should be a 2d uint24 array. + PersistentCommittees []uint32 `protobuf:"varint,1004,rep,packed,name=persistent_committees,json=persistentCommittees,proto3" json:"persistent_committees,omitempty"` // Deprecated: Do not use. + // repeated Uint32Array persistent_committees = 1004; + PersistentCommitteeReassignments []*ShardReassignmentRecord `protobuf:"bytes,1005,rep,name=persistent_committee_reassignments,json=persistentCommitteeReassignments,proto3" json:"persistent_committee_reassignments,omitempty"` + // Finality [2001-3000] + PreviousJustifiedSlot uint64 `protobuf:"varint,2001,opt,name=previous_justified_slot,json=previousJustifiedSlot,proto3" json:"previous_justified_slot,omitempty"` + JustifiedSlot uint64 `protobuf:"varint,2002,opt,name=justified_slot,json=justifiedSlot,proto3" json:"justified_slot,omitempty"` + JustifiedSlotBitfield uint64 `protobuf:"varint,2003,opt,name=justified_slot_bitfield,json=justifiedSlotBitfield,proto3" json:"justified_slot_bitfield,omitempty"` + FinalizedSlot uint64 `protobuf:"varint,2004,opt,name=finalized_slot,json=finalizedSlot,proto3" json:"finalized_slot,omitempty"` + // Recent state [3001-4000] + LatestCrosslinks []*CrosslinkRecord `protobuf:"bytes,3001,rep,name=latest_crosslinks,json=latestCrosslinks,proto3" json:"latest_crosslinks,omitempty"` + LastStateRecalculationSlot uint64 `protobuf:"varint,3002,opt,name=last_state_recalculation_slot,json=lastStateRecalculationSlot,proto3" json:"last_state_recalculation_slot,omitempty"` + LatestBlockHash32S [][]byte `protobuf:"bytes,3003,rep,name=latest_block_hash32s,json=latestBlockHash32s,proto3" json:"latest_block_hash32s,omitempty"` + LatestPenalizedExitBalances []uint64 `protobuf:"varint,3004,rep,packed,name=latest_penalized_exit_balances,json=latestPenalizedExitBalances,proto3" json:"latest_penalized_exit_balances,omitempty"` + LatestAttestations []*PendingAttestationRecord `protobuf:"bytes,3005,rep,name=latest_attestations,json=latestAttestations,proto3" json:"latest_attestations,omitempty"` + // PoW receipt root [4001-5000] + ProcessedPowReceiptRootHash32 [][]byte `protobuf:"bytes,4001,rep,name=processed_pow_receipt_root_hash32,json=processedPowReceiptRootHash32,proto3" json:"processed_pow_receipt_root_hash32,omitempty"` + CandidatePowReceiptRoots []*CandidatePoWReceiptRootRecord `protobuf:"bytes,4002,rep,name=candidate_pow_receipt_roots,json=candidatePowReceiptRoots,proto3" json:"candidate_pow_receipt_roots,omitempty"` + // Miscellaneous [5001-6000] + GenesisTime uint64 `protobuf:"varint,5001,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` + ForkData *ForkData `protobuf:"bytes,5002,opt,name=fork_data,json=forkData,proto3" json:"fork_data,omitempty"` + // Deprecated fields + // All fields mustbe annotated with [deprecated=true]; + Validators []*ValidatorRecord `protobuf:"bytes,10000,rep,name=validators,proto3" json:"validators,omitempty"` // Deprecated: Do not use. + ValidatorSetChangeSlot uint64 `protobuf:"varint,10001,opt,name=validator_set_change_slot,json=validatorSetChangeSlot,proto3" json:"validator_set_change_slot,omitempty"` // Deprecated: Do not use. + Crosslinks []*CrosslinkRecord `protobuf:"bytes,10002,rep,name=crosslinks,proto3" json:"crosslinks,omitempty"` // Deprecated: Do not use. + RandaoMix []byte `protobuf:"bytes,10003,opt,name=randao_mix,json=randaoMix,proto3" json:"randao_mix,omitempty"` // Deprecated: Do not use. + PersistentCommitteeReassignment []*ShardReassignmentRecord `protobuf:"bytes,10004,rep,name=persistent_committee_reassignment,json=persistentCommitteeReassignment,proto3" json:"persistent_committee_reassignment,omitempty"` // Deprecated: Do not use. + LastFinalizedSlot uint64 `protobuf:"varint,10005,opt,name=last_finalized_slot,json=lastFinalizedSlot,proto3" json:"last_finalized_slot,omitempty"` // Deprecated: Do not use. + LastJustifiedSlot uint64 `protobuf:"varint,10006,opt,name=last_justified_slot,json=lastJustifiedSlot,proto3" json:"last_justified_slot,omitempty"` // Deprecated: Do not use. + JustifiedStreak uint64 `protobuf:"varint,10007,opt,name=justified_streak,json=justifiedStreak,proto3" json:"justified_streak,omitempty"` // Deprecated: Do not use. + NextShufflingSeed []byte `protobuf:"bytes,10008,opt,name=next_shuffling_seed,json=nextShufflingSeed,proto3" json:"next_shuffling_seed,omitempty"` // Deprecated: Do not use. + DepositsPenalizedInPeriod []uint64 `protobuf:"varint,10009,rep,packed,name=deposits_penalized_in_period,json=depositsPenalizedInPeriod,proto3" json:"deposits_penalized_in_period,omitempty"` // Deprecated: Do not use. + ValidatorDeltaHashChain []byte `protobuf:"bytes,10010,opt,name=validator_delta_hash_chain,json=validatorDeltaHashChain,proto3" json:"validator_delta_hash_chain,omitempty"` // Deprecated: Do not use. + CurrentExitSeq uint64 `protobuf:"varint,10011,opt,name=current_exit_seq,json=currentExitSeq,proto3" json:"current_exit_seq,omitempty"` // Deprecated: Do not use. + KnownPowReceiptRoot []byte `protobuf:"bytes,10012,opt,name=known_pow_receipt_root,json=knownPowReceiptRoot,proto3" json:"known_pow_receipt_root,omitempty"` // Deprecated: Do not use. + CandidatePowReceiptRoot []byte `protobuf:"bytes,10013,opt,name=candidate_pow_receipt_root,json=candidatePowReceiptRoot,proto3" json:"candidate_pow_receipt_root,omitempty"` // Deprecated: Do not use. + CandidatePowReceiptRootVotes uint64 `protobuf:"varint,10014,opt,name=candidate_pow_receipt_root_votes,json=candidatePowReceiptRootVotes,proto3" json:"candidate_pow_receipt_root_votes,omitempty"` // Deprecated: Do not use. + PendingAttestations []*AggregatedAttestation `protobuf:"bytes,10018,rep,name=pending_attestations,json=pendingAttestations,proto3" json:"pending_attestations,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *BeaconState) Reset() { *m = BeaconState{} } func (m *BeaconState) String() string { return proto.CompactTextString(m) } func (*BeaconState) ProtoMessage() {} func (*BeaconState) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{0} + return fileDescriptor_types_6a68660b78fb3fe8, []int{0} } func (m *BeaconState) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BeaconState.Unmarshal(m, b) @@ -383,7 +424,7 @@ func (m *ForkData) Reset() { *m = ForkData{} } func (m *ForkData) String() string { return proto.CompactTextString(m) } func (*ForkData) ProtoMessage() {} func (*ForkData) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{1} + return fileDescriptor_types_6a68660b78fb3fe8, []int{1} } func (m *ForkData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ForkData.Unmarshal(m, b) @@ -436,7 +477,7 @@ func (m *CandidatePoWReceiptRootRecord) Reset() { *m = CandidatePoWRecei func (m *CandidatePoWReceiptRootRecord) String() string { return proto.CompactTextString(m) } func (*CandidatePoWReceiptRootRecord) ProtoMessage() {} func (*CandidatePoWReceiptRootRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{2} + return fileDescriptor_types_6a68660b78fb3fe8, []int{2} } func (m *CandidatePoWReceiptRootRecord) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CandidatePoWReceiptRootRecord.Unmarshal(m, b) @@ -484,7 +525,7 @@ func (m *PendingAttestationRecord) Reset() { *m = PendingAttestationReco func (m *PendingAttestationRecord) String() string { return proto.CompactTextString(m) } func (*PendingAttestationRecord) ProtoMessage() {} func (*PendingAttestationRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{3} + return fileDescriptor_types_6a68660b78fb3fe8, []int{3} } func (m *PendingAttestationRecord) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PendingAttestationRecord.Unmarshal(m, b) @@ -550,7 +591,7 @@ func (m *AttestationData) Reset() { *m = AttestationData{} } func (m *AttestationData) String() string { return proto.CompactTextString(m) } func (*AttestationData) ProtoMessage() {} func (*AttestationData) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{4} + return fileDescriptor_types_6a68660b78fb3fe8, []int{4} } func (m *AttestationData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AttestationData.Unmarshal(m, b) @@ -627,24 +668,27 @@ func (m *AttestationData) GetJustifiedBlockHash32() []byte { } type ValidatorRecord struct { - Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - WithdrawalShard uint64 `protobuf:"varint,2,opt,name=withdrawal_shard,json=withdrawalShard,proto3" json:"withdrawal_shard,omitempty"` - WithdrawalAddress []byte `protobuf:"bytes,3,opt,name=withdrawal_address,json=withdrawalAddress,proto3" json:"withdrawal_address,omitempty"` - RandaoCommitment []byte `protobuf:"bytes,4,opt,name=randao_commitment,json=randaoCommitment,proto3" json:"randao_commitment,omitempty"` - Balance uint64 `protobuf:"varint,5,opt,name=balance,proto3" json:"balance,omitempty"` - Status uint64 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` - ExitSlot uint64 `protobuf:"varint,7,opt,name=exit_slot,json=exitSlot,proto3" json:"exit_slot,omitempty"` - RandaoLastChange uint64 `protobuf:"varint,8,opt,name=randao_last_change,json=randaoLastChange,proto3" json:"randao_last_change,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + // TODO(781): The usage of withdrawal_credentials is not defined in spec. Not used in Prysm yet. + WithdrawalCredentials []byte `protobuf:"bytes,2,opt,name=withdrawal_credentials,json=withdrawalCredentials,proto3" json:"withdrawal_credentials,omitempty"` + RandaoCommitmentHash32 []byte `protobuf:"bytes,3,opt,name=randao_commitment_hash32,json=randaoCommitmentHash32,proto3" json:"randao_commitment_hash32,omitempty"` + RandaoSkips uint64 `protobuf:"varint,4,opt,name=randao_skips,json=randaoSkips,proto3" json:"randao_skips,omitempty"` + // Balance in Gwei + Balance uint64 `protobuf:"varint,5,opt,name=balance,proto3" json:"balance,omitempty"` + StatusCode ValidatorRecord_ValiatorStateCode `protobuf:"varint,6,opt,name=status_code,json=statusCode,proto3,enum=ethereum.beacon.p2p.v1.ValidatorRecord_ValiatorStateCode" json:"status_code,omitempty"` + LatestStatusChangeSlot uint64 `protobuf:"varint,7,opt,name=latest_status_change_slot,json=latestStatusChangeSlot,proto3" json:"latest_status_change_slot,omitempty"` + ExitCount uint64 `protobuf:"varint,8,opt,name=exit_count,json=exitCount,proto3" json:"exit_count,omitempty"` + Status uint64 `protobuf:"varint,9,opt,name=status,proto3" json:"status,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ValidatorRecord) Reset() { *m = ValidatorRecord{} } func (m *ValidatorRecord) String() string { return proto.CompactTextString(m) } func (*ValidatorRecord) ProtoMessage() {} func (*ValidatorRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{5} + return fileDescriptor_types_6a68660b78fb3fe8, []int{5} } func (m *ValidatorRecord) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ValidatorRecord.Unmarshal(m, b) @@ -671,27 +715,27 @@ func (m *ValidatorRecord) GetPubkey() []byte { return nil } -func (m *ValidatorRecord) GetWithdrawalShard() uint64 { +func (m *ValidatorRecord) GetWithdrawalCredentials() []byte { if m != nil { - return m.WithdrawalShard + return m.WithdrawalCredentials + } + return nil +} + +func (m *ValidatorRecord) GetRandaoCommitmentHash32() []byte { + if m != nil { + return m.RandaoCommitmentHash32 + } + return nil +} + +func (m *ValidatorRecord) GetRandaoSkips() uint64 { + if m != nil { + return m.RandaoSkips } return 0 } -func (m *ValidatorRecord) GetWithdrawalAddress() []byte { - if m != nil { - return m.WithdrawalAddress - } - return nil -} - -func (m *ValidatorRecord) GetRandaoCommitment() []byte { - if m != nil { - return m.RandaoCommitment - } - return nil -} - func (m *ValidatorRecord) GetBalance() uint64 { if m != nil { return m.Balance @@ -699,6 +743,28 @@ func (m *ValidatorRecord) GetBalance() uint64 { return 0 } +func (m *ValidatorRecord) GetStatusCode() ValidatorRecord_ValiatorStateCode { + if m != nil { + return m.StatusCode + } + return ValidatorRecord_pending_activation +} + +func (m *ValidatorRecord) GetLatestStatusChangeSlot() uint64 { + if m != nil { + return m.LatestStatusChangeSlot + } + return 0 +} + +func (m *ValidatorRecord) GetExitCount() uint64 { + if m != nil { + return m.ExitCount + } + return 0 +} + +// Deprecated: Do not use. func (m *ValidatorRecord) GetStatus() uint64 { if m != nil { return m.Status @@ -706,20 +772,6 @@ func (m *ValidatorRecord) GetStatus() uint64 { return 0 } -func (m *ValidatorRecord) GetExitSlot() uint64 { - if m != nil { - return m.ExitSlot - } - return 0 -} - -func (m *ValidatorRecord) GetRandaoLastChange() uint64 { - if m != nil { - return m.RandaoLastChange - } - return 0 -} - type ShardReassignmentRecord struct { ValidatorIndex uint32 `protobuf:"varint,1,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"` Shard uint64 `protobuf:"varint,2,opt,name=shard,proto3" json:"shard,omitempty"` @@ -733,7 +785,7 @@ func (m *ShardReassignmentRecord) Reset() { *m = ShardReassignmentRecord func (m *ShardReassignmentRecord) String() string { return proto.CompactTextString(m) } func (*ShardReassignmentRecord) ProtoMessage() {} func (*ShardReassignmentRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{6} + return fileDescriptor_types_6a68660b78fb3fe8, []int{6} } func (m *ShardReassignmentRecord) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ShardReassignmentRecord.Unmarshal(m, b) @@ -774,6 +826,7 @@ func (m *ShardReassignmentRecord) GetSlot() uint64 { return 0 } +// AggregatedAttestation is deprecated entirely by AttestationRecord. type AggregatedAttestation struct { Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` // Deprecated: Do not use. Shard uint64 `protobuf:"varint,2,opt,name=shard,proto3" json:"shard,omitempty"` // Deprecated: Do not use. @@ -792,7 +845,7 @@ func (m *AggregatedAttestation) Reset() { *m = AggregatedAttestation{} } func (m *AggregatedAttestation) String() string { return proto.CompactTextString(m) } func (*AggregatedAttestation) ProtoMessage() {} func (*AggregatedAttestation) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{7} + return fileDescriptor_types_6a68660b78fb3fe8, []int{7} } func (m *AggregatedAttestation) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AggregatedAttestation.Unmarshal(m, b) @@ -888,7 +941,7 @@ func (m *SpecialRecord) Reset() { *m = SpecialRecord{} } func (m *SpecialRecord) String() string { return proto.CompactTextString(m) } func (*SpecialRecord) ProtoMessage() {} func (*SpecialRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{8} + return fileDescriptor_types_6a68660b78fb3fe8, []int{8} } func (m *SpecialRecord) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SpecialRecord.Unmarshal(m, b) @@ -934,7 +987,7 @@ func (m *CrosslinkRecord) Reset() { *m = CrosslinkRecord{} } func (m *CrosslinkRecord) String() string { return proto.CompactTextString(m) } func (*CrosslinkRecord) ProtoMessage() {} func (*CrosslinkRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{9} + return fileDescriptor_types_6a68660b78fb3fe8, []int{9} } func (m *CrosslinkRecord) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CrosslinkRecord.Unmarshal(m, b) @@ -979,7 +1032,7 @@ func (m *ShardAndCommitteeArray) Reset() { *m = ShardAndCommitteeArray{} func (m *ShardAndCommitteeArray) String() string { return proto.CompactTextString(m) } func (*ShardAndCommitteeArray) ProtoMessage() {} func (*ShardAndCommitteeArray) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{10} + return fileDescriptor_types_6a68660b78fb3fe8, []int{10} } func (m *ShardAndCommitteeArray) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ShardAndCommitteeArray.Unmarshal(m, b) @@ -1018,7 +1071,7 @@ func (m *ShardAndCommittee) Reset() { *m = ShardAndCommittee{} } func (m *ShardAndCommittee) String() string { return proto.CompactTextString(m) } func (*ShardAndCommittee) ProtoMessage() {} func (*ShardAndCommittee) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{11} + return fileDescriptor_types_6a68660b78fb3fe8, []int{11} } func (m *ShardAndCommittee) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ShardAndCommittee.Unmarshal(m, b) @@ -1053,29 +1106,39 @@ func (m *ShardAndCommittee) GetCommittee() []uint32 { } type BeaconBlock struct { - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` - RandaoRevealHash32 []byte `protobuf:"bytes,2,opt,name=randao_reveal_hash32,json=randaoRevealHash32,proto3" json:"randao_reveal_hash32,omitempty"` - CandidatePowReceiptRootHash32 []byte `protobuf:"bytes,3,opt,name=candidate_pow_receipt_root_hash32,json=candidatePowReceiptRootHash32,proto3" json:"candidate_pow_receipt_root_hash32,omitempty"` - AncestorHash32S [][]byte `protobuf:"bytes,4,rep,name=ancestor_hash32s,json=ancestorHash32s,proto3" json:"ancestor_hash32s,omitempty"` - StateRootHash32 []byte `protobuf:"bytes,5,opt,name=state_root_hash32,json=stateRootHash32,proto3" json:"state_root_hash32,omitempty"` - Attestations []*AggregatedAttestation `protobuf:"bytes,6,rep,name=attestations,proto3" json:"attestations,omitempty"` // Deprecated: Do not use. - Specials []*SpecialRecord `protobuf:"bytes,7,rep,name=specials,proto3" json:"specials,omitempty"` - ProposerSignature [][]byte `protobuf:"bytes,8,rep,name=proposer_signature,json=proposerSignature,proto3" json:"proposer_signature,omitempty"` - AncestorHashes [][]byte `protobuf:"bytes,1002,rep,name=ancestor_hashes,json=ancestorHashes,proto3" json:"ancestor_hashes,omitempty"` // Deprecated: Do not use. - RandaoReveal []byte `protobuf:"bytes,1003,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty"` // Deprecated: Do not use. - PowChainRef []byte `protobuf:"bytes,1004,opt,name=pow_chain_ref,json=powChainRef,proto3" json:"pow_chain_ref,omitempty"` // Deprecated: Do not use. - StateRoot []byte `protobuf:"bytes,1005,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // Deprecated: Do not use. - Timestamp *timestamp.Timestamp `protobuf:"bytes,1006,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Deprecated: Do not use. - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` + RandaoRevealHash32 []byte `protobuf:"bytes,2,opt,name=randao_reveal_hash32,json=randaoRevealHash32,proto3" json:"randao_reveal_hash32,omitempty"` + CandidatePowReceiptRootHash32 []byte `protobuf:"bytes,3,opt,name=candidate_pow_receipt_root_hash32,json=candidatePowReceiptRootHash32,proto3" json:"candidate_pow_receipt_root_hash32,omitempty"` + // Ancestor hashes represent a skip list of ancestor beacon block hashes. + // i'th item is the most recent ancestor whose slot is a multiple of 2^i + // for i in the range of 0 to 31. + AncestorHash32S [][]byte `protobuf:"bytes,4,rep,name=ancestor_hash32s,json=ancestorHash32s,proto3" json:"ancestor_hash32s,omitempty"` + StateRootHash32 []byte `protobuf:"bytes,5,opt,name=state_root_hash32,json=stateRootHash32,proto3" json:"state_root_hash32,omitempty"` + // TODO(781): attestations should be a list of attestionRecords according to spec + // at ethereum/eth2.0-specs@11d4473. Update this field to AttestionRecord + // and remove the AggregatedAttestion message. + Attestations []*AggregatedAttestation `protobuf:"bytes,6,rep,name=attestations,proto3" json:"attestations,omitempty"` // Deprecated: Do not use. + // repeated AttestationRecord attestations = 6; + // Specials consist of exist, penalities, etc. + Specials []*SpecialRecord `protobuf:"bytes,7,rep,name=specials,proto3" json:"specials,omitempty"` + ProposerSignature [][]byte `protobuf:"bytes,8,rep,name=proposer_signature,json=proposerSignature,proto3" json:"proposer_signature,omitempty"` + // Deprecated fields + // All fields must be annotated with [deprecated=true]; + AncestorHashes [][]byte `protobuf:"bytes,1002,rep,name=ancestor_hashes,json=ancestorHashes,proto3" json:"ancestor_hashes,omitempty"` // Deprecated: Do not use. + RandaoReveal []byte `protobuf:"bytes,1003,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty"` // Deprecated: Do not use. + PowChainRef []byte `protobuf:"bytes,1004,opt,name=pow_chain_ref,json=powChainRef,proto3" json:"pow_chain_ref,omitempty"` // Deprecated: Do not use. + StateRoot []byte `protobuf:"bytes,1005,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // Deprecated: Do not use. + Timestamp *timestamp.Timestamp `protobuf:"bytes,1006,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *BeaconBlock) Reset() { *m = BeaconBlock{} } func (m *BeaconBlock) String() string { return proto.CompactTextString(m) } func (*BeaconBlock) ProtoMessage() {} func (*BeaconBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_d2a37195e9f80cec, []int{12} + return fileDescriptor_types_6a68660b78fb3fe8, []int{12} } func (m *BeaconBlock) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BeaconBlock.Unmarshal(m, b) @@ -1206,138 +1269,143 @@ func init() { proto.RegisterType((*ShardAndCommitteeArray)(nil), "ethereum.beacon.p2p.v1.ShardAndCommitteeArray") proto.RegisterType((*ShardAndCommittee)(nil), "ethereum.beacon.p2p.v1.ShardAndCommittee") proto.RegisterType((*BeaconBlock)(nil), "ethereum.beacon.p2p.v1.BeaconBlock") + proto.RegisterEnum("ethereum.beacon.p2p.v1.ValidatorRecord_ValiatorStateCode", ValidatorRecord_ValiatorStateCode_name, ValidatorRecord_ValiatorStateCode_value) } -func init() { - proto.RegisterFile("proto/beacon/p2p/v1/types.proto", fileDescriptor_types_d2a37195e9f80cec) -} +func init() { proto.RegisterFile("types.proto", fileDescriptor_types_6a68660b78fb3fe8) } -var fileDescriptor_types_d2a37195e9f80cec = []byte{ - // 2011 bytes of a gzipped FileDescriptorProto +var fileDescriptor_types_6a68660b78fb3fe8 = []byte{ + // 2099 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 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b9, 0x09, 0xa4, 0x00, 0x65, 0x41, 0x90, 0x70, 0xa5, 0xd2, 0xe0, - 0xe7, 0x92, 0x6d, 0x2b, 0x28, 0xdc, 0x75, 0x6c, 0xff, 0xc3, 0x9e, 0x67, 0x03, 0x5f, 0xb7, 0x82, - 0xdd, 0x6c, 0x9d, 0x50, 0x98, 0x72, 0xb3, 0x1e, 0x86, 0xba, 0xea, 0xa5, 0x8f, 0xc6, 0x71, 0x93, - 0x2c, 0x7d, 0x85, 0x01, 0xad, 0x7a, 0xee, 0xc9, 0x14, 0xb2, 0x65, 0xe0, 0x3c, 0x78, 0xd3, 0x66, - 0x01, 0xe3, 0x76, 0x03, 0x88, 0xdb, 0xbb, 0x70, 0x8b, 0xc4, 0x98, 0x55, 0xd3, 0xcd, 0xf3, 0x5b, - 0x63, 0x33, 0x84, 0xe5, 0x31, 0xbd, 0x96, 0x5c, 0x87, 0x5a, 0xde, 0x31, 0x44, 0x14, 0xf0, 0x53, - 0x8c, 0xdf, 0x9c, 0x37, 0x9f, 0x2d, 0x3f, 0x30, 0xab, 0x63, 0x12, 0x36, 0x4d, 0xed, 0xc9, 0x3c, - 0xb5, 0x9b, 0xcf, 0x26, 0x60, 0x71, 0x24, 0x2d, 0x92, 0xa5, 0x62, 0x21, 0x20, 0x49, 0xda, 0x62, - 0xa0, 0x25, 0xdb, 0x28, 0x70, 0xf6, 0x37, 0x86, 0xd2, 0x68, 0x32, 0x83, 0x0c, 0xa5, 0xd2, 0xc2, - 0xa8, 0x54, 0xb2, 0x27, 0x82, 0x0a, 0x64, 0x38, 0x99, 0xc8, 0x0d, 0xa8, 0x0f, 0x56, 0x83, 0xad, - 0x05, 0xdb, 0xee, 0xca, 0xf5, 0x40, 0x36, 0xa1, 0x61, 0xbb, 0x03, 0x4f, 0x72, 0xba, 0x38, 0x9f, - 0xc1, 0xeb, 0xa9, 0x30, 0xe3, 0x8c, 0x37, 0x60, 0x51, 0xb6, 0x43, 0xf1, 0xb4, 0xcf, 0x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 0xc5, + 0xbd, 0x14, 0xea, 0x02, 0x55, 0xb3, 0x26, 0xb2, 0x65, 0x89, 0x76, 0x61, 0xdd, 0x94, 0x9d, 0xd4, + 0xf5, 0xee, 0x0b, 0x1a, 0x90, 0x28, 0xe8, 0x47, 0x44, 0x31, 0x1e, 0x5b, 0x6f, 0xfe, 0xb4, 0x6a, + 0x8b, 0x47, 0xa3, 0x0c, 0x29, 0x78, 0x45, 0x8c, 0x71, 0xed, 0x55, 0x58, 0x76, 0xae, 0x75, 0x22, + 0x1e, 0x1c, 0xba, 0xcc, 0x95, 0xf8, 0xcf, 0xda, 0xbb, 0x05, 0x0f, 0x59, 0xe1, 0xae, 0x96, 0xd9, + 0xec, 0x95, 0xe8, 0x0e, 0xbc, 0xe0, 0x54, 0x12, 0x9a, 0xbe, 0xbc, 0x29, 0xd8, 0x0e, 0x89, 0x48, + 0x1c, 0x50, 0x89, 0xff, 0xa2, 0x95, 0xa7, 0xbc, 0x8b, 0x16, 0xb6, 0x9f, 0xa2, 0x74, 0xc9, 0xee, + 0x3a, 0x0c, 0xea, 0xc0, 0x79, 0x67, 0x85, 0x28, 0xfd, 0x63, 0x5c, 0x92, 0xf8, 0xaf, 0x36, 0x2a, + 0xaf, 0x8c, 0x8b, 0xca, 0x3e, 0x8d, 0x43, 0x16, 0xf7, 0x76, 0x72, 0x1d, 0x17, 0x1e, 0xe7, 0x69, + 0x41, 0x20, 0xd1, 0x7d, 0xb8, 0x92, 0x08, 0x1e, 0x50, 0x29, 0x69, 0xe8, 0x27, 0xfc, 0x44, 0xc7, + 0x88, 0xb2, 0x44, 0xf9, 0x82, 0x73, 0x95, 0x16, 0xe9, 0xfb, 0x97, 0xcd, 0x9b, 0xae, 0x67, 0xc8, + 0x7d, 0x7e, 0xe2, 0x59, 0x9c, 0xc7, 0xb9, 0x72, 0x35, 0xdb, 0x87, 0x8b, 0x01, 0x89, 0x43, 0x4d, + 0x1a, 0x74, 0xc8, 0x94, 0xc4, 0x1f, 0x5c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0xc5, 0x73, 0xd4, 0x35, 0xa9, 0xcf, 0xcd, 0x7e, 0x09, 0x14, 0xb4, 0x8b, 0x3f, + 0xca, 0x91, 0xf3, 0x09, 0x3f, 0x31, 0x57, 0x05, 0x8f, 0x76, 0xf5, 0x5d, 0x31, 0x8f, 0x3a, 0xfe, + 0x38, 0x47, 0xcd, 0x65, 0x31, 0x47, 0x5f, 0x81, 0xb9, 0xec, 0xbb, 0x2b, 0xfe, 0xef, 0x8c, 0x99, + 0xed, 0xd6, 0x5a, 0xf6, 0xd3, 0x6c, 0x2b, 0xfd, 0x34, 0xdb, 0x7a, 0x94, 0x42, 0xac, 0x7a, 0xa6, + 0xd1, 0x99, 0x36, 0x90, 0x9b, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x68, 0x61, 0x44, 0xf2, + 0x15, 0x00, 0x00, } diff --git a/proto/beacon/p2p/v1/types.proto b/proto/beacon/p2p/v1/types.proto index 14d1910e5a..e05a128b73 100644 --- a/proto/beacon/p2p/v1/types.proto +++ b/proto/beacon/p2p/v1/types.proto @@ -16,7 +16,7 @@ message BeaconState { bytes randao_mix_hash32 = 1001; bytes next_seed_hash32 = 1002; repeated ShardAndCommitteeArray shard_and_committees_for_slots = 1003; - // TODO: Persistent committees should be a 2d uint24 array. + // TODO(781): Persistent committees should be a 2d uint24 array. repeated uint32 persistent_committees = 1004 [deprecated=true]; // repeated Uint32Array persistent_committees = 1004; repeated ShardReassignmentRecord persistent_committee_reassignments = 1005; @@ -38,7 +38,7 @@ message BeaconState { repeated bytes processed_pow_receipt_root_hash32 = 4001; repeated CandidatePoWReceiptRootRecord candidate_pow_receipt_roots = 4002; - // Miscellanous [5001-6000] + // Miscellaneous [5001-6000] uint64 genesis_time = 5001; ForkData fork_data = 5002; @@ -95,13 +95,24 @@ message AttestationData { message ValidatorRecord { bytes pubkey = 1; - uint64 withdrawal_shard = 2; - bytes withdrawal_address = 3; - bytes randao_commitment = 4; + // TODO(781): The usage of withdrawal_credentials is not defined in spec. Not used in Prysm yet. + bytes withdrawal_credentials = 2; + bytes randao_commitment_hash32 = 3; + uint64 randao_skips = 4; + // Balance in Gwei uint64 balance = 5; - uint64 status = 6; - uint64 exit_slot = 7; - uint64 randao_last_change = 8; + // Possible validator status code: + // https://github.com/ethereum/eth2.0-specs/blob/master/specs/core/0_beacon-chain.md#constants + enum ValiatorStateCode { + pending_activation = 0; + active = 1; + exited_without_penalty = 2; + exited_with_penalty = 3; + } + ValiatorStateCode status_code = 6; + uint64 latest_status_change_slot = 7; + uint64 exit_count = 8; + uint64 status = 9 [deprecated=true]; // Replaced by status_code } message ShardReassignmentRecord { @@ -150,7 +161,7 @@ message BeaconBlock { // for i in the range of 0 to 31. repeated bytes ancestor_hash32s = 4; bytes state_root_hash32 = 5; - // TODO: attestations should be a list of attestionRecords according to spec + // TODO(781): attestations should be a list of attestionRecords according to spec // at ethereum/eth2.0-specs@11d4473. Update this field to AttestionRecord // and remove the AggregatedAttestion message. repeated AggregatedAttestation attestations = 6 [deprecated=true];