mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 21:08:10 -05:00
Wrap Up Data Structure Renaming (#1270)
* spec renames * fix goimports * fix items
This commit is contained in:
@@ -245,23 +245,23 @@ func TestRunningChainService(t *testing.T) {
|
||||
t.Fatalf("Can't get state from db %v", err)
|
||||
}
|
||||
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength*2; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Committee: []uint32{9, 8, 311, 12, 92, 1, 23, 17}},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
beaconState.ShardAndCommitteesAtSlots = shardAndCommittees
|
||||
beaconState.ShardCommitteesAtSlots = ShardCommittees
|
||||
if err := chainService.beaconDB.SaveState(beaconState); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
currentSlot := uint64(5)
|
||||
attestationSlot := uint64(0)
|
||||
shard := beaconState.ShardAndCommitteesAtSlots[attestationSlot].ArrayShardAndCommittee[0].Shard
|
||||
shard := beaconState.ShardCommitteesAtSlots[attestationSlot].ArrayShardCommittee[0].Shard
|
||||
|
||||
block := &pb.BeaconBlock{
|
||||
Slot: currentSlot + 1,
|
||||
@@ -461,7 +461,7 @@ func TestIsBlockReadyForProcessing(t *testing.T) {
|
||||
|
||||
currentSlot := uint64(1)
|
||||
attestationSlot := uint64(0)
|
||||
shard := beaconState.ShardAndCommitteesAtSlots[attestationSlot].ArrayShardAndCommittee[0].Shard
|
||||
shard := beaconState.ShardCommitteesAtSlots[attestationSlot].ArrayShardCommittee[0].Shard
|
||||
|
||||
block3 := &pb.BeaconBlock{
|
||||
Slot: currentSlot,
|
||||
|
||||
@@ -370,8 +370,8 @@ func CrosslinksRewardsPenalties(
|
||||
|
||||
epochLength := params.BeaconConfig().EpochLength
|
||||
baseRewardQuotient := baseRewardQuotient(totalBalance)
|
||||
for _, shardCommitteesAtSlot := range state.ShardAndCommitteesAtSlots[:epochLength] {
|
||||
for _, shardCommitees := range shardCommitteesAtSlot.ArrayShardAndCommittee {
|
||||
for _, shardCommitteesAtSlot := range state.ShardCommitteesAtSlots[:epochLength] {
|
||||
for _, shardCommitees := range shardCommitteesAtSlot.ArrayShardCommittee {
|
||||
|
||||
for _, index := range shardCommitees.Committee {
|
||||
baseReward := baseReward(state, index, baseRewardQuotient)
|
||||
|
||||
@@ -202,8 +202,8 @@ func TestChainHeadRewardsPenalties(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestInclusionDistRewards_Ok(t *testing.T) {
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
attestation := []*pb.PendingAttestationRecord{
|
||||
@@ -232,9 +232,9 @@ func TestInclusionDistRewards_Ok(t *testing.T) {
|
||||
validatorBalances[i] = params.BeaconConfig().MaxDepositInGwei
|
||||
}
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
LatestAttestations: attestation,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
LatestAttestations: attestation,
|
||||
}
|
||||
state, err := InclusionDistRewards(
|
||||
state,
|
||||
@@ -251,8 +251,8 @@ func TestInclusionDistRewards_Ok(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestInclusionDistRewards_NotOk(t *testing.T) {
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{}},
|
||||
}}}
|
||||
attestation := []*pb.PendingAttestationRecord{
|
||||
@@ -268,8 +268,8 @@ func TestInclusionDistRewards_NotOk(t *testing.T) {
|
||||
}
|
||||
for _, tt := range tests {
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
LatestAttestations: attestation,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
LatestAttestations: attestation,
|
||||
}
|
||||
_, err := InclusionDistRewards(state, tt.voted, 0)
|
||||
if err == nil {
|
||||
@@ -427,8 +427,8 @@ func TestInactivityExitedPenality(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestInactivityInclusionPenalty_Ok(t *testing.T) {
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
attestation := []*pb.PendingAttestationRecord{
|
||||
@@ -451,9 +451,9 @@ func TestInactivityInclusionPenalty_Ok(t *testing.T) {
|
||||
validatorBalances[i] = params.BeaconConfig().MaxDepositInGwei
|
||||
}
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
LatestAttestations: attestation,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
LatestAttestations: attestation,
|
||||
}
|
||||
state, err := InactivityInclusionPenalties(
|
||||
state,
|
||||
@@ -470,8 +470,8 @@ func TestInactivityInclusionPenalty_Ok(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestInactivityInclusionPenalty_NotOk(t *testing.T) {
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{}},
|
||||
}}}
|
||||
attestation := []*pb.PendingAttestationRecord{
|
||||
@@ -487,8 +487,8 @@ func TestInactivityInclusionPenalty_NotOk(t *testing.T) {
|
||||
}
|
||||
for _, tt := range tests {
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
LatestAttestations: attestation,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
LatestAttestations: attestation,
|
||||
}
|
||||
_, err := InactivityInclusionPenalties(state, tt.voted, 0)
|
||||
if err == nil {
|
||||
@@ -498,8 +498,8 @@ func TestInactivityInclusionPenalty_NotOk(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAttestationInclusionRewards(t *testing.T) {
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
attestation := []*pb.PendingAttestationRecord{
|
||||
@@ -521,9 +521,9 @@ func TestAttestationInclusionRewards(t *testing.T) {
|
||||
validatorBalances[i] = params.BeaconConfig().MaxDepositInGwei
|
||||
}
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
LatestAttestations: attestation,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
LatestAttestations: attestation,
|
||||
}
|
||||
state, err := AttestationInclusionRewards(
|
||||
state,
|
||||
@@ -540,8 +540,8 @@ func TestAttestationInclusionRewards(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAttestationInclusionRewards_NoInclusionSlot(t *testing.T) {
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
|
||||
@@ -557,8 +557,8 @@ func TestAttestationInclusionRewards_NoInclusionSlot(t *testing.T) {
|
||||
validatorBalances[i] = params.BeaconConfig().MaxDepositInGwei
|
||||
}
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
}
|
||||
if _, err := AttestationInclusionRewards(state, 0, tt.voted); err == nil {
|
||||
t.Fatal("AttestationInclusionRewards should have failed with no inclusion slot")
|
||||
@@ -567,8 +567,8 @@ func TestAttestationInclusionRewards_NoInclusionSlot(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAttestationInclusionRewards_NoProposerIndex(t *testing.T) {
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
attestation := []*pb.PendingAttestationRecord{
|
||||
@@ -589,10 +589,10 @@ func TestAttestationInclusionRewards_NoProposerIndex(t *testing.T) {
|
||||
validatorBalances[i] = params.BeaconConfig().MaxDepositInGwei
|
||||
}
|
||||
state := &pb.BeaconState{
|
||||
Slot: 1000,
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
LatestAttestations: attestation,
|
||||
Slot: 1000,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
LatestAttestations: attestation,
|
||||
}
|
||||
if _, err := AttestationInclusionRewards(state, 0, tt.voted); err == nil {
|
||||
t.Fatal("AttestationInclusionRewards should have failed with no proposer index")
|
||||
@@ -601,10 +601,10 @@ func TestAttestationInclusionRewards_NoProposerIndex(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCrosslinksRewardsPenalties(t *testing.T) {
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
},
|
||||
})
|
||||
@@ -632,9 +632,9 @@ func TestCrosslinksRewardsPenalties(t *testing.T) {
|
||||
validatorBalances[i] = params.BeaconConfig().MaxDepositInGwei
|
||||
}
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
LatestAttestations: attestation,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
ValidatorBalances: validatorBalances,
|
||||
LatestAttestations: attestation,
|
||||
}
|
||||
state = CrosslinksRewardsPenalties(
|
||||
state,
|
||||
|
||||
@@ -79,9 +79,9 @@ func TestProcessBlockRandao_UnequalBlockAndProposerRandao(t *testing.T) {
|
||||
beaconState := &pb.BeaconState{
|
||||
ValidatorRegistry: registry,
|
||||
Slot: 1,
|
||||
ShardAndCommitteesAtSlots: []*pb.ShardAndCommitteeArray{
|
||||
ShardCommitteesAtSlots: []*pb.ShardCommitteeArray{
|
||||
{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{
|
||||
Shard: 0,
|
||||
Committee: []uint32{1, 0},
|
||||
@@ -90,7 +90,7 @@ func TestProcessBlockRandao_UnequalBlockAndProposerRandao(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{
|
||||
Shard: 0,
|
||||
Committee: []uint32{1, 0},
|
||||
@@ -128,9 +128,9 @@ func TestProcessBlockRandao_CreateRandaoMixAndUpdateProposer(t *testing.T) {
|
||||
ValidatorRegistry: registry,
|
||||
Slot: 1,
|
||||
LatestRandaoMixesHash32S: make([][]byte, params.BeaconConfig().LatestRandaoMixesLength),
|
||||
ShardAndCommitteesAtSlots: []*pb.ShardAndCommitteeArray{
|
||||
ShardCommitteesAtSlots: []*pb.ShardCommitteeArray{
|
||||
{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{
|
||||
Shard: 0,
|
||||
Committee: []uint32{1, 0},
|
||||
@@ -139,7 +139,7 @@ func TestProcessBlockRandao_CreateRandaoMixAndUpdateProposer(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{
|
||||
Shard: 0,
|
||||
Committee: []uint32{1, 0},
|
||||
@@ -312,10 +312,10 @@ func TestProcessProposerSlashings_UnmatchedBlockRoots(t *testing.T) {
|
||||
func TestProcessProposerSlashings_AppliesCorrectStatus(t *testing.T) {
|
||||
// We test the case when data is correct and verify the validator
|
||||
// registry has been updated.
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength*2; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
},
|
||||
})
|
||||
@@ -352,7 +352,7 @@ func TestProcessProposerSlashings_AppliesCorrectStatus(t *testing.T) {
|
||||
ValidatorBalances: []uint64{params.BeaconConfig().MaxDepositInGwei,
|
||||
params.BeaconConfig().MaxDepositInGwei},
|
||||
LatestPenalizedExitBalances: []uint64{0},
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
block := &pb.BeaconBlock{
|
||||
Body: &pb.BeaconBlockBody{
|
||||
@@ -680,10 +680,10 @@ func TestProcessCasperSlashings_EmptyVoteIndexIntersection(t *testing.T) {
|
||||
func TestProcessCasperSlashings_AppliesCorrectStatus(t *testing.T) {
|
||||
// We test the case when data is correct and verify the validator
|
||||
// registry has been updated.
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength*2; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
},
|
||||
})
|
||||
@@ -728,7 +728,7 @@ func TestProcessCasperSlashings_AppliesCorrectStatus(t *testing.T) {
|
||||
Slot: currentSlot,
|
||||
ValidatorBalances: []uint64{32, 32, 32, 32, 32, 32},
|
||||
LatestPenalizedExitBalances: []uint64{0},
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
block := &pb.BeaconBlock{
|
||||
Body: &pb.BeaconBlockBody{
|
||||
|
||||
@@ -157,7 +157,7 @@ func PrevHeadAttestations(
|
||||
// is maximized (ties broken by favoring lower shard_block_root values)
|
||||
func WinningRoot(
|
||||
state *pb.BeaconState,
|
||||
shardCommittee *pb.ShardAndCommittee,
|
||||
shardCommittee *pb.ShardCommittee,
|
||||
thisEpochAttestations []*pb.PendingAttestationRecord,
|
||||
prevEpochAttestations []*pb.PendingAttestationRecord) ([]byte, error) {
|
||||
|
||||
@@ -204,7 +204,7 @@ func WinningRoot(
|
||||
// `attesting_validator_indices(shard_committee, winning_root(shard_committee))` for convenience
|
||||
func AttestingValidators(
|
||||
state *pb.BeaconState,
|
||||
shardCommittee *pb.ShardAndCommittee,
|
||||
shardCommittee *pb.ShardCommittee,
|
||||
thisEpochAttestations []*pb.PendingAttestationRecord,
|
||||
prevEpochAttestations []*pb.PendingAttestationRecord) ([]uint32, error) {
|
||||
|
||||
@@ -238,7 +238,7 @@ func AttestingValidators(
|
||||
// sum([get_effective_balance(state, i) for i in shard_committee.committee])
|
||||
func TotalAttestingBalance(
|
||||
state *pb.BeaconState,
|
||||
shardCommittee *pb.ShardAndCommittee,
|
||||
shardCommittee *pb.ShardCommittee,
|
||||
thisEpochAttestations []*pb.PendingAttestationRecord,
|
||||
prevEpochAttestations []*pb.PendingAttestationRecord) (uint64, error) {
|
||||
|
||||
@@ -263,7 +263,7 @@ func TotalAttestingBalance(
|
||||
// sum([get_effective_balance(state, i) for i in shard_committee.committee])
|
||||
func TotalBalance(
|
||||
state *pb.BeaconState,
|
||||
shardCommittee *pb.ShardAndCommittee) uint64 {
|
||||
shardCommittee *pb.ShardCommittee) uint64 {
|
||||
|
||||
var totalBalance uint64
|
||||
for _, index := range shardCommittee.Committee {
|
||||
|
||||
@@ -245,15 +245,15 @@ func TestHeadAttestations_NotOk(t *testing.T) {
|
||||
func TestWinningRoot_Ok(t *testing.T) {
|
||||
defaultBalance := params.BeaconConfig().MaxDeposit
|
||||
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
|
||||
// Assign 32 ETH balance to every validator in shardAndCommittees.
|
||||
// Assign 32 ETH balance to every validator in ShardCommittees.
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
Slot: 5,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
Slot: 5,
|
||||
ValidatorBalances: []uint64{
|
||||
defaultBalance, defaultBalance, defaultBalance, defaultBalance,
|
||||
defaultBalance, defaultBalance, defaultBalance, defaultBalance,
|
||||
@@ -279,7 +279,7 @@ func TestWinningRoot_Ok(t *testing.T) {
|
||||
// WinningRoot chooses the lowest hash: []byte{100}
|
||||
winnerRoot, err := WinningRoot(
|
||||
state,
|
||||
shardAndCommittees[0].ArrayShardAndCommittee[0],
|
||||
ShardCommittees[0].ArrayShardCommittee[0],
|
||||
attestations,
|
||||
nil)
|
||||
if err != nil {
|
||||
@@ -293,7 +293,7 @@ func TestWinningRoot_Ok(t *testing.T) {
|
||||
attestations[5].ParticipationBitfield = []byte{'C'}
|
||||
winnerRoot, err = WinningRoot(
|
||||
state,
|
||||
shardAndCommittees[0].ArrayShardAndCommittee[0],
|
||||
ShardCommittees[0].ArrayShardCommittee[0],
|
||||
attestations,
|
||||
nil)
|
||||
if err != nil {
|
||||
@@ -305,13 +305,13 @@ func TestWinningRoot_Ok(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestWinningRoot_OutOfBound(t *testing.T) {
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{}},
|
||||
}}}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
|
||||
attestation := &pb.PendingAttestationRecord{
|
||||
@@ -324,7 +324,7 @@ func TestWinningRoot_OutOfBound(t *testing.T) {
|
||||
|
||||
_, err := WinningRoot(
|
||||
state,
|
||||
shardAndCommittees[0].ArrayShardAndCommittee[0],
|
||||
ShardCommittees[0].ArrayShardCommittee[0],
|
||||
[]*pb.PendingAttestationRecord{attestation},
|
||||
nil)
|
||||
if err == nil {
|
||||
@@ -335,15 +335,15 @@ func TestWinningRoot_OutOfBound(t *testing.T) {
|
||||
func TestAttestingValidators_Ok(t *testing.T) {
|
||||
defaultBalance := params.BeaconConfig().MaxDeposit
|
||||
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
|
||||
// Assign 32 ETH balance to every validator in shardAndCommittees.
|
||||
// Assign 32 ETH balance to every validator in ShardCommittees.
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
Slot: 5,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
Slot: 5,
|
||||
ValidatorBalances: []uint64{
|
||||
defaultBalance, defaultBalance, defaultBalance, defaultBalance,
|
||||
defaultBalance, defaultBalance, defaultBalance, defaultBalance,
|
||||
@@ -367,7 +367,7 @@ func TestAttestingValidators_Ok(t *testing.T) {
|
||||
|
||||
attestedValidators, err := AttestingValidators(
|
||||
state,
|
||||
shardAndCommittees[0].ArrayShardAndCommittee[0],
|
||||
ShardCommittees[0].ArrayShardCommittee[0],
|
||||
attestations,
|
||||
nil)
|
||||
if err != nil {
|
||||
@@ -381,13 +381,13 @@ func TestAttestingValidators_Ok(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAttestingValidators_CantGetWinningRoot(t *testing.T) {
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{}},
|
||||
}}}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
|
||||
attestation := &pb.PendingAttestationRecord{
|
||||
@@ -400,7 +400,7 @@ func TestAttestingValidators_CantGetWinningRoot(t *testing.T) {
|
||||
|
||||
_, err := AttestingValidators(
|
||||
state,
|
||||
shardAndCommittees[0].ArrayShardAndCommittee[0],
|
||||
ShardCommittees[0].ArrayShardCommittee[0],
|
||||
[]*pb.PendingAttestationRecord{attestation},
|
||||
nil)
|
||||
if err == nil {
|
||||
@@ -410,15 +410,15 @@ func TestAttestingValidators_CantGetWinningRoot(t *testing.T) {
|
||||
|
||||
func TestTotalAttestingBalance_Ok(t *testing.T) {
|
||||
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
|
||||
// Assign validators to different balances.
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
Slot: 5,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
Slot: 5,
|
||||
ValidatorBalances: []uint64{16 * 1e9, 18 * 1e9, 20 * 1e9, 31 * 1e9,
|
||||
32 * 1e9, 34 * 1e9, 50 * 1e9, 50 * 1e9},
|
||||
}
|
||||
@@ -440,7 +440,7 @@ func TestTotalAttestingBalance_Ok(t *testing.T) {
|
||||
|
||||
attestedBalance, err := TotalAttestingBalance(
|
||||
state,
|
||||
shardAndCommittees[0].ArrayShardAndCommittee[0],
|
||||
ShardCommittees[0].ArrayShardCommittee[0],
|
||||
attestations,
|
||||
nil)
|
||||
if err != nil {
|
||||
@@ -455,13 +455,13 @@ func TestTotalAttestingBalance_Ok(t *testing.T) {
|
||||
|
||||
func TestTotalAttestingBalance_NotOfBound(t *testing.T) {
|
||||
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{}},
|
||||
}}}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
|
||||
attestation := &pb.PendingAttestationRecord{
|
||||
@@ -474,7 +474,7 @@ func TestTotalAttestingBalance_NotOfBound(t *testing.T) {
|
||||
|
||||
_, err := TotalAttestingBalance(
|
||||
state,
|
||||
shardAndCommittees[0].ArrayShardAndCommittee[0],
|
||||
ShardCommittees[0].ArrayShardCommittee[0],
|
||||
[]*pb.PendingAttestationRecord{attestation},
|
||||
nil)
|
||||
if err == nil {
|
||||
@@ -484,7 +484,7 @@ func TestTotalAttestingBalance_NotOfBound(t *testing.T) {
|
||||
|
||||
func TestTotalBalance(t *testing.T) {
|
||||
|
||||
shardAndCommittees := &pb.ShardAndCommittee{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}}
|
||||
ShardCommittees := &pb.ShardCommittee{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}}
|
||||
|
||||
// Assign validators to different balances.
|
||||
state := &pb.BeaconState{
|
||||
@@ -494,7 +494,7 @@ func TestTotalBalance(t *testing.T) {
|
||||
}
|
||||
|
||||
// 20 + 25 + 30 + 30 + 32 + 32 + 32 + 32 = 233
|
||||
totalBalance := TotalBalance(state, shardAndCommittees)
|
||||
totalBalance := TotalBalance(state, ShardCommittees)
|
||||
if totalBalance != 233*1e9 {
|
||||
t.Errorf("Incorrect total balance. Wanted: 233*1e9, got: %d", totalBalance)
|
||||
}
|
||||
@@ -502,14 +502,14 @@ func TestTotalBalance(t *testing.T) {
|
||||
|
||||
func TestInclusionSlot_Ok(t *testing.T) {
|
||||
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
Slot: 5,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
Slot: 5,
|
||||
LatestAttestations: []*pb.PendingAttestationRecord{
|
||||
{Data: &pb.AttestationData{Shard: 1, Slot: 0},
|
||||
// Validator 1 and 7 participated.
|
||||
@@ -531,13 +531,13 @@ func TestInclusionSlot_Ok(t *testing.T) {
|
||||
|
||||
func TestInclusionSlot_BadBitfield(t *testing.T) {
|
||||
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{1}},
|
||||
}}}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
LatestAttestations: []*pb.PendingAttestationRecord{
|
||||
{Data: &pb.AttestationData{Shard: 1, Slot: 0},
|
||||
ParticipationBitfield: []byte{},
|
||||
@@ -553,13 +553,13 @@ func TestInclusionSlot_BadBitfield(t *testing.T) {
|
||||
|
||||
func TestInclusionSlot_NotFound(t *testing.T) {
|
||||
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{1}},
|
||||
}}}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
|
||||
_, err := InclusionSlot(state, 1)
|
||||
@@ -570,14 +570,14 @@ func TestInclusionSlot_NotFound(t *testing.T) {
|
||||
|
||||
func TestInclusionDistance_Ok(t *testing.T) {
|
||||
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
Slot: 5,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
Slot: 5,
|
||||
LatestAttestations: []*pb.PendingAttestationRecord{
|
||||
{Data: &pb.AttestationData{Shard: 1, Slot: 0},
|
||||
// Validator 1 and 7 participated.
|
||||
@@ -600,13 +600,13 @@ func TestInclusionDistance_Ok(t *testing.T) {
|
||||
|
||||
func TestInclusionDistance_BadBitfield(t *testing.T) {
|
||||
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{1}},
|
||||
}}}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
LatestAttestations: []*pb.PendingAttestationRecord{
|
||||
{Data: &pb.AttestationData{Shard: 1, Slot: 0},
|
||||
ParticipationBitfield: []byte{},
|
||||
@@ -622,13 +622,13 @@ func TestInclusionDistance_BadBitfield(t *testing.T) {
|
||||
|
||||
func TestInclusionDistance_NotFound(t *testing.T) {
|
||||
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{1}},
|
||||
}}}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
|
||||
_, err := InclusionDistance(state, 1)
|
||||
|
||||
@@ -40,8 +40,8 @@ func CanProcessValidatorRegistry(state *pb.BeaconState) bool {
|
||||
if state.FinalizedSlot <= state.ValidatorRegistryLatestChangeSlot {
|
||||
return false
|
||||
}
|
||||
for _, shardCommitteesAtSlot := range state.ShardAndCommitteesAtSlots {
|
||||
for _, shardCommittee := range shardCommitteesAtSlot.ArrayShardAndCommittee {
|
||||
for _, shardCommitteesAtSlot := range state.ShardCommitteesAtSlots {
|
||||
for _, shardCommittee := range shardCommitteesAtSlot.ArrayShardCommittee {
|
||||
if state.LatestCrosslinks[shardCommittee.Shard].Slot <= state.ValidatorRegistryLatestChangeSlot {
|
||||
return false
|
||||
}
|
||||
@@ -145,8 +145,8 @@ func ProcessCrosslinks(
|
||||
thisEpochAttestations []*pb.PendingAttestationRecord,
|
||||
prevEpochAttestations []*pb.PendingAttestationRecord) (*pb.BeaconState, error) {
|
||||
|
||||
for _, shardCommitteesAtSlot := range state.ShardAndCommitteesAtSlots {
|
||||
for _, shardCommittee := range shardCommitteesAtSlot.ArrayShardAndCommittee {
|
||||
for _, shardCommitteesAtSlot := range state.ShardCommitteesAtSlots {
|
||||
for _, shardCommittee := range shardCommitteesAtSlot.ArrayShardCommittee {
|
||||
attestingBalance, err := TotalAttestingBalance(state, shardCommittee, thisEpochAttestations, prevEpochAttestations)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not get attesting balance for shard committee %d: %v", shardCommittee.Shard, err)
|
||||
@@ -210,10 +210,10 @@ func ProcessValidatorRegistry(
|
||||
seedLookahead := params.BeaconConfig().SeedLookahead
|
||||
shardCount := params.BeaconConfig().ShardCount
|
||||
|
||||
shardCommittees := state.ShardAndCommitteesAtSlots
|
||||
shardCommittees := state.ShardCommitteesAtSlots
|
||||
lastSlot := len(shardCommittees) - 1
|
||||
lastCommittee := len(shardCommittees[lastSlot].ArrayShardAndCommittee) - 1
|
||||
nextStartShard := (shardCommittees[lastSlot].ArrayShardAndCommittee[lastCommittee].Shard + 1) %
|
||||
lastCommittee := len(shardCommittees[lastSlot].ArrayShardCommittee) - 1
|
||||
nextStartShard := (shardCommittees[lastSlot].ArrayShardCommittee[lastCommittee].Shard + 1) %
|
||||
shardCount
|
||||
|
||||
var randaoHash32 [32]byte
|
||||
@@ -221,7 +221,7 @@ func ProcessValidatorRegistry(
|
||||
uint64(seedLookahead))%randaoMixesLength])
|
||||
|
||||
for i := 0; i < epochLength; i++ {
|
||||
state.ShardAndCommitteesAtSlots[i] = state.ShardAndCommitteesAtSlots[epochLength+i]
|
||||
state.ShardCommitteesAtSlots[i] = state.ShardCommitteesAtSlots[epochLength+i]
|
||||
}
|
||||
newShuffledCommittees, err := validators.ShuffleValidatorRegistryToCommittees(
|
||||
randaoHash32,
|
||||
@@ -234,7 +234,7 @@ func ProcessValidatorRegistry(
|
||||
}
|
||||
|
||||
for i := 0; i < epochLength; i++ {
|
||||
state.ShardAndCommitteesAtSlots[epochLength+i] = newShuffledCommittees[i]
|
||||
state.ShardCommitteesAtSlots[epochLength+i] = newShuffledCommittees[i]
|
||||
}
|
||||
return state, nil
|
||||
}
|
||||
@@ -261,10 +261,10 @@ func ProcessPartialValidatorRegistry(
|
||||
copy(randaoHash32[:], state.LatestRandaoMixesHash32S[(state.Slot-uint64(seedLookahead))%randaoMixesLength])
|
||||
|
||||
for i := 0; i < epochLength; i++ {
|
||||
state.ShardAndCommitteesAtSlots[i] = state.ShardAndCommitteesAtSlots[epochLength+i]
|
||||
state.ShardCommitteesAtSlots[i] = state.ShardCommitteesAtSlots[epochLength+i]
|
||||
}
|
||||
epochsSinceLastRegistryChange := (state.Slot - state.ValidatorRegistryLatestChangeSlot) / uint64(epochLength)
|
||||
startShard := state.ShardAndCommitteesAtSlots[0].ArrayShardAndCommittee[0].Shard
|
||||
startShard := state.ShardCommitteesAtSlots[0].ArrayShardCommittee[0].Shard
|
||||
if mathutil.IsPowerOf2(epochsSinceLastRegistryChange) {
|
||||
newShuffledCommittees, err := validators.ShuffleValidatorRegistryToCommittees(
|
||||
randaoHash32,
|
||||
@@ -276,7 +276,7 @@ func ProcessPartialValidatorRegistry(
|
||||
return nil, fmt.Errorf("could not shuffle validator registry for commtitees: %v", err)
|
||||
}
|
||||
for i := 0; i < epochLength; i++ {
|
||||
state.ShardAndCommitteesAtSlots[epochLength+i] = newShuffledCommittees[i]
|
||||
state.ShardCommitteesAtSlots[epochLength+i] = newShuffledCommittees[i]
|
||||
}
|
||||
}
|
||||
return state, nil
|
||||
|
||||
@@ -224,15 +224,15 @@ func TestProcessFinalization(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestProcessCrosslinks_Ok(t *testing.T) {
|
||||
shardCommitteesAtSlot := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
shardCommitteesAtSlot := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardCommitteesAtSlot,
|
||||
Slot: 5,
|
||||
LatestCrosslinks: []*pb.CrosslinkRecord{{}, {}},
|
||||
ShardCommitteesAtSlots: shardCommitteesAtSlot,
|
||||
Slot: 5,
|
||||
LatestCrosslinks: []*pb.CrosslinkRecord{{}, {}},
|
||||
ValidatorBalances: []uint64{16 * 1e9, 18 * 1e9, 20 * 1e9, 31 * 1e9,
|
||||
32 * 1e9, 34 * 1e9, 50 * 1e9, 50 * 1e9},
|
||||
}
|
||||
@@ -274,16 +274,16 @@ func TestProcessCrosslinks_Ok(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestProcessCrosslinks_NoRoot(t *testing.T) {
|
||||
shardCommitteesAtSlot := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
shardCommitteesAtSlot := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
}}}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardCommitteesAtSlot,
|
||||
Slot: 5,
|
||||
LatestCrosslinks: []*pb.CrosslinkRecord{{}, {}},
|
||||
ValidatorBalances: []uint64{},
|
||||
ShardCommitteesAtSlots: shardCommitteesAtSlot,
|
||||
Slot: 5,
|
||||
LatestCrosslinks: []*pb.CrosslinkRecord{{}, {}},
|
||||
ValidatorBalances: []uint64{},
|
||||
}
|
||||
|
||||
attestations := []*pb.PendingAttestationRecord{
|
||||
@@ -298,17 +298,17 @@ func TestProcessCrosslinks_NoRoot(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestProcessEjections_Ok(t *testing.T) {
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength*2; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Committee: []uint32{0, 1, 2, 3, 4, 5, 6, 7}},
|
||||
},
|
||||
})
|
||||
}
|
||||
state := &pb.BeaconState{
|
||||
Slot: 1,
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
Slot: 1,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
ValidatorBalances: []uint64{
|
||||
params.BeaconConfig().EjectionBalanceInGwei - 1,
|
||||
params.BeaconConfig().EjectionBalanceInGwei + 1},
|
||||
@@ -339,8 +339,8 @@ func TestCanProcessValidatorRegistry(t *testing.T) {
|
||||
LatestCrosslinks: []*pb.CrosslinkRecord{
|
||||
{Slot: 101}, {Slot: 102}, {Slot: 103}, {Slot: 104},
|
||||
},
|
||||
ShardAndCommitteesAtSlots: []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommitteesAtSlots: []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 0}, {Shard: 1}, {Shard: 2}, {Shard: 3},
|
||||
}},
|
||||
},
|
||||
@@ -364,8 +364,8 @@ func TestCanNotProcessValidatorRegistry(t *testing.T) {
|
||||
LatestCrosslinks: []*pb.CrosslinkRecord{
|
||||
{Slot: 99},
|
||||
},
|
||||
ShardAndCommitteesAtSlots: []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommitteesAtSlots: []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 0}},
|
||||
}},
|
||||
}
|
||||
@@ -376,17 +376,17 @@ func TestCanNotProcessValidatorRegistry(t *testing.T) {
|
||||
|
||||
func TestProcessValidatorRegistry(t *testing.T) {
|
||||
epochLength := params.BeaconConfig().EpochLength
|
||||
shardAndCommittees := make([]*pb.ShardAndCommitteeArray, epochLength*2)
|
||||
for i := 0; i < len(shardAndCommittees); i++ {
|
||||
shardAndCommittees[i] = &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{{Shard: uint64(i)}},
|
||||
shardCommittees := make([]*pb.ShardCommitteeArray, epochLength*2)
|
||||
for i := 0; i < len(shardCommittees); i++ {
|
||||
shardCommittees[i] = &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{{Shard: uint64(i)}},
|
||||
}
|
||||
}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
Slot: 64,
|
||||
ValidatorRegistryLatestChangeSlot: 1,
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: shardCommittees,
|
||||
LatestRandaoMixesHash32S: [][]byte{{'A'}},
|
||||
}
|
||||
copiedState := proto.Clone(state).(*pb.BeaconState)
|
||||
@@ -395,19 +395,19 @@ func TestProcessValidatorRegistry(t *testing.T) {
|
||||
t.Fatalf("Could not execute ProcessValidatorRegistry: %v", err)
|
||||
}
|
||||
|
||||
if newState.ShardAndCommitteesAtSlots[0].ArrayShardAndCommittee[0].Shard != state.ShardAndCommitteesAtSlots[epochLength].ArrayShardAndCommittee[0].Shard {
|
||||
if newState.ShardCommitteesAtSlots[0].ArrayShardCommittee[0].Shard != state.ShardCommitteesAtSlots[epochLength].ArrayShardCommittee[0].Shard {
|
||||
t.Errorf("Incorrect rotation for shard committees, wanted shard: %d, got shard: %d",
|
||||
state.ShardAndCommitteesAtSlots[0].ArrayShardAndCommittee[0].Shard,
|
||||
newState.ShardAndCommitteesAtSlots[epochLength].ArrayShardAndCommittee[0].Shard)
|
||||
state.ShardCommitteesAtSlots[0].ArrayShardCommittee[0].Shard,
|
||||
newState.ShardCommitteesAtSlots[epochLength].ArrayShardCommittee[0].Shard)
|
||||
}
|
||||
}
|
||||
|
||||
func TestProcessValidatorRegistry_ReachedUpperBound(t *testing.T) {
|
||||
epochLength := params.BeaconConfig().EpochLength
|
||||
shardAndCommittees := make([]*pb.ShardAndCommitteeArray, epochLength*2)
|
||||
for i := 0; i < len(shardAndCommittees); i++ {
|
||||
shardAndCommittees[i] = &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{{Shard: uint64(i)}},
|
||||
shardCommittees := make([]*pb.ShardCommitteeArray, epochLength*2)
|
||||
for i := 0; i < len(shardCommittees); i++ {
|
||||
shardCommittees[i] = &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{{Shard: uint64(i)}},
|
||||
}
|
||||
}
|
||||
validators := make([]*pb.ValidatorRecord, 1<<params.BeaconConfig().MaxNumLog2Validators-1)
|
||||
@@ -418,7 +418,7 @@ func TestProcessValidatorRegistry_ReachedUpperBound(t *testing.T) {
|
||||
state := &pb.BeaconState{
|
||||
Slot: 64,
|
||||
ValidatorRegistryLatestChangeSlot: 1,
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: shardCommittees,
|
||||
LatestRandaoMixesHash32S: [][]byte{{'A'}},
|
||||
ValidatorRegistry: validators,
|
||||
}
|
||||
@@ -430,17 +430,17 @@ func TestProcessValidatorRegistry_ReachedUpperBound(t *testing.T) {
|
||||
|
||||
func TestProcessPartialValidatorRegistry(t *testing.T) {
|
||||
epochLength := params.BeaconConfig().EpochLength
|
||||
shardAndCommittees := make([]*pb.ShardAndCommitteeArray, epochLength*2)
|
||||
for i := 0; i < len(shardAndCommittees); i++ {
|
||||
shardAndCommittees[i] = &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{{Shard: uint64(i)}},
|
||||
shardCommittees := make([]*pb.ShardCommitteeArray, epochLength*2)
|
||||
for i := 0; i < len(shardCommittees); i++ {
|
||||
shardCommittees[i] = &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{{Shard: uint64(i)}},
|
||||
}
|
||||
}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
Slot: 64,
|
||||
ValidatorRegistryLatestChangeSlot: 1,
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: shardCommittees,
|
||||
LatestRandaoMixesHash32S: [][]byte{{'A'}},
|
||||
}
|
||||
copiedState := proto.Clone(state).(*pb.BeaconState)
|
||||
@@ -453,19 +453,19 @@ func TestProcessPartialValidatorRegistry(t *testing.T) {
|
||||
state.ValidatorRegistryLatestChangeSlot, newState.ValidatorRegistryLatestChangeSlot)
|
||||
}
|
||||
|
||||
if newState.ShardAndCommitteesAtSlots[0].ArrayShardAndCommittee[0].Shard != state.ShardAndCommitteesAtSlots[epochLength].ArrayShardAndCommittee[0].Shard {
|
||||
if newState.ShardCommitteesAtSlots[0].ArrayShardCommittee[0].Shard != state.ShardCommitteesAtSlots[epochLength].ArrayShardCommittee[0].Shard {
|
||||
t.Errorf("Incorrect rotation for shard committees, wanted shard: %d, got shard: %d",
|
||||
state.ShardAndCommitteesAtSlots[0].ArrayShardAndCommittee[0].Shard,
|
||||
newState.ShardAndCommitteesAtSlots[epochLength].ArrayShardAndCommittee[0].Shard)
|
||||
state.ShardCommitteesAtSlots[0].ArrayShardCommittee[0].Shard,
|
||||
newState.ShardCommitteesAtSlots[epochLength].ArrayShardCommittee[0].Shard)
|
||||
}
|
||||
}
|
||||
|
||||
func TestProcessPartialValidatorRegistry_ReachedUpperBound(t *testing.T) {
|
||||
epochLength := params.BeaconConfig().EpochLength
|
||||
shardAndCommittees := make([]*pb.ShardAndCommitteeArray, epochLength*2)
|
||||
for i := 0; i < len(shardAndCommittees); i++ {
|
||||
shardAndCommittees[i] = &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{{Shard: uint64(i)}},
|
||||
shardCommittees := make([]*pb.ShardCommitteeArray, epochLength*2)
|
||||
for i := 0; i < len(shardCommittees); i++ {
|
||||
shardCommittees[i] = &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{{Shard: uint64(i)}},
|
||||
}
|
||||
}
|
||||
validators := make([]*pb.ValidatorRecord, 1<<params.BeaconConfig().MaxNumLog2Validators-1)
|
||||
@@ -476,7 +476,7 @@ func TestProcessPartialValidatorRegistry_ReachedUpperBound(t *testing.T) {
|
||||
state := &pb.BeaconState{
|
||||
Slot: 64,
|
||||
ValidatorRegistryLatestChangeSlot: 1,
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: shardCommittees,
|
||||
LatestRandaoMixesHash32S: [][]byte{{'A'}},
|
||||
ValidatorRegistry: validators,
|
||||
}
|
||||
|
||||
@@ -14,16 +14,16 @@ func TestUpdateRandaoLayers(t *testing.T) {
|
||||
genesisValidatorRegistry := v.InitialValidatorRegistry()
|
||||
beaconState.ValidatorRegistry = genesisValidatorRegistry
|
||||
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength*2; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Committee: []uint32{9, 8, 311, 12, 92, 1, 23, 17}},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
beaconState.ShardAndCommitteesAtSlots = shardAndCommittees
|
||||
beaconState.ShardCommitteesAtSlots = ShardCommittees
|
||||
|
||||
newState, err := UpdateRandaoLayers(beaconState, 1)
|
||||
if err != nil {
|
||||
|
||||
@@ -94,9 +94,9 @@ func InitialBeaconState(
|
||||
ValidatorRegistryDeltaChainTipHash32: params.BeaconConfig().ZeroHash[:],
|
||||
|
||||
// Randomness and committees.
|
||||
LatestRandaoMixesHash32S: latestRandaoMixes,
|
||||
LatestVdfOutputsHash32S: latestVDFOutputs,
|
||||
ShardAndCommitteesAtSlots: []*pb.ShardAndCommitteeArray{},
|
||||
LatestRandaoMixesHash32S: latestRandaoMixes,
|
||||
LatestVdfOutputsHash32S: latestVDFOutputs,
|
||||
ShardCommitteesAtSlots: []*pb.ShardCommitteeArray{},
|
||||
|
||||
// Proof of custody.
|
||||
// Place holder, proof of custody challenge is defined in phase 1.
|
||||
@@ -167,7 +167,7 @@ func InitialBeaconState(
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not shuffle initial committee: %v", err)
|
||||
}
|
||||
state.ShardAndCommitteesAtSlots = append(initialShuffling, initialShuffling...)
|
||||
state.ShardCommitteesAtSlots = append(initialShuffling, initialShuffling...)
|
||||
|
||||
return state, nil
|
||||
}
|
||||
|
||||
@@ -172,15 +172,15 @@ func TestInitialBeaconState_Ok(t *testing.T) {
|
||||
}
|
||||
|
||||
// Initial committee shuffling check.
|
||||
if len(state.ShardAndCommitteesAtSlots) != int(2*epochLength) {
|
||||
t.Error("ShardAndCommitteesAtSlots was not correctly initialized")
|
||||
if len(state.ShardCommitteesAtSlots) != int(2*epochLength) {
|
||||
t.Error("ShardCommitteesAtSlots was not correctly initialized")
|
||||
}
|
||||
|
||||
for i := 0; i < len(state.ShardAndCommitteesAtSlots); i++ {
|
||||
if len(state.ShardAndCommitteesAtSlots[i].ArrayShardAndCommittee[0].Committee) !=
|
||||
for i := 0; i < len(state.ShardCommitteesAtSlots); i++ {
|
||||
if len(state.ShardCommitteesAtSlots[i].ArrayShardCommittee[0].Committee) !=
|
||||
int(params.BeaconConfig().TargetCommitteeSize) {
|
||||
t.Errorf("ShardAndCommittees was not correctly initialized %d",
|
||||
len(state.ShardAndCommitteesAtSlots[i].ArrayShardAndCommittee[0].Committee))
|
||||
t.Errorf("ShardCommittees was not correctly initialized %d",
|
||||
len(state.ShardCommitteesAtSlots[i].ArrayShardCommittee[0].Committee))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ import (
|
||||
func TestValidatorIndexMap(t *testing.T) {
|
||||
state := &pb.BeaconState{
|
||||
ValidatorRegistry: []*pb.ValidatorRecord{
|
||||
&pb.ValidatorRecord{
|
||||
{
|
||||
Pubkey: []byte("zero"),
|
||||
},
|
||||
&pb.ValidatorRecord{
|
||||
{
|
||||
Pubkey: []byte("one"),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -42,9 +42,9 @@ func TestProcessBlock_IncorrectBlockRandao(t *testing.T) {
|
||||
beaconState := &pb.BeaconState{
|
||||
Slot: 0,
|
||||
ValidatorRegistry: registry,
|
||||
ShardAndCommitteesAtSlots: []*pb.ShardAndCommitteeArray{
|
||||
ShardCommitteesAtSlots: []*pb.ShardCommitteeArray{
|
||||
{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{
|
||||
Shard: 0,
|
||||
Committee: []uint32{0, 1},
|
||||
@@ -78,9 +78,9 @@ func TestProcessBlock_IncorrectProposerSlashing(t *testing.T) {
|
||||
},
|
||||
}
|
||||
slashings := make([]*pb.ProposerSlashing, params.BeaconConfig().MaxProposerSlashings+1)
|
||||
shardAndCommittees := make([]*pb.ShardAndCommitteeArray, 64)
|
||||
shardAndCommittees[5] = &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := make([]*pb.ShardCommitteeArray, 64)
|
||||
ShardCommittees[5] = &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{
|
||||
Shard: 0,
|
||||
Committee: []uint32{0, 1},
|
||||
@@ -89,10 +89,10 @@ func TestProcessBlock_IncorrectProposerSlashing(t *testing.T) {
|
||||
}
|
||||
latestMixes := make([][]byte, params.BeaconConfig().LatestRandaoMixesLength)
|
||||
beaconState := &pb.BeaconState{
|
||||
LatestRandaoMixesHash32S: latestMixes,
|
||||
ValidatorRegistry: registry,
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
Slot: 5,
|
||||
LatestRandaoMixesHash32S: latestMixes,
|
||||
ValidatorRegistry: registry,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
Slot: 5,
|
||||
}
|
||||
block := &pb.BeaconBlock{
|
||||
Slot: 5,
|
||||
@@ -136,9 +136,9 @@ func TestProcessBlock_IncorrectCasperSlashing(t *testing.T) {
|
||||
},
|
||||
}
|
||||
casperSlashings := make([]*pb.CasperSlashing, params.BeaconConfig().MaxCasperSlashings+1)
|
||||
shardAndCommittees := make([]*pb.ShardAndCommitteeArray, 64)
|
||||
shardAndCommittees[5] = &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := make([]*pb.ShardCommitteeArray, 64)
|
||||
ShardCommittees[5] = &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{
|
||||
Shard: 0,
|
||||
Committee: []uint32{0, 1},
|
||||
@@ -147,10 +147,10 @@ func TestProcessBlock_IncorrectCasperSlashing(t *testing.T) {
|
||||
}
|
||||
latestMixes := make([][]byte, params.BeaconConfig().LatestRandaoMixesLength)
|
||||
beaconState := &pb.BeaconState{
|
||||
LatestRandaoMixesHash32S: latestMixes,
|
||||
Slot: 5,
|
||||
ValidatorRegistry: registry,
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
LatestRandaoMixesHash32S: latestMixes,
|
||||
Slot: 5,
|
||||
ValidatorRegistry: registry,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
block := &pb.BeaconBlock{
|
||||
Slot: 5,
|
||||
@@ -217,9 +217,9 @@ func TestProcessBlock_IncorrectProcessBlockAttestations(t *testing.T) {
|
||||
},
|
||||
}
|
||||
blockAttestations := make([]*pb.Attestation, params.BeaconConfig().MaxAttestations+1)
|
||||
shardAndCommittees := make([]*pb.ShardAndCommitteeArray, 64)
|
||||
shardAndCommittees[5] = &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := make([]*pb.ShardCommitteeArray, 64)
|
||||
ShardCommittees[5] = &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{
|
||||
Shard: 0,
|
||||
Committee: []uint32{0, 1},
|
||||
@@ -228,10 +228,10 @@ func TestProcessBlock_IncorrectProcessBlockAttestations(t *testing.T) {
|
||||
}
|
||||
latestMixes := make([][]byte, params.BeaconConfig().LatestRandaoMixesLength)
|
||||
beaconState := &pb.BeaconState{
|
||||
LatestRandaoMixesHash32S: latestMixes,
|
||||
Slot: 5,
|
||||
ValidatorRegistry: registry,
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
LatestRandaoMixesHash32S: latestMixes,
|
||||
Slot: 5,
|
||||
ValidatorRegistry: registry,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
block := &pb.BeaconBlock{
|
||||
Slot: 5,
|
||||
@@ -320,9 +320,9 @@ func TestProcessBlock_IncorrectProcessExits(t *testing.T) {
|
||||
CustodyBitfield: []byte{1},
|
||||
}
|
||||
attestations := []*pb.Attestation{blockAtt}
|
||||
shardAndCommittees := make([]*pb.ShardAndCommitteeArray, 128)
|
||||
shardAndCommittees[64] = &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := make([]*pb.ShardCommitteeArray, 128)
|
||||
ShardCommittees[64] = &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{
|
||||
Shard: 0,
|
||||
Committee: []uint32{0, 1},
|
||||
@@ -331,13 +331,13 @@ func TestProcessBlock_IncorrectProcessExits(t *testing.T) {
|
||||
}
|
||||
latestMixes := make([][]byte, params.BeaconConfig().LatestRandaoMixesLength)
|
||||
beaconState := &pb.BeaconState{
|
||||
LatestRandaoMixesHash32S: latestMixes,
|
||||
ValidatorRegistry: registry,
|
||||
Slot: 64,
|
||||
PreviousJustifiedSlot: 10,
|
||||
LatestBlockRootHash32S: blockRoots,
|
||||
LatestCrosslinks: stateLatestCrosslinks,
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
LatestRandaoMixesHash32S: latestMixes,
|
||||
ValidatorRegistry: registry,
|
||||
Slot: 64,
|
||||
PreviousJustifiedSlot: 10,
|
||||
LatestBlockRootHash32S: blockRoots,
|
||||
LatestCrosslinks: stateLatestCrosslinks,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
exits := make([]*pb.Exit, params.BeaconConfig().MaxExits+1)
|
||||
block := &pb.BeaconBlock{
|
||||
@@ -428,9 +428,9 @@ func TestProcessBlock_PassesProcessingConditions(t *testing.T) {
|
||||
CustodyBitfield: []byte{1},
|
||||
}
|
||||
attestations := []*pb.Attestation{blockAtt}
|
||||
shardAndCommittees := make([]*pb.ShardAndCommitteeArray, 128)
|
||||
shardAndCommittees[64] = &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := make([]*pb.ShardCommitteeArray, 128)
|
||||
ShardCommittees[64] = &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{
|
||||
Shard: 0,
|
||||
Committee: []uint32{0, 1},
|
||||
@@ -439,13 +439,13 @@ func TestProcessBlock_PassesProcessingConditions(t *testing.T) {
|
||||
}
|
||||
latestMixes := make([][]byte, params.BeaconConfig().LatestRandaoMixesLength)
|
||||
beaconState := &pb.BeaconState{
|
||||
LatestRandaoMixesHash32S: latestMixes,
|
||||
ValidatorRegistry: registry,
|
||||
Slot: 64,
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
PreviousJustifiedSlot: 10,
|
||||
LatestBlockRootHash32S: blockRoots,
|
||||
LatestCrosslinks: stateLatestCrosslinks,
|
||||
LatestRandaoMixesHash32S: latestMixes,
|
||||
ValidatorRegistry: registry,
|
||||
Slot: 64,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
PreviousJustifiedSlot: 10,
|
||||
LatestBlockRootHash32S: blockRoots,
|
||||
LatestCrosslinks: stateLatestCrosslinks,
|
||||
}
|
||||
exits := []*pb.Exit{
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ func ShuffleValidatorRegistryToCommittees(
|
||||
validators []*pb.ValidatorRecord,
|
||||
crosslinkStartShard uint64,
|
||||
slot uint64,
|
||||
) ([]*pb.ShardAndCommitteeArray, error) {
|
||||
) ([]*pb.ShardCommitteeArray, error) {
|
||||
indices := ActiveValidatorIndices(validators, slot)
|
||||
// split the shuffled list for slot.
|
||||
shuffledValidatorRegistry, err := utils.ShuffleIndices(seed, indices)
|
||||
@@ -29,27 +29,27 @@ func ShuffleValidatorRegistryToCommittees(
|
||||
// splitBySlotShard splits the validator list into evenly sized committees and assigns each
|
||||
// committee to a slot and a shard. If the validator set is large, multiple committees are assigned
|
||||
// to a single slot and shard. See getCommitteesPerSlot for more details.
|
||||
func splitBySlotShard(shuffledValidatorRegistry []uint32, crosslinkStartShard uint64) []*pb.ShardAndCommitteeArray {
|
||||
func splitBySlotShard(shuffledValidatorRegistry []uint32, crosslinkStartShard uint64) []*pb.ShardCommitteeArray {
|
||||
committeesPerSlot := getCommitteesPerSlot(uint64(len(shuffledValidatorRegistry)))
|
||||
committeBySlotAndShard := []*pb.ShardAndCommitteeArray{}
|
||||
committeBySlotAndShard := []*pb.ShardCommitteeArray{}
|
||||
|
||||
// split the validator indices by slot.
|
||||
validatorsBySlot := utils.SplitIndices(shuffledValidatorRegistry, params.BeaconConfig().EpochLength)
|
||||
for i, validatorsForSlot := range validatorsBySlot {
|
||||
shardCommittees := []*pb.ShardAndCommittee{}
|
||||
shardCommittees := []*pb.ShardCommittee{}
|
||||
validatorsByShard := utils.SplitIndices(validatorsForSlot, committeesPerSlot)
|
||||
shardStart := crosslinkStartShard + uint64(i)*committeesPerSlot
|
||||
|
||||
for j, validatorsForShard := range validatorsByShard {
|
||||
shardID := (shardStart + uint64(j)) % params.BeaconConfig().ShardCount
|
||||
shardCommittees = append(shardCommittees, &pb.ShardAndCommittee{
|
||||
shardCommittees = append(shardCommittees, &pb.ShardCommittee{
|
||||
Shard: shardID,
|
||||
Committee: validatorsForShard,
|
||||
})
|
||||
}
|
||||
|
||||
committeBySlotAndShard = append(committeBySlotAndShard, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: shardCommittees,
|
||||
committeBySlotAndShard = append(committeBySlotAndShard, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: shardCommittees,
|
||||
})
|
||||
}
|
||||
return committeBySlotAndShard
|
||||
@@ -101,13 +101,13 @@ func AttestationParticipants(
|
||||
participationBitfield []byte) ([]uint32, error) {
|
||||
|
||||
// Find the relevant committee.
|
||||
shardCommittees, err := ShardAndCommitteesAtSlot(state, attestationData.Slot)
|
||||
shardCommittees, err := ShardCommitteesAtSlot(state, attestationData.Slot)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var participants *pb.ShardAndCommittee
|
||||
for _, committee := range shardCommittees.ArrayShardAndCommittee {
|
||||
var participants *pb.ShardCommittee
|
||||
for _, committee := range shardCommittees.ArrayShardCommittee {
|
||||
if committee.Shard == attestationData.Shard {
|
||||
participants = committee
|
||||
break
|
||||
|
||||
@@ -9,31 +9,31 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/shared/params"
|
||||
)
|
||||
|
||||
func TestGetShardAndCommitteesAtSlots(t *testing.T) {
|
||||
func TestGetShardCommitteesAtSlots(t *testing.T) {
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommitteesAtSlots: []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1, Committee: []uint32{0, 1, 2, 3, 4}},
|
||||
{Shard: 2, Committee: []uint32{5, 6, 7, 8, 9}},
|
||||
}},
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 3, Committee: []uint32{0, 1, 2, 3, 4}},
|
||||
{Shard: 4, Committee: []uint32{5, 6, 7, 8, 9}},
|
||||
}},
|
||||
}}
|
||||
if _, err := ShardAndCommitteesAtSlot(state, 1000); err == nil {
|
||||
t.Error("getShardAndCommitteesForSlot should have failed with invalid slot")
|
||||
if _, err := ShardCommitteesAtSlot(state, 1000); err == nil {
|
||||
t.Error("getShardCommitteesForSlot should have failed with invalid slot")
|
||||
}
|
||||
committee, err := ShardAndCommitteesAtSlot(state, 0)
|
||||
committee, err := ShardCommitteesAtSlot(state, 0)
|
||||
if err != nil {
|
||||
t.Errorf("getShardAndCommitteesForSlot failed: %v", err)
|
||||
t.Errorf("getShardCommitteesForSlot failed: %v", err)
|
||||
}
|
||||
if committee.ArrayShardAndCommittee[0].Shard != 1 {
|
||||
t.Errorf("getShardAndCommitteesForSlot returns Shard should be 1, got: %v", committee.ArrayShardAndCommittee[0].Shard)
|
||||
if committee.ArrayShardCommittee[0].Shard != 1 {
|
||||
t.Errorf("getShardCommitteesForSlot returns Shard should be 1, got: %v", committee.ArrayShardCommittee[0].Shard)
|
||||
}
|
||||
committee, _ = ShardAndCommitteesAtSlot(state, 1)
|
||||
if committee.ArrayShardAndCommittee[0].Shard != 3 {
|
||||
t.Errorf("getShardAndCommitteesForSlot returns Shard should be 3, got: %v", committee.ArrayShardAndCommittee[0].Shard)
|
||||
committee, _ = ShardCommitteesAtSlot(state, 1)
|
||||
if committee.ArrayShardCommittee[0].Shard != 3 {
|
||||
t.Errorf("getShardCommitteesForSlot returns Shard should be 3, got: %v", committee.ArrayShardCommittee[0].Shard)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,19 +151,19 @@ func TestValidatorRegistryBySlotShardRegularValidatorSet(t *testing.T) {
|
||||
validatorIndices = append(validatorIndices, uint32(i))
|
||||
}
|
||||
|
||||
shardAndCommitteeArray := splitBySlotShard(validatorIndices, 0)
|
||||
ShardCommitteeArray := splitBySlotShard(validatorIndices, 0)
|
||||
|
||||
if len(shardAndCommitteeArray) != int(params.BeaconConfig().EpochLength) {
|
||||
t.Fatalf("Expected length %d: got %d", params.BeaconConfig().EpochLength, len(shardAndCommitteeArray))
|
||||
if len(ShardCommitteeArray) != int(params.BeaconConfig().EpochLength) {
|
||||
t.Fatalf("Expected length %d: got %d", params.BeaconConfig().EpochLength, len(ShardCommitteeArray))
|
||||
}
|
||||
|
||||
for i := 0; i < len(shardAndCommitteeArray); i++ {
|
||||
shardAndCommittees := shardAndCommitteeArray[i].ArrayShardAndCommittee
|
||||
if len(shardAndCommittees) != 1 {
|
||||
for i := 0; i < len(ShardCommitteeArray); i++ {
|
||||
ShardCommittees := ShardCommitteeArray[i].ArrayShardCommittee
|
||||
if len(ShardCommittees) != 1 {
|
||||
t.Fatalf("Expected %d committee per slot: got %d", params.BeaconConfig().TargetCommitteeSize, 1)
|
||||
}
|
||||
|
||||
committeeSize := len(shardAndCommittees[0].Committee)
|
||||
committeeSize := len(ShardCommittees[0].Committee)
|
||||
if committeeSize != int(params.BeaconConfig().TargetCommitteeSize) {
|
||||
t.Fatalf("Expected committee size %d: got %d", params.BeaconConfig().TargetCommitteeSize, committeeSize)
|
||||
}
|
||||
@@ -177,21 +177,21 @@ func TestValidatorRegistryBySlotShardLargeValidatorSet(t *testing.T) {
|
||||
validatorIndices = append(validatorIndices, uint32(i))
|
||||
}
|
||||
|
||||
shardAndCommitteeArray := splitBySlotShard(validatorIndices, 0)
|
||||
ShardCommitteeArray := splitBySlotShard(validatorIndices, 0)
|
||||
|
||||
if len(shardAndCommitteeArray) != int(params.BeaconConfig().EpochLength) {
|
||||
t.Fatalf("Expected length %d: got %d", params.BeaconConfig().EpochLength, len(shardAndCommitteeArray))
|
||||
if len(ShardCommitteeArray) != int(params.BeaconConfig().EpochLength) {
|
||||
t.Fatalf("Expected length %d: got %d", params.BeaconConfig().EpochLength, len(ShardCommitteeArray))
|
||||
}
|
||||
|
||||
for i := 0; i < len(shardAndCommitteeArray); i++ {
|
||||
shardAndCommittees := shardAndCommitteeArray[i].ArrayShardAndCommittee
|
||||
if len(shardAndCommittees) != 2 {
|
||||
for i := 0; i < len(ShardCommitteeArray); i++ {
|
||||
ShardCommittees := ShardCommitteeArray[i].ArrayShardCommittee
|
||||
if len(ShardCommittees) != 2 {
|
||||
t.Fatalf("Expected %d committee per slot: got %d", params.BeaconConfig().TargetCommitteeSize, 2)
|
||||
}
|
||||
|
||||
t.Logf("slot %d", i)
|
||||
for j := 0; j < len(shardAndCommittees); j++ {
|
||||
shardCommittee := shardAndCommittees[j]
|
||||
for j := 0; j < len(ShardCommittees); j++ {
|
||||
shardCommittee := ShardCommittees[j]
|
||||
t.Logf("shard %d", shardCommittee.Shard)
|
||||
t.Logf("committee: %v", shardCommittee.Committee)
|
||||
if len(shardCommittee.Committee) != int(params.BeaconConfig().TargetCommitteeSize) {
|
||||
@@ -209,20 +209,20 @@ func TestValidatorRegistryBySlotShardSmallValidatorSet(t *testing.T) {
|
||||
validatorIndices = append(validatorIndices, uint32(i))
|
||||
}
|
||||
|
||||
shardAndCommitteeArray := splitBySlotShard(validatorIndices, 0)
|
||||
ShardCommitteeArray := splitBySlotShard(validatorIndices, 0)
|
||||
|
||||
if len(shardAndCommitteeArray) != int(params.BeaconConfig().EpochLength) {
|
||||
t.Fatalf("Expected length %d: got %d", params.BeaconConfig().EpochLength, len(shardAndCommitteeArray))
|
||||
if len(ShardCommitteeArray) != int(params.BeaconConfig().EpochLength) {
|
||||
t.Fatalf("Expected length %d: got %d", params.BeaconConfig().EpochLength, len(ShardCommitteeArray))
|
||||
}
|
||||
|
||||
for i := 0; i < len(shardAndCommitteeArray); i++ {
|
||||
shardAndCommittees := shardAndCommitteeArray[i].ArrayShardAndCommittee
|
||||
if len(shardAndCommittees) != 1 {
|
||||
for i := 0; i < len(ShardCommitteeArray); i++ {
|
||||
ShardCommittees := ShardCommitteeArray[i].ArrayShardCommittee
|
||||
if len(ShardCommittees) != 1 {
|
||||
t.Fatalf("Expected %d committee per slot: got %d", params.BeaconConfig().TargetCommitteeSize, 1)
|
||||
}
|
||||
|
||||
for j := 0; j < len(shardAndCommittees); j++ {
|
||||
shardCommittee := shardAndCommittees[j]
|
||||
for j := 0; j < len(ShardCommittees); j++ {
|
||||
shardCommittee := ShardCommittees[j]
|
||||
if len(shardCommittee.Committee) != int(params.BeaconConfig().TargetCommitteeSize/2) {
|
||||
t.Fatalf("Expected committee size %d: got %d", params.BeaconConfig().TargetCommitteeSize/2, len(shardCommittee.Committee))
|
||||
}
|
||||
@@ -240,10 +240,10 @@ func TestAttestationParticipants_ok(t *testing.T) {
|
||||
committeeIndices = append(committeeIndices, i)
|
||||
}
|
||||
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength*2; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: i},
|
||||
{Committee: committeeIndices},
|
||||
},
|
||||
@@ -251,7 +251,7 @@ func TestAttestationParticipants_ok(t *testing.T) {
|
||||
}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
|
||||
attestationData := &pb.AttestationData{}
|
||||
@@ -325,17 +325,17 @@ func TestAttestationParticipants_IncorrectBitfield(t *testing.T) {
|
||||
t.Errorf("EpochLength should be 64 for these tests to pass")
|
||||
}
|
||||
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength*2; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: i},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
|
||||
attestationData := &pb.AttestationData{}
|
||||
|
||||
@@ -70,7 +70,7 @@ func ActiveValidator(state *pb.BeaconState, validatorIndices []uint32) []*pb.Val
|
||||
return activeValidators
|
||||
}
|
||||
|
||||
// ShardAndCommitteesAtSlot returns the shard and committee list for a given
|
||||
// ShardCommitteesAtSlot returns the shard and committee list for a given
|
||||
// slot within the range of 2 * epoch length within the same 2 epoch slot
|
||||
// window as the state slot.
|
||||
//
|
||||
@@ -82,7 +82,7 @@ func ActiveValidator(state *pb.BeaconState, validatorIndices []uint32) []*pb.Val
|
||||
// earliest_slot_in_array = state.Slot - (state.Slot % EPOCH_LENGTH) - EPOCH_LENGTH
|
||||
// assert earliest_slot_in_array <= slot < earliest_slot_in_array + EPOCH_LENGTH * 2
|
||||
// return state.shard_committees_at_slots[slot - earliest_slot_in_array]
|
||||
func ShardAndCommitteesAtSlot(state *pb.BeaconState, slot uint64) (*pb.ShardAndCommitteeArray, error) {
|
||||
func ShardCommitteesAtSlot(state *pb.BeaconState, slot uint64) (*pb.ShardCommitteeArray, error) {
|
||||
epochLength := params.BeaconConfig().EpochLength
|
||||
var earliestSlot uint64
|
||||
|
||||
@@ -100,7 +100,7 @@ func ShardAndCommitteesAtSlot(state *pb.BeaconState, slot uint64) (*pb.ShardAndC
|
||||
earliestSlot+(epochLength*2),
|
||||
)
|
||||
}
|
||||
return state.ShardAndCommitteesAtSlots[slot-earliestSlot], nil
|
||||
return state.ShardCommitteesAtSlots[slot-earliestSlot], nil
|
||||
}
|
||||
|
||||
// BeaconProposerIndex returns the index of the proposer of the block at a
|
||||
@@ -114,26 +114,26 @@ func ShardAndCommitteesAtSlot(state *pb.BeaconState, slot uint64) (*pb.ShardAndC
|
||||
// first_committee = get_shard_committees_at_slot(state, slot)[0].committee
|
||||
// return first_committee[slot % len(first_committee)]
|
||||
func BeaconProposerIndex(state *pb.BeaconState, slot uint64) (uint32, error) {
|
||||
committeeArray, err := ShardAndCommitteesAtSlot(state, slot)
|
||||
committeeArray, err := ShardCommitteesAtSlot(state, slot)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
firstCommittee := committeeArray.ArrayShardAndCommittee[0].Committee
|
||||
firstCommittee := committeeArray.ArrayShardCommittee[0].Committee
|
||||
|
||||
return firstCommittee[slot%uint64(len(firstCommittee))], nil
|
||||
}
|
||||
|
||||
// ProposerShardAndIndex returns the index and the shardID of a proposer from a given slot.
|
||||
func ProposerShardAndIndex(state *pb.BeaconState, slot uint64) (uint64, uint64, error) {
|
||||
slotCommittees, err := ShardAndCommitteesAtSlot(
|
||||
slotCommittees, err := ShardCommitteesAtSlot(
|
||||
state,
|
||||
slot)
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
|
||||
proposerShardID := slotCommittees.ArrayShardAndCommittee[0].Shard
|
||||
proposerIndex := slot % uint64(len(slotCommittees.ArrayShardAndCommittee[0].Committee))
|
||||
proposerShardID := slotCommittees.ArrayShardCommittee[0].Shard
|
||||
proposerIndex := slot % uint64(len(slotCommittees.ArrayShardCommittee[0].Committee))
|
||||
return proposerShardID, proposerIndex, nil
|
||||
}
|
||||
|
||||
@@ -150,14 +150,14 @@ func ValidatorIndex(pubKey []byte, validators []*pb.ValidatorRecord) (uint32, er
|
||||
}
|
||||
|
||||
// ValidatorShardID returns the shard ID of the validator currently participates in.
|
||||
func ValidatorShardID(pubKey []byte, validators []*pb.ValidatorRecord, shardCommittees []*pb.ShardAndCommitteeArray) (uint64, error) {
|
||||
func ValidatorShardID(pubKey []byte, validators []*pb.ValidatorRecord, shardCommittees []*pb.ShardCommitteeArray) (uint64, error) {
|
||||
index, err := ValidatorIndex(pubKey, validators)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
for _, slotCommittee := range shardCommittees {
|
||||
for _, committee := range slotCommittee.ArrayShardAndCommittee {
|
||||
for _, committee := range slotCommittee.ArrayShardCommittee {
|
||||
for _, validator := range committee.Committee {
|
||||
if validator == index {
|
||||
return committee.Shard, nil
|
||||
@@ -171,14 +171,14 @@ func ValidatorShardID(pubKey []byte, validators []*pb.ValidatorRecord, shardComm
|
||||
|
||||
// ValidatorSlotAndRole returns a validator's assingned slot number
|
||||
// and whether it should act as an attester or proposer.
|
||||
func ValidatorSlotAndRole(pubKey []byte, validators []*pb.ValidatorRecord, shardCommittees []*pb.ShardAndCommitteeArray) (uint64, pbrpc.ValidatorRole, error) {
|
||||
func ValidatorSlotAndRole(pubKey []byte, validators []*pb.ValidatorRecord, shardCommittees []*pb.ShardCommitteeArray) (uint64, pbrpc.ValidatorRole, error) {
|
||||
index, err := ValidatorIndex(pubKey, validators)
|
||||
if err != nil {
|
||||
return 0, pbrpc.ValidatorRole_UNKNOWN, err
|
||||
}
|
||||
|
||||
for slot, slotCommittee := range shardCommittees {
|
||||
for i, committee := range slotCommittee.ArrayShardAndCommittee {
|
||||
for i, committee := range slotCommittee.ArrayShardCommittee {
|
||||
for v, validator := range committee.Committee {
|
||||
if validator != index {
|
||||
continue
|
||||
@@ -358,7 +358,7 @@ func ValidatorIndices(
|
||||
// if a.shard == shard_committee.shard and a.shard_block_root == shard_block_root]
|
||||
func AttestingValidatorIndices(
|
||||
state *pb.BeaconState,
|
||||
shardCommittee *pb.ShardAndCommittee,
|
||||
shardCommittee *pb.ShardCommittee,
|
||||
shardBlockRoot []byte,
|
||||
thisEpochAttestations []*pb.PendingAttestationRecord,
|
||||
prevEpochAttestations []*pb.PendingAttestationRecord) ([]uint32, error) {
|
||||
|
||||
@@ -60,16 +60,16 @@ func TestInitialValidatorRegistry(t *testing.T) {
|
||||
|
||||
func TestProposerShardAndIndex(t *testing.T) {
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommitteesAtSlots: []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 0, Committee: []uint32{0, 1, 2, 3, 4}},
|
||||
{Shard: 1, Committee: []uint32{5, 6, 7, 8, 9}},
|
||||
}},
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 2, Committee: []uint32{10, 11, 12, 13, 14}},
|
||||
{Shard: 3, Committee: []uint32{15, 16, 17, 18, 19}},
|
||||
}},
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 4, Committee: []uint32{20, 21, 22, 23, 24}},
|
||||
{Shard: 5, Committee: []uint32{25, 26, 27, 28, 29}},
|
||||
}},
|
||||
@@ -113,8 +113,8 @@ func TestValidatorShard(t *testing.T) {
|
||||
for i := 0; i < 21; i++ {
|
||||
validators = append(validators, &pb.ValidatorRecord{Pubkey: []byte{}, ExitSlot: params.BeaconConfig().FarFutureSlot})
|
||||
}
|
||||
shardCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
shardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 0, Committee: []uint32{0, 1, 2, 3, 4, 5, 6}},
|
||||
{Shard: 1, Committee: []uint32{7, 8, 9, 10, 11, 12, 13}},
|
||||
{Shard: 2, Committee: []uint32{14, 15, 16, 17, 18, 19}},
|
||||
@@ -145,18 +145,18 @@ func TestValidatorSlotAndResponsibility(t *testing.T) {
|
||||
for i := 0; i < 61; i++ {
|
||||
validators = append(validators, &pb.ValidatorRecord{Pubkey: []byte{}, ExitSlot: params.BeaconConfig().FarFutureSlot})
|
||||
}
|
||||
shardCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
shardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 0, Committee: []uint32{0, 1, 2, 3, 4, 5, 6}},
|
||||
{Shard: 1, Committee: []uint32{7, 8, 9, 10, 11, 12, 13}},
|
||||
{Shard: 2, Committee: []uint32{14, 15, 16, 17, 18, 19}},
|
||||
}},
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 3, Committee: []uint32{20, 21, 22, 23, 24, 25, 26}},
|
||||
{Shard: 4, Committee: []uint32{27, 28, 29, 30, 31, 32, 33}},
|
||||
{Shard: 5, Committee: []uint32{34, 35, 36, 37, 38, 39}},
|
||||
}},
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 6, Committee: []uint32{40, 41, 42, 43, 44, 45, 46}},
|
||||
{Shard: 7, Committee: []uint32{47, 48, 49, 50, 51, 52, 53}},
|
||||
{Shard: 8, Committee: []uint32{54, 55, 56, 57, 58, 59}},
|
||||
@@ -181,22 +181,22 @@ func TestValidatorSlotAndResponsibility(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestShardAndCommitteesAtSlot_OK(t *testing.T) {
|
||||
func TestShardCommitteesAtSlot_OK(t *testing.T) {
|
||||
if params.BeaconConfig().EpochLength != 64 {
|
||||
t.Errorf("EpochLength should be 64 for these tests to pass")
|
||||
}
|
||||
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength*2; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: i},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
@@ -232,22 +232,22 @@ func TestShardAndCommitteesAtSlot_OK(t *testing.T) {
|
||||
for _, tt := range tests {
|
||||
state.Slot = tt.stateSlot
|
||||
|
||||
result, err := ShardAndCommitteesAtSlot(state, tt.slot)
|
||||
result, err := ShardCommitteesAtSlot(state, tt.slot)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to get shard and committees at slot: %v", err)
|
||||
}
|
||||
|
||||
if result.ArrayShardAndCommittee[0].Shard != tt.expectedShard {
|
||||
if result.ArrayShardCommittee[0].Shard != tt.expectedShard {
|
||||
t.Errorf(
|
||||
"Result shard was an unexpected value. Wanted %d, got %d",
|
||||
tt.expectedShard,
|
||||
result.ArrayShardAndCommittee[0].Shard,
|
||||
result.ArrayShardCommittee[0].Shard,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestShardAndCommitteesAtSlot_OutOfBounds(t *testing.T) {
|
||||
func TestShardCommitteesAtSlot_OutOfBounds(t *testing.T) {
|
||||
if params.BeaconConfig().EpochLength != 64 {
|
||||
t.Errorf("EpochLength should be 64 for these tests to pass")
|
||||
}
|
||||
@@ -271,7 +271,7 @@ func TestShardAndCommitteesAtSlot_OutOfBounds(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
_, err := ShardAndCommitteesAtSlot(state, tt.slot)
|
||||
_, err := ShardCommitteesAtSlot(state, tt.slot)
|
||||
if err != nil && err.Error() != tt.expectedErr {
|
||||
t.Fatalf("Expected error \"%s\" got \"%v\"", tt.expectedErr, err)
|
||||
}
|
||||
@@ -404,18 +404,18 @@ func TestBoundaryAttesterIndices(t *testing.T) {
|
||||
for i := uint32(0); i < 8; i++ {
|
||||
committeeIndices = append(committeeIndices, i)
|
||||
}
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength*2; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 100, Committee: committeeIndices},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
Slot: 5,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
Slot: 5,
|
||||
}
|
||||
|
||||
boundaryAttestations := []*pb.PendingAttestationRecord{
|
||||
@@ -439,17 +439,17 @@ func TestBeaconProposerIndex(t *testing.T) {
|
||||
t.Errorf("EpochLength should be 64 for these tests to pass")
|
||||
}
|
||||
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength*2; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Committee: []uint32{9, 8, 311, 12, 92, 1, 23, 17}},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
@@ -504,18 +504,18 @@ func TestAttestingValidatorIndices_Ok(t *testing.T) {
|
||||
committeeIndices = append(committeeIndices, i)
|
||||
}
|
||||
|
||||
var shardAndCommittees []*pb.ShardAndCommitteeArray
|
||||
var ShardCommittees []*pb.ShardCommitteeArray
|
||||
for i := uint64(0); i < params.BeaconConfig().EpochLength*2; i++ {
|
||||
shardAndCommittees = append(shardAndCommittees, &pb.ShardAndCommitteeArray{
|
||||
ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees = append(ShardCommittees, &pb.ShardCommitteeArray{
|
||||
ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: i, Committee: committeeIndices},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
Slot: 5,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
Slot: 5,
|
||||
}
|
||||
|
||||
prevAttestation := &pb.PendingAttestationRecord{
|
||||
@@ -538,7 +538,7 @@ func TestAttestingValidatorIndices_Ok(t *testing.T) {
|
||||
|
||||
indices, err := AttestingValidatorIndices(
|
||||
state,
|
||||
shardAndCommittees[3].ArrayShardAndCommittee[0],
|
||||
ShardCommittees[3].ArrayShardCommittee[0],
|
||||
[]byte{'B'},
|
||||
[]*pb.PendingAttestationRecord{thisAttestation},
|
||||
[]*pb.PendingAttestationRecord{prevAttestation})
|
||||
@@ -554,15 +554,15 @@ func TestAttestingValidatorIndices_Ok(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAttestingValidatorIndices_OutOfBound(t *testing.T) {
|
||||
shardAndCommittees := []*pb.ShardAndCommitteeArray{
|
||||
{ArrayShardAndCommittee: []*pb.ShardAndCommittee{
|
||||
ShardCommittees := []*pb.ShardCommitteeArray{
|
||||
{ArrayShardCommittee: []*pb.ShardCommittee{
|
||||
{Shard: 1},
|
||||
}},
|
||||
}
|
||||
|
||||
state := &pb.BeaconState{
|
||||
ShardAndCommitteesAtSlots: shardAndCommittees,
|
||||
Slot: 5,
|
||||
ShardCommitteesAtSlots: ShardCommittees,
|
||||
Slot: 5,
|
||||
}
|
||||
|
||||
attestation := &pb.PendingAttestationRecord{
|
||||
@@ -576,7 +576,7 @@ func TestAttestingValidatorIndices_OutOfBound(t *testing.T) {
|
||||
|
||||
_, err := AttestingValidatorIndices(
|
||||
state,
|
||||
shardAndCommittees[0].ArrayShardAndCommittee[0],
|
||||
ShardCommittees[0].ArrayShardCommittee[0],
|
||||
[]byte{'B'},
|
||||
[]*pb.PendingAttestationRecord{attestation},
|
||||
nil)
|
||||
|
||||
@@ -299,7 +299,7 @@ func (s *Service) ValidatorShardID(ctx context.Context, req *pb.PublicKey) (*pb.
|
||||
shardID, err := v.ValidatorShardID(
|
||||
req.PublicKey,
|
||||
beaconState.ValidatorRegistry,
|
||||
beaconState.ShardAndCommitteesAtSlots,
|
||||
beaconState.ShardCommitteesAtSlots,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not get validator shard ID: %v", err)
|
||||
@@ -322,7 +322,7 @@ func (s *Service) ValidatorSlotAndResponsibility(
|
||||
slot, role, err := v.ValidatorSlotAndRole(
|
||||
req.PublicKey,
|
||||
beaconState.ValidatorRegistry,
|
||||
beaconState.ShardAndCommitteesAtSlots,
|
||||
beaconState.ShardCommitteesAtSlots,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not get assigned validator slot for attester/proposer: %v", err)
|
||||
@@ -412,7 +412,7 @@ func assignmentsForPublicKeys(keys []*pb.PublicKey, beaconState *pbp2p.BeaconSta
|
||||
assignedSlot, role, err := v.ValidatorSlotAndRole(
|
||||
val.PublicKey,
|
||||
beaconState.ValidatorRegistry,
|
||||
beaconState.ShardAndCommitteesAtSlots,
|
||||
beaconState.ShardCommitteesAtSlots,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -423,7 +423,7 @@ func assignmentsForPublicKeys(keys []*pb.PublicKey, beaconState *pbp2p.BeaconSta
|
||||
shardID, err := v.ValidatorShardID(
|
||||
val.PublicKey,
|
||||
beaconState.ValidatorRegistry,
|
||||
beaconState.ShardAndCommitteesAtSlots,
|
||||
beaconState.ShardCommitteesAtSlots,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -344,7 +344,7 @@ func (sim *Simulator) generateBlock(slot uint64, lastHash [32]byte) (*pb.BeaconB
|
||||
}
|
||||
|
||||
parentSlot := slot - 1
|
||||
committees, err := v.ShardAndCommitteesAtSlot(
|
||||
committees, err := v.ShardCommitteesAtSlot(
|
||||
beaconState,
|
||||
parentSlot,
|
||||
)
|
||||
@@ -355,7 +355,7 @@ func (sim *Simulator) generateBlock(slot uint64, lastHash [32]byte) (*pb.BeaconB
|
||||
parentHash := make([]byte, 32)
|
||||
copy(parentHash, lastHash[:])
|
||||
|
||||
shardCommittees := committees.ArrayShardAndCommittee
|
||||
shardCommittees := committees.ArrayShardCommittee
|
||||
attestations := make([]*pb.Attestation, len(shardCommittees))
|
||||
|
||||
// Create attestations for all committees of the previous block.
|
||||
|
||||
@@ -364,12 +364,6 @@ func (s *InitialSync) requestNextBlockBySlot(slotNumber uint64) {
|
||||
s.p2p.Broadcast(&pb.BeaconBlockRequestBySlotNumber{SlotNumber: slotNumber})
|
||||
}
|
||||
|
||||
func (s *InitialSync) requestBlockByHash(hash [32]byte, peer p2p.Peer) {
|
||||
s.p2p.Send(&pb.BeaconBlockRequest{
|
||||
Hash: hash[:],
|
||||
}, peer)
|
||||
}
|
||||
|
||||
// requestBatchedBlocks sends out a request for multiple blocks till a
|
||||
// specified bound slot number.
|
||||
func (s *InitialSync) requestBatchedBlocks(endSlot uint64) {
|
||||
@@ -439,11 +433,3 @@ func (s *InitialSync) checkBlockValidity(block *pb.BeaconBlock) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *InitialSync) writeBlockToDB(block *pb.BeaconBlock) error {
|
||||
return s.db.SaveBlock(block)
|
||||
}
|
||||
|
||||
func (s *InitialSync) checkForGenesisBlock(hash [32]byte) bool {
|
||||
return s.db.HasBlock(hash)
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ func (x ValidatorRecord_StatusFlags) String() string {
|
||||
return proto.EnumName(ValidatorRecord_StatusFlags_name, int32(x))
|
||||
}
|
||||
func (ValidatorRecord_StatusFlags) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{7, 0}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{7, 0}
|
||||
}
|
||||
|
||||
type ValidatorRegistryDeltaBlock_ValidatorRegistryDeltaFlags int32
|
||||
@@ -67,7 +67,7 @@ func (x ValidatorRegistryDeltaBlock_ValidatorRegistryDeltaFlags) String() string
|
||||
return proto.EnumName(ValidatorRegistryDeltaBlock_ValidatorRegistryDeltaFlags_name, int32(x))
|
||||
}
|
||||
func (ValidatorRegistryDeltaBlock_ValidatorRegistryDeltaFlags) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{22, 0}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{22, 0}
|
||||
}
|
||||
|
||||
type BeaconState struct {
|
||||
@@ -76,9 +76,9 @@ type BeaconState struct {
|
||||
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"`
|
||||
ValidatorBalances []uint64 `protobuf:"varint,5,rep,packed,name=validator_balances,json=validatorBalances" json:"validator_balances,omitempty"`
|
||||
ShardAndCommitteesAtSlots []*ShardAndCommitteeArray `protobuf:"bytes,1001,rep,name=shard_and_committees_at_slots,json=shardAndCommitteesAtSlots" json:"shard_and_committees_at_slots,omitempty"`
|
||||
LatestRandaoMixesHash32S [][]byte `protobuf:"bytes,1002,rep,name=latest_randao_mixes_hash32s,json=latestRandaoMixesHash32s" json:"latest_randao_mixes_hash32s,omitempty"`
|
||||
LatestVdfOutputsHash32S [][]byte `protobuf:"bytes,1003,rep,name=latest_vdf_outputs_hash32s,json=latestVdfOutputsHash32s" json:"latest_vdf_outputs_hash32s,omitempty"`
|
||||
ShardCommitteesAtSlots []*ShardCommitteeArray `protobuf:"bytes,1003,rep,name=shard_committees_at_slots,json=shardCommitteesAtSlots" json:"shard_committees_at_slots,omitempty"`
|
||||
LatestRandaoMixesHash32S [][]byte `protobuf:"bytes,1004,rep,name=latest_randao_mixes_hash32s,json=latestRandaoMixesHash32s" json:"latest_randao_mixes_hash32s,omitempty"`
|
||||
LatestVdfOutputsHash32S [][]byte `protobuf:"bytes,1005,rep,name=latest_vdf_outputs_hash32s,json=latestVdfOutputsHash32s" json:"latest_vdf_outputs_hash32s,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"`
|
||||
JustificationBitfield uint64 `protobuf:"varint,2003,opt,name=justification_bitfield,json=justificationBitfield,proto3" json:"justification_bitfield,omitempty"`
|
||||
@@ -103,7 +103,7 @@ 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_270805abd6d53eee, []int{0}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{0}
|
||||
}
|
||||
func (m *BeaconState) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -167,9 +167,9 @@ func (m *BeaconState) GetValidatorBalances() []uint64 {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BeaconState) GetShardAndCommitteesAtSlots() []*ShardAndCommitteeArray {
|
||||
func (m *BeaconState) GetShardCommitteesAtSlots() []*ShardCommitteeArray {
|
||||
if m != nil {
|
||||
return m.ShardAndCommitteesAtSlots
|
||||
return m.ShardCommitteesAtSlots
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -306,7 +306,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_270805abd6d53eee, []int{1}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{1}
|
||||
}
|
||||
func (m *ForkData) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -368,7 +368,7 @@ func (m *DepositRootVote) Reset() { *m = DepositRootVote{} }
|
||||
func (m *DepositRootVote) String() string { return proto.CompactTextString(m) }
|
||||
func (*DepositRootVote) ProtoMessage() {}
|
||||
func (*DepositRootVote) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{2}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{2}
|
||||
}
|
||||
func (m *DepositRootVote) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -425,7 +425,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_270805abd6d53eee, []int{3}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{3}
|
||||
}
|
||||
func (m *PendingAttestationRecord) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -496,7 +496,7 @@ func (m *Attestation) Reset() { *m = Attestation{} }
|
||||
func (m *Attestation) String() string { return proto.CompactTextString(m) }
|
||||
func (*Attestation) ProtoMessage() {}
|
||||
func (*Attestation) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{4}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{4}
|
||||
}
|
||||
func (m *Attestation) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -571,7 +571,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_270805abd6d53eee, []int{5}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{5}
|
||||
}
|
||||
func (m *AttestationData) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -668,7 +668,7 @@ func (m *AttestationDataAndCustodyBit) Reset() { *m = AttestationDataAnd
|
||||
func (m *AttestationDataAndCustodyBit) String() string { return proto.CompactTextString(m) }
|
||||
func (*AttestationDataAndCustodyBit) ProtoMessage() {}
|
||||
func (*AttestationDataAndCustodyBit) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{6}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{6}
|
||||
}
|
||||
func (m *AttestationDataAndCustodyBit) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -735,7 +735,7 @@ 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_270805abd6d53eee, []int{7}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{7}
|
||||
}
|
||||
func (m *ValidatorRecord) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -876,7 +876,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_270805abd6d53eee, []int{8}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{8}
|
||||
}
|
||||
func (m *ShardReassignmentRecord) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -938,7 +938,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_270805abd6d53eee, []int{9}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{9}
|
||||
}
|
||||
func (m *CrosslinkRecord) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -981,25 +981,25 @@ func (m *CrosslinkRecord) GetShardBlockRootHash32() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
type ShardAndCommitteeArray struct {
|
||||
ArrayShardAndCommittee []*ShardAndCommittee `protobuf:"bytes,1,rep,name=array_shard_and_committee,json=arrayShardAndCommittee" json:"array_shard_and_committee,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
type ShardCommitteeArray struct {
|
||||
ArrayShardCommittee []*ShardCommittee `protobuf:"bytes,1,rep,name=array_shard_committee,json=arrayShardCommittee" json:"array_shard_committee,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
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_270805abd6d53eee, []int{10}
|
||||
func (m *ShardCommitteeArray) Reset() { *m = ShardCommitteeArray{} }
|
||||
func (m *ShardCommitteeArray) String() string { return proto.CompactTextString(m) }
|
||||
func (*ShardCommitteeArray) ProtoMessage() {}
|
||||
func (*ShardCommitteeArray) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_e804881c313057f0, []int{10}
|
||||
}
|
||||
func (m *ShardAndCommitteeArray) XXX_Unmarshal(b []byte) error {
|
||||
func (m *ShardCommitteeArray) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ShardAndCommitteeArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
func (m *ShardCommitteeArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ShardAndCommitteeArray.Marshal(b, m, deterministic)
|
||||
return xxx_messageInfo_ShardCommitteeArray.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalTo(b)
|
||||
@@ -1009,26 +1009,26 @@ func (m *ShardAndCommitteeArray) XXX_Marshal(b []byte, deterministic bool) ([]by
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (dst *ShardAndCommitteeArray) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ShardAndCommitteeArray.Merge(dst, src)
|
||||
func (dst *ShardCommitteeArray) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ShardCommitteeArray.Merge(dst, src)
|
||||
}
|
||||
func (m *ShardAndCommitteeArray) XXX_Size() int {
|
||||
func (m *ShardCommitteeArray) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *ShardAndCommitteeArray) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ShardAndCommitteeArray.DiscardUnknown(m)
|
||||
func (m *ShardCommitteeArray) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ShardCommitteeArray.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ShardAndCommitteeArray proto.InternalMessageInfo
|
||||
var xxx_messageInfo_ShardCommitteeArray proto.InternalMessageInfo
|
||||
|
||||
func (m *ShardAndCommitteeArray) GetArrayShardAndCommittee() []*ShardAndCommittee {
|
||||
func (m *ShardCommitteeArray) GetArrayShardCommittee() []*ShardCommittee {
|
||||
if m != nil {
|
||||
return m.ArrayShardAndCommittee
|
||||
return m.ArrayShardCommittee
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ShardAndCommittee struct {
|
||||
type ShardCommittee struct {
|
||||
Shard uint64 `protobuf:"varint,1,opt,name=shard,proto3" json:"shard,omitempty"`
|
||||
Committee []uint32 `protobuf:"varint,2,rep,packed,name=committee" json:"committee,omitempty"`
|
||||
TotalValidatorCount uint64 `protobuf:"varint,3,opt,name=total_validator_count,json=totalValidatorCount,proto3" json:"total_validator_count,omitempty"`
|
||||
@@ -1037,18 +1037,18 @@ type ShardAndCommittee struct {
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
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_270805abd6d53eee, []int{11}
|
||||
func (m *ShardCommittee) Reset() { *m = ShardCommittee{} }
|
||||
func (m *ShardCommittee) String() string { return proto.CompactTextString(m) }
|
||||
func (*ShardCommittee) ProtoMessage() {}
|
||||
func (*ShardCommittee) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_e804881c313057f0, []int{11}
|
||||
}
|
||||
func (m *ShardAndCommittee) XXX_Unmarshal(b []byte) error {
|
||||
func (m *ShardCommittee) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ShardAndCommittee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
func (m *ShardCommittee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ShardAndCommittee.Marshal(b, m, deterministic)
|
||||
return xxx_messageInfo_ShardCommittee.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalTo(b)
|
||||
@@ -1058,33 +1058,33 @@ func (m *ShardAndCommittee) XXX_Marshal(b []byte, deterministic bool) ([]byte, e
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (dst *ShardAndCommittee) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ShardAndCommittee.Merge(dst, src)
|
||||
func (dst *ShardCommittee) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ShardCommittee.Merge(dst, src)
|
||||
}
|
||||
func (m *ShardAndCommittee) XXX_Size() int {
|
||||
func (m *ShardCommittee) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *ShardAndCommittee) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ShardAndCommittee.DiscardUnknown(m)
|
||||
func (m *ShardCommittee) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ShardCommittee.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ShardAndCommittee proto.InternalMessageInfo
|
||||
var xxx_messageInfo_ShardCommittee proto.InternalMessageInfo
|
||||
|
||||
func (m *ShardAndCommittee) GetShard() uint64 {
|
||||
func (m *ShardCommittee) GetShard() uint64 {
|
||||
if m != nil {
|
||||
return m.Shard
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ShardAndCommittee) GetCommittee() []uint32 {
|
||||
func (m *ShardCommittee) GetCommittee() []uint32 {
|
||||
if m != nil {
|
||||
return m.Committee
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ShardAndCommittee) GetTotalValidatorCount() uint64 {
|
||||
func (m *ShardCommittee) GetTotalValidatorCount() uint64 {
|
||||
if m != nil {
|
||||
return m.TotalValidatorCount
|
||||
}
|
||||
@@ -1108,7 +1108,7 @@ 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_270805abd6d53eee, []int{12}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{12}
|
||||
}
|
||||
func (m *BeaconBlock) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1201,7 +1201,7 @@ func (m *BeaconBlockBody) Reset() { *m = BeaconBlockBody{} }
|
||||
func (m *BeaconBlockBody) String() string { return proto.CompactTextString(m) }
|
||||
func (*BeaconBlockBody) ProtoMessage() {}
|
||||
func (*BeaconBlockBody) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{13}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{13}
|
||||
}
|
||||
func (m *BeaconBlockBody) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1280,7 +1280,7 @@ func (m *DepositInput) Reset() { *m = DepositInput{} }
|
||||
func (m *DepositInput) String() string { return proto.CompactTextString(m) }
|
||||
func (*DepositInput) ProtoMessage() {}
|
||||
func (*DepositInput) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{14}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{14}
|
||||
}
|
||||
func (m *DepositInput) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1357,7 +1357,7 @@ func (m *ProposalSignedData) Reset() { *m = ProposalSignedData{} }
|
||||
func (m *ProposalSignedData) String() string { return proto.CompactTextString(m) }
|
||||
func (*ProposalSignedData) ProtoMessage() {}
|
||||
func (*ProposalSignedData) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{15}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{15}
|
||||
}
|
||||
func (m *ProposalSignedData) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1421,7 +1421,7 @@ func (m *SlashableVoteData) Reset() { *m = SlashableVoteData{} }
|
||||
func (m *SlashableVoteData) String() string { return proto.CompactTextString(m) }
|
||||
func (*SlashableVoteData) ProtoMessage() {}
|
||||
func (*SlashableVoteData) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{16}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{16}
|
||||
}
|
||||
func (m *SlashableVoteData) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1491,7 +1491,7 @@ func (m *DepositData) Reset() { *m = DepositData{} }
|
||||
func (m *DepositData) String() string { return proto.CompactTextString(m) }
|
||||
func (*DepositData) ProtoMessage() {}
|
||||
func (*DepositData) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{17}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{17}
|
||||
}
|
||||
func (m *DepositData) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1556,7 +1556,7 @@ func (m *ProposerSlashing) Reset() { *m = ProposerSlashing{} }
|
||||
func (m *ProposerSlashing) String() string { return proto.CompactTextString(m) }
|
||||
func (*ProposerSlashing) ProtoMessage() {}
|
||||
func (*ProposerSlashing) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{18}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{18}
|
||||
}
|
||||
func (m *ProposerSlashing) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1632,7 +1632,7 @@ func (m *CasperSlashing) Reset() { *m = CasperSlashing{} }
|
||||
func (m *CasperSlashing) String() string { return proto.CompactTextString(m) }
|
||||
func (*CasperSlashing) ProtoMessage() {}
|
||||
func (*CasperSlashing) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{19}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{19}
|
||||
}
|
||||
func (m *CasperSlashing) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1688,7 +1688,7 @@ func (m *Deposit) Reset() { *m = Deposit{} }
|
||||
func (m *Deposit) String() string { return proto.CompactTextString(m) }
|
||||
func (*Deposit) ProtoMessage() {}
|
||||
func (*Deposit) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{20}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{20}
|
||||
}
|
||||
func (m *Deposit) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1751,7 +1751,7 @@ func (m *Exit) Reset() { *m = Exit{} }
|
||||
func (m *Exit) String() string { return proto.CompactTextString(m) }
|
||||
func (*Exit) ProtoMessage() {}
|
||||
func (*Exit) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{21}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{21}
|
||||
}
|
||||
func (m *Exit) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1816,7 +1816,7 @@ func (m *ValidatorRegistryDeltaBlock) Reset() { *m = ValidatorRegistryDe
|
||||
func (m *ValidatorRegistryDeltaBlock) String() string { return proto.CompactTextString(m) }
|
||||
func (*ValidatorRegistryDeltaBlock) ProtoMessage() {}
|
||||
func (*ValidatorRegistryDeltaBlock) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{22}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{22}
|
||||
}
|
||||
func (m *ValidatorRegistryDeltaBlock) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1890,7 +1890,7 @@ func (m *CustodyChallenge) Reset() { *m = CustodyChallenge{} }
|
||||
func (m *CustodyChallenge) String() string { return proto.CompactTextString(m) }
|
||||
func (*CustodyChallenge) ProtoMessage() {}
|
||||
func (*CustodyChallenge) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_270805abd6d53eee, []int{23}
|
||||
return fileDescriptor_types_e804881c313057f0, []int{23}
|
||||
}
|
||||
func (m *CustodyChallenge) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1930,8 +1930,8 @@ func init() {
|
||||
proto.RegisterType((*ValidatorRecord)(nil), "ethereum.beacon.p2p.v1.ValidatorRecord")
|
||||
proto.RegisterType((*ShardReassignmentRecord)(nil), "ethereum.beacon.p2p.v1.ShardReassignmentRecord")
|
||||
proto.RegisterType((*CrosslinkRecord)(nil), "ethereum.beacon.p2p.v1.CrosslinkRecord")
|
||||
proto.RegisterType((*ShardAndCommitteeArray)(nil), "ethereum.beacon.p2p.v1.ShardAndCommitteeArray")
|
||||
proto.RegisterType((*ShardAndCommittee)(nil), "ethereum.beacon.p2p.v1.ShardAndCommittee")
|
||||
proto.RegisterType((*ShardCommitteeArray)(nil), "ethereum.beacon.p2p.v1.ShardCommitteeArray")
|
||||
proto.RegisterType((*ShardCommittee)(nil), "ethereum.beacon.p2p.v1.ShardCommittee")
|
||||
proto.RegisterType((*BeaconBlock)(nil), "ethereum.beacon.p2p.v1.BeaconBlock")
|
||||
proto.RegisterType((*BeaconBlockBody)(nil), "ethereum.beacon.p2p.v1.BeaconBlockBody")
|
||||
proto.RegisterType((*DepositInput)(nil), "ethereum.beacon.p2p.v1.DepositInput")
|
||||
@@ -2007,9 +2007,9 @@ func (m *BeaconState) MarshalTo(dAtA []byte) (int, error) {
|
||||
i = encodeVarintTypes(dAtA, i, uint64(j1))
|
||||
i += copy(dAtA[i:], dAtA2[:j1])
|
||||
}
|
||||
if len(m.ShardAndCommitteesAtSlots) > 0 {
|
||||
for _, msg := range m.ShardAndCommitteesAtSlots {
|
||||
dAtA[i] = 0xca
|
||||
if len(m.ShardCommitteesAtSlots) > 0 {
|
||||
for _, msg := range m.ShardCommitteesAtSlots {
|
||||
dAtA[i] = 0xda
|
||||
i++
|
||||
dAtA[i] = 0x3e
|
||||
i++
|
||||
@@ -2023,7 +2023,7 @@ func (m *BeaconState) MarshalTo(dAtA []byte) (int, error) {
|
||||
}
|
||||
if len(m.LatestRandaoMixesHash32S) > 0 {
|
||||
for _, b := range m.LatestRandaoMixesHash32S {
|
||||
dAtA[i] = 0xd2
|
||||
dAtA[i] = 0xe2
|
||||
i++
|
||||
dAtA[i] = 0x3e
|
||||
i++
|
||||
@@ -2033,7 +2033,7 @@ func (m *BeaconState) MarshalTo(dAtA []byte) (int, error) {
|
||||
}
|
||||
if len(m.LatestVdfOutputsHash32S) > 0 {
|
||||
for _, b := range m.LatestVdfOutputsHash32S {
|
||||
dAtA[i] = 0xda
|
||||
dAtA[i] = 0xea
|
||||
i++
|
||||
dAtA[i] = 0x3e
|
||||
i++
|
||||
@@ -2663,7 +2663,7 @@ func (m *CrosslinkRecord) MarshalTo(dAtA []byte) (int, error) {
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *ShardAndCommitteeArray) Marshal() (dAtA []byte, err error) {
|
||||
func (m *ShardCommitteeArray) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
@@ -2673,13 +2673,13 @@ func (m *ShardAndCommitteeArray) Marshal() (dAtA []byte, err error) {
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *ShardAndCommitteeArray) MarshalTo(dAtA []byte) (int, error) {
|
||||
func (m *ShardCommitteeArray) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.ArrayShardAndCommittee) > 0 {
|
||||
for _, msg := range m.ArrayShardAndCommittee {
|
||||
if len(m.ArrayShardCommittee) > 0 {
|
||||
for _, msg := range m.ArrayShardCommittee {
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintTypes(dAtA, i, uint64(msg.Size()))
|
||||
@@ -2696,7 +2696,7 @@ func (m *ShardAndCommitteeArray) MarshalTo(dAtA []byte) (int, error) {
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *ShardAndCommittee) Marshal() (dAtA []byte, err error) {
|
||||
func (m *ShardCommittee) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
@@ -2706,7 +2706,7 @@ func (m *ShardAndCommittee) Marshal() (dAtA []byte, err error) {
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *ShardAndCommittee) MarshalTo(dAtA []byte) (int, error) {
|
||||
func (m *ShardCommittee) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
@@ -3373,8 +3373,8 @@ func (m *BeaconState) Size() (n int) {
|
||||
}
|
||||
n += 1 + sovTypes(uint64(l)) + l
|
||||
}
|
||||
if len(m.ShardAndCommitteesAtSlots) > 0 {
|
||||
for _, e := range m.ShardAndCommitteesAtSlots {
|
||||
if len(m.ShardCommitteesAtSlots) > 0 {
|
||||
for _, e := range m.ShardCommitteesAtSlots {
|
||||
l = e.Size()
|
||||
n += 2 + l + sovTypes(uint64(l))
|
||||
}
|
||||
@@ -3692,11 +3692,11 @@ func (m *CrosslinkRecord) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ShardAndCommitteeArray) Size() (n int) {
|
||||
func (m *ShardCommitteeArray) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.ArrayShardAndCommittee) > 0 {
|
||||
for _, e := range m.ArrayShardAndCommittee {
|
||||
if len(m.ArrayShardCommittee) > 0 {
|
||||
for _, e := range m.ArrayShardCommittee {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
@@ -3707,7 +3707,7 @@ func (m *ShardAndCommitteeArray) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ShardAndCommittee) Size() (n int) {
|
||||
func (m *ShardCommittee) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
if m.Shard != 0 {
|
||||
@@ -4229,9 +4229,9 @@ func (m *BeaconState) Unmarshal(dAtA []byte) error {
|
||||
} else {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ValidatorBalances", wireType)
|
||||
}
|
||||
case 1001:
|
||||
case 1003:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ShardAndCommitteesAtSlots", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ShardCommitteesAtSlots", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@@ -4255,12 +4255,12 @@ func (m *BeaconState) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ShardAndCommitteesAtSlots = append(m.ShardAndCommitteesAtSlots, &ShardAndCommitteeArray{})
|
||||
if err := m.ShardAndCommitteesAtSlots[len(m.ShardAndCommitteesAtSlots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
m.ShardCommitteesAtSlots = append(m.ShardCommitteesAtSlots, &ShardCommitteeArray{})
|
||||
if err := m.ShardCommitteesAtSlots[len(m.ShardCommitteesAtSlots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 1002:
|
||||
case 1004:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field LatestRandaoMixesHash32S", wireType)
|
||||
}
|
||||
@@ -4289,7 +4289,7 @@ func (m *BeaconState) Unmarshal(dAtA []byte) error {
|
||||
m.LatestRandaoMixesHash32S = append(m.LatestRandaoMixesHash32S, make([]byte, postIndex-iNdEx))
|
||||
copy(m.LatestRandaoMixesHash32S[len(m.LatestRandaoMixesHash32S)-1], dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 1003:
|
||||
case 1005:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field LatestVdfOutputsHash32S", wireType)
|
||||
}
|
||||
@@ -6254,7 +6254,7 @@ func (m *CrosslinkRecord) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ShardAndCommitteeArray) Unmarshal(dAtA []byte) error {
|
||||
func (m *ShardCommitteeArray) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -6277,15 +6277,15 @@ func (m *ShardAndCommitteeArray) Unmarshal(dAtA []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ShardAndCommitteeArray: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: ShardCommitteeArray: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ShardAndCommitteeArray: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: ShardCommitteeArray: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ArrayShardAndCommittee", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ArrayShardCommittee", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@@ -6309,8 +6309,8 @@ func (m *ShardAndCommitteeArray) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ArrayShardAndCommittee = append(m.ArrayShardAndCommittee, &ShardAndCommittee{})
|
||||
if err := m.ArrayShardAndCommittee[len(m.ArrayShardAndCommittee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
m.ArrayShardCommittee = append(m.ArrayShardCommittee, &ShardCommittee{})
|
||||
if err := m.ArrayShardCommittee[len(m.ArrayShardCommittee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
@@ -6336,7 +6336,7 @@ func (m *ShardAndCommitteeArray) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ShardAndCommittee) Unmarshal(dAtA []byte) error {
|
||||
func (m *ShardCommittee) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -6359,10 +6359,10 @@ func (m *ShardAndCommittee) Unmarshal(dAtA []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ShardAndCommittee: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: ShardCommittee: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ShardAndCommittee: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: ShardCommittee: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
@@ -8528,151 +8528,151 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("proto/beacon/p2p/v1/types.proto", fileDescriptor_types_270805abd6d53eee)
|
||||
proto.RegisterFile("proto/beacon/p2p/v1/types.proto", fileDescriptor_types_e804881c313057f0)
|
||||
}
|
||||
|
||||
var fileDescriptor_types_270805abd6d53eee = []byte{
|
||||
// 2266 bytes of a gzipped FileDescriptorProto
|
||||
var fileDescriptor_types_e804881c313057f0 = []byte{
|
||||
// 2262 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x73, 0x1b, 0x49,
|
||||
0x15, 0x5f, 0xc9, 0xdf, 0x4f, 0xb2, 0x25, 0xb7, 0x13, 0x7b, 0x12, 0xdb, 0xb1, 0x33, 0xd9, 0x6c,
|
||||
0x9c, 0x14, 0xd8, 0x91, 0x52, 0x4b, 0x28, 0x02, 0x0b, 0x96, 0x9d, 0x25, 0xa2, 0xc2, 0x26, 0x8c,
|
||||
0x8d, 0xb3, 0x07, 0xaa, 0x86, 0x96, 0xa6, 0x25, 0x4f, 0x3c, 0x9a, 0x19, 0xa6, 0x5b, 0xde, 0x98,
|
||||
0xaf, 0x3b, 0x1f, 0x05, 0x1c, 0xf7, 0x0a, 0x7f, 0x05, 0x14, 0x1f, 0x37, 0xaa, 0x38, 0xf2, 0x75,
|
||||
0xa2, 0x0a, 0x8a, 0xca, 0x85, 0xaf, 0x13, 0x27, 0xaa, 0x38, 0x51, 0xfd, 0xba, 0xe7, 0x43, 0x23,
|
||||
0xc9, 0x49, 0xc8, 0x65, 0x4f, 0xd6, 0xbc, 0xf7, 0x7e, 0xaf, 0xbb, 0xdf, 0x7b, 0xfd, 0x3e, 0xda,
|
||||
0xb0, 0x11, 0x46, 0x81, 0x08, 0x76, 0x5a, 0x8c, 0xb6, 0x03, 0x7f, 0x27, 0xac, 0x87, 0x3b, 0xa7,
|
||||
0xb5, 0x1d, 0x71, 0x16, 0x32, 0xbe, 0x8d, 0x1c, 0xb2, 0xcc, 0xc4, 0x31, 0x8b, 0x58, 0xbf, 0xb7,
|
||||
0xad, 0x64, 0xb6, 0xc3, 0x7a, 0xb8, 0x7d, 0x5a, 0xbb, 0xbc, 0xaa, 0x80, 0xed, 0xa0, 0xd7, 0x0b,
|
||||
0xfc, 0x9d, 0x1e, 0xe3, 0x9c, 0x76, 0x63, 0x90, 0xf9, 0x61, 0x19, 0x4a, 0x0d, 0x14, 0x3f, 0x10,
|
||||
0x54, 0x30, 0x72, 0x04, 0xe4, 0x94, 0x7a, 0xae, 0x43, 0x45, 0x10, 0xd9, 0x11, 0xeb, 0xba, 0x5c,
|
||||
0x44, 0x67, 0x46, 0x61, 0x73, 0x62, 0xab, 0x54, 0xbf, 0xb1, 0x3d, 0x7a, 0x85, 0xed, 0xa3, 0x18,
|
||||
0x61, 0xb1, 0x76, 0x10, 0x39, 0xd6, 0xe2, 0x69, 0x4a, 0x50, 0x1a, 0xc8, 0x63, 0xb8, 0x3e, 0xac,
|
||||
0xd7, 0xf6, 0xa8, 0x60, 0x5c, 0xd8, 0xed, 0x63, 0xea, 0x77, 0x99, 0xcd, 0xbd, 0x40, 0x18, 0xc5,
|
||||
0xcd, 0xc2, 0xd6, 0xa4, 0x75, 0x75, 0x48, 0xc3, 0x43, 0x14, 0xdd, 0x43, 0xc9, 0x03, 0x2f, 0x10,
|
||||
0x64, 0x17, 0xd6, 0x47, 0x68, 0x64, 0xcf, 0x5c, 0x61, 0xb7, 0x83, 0xbe, 0x2f, 0x8c, 0x09, 0xd4,
|
||||
0x74, 0x79, 0x48, 0xd3, 0xfd, 0x67, 0xae, 0xd8, 0x93, 0x12, 0xe4, 0x09, 0xdc, 0x1c, 0xa1, 0xc2,
|
||||
0x61, 0x9e, 0xa0, 0x72, 0x4f, 0xae, 0x6f, 0x0b, 0x37, 0xb4, 0x8f, 0x29, 0x3f, 0xbe, 0x53, 0x37,
|
||||
0x26, 0x37, 0x0b, 0x5b, 0x65, 0xeb, 0xcd, 0x21, 0x75, 0xfb, 0x52, 0x7c, 0x4f, 0x4a, 0x1f, 0xba,
|
||||
0xe1, 0x03, 0x94, 0x25, 0x1f, 0xcf, 0x5a, 0xb1, 0x45, 0x3d, 0xea, 0xb7, 0x19, 0x37, 0xa6, 0x36,
|
||||
0x27, 0xb6, 0x26, 0x33, 0xc6, 0x69, 0x68, 0x06, 0xf9, 0x1a, 0xac, 0xf3, 0x63, 0x1a, 0x39, 0x36,
|
||||
0xf5, 0x1d, 0x5b, 0xfa, 0xc9, 0x15, 0x82, 0x31, 0x6e, 0x53, 0x81, 0x36, 0xe1, 0xc6, 0x3f, 0x66,
|
||||
0xd0, 0x01, 0xdb, 0xe3, 0x1c, 0x70, 0x20, 0xd1, 0xbb, 0xbe, 0xb3, 0x17, 0x63, 0x77, 0xa3, 0x88,
|
||||
0x9e, 0x59, 0x97, 0x78, 0x9e, 0xce, 0x77, 0x85, 0x34, 0x1e, 0x27, 0xef, 0xc0, 0xaa, 0x36, 0x7e,
|
||||
0x44, 0x7d, 0x87, 0x06, 0x76, 0xcf, 0x7d, 0xc6, 0xb8, 0x3e, 0x2b, 0x37, 0xfe, 0x29, 0x17, 0x2c,
|
||||
0x5b, 0x86, 0x92, 0xb1, 0x50, 0xe4, 0x8b, 0x52, 0x42, 0x1d, 0x90, 0x93, 0x4f, 0xc3, 0x65, 0x8d,
|
||||
0x3f, 0x75, 0x3a, 0x76, 0xd0, 0x17, 0x61, 0x5f, 0xa4, 0xf0, 0x7f, 0x29, 0xf8, 0x8a, 0x12, 0x39,
|
||||
0x72, 0x3a, 0x8f, 0x94, 0x40, 0x8c, 0xbe, 0x0b, 0x2b, 0x61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x79, 0x9b, 0x92, 0x40, 0x6e, 0xc1, 0x92, 0xd6, 0x42, 0x85,
|
||||
0xfc, 0x83, 0xc6, 0xe5, 0xc6, 0xaf, 0x94, 0x61, 0x6e, 0x8f, 0x33, 0xcc, 0x63, 0xe6, 0x3b, 0xae,
|
||||
0xdf, 0xdd, 0x4d, 0x31, 0xda, 0x42, 0x44, 0x69, 0xcb, 0x30, 0xb2, 0x91, 0xe7, 0xb0, 0x30, 0xe0,
|
||||
0xae, 0xc8, 0x1e, 0xd4, 0xf8, 0xf1, 0x06, 0x5e, 0x53, 0x1d, 0x79, 0xfb, 0x4a, 0x22, 0x3d, 0xa8,
|
||||
0xcc, 0x6f, 0x03, 0xb0, 0xd3, 0x40, 0x30, 0x6e, 0xfc, 0x64, 0xe3, 0x7c, 0xcf, 0x65, 0xf4, 0x1c,
|
||||
0x05, 0x82, 0x59, 0x55, 0x67, 0x90, 0xc0, 0x89, 0x09, 0xe5, 0x2e, 0xf3, 0x19, 0x77, 0xb9, 0x2d,
|
||||
0xdc, 0x1e, 0x33, 0xbe, 0x73, 0x03, 0xc3, 0xa6, 0xa4, 0x89, 0x87, 0x6e, 0x8f, 0x91, 0x77, 0x60,
|
||||
0xae, 0x13, 0x44, 0x27, 0xb6, 0x43, 0x05, 0x35, 0xbe, 0x2b, 0x05, 0x4a, 0xf5, 0xcd, 0x71, 0x4b,
|
||||
0xbe, 0x1b, 0x44, 0x27, 0xfb, 0x54, 0x50, 0x6b, 0xb6, 0xa3, 0x7f, 0x91, 0x25, 0x98, 0xc4, 0x90,
|
||||
0xfc, 0x9e, 0xd2, 0x8d, 0x1f, 0xe4, 0x7d, 0x20, 0xed, 0x3e, 0x17, 0x81, 0x73, 0x26, 0x53, 0x96,
|
||||
0xe7, 0x31, 0xbf, 0xcb, 0xb8, 0xf1, 0xef, 0x6d, 0x3c, 0xd0, 0xd6, 0xd8, 0x50, 0x54, 0x90, 0xbd,
|
||||
0x18, 0x61, 0x2d, 0xb6, 0x73, 0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, 0x58, 0xa2, 0xdd, 0x6e, 0xc4, 0xba, 0x54, 0x30, 0x9b, 0xbb, 0x5d, 0x9f, 0x8a,
|
||||
0x7e, 0xc4, 0x74, 0xe1, 0x25, 0x09, 0xeb, 0x20, 0xe6, 0x98, 0x3f, 0x9c, 0x80, 0x4a, 0x6e, 0xb3,
|
||||
0x84, 0xe8, 0x4b, 0x52, 0xc8, 0xdc, 0x91, 0x0b, 0x30, 0x85, 0x95, 0x50, 0x87, 0x80, 0xfa, 0x20,
|
||||
0x77, 0xc1, 0x50, 0xe7, 0x1e, 0xce, 0x97, 0x7a, 0x87, 0x17, 0x15, 0x3f, 0x97, 0x2c, 0xc9, 0x3d,
|
||||
0xb8, 0xcc, 0xc2, 0xa0, 0x7d, 0x6c, 0xb7, 0x82, 0xbe, 0xef, 0xd0, 0xe8, 0x6c, 0x00, 0xaa, 0xb6,
|
||||
0xbb, 0x82, 0x12, 0x0d, 0x2d, 0x90, 0x01, 0xbf, 0x0d, 0x2b, 0xaa, 0xd6, 0x0f, 0x2f, 0x3a, 0x85,
|
||||
0xc8, 0x0b, 0xc8, 0xce, 0xaf, 0xf9, 0x59, 0x58, 0xcb, 0x17, 0x9c, 0x01, 0xec, 0x34, 0x62, 0x2f,
|
||||
0xe5, 0x2a, 0x4a, 0x46, 0xc1, 0xf5, 0xa1, 0xca, 0x39, 0x33, 0xaa, 0x70, 0x7e, 0x06, 0x56, 0x53,
|
||||
0xb1, 0xe1, 0x2d, 0xce, 0xe2, 0x32, 0x46, 0x22, 0x92, 0xdb, 0xa6, 0xf9, 0x4d, 0x58, 0xcb, 0x39,
|
||||
0x44, 0x76, 0x1f, 0x89, 0x9f, 0x5f, 0x2f, 0x02, 0x37, 0xa0, 0x94, 0x09, 0x25, 0x74, 0xe6, 0xac,
|
||||
0x05, 0x69, 0x14, 0x99, 0xff, 0x9d, 0x82, 0x4a, 0xae, 0x17, 0x25, 0xcb, 0x30, 0x1d, 0xf6, 0x5b,
|
||||
0x27, 0xec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f4, 0x48, 0x43, 0x1c,
|
||||
0xb8, 0x44, 0xe5, 0x0f, 0x7b, 0xc4, 0xc0, 0xa4, 0xc7, 0xd4, 0x9b, 0x2f, 0x3d, 0x25, 0x59, 0xcb,
|
||||
0xa8, 0x6b, 0x88, 0x6e, 0x7e, 0x03, 0x16, 0x87, 0x88, 0xa9, 0x71, 0x0a, 0x59, 0xe3, 0xac, 0xc1,
|
||||
0x5c, 0xba, 0x81, 0xe2, 0xe6, 0xc4, 0xd6, 0xbc, 0x95, 0x12, 0x48, 0x1d, 0x2e, 0x8a, 0x40, 0x50,
|
||||
0xcf, 0x4e, 0xed, 0x9f, 0x1d, 0x4e, 0x97, 0x90, 0x99, 0xdc, 0x01, 0xd5, 0x96, 0xfc, 0xb4, 0x18,
|
||||
0x8f, 0xe4, 0x68, 0x96, 0x91, 0x76, 0xfd, 0x18, 0x90, 0x90, 0x46, 0xf2, 0x06, 0x0c, 0x9b, 0xb4,
|
||||
0xaa, 0x38, 0x99, 0xdc, 0x7f, 0x0b, 0x16, 0xe5, 0x55, 0x62, 0x23, 0x4a, 0x5c, 0x05, 0x19, 0x19,
|
||||
0xd9, 0xdb, 0x70, 0x41, 0x67, 0xa6, 0x88, 0x9d, 0x32, 0xea, 0x0d, 0x96, 0x35, 0xa2, 0x78, 0x16,
|
||||
0xb2, 0x34, 0x62, 0x4c, 0x57, 0x36, 0x35, 0xae, 0x2b, 0x5b, 0x83, 0xb9, 0xb4, 0xb8, 0x4f, 0xe3,
|
||||
0x58, 0x92, 0x12, 0x64, 0x85, 0x68, 0x05, 0xce, 0x19, 0xe6, 0xa8, 0x73, 0x2a, 0x44, 0xc6, 0x40,
|
||||
0x0d, 0x79, 0xd1, 0x10, 0x64, 0xfe, 0xa7, 0x08, 0x95, 0x1c, 0x87, 0x7c, 0x1e, 0xca, 0x03, 0xc3,
|
||||
0x88, 0x0a, 0x92, 0x6b, 0x2f, 0x51, 0x7a, 0xac, 0x01, 0x20, 0x79, 0x02, 0x24, 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, 0xee, 0xf8, 0xde, 0x5e, 0x50, 0x0f,
|
||||
0xf6, 0xce, 0x6a, 0x7b, 0xec, 0x3c, 0x20, 0x74, 0x57, 0x70, 0xd0, 0x2a, 0x61, 0x27, 0x24, 0x24,
|
||||
0x83, 0xfe, 0xae, 0x94, 0xd9, 0x0d, 0xea, 0xc1, 0xee, 0x59, 0xed, 0xca, 0xba, 0x04, 0x76, 0xfc,
|
||||
0x7e, 0xdf, 0xf7, 0xf6, 0xfa, 0x84, 0x52, 0xdc, 0x8b, 0x40, 0xc6, 0x87, 0x25, 0x28, 0x36, 0x84,
|
||||
0xf8, 0x21, 0xc3, 0x8c, 0xa0, 0x63, 0x40, 0x67, 0xd8, 0x75, 0x6c, 0xcc, 0xfc, 0xd0, 0x0a, 0x49,
|
||||
0xcf, 0xa1, 0x2c, 0x3c, 0xd7, 0xb5, 0xed, 0xfc, 0x4e, 0xb1, 0x7e, 0x73, 0x77, 0xfc, 0x0a, 0xbb,
|
||||
0xc7, 0x11, 0xc2, 0x24, 0x1d, 0x3f, 0xb4, 0xcd, 0xa5, 0xb3, 0x84, 0x20, 0x35, 0xa0, 0x27, 0x70,
|
||||
0x63, 0x54, 0xaf, 0xe5, 0x62, 0x46, 0x28, 0xb3, 0x3a, 0x27, 0xd8, 0xeb, 0x11, 0x8b, 0xba, 0x3e,
|
||||
0xd3, 0x73, 0xdb, 0xda, 0x4e, 0xc1, 0xbc, 0x36, 0xa2, 0xe1, 0x91, 0x10, 0x6d, 0x0a, 0xc9, 0x43,
|
||||
0xd7, 0x67, 0x68, 0x1f, 0x36, 0xc7, 0x68, 0x24, 0xcf, 0x1d, 0x66, 0x75, 0xfc, 0x81, 0xc7, 0xf4,
|
||||
0xbc, 0xd0, 0x74, 0x65, 0x44, 0xd3, 0x83, 0xe7, 0x0e, 0x6b, 0x72, 0x09, 0xf4, 0x14, 0x6e, 0x8d,
|
||||
0x51, 0x61, 0x13, 0x97, 0x61, 0xbe, 0x27, 0xc7, 0xb3, 0x98, 0x13, 0x58, 0x27, 0x98, 0x9e, 0xdc,
|
||||
0xad, 0xeb, 0x85, 0x6d, 0x6d, 0xa7, 0x64, 0xbe, 0x39, 0xa2, 0xee, 0x80, 0x8b, 0x37, 0xb9, 0xf4,
|
||||
0x91, 0x13, 0x3c, 0x14, 0xb2, 0xe8, 0x13, 0x69, 0x2b, 0xb6, 0xb1, 0x8b, 0xbd, 0x0e, 0xa1, 0xfa,
|
||||
0xcc, 0x76, 0x7e, 0xa7, 0x90, 0x32, 0x4e, 0x43, 0x31, 0x50, 0x0f, 0x2e, 0xd3, 0x13, 0x1c, 0xda,
|
||||
0x16, 0xf7, 0x91, 0xc3, 0x18, 0x21, 0xd4, 0xc2, 0x4c, 0xd8, 0x83, 0xea, 0xff, 0x98, 0x13, 0xc6,
|
||||
0xff, 0xd8, 0x24, 0xe3, 0x1f, 0x72, 0x64, 0x33, 0x02, 0xee, 0x87, 0x21, 0x3e, 0x37, 0x57, 0xe9,
|
||||
0x10, 0x91, 0xee, 0x33, 0x6e, 0x32, 0x8a, 0xde, 0x81, 0x75, 0x65, 0xf2, 0x10, 0x7b, 0x36, 0xf6,
|
||||
0xad, 0xbe, 0xf3, 0x9c, 0x50, 0x75, 0x42, 0xaa, 0xff, 0x93, 0x2f, 0x55, 0x32, 0x75, 0x29, 0x63,
|
||||
0x0a, 0x91, 0x2f, 0x71, 0x09, 0x79, 0x2c, 0x8a, 0x3e, 0x03, 0x57, 0x14, 0xfe, 0xcc, 0xee, 0x5a,
|
||||
0xfe, 0x80, 0x05, 0x03, 0x96, 0xc0, 0xff, 0x25, 0xe1, 0x6b, 0x52, 0xe4, 0xd8, 0xee, 0x3e, 0x96,
|
||||
0x02, 0x11, 0xfa, 0x1e, 0xac, 0x05, 0x21, 0x39, 0x73, 0xfc, 0x01, 0xb5, 0x9e, 0x0d, 0x28, 0x73,
|
||||
0xba, 0x0e, 0xb1, 0xa5, 0xd7, 0x7f, 0x57, 0x11, 0xce, 0x5a, 0x89, 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, 0x79, 0x42, 0x3c, 0xdb, 0xf1, 0x7a, 0xfb, 0x09,
|
||||
0x46, 0x59, 0x08, 0x49, 0x6d, 0x29, 0x46, 0x3a, 0xf2, 0x6c, 0x12, 0xf8, 0xd4, 0x61, 0xe9, 0x83,
|
||||
0xea, 0x3f, 0xde, 0x12, 0x97, 0x53, 0x45, 0xde, 0x81, 0x94, 0x48, 0x0e, 0xca, 0xb3, 0xda, 0x10,
|
||||
0xec, 0xcc, 0x67, 0x84, 0xea, 0x3f, 0xd9, 0x9a, 0xee, 0xb9, 0x94, 0x9e, 0x63, 0x9f, 0x11, 0xb3,
|
||||
0x6a, 0x0f, 0x13, 0x28, 0x32, 0xa0, 0xd4, 0x23, 0x1e, 0xa1, 0x0e, 0xb5, 0x98, 0xd3, 0x27, 0xfa,
|
||||
0x77, 0x6e, 0x8a, 0xb0, 0x29, 0x2a, 0xe2, 0x91, 0xd3, 0x27, 0xe8, 0x1d, 0x58, 0xe8, 0xfa, 0xe1,
|
||||
0xa9, 0x65, 0x63, 0x86, 0xf5, 0xef, 0x72, 0x81, 0x62, 0x7d, 0x7b, 0xd2, 0x92, 0xef, 0xfa, 0xe1,
|
||||
0xe9, 0x01, 0x66, 0xd8, 0x9c, 0xef, 0xaa, 0x5f, 0x68, 0x19, 0x0a, 0x22, 0x24, 0xbf, 0x27, 0x75,
|
||||
0x8b, 0x0f, 0xf4, 0x3e, 0xa0, 0xce, 0x80, 0x32, 0xdf, 0x3e, 0xe7, 0x89, 0xca, 0x75, 0x89, 0xd7,
|
||||
0x23, 0x54, 0xff, 0xf7, 0xae, 0x38, 0xd0, 0xce, 0xc4, 0x50, 0x94, 0x90, 0x66, 0x84, 0x30, 0x97,
|
||||
0x3a, 0x19, 0x0a, 0x35, 0xbe, 0x0d, 0xf3, 0xd1, 0x26, 0xd0, 0x0e, 0x54, 0x83, 0x90, 0x58, 0x62,
|
||||
0xfb, 0x67, 0x24, 0xa4, 0x8e, 0xef, 0xe9, 0x9a, 0xd8, 0x45, 0x39, 0x08, 0x09, 0x17, 0x3b, 0x96,
|
||||
0x54, 0x74, 0x1b, 0x96, 0x02, 0x9f, 0xb2, 0x61, 0x51, 0x99, 0xca, 0x2b, 0x9c, 0x91, 0x96, 0x5d,
|
||||
0x57, 0x06, 0x11, 0xa7, 0x92, 0x49, 0x5a, 0x9c, 0x96, 0x5f, 0x31, 0xe3, 0xeb, 0x50, 0xc9, 0x98,
|
||||
0x1d, 0xed, 0xc2, 0xf2, 0x38, 0x9f, 0x6b, 0xc2, 0xe5, 0x4b, 0xf6, 0x88, 0xb3, 0x37, 0x01, 0xb8,
|
||||
0x7f, 0x55, 0x15, 0x90, 0x9b, 0x58, 0xe0, 0x14, 0x91, 0xf4, 0x8d, 0xbf, 0x68, 0xa0, 0x4f, 0x0a,
|
||||
0x3d, 0x74, 0x1f, 0x0a, 0xc2, 0x4f, 0x9a, 0x70, 0xd3, 0xc4, 0xc8, 0x48, 0x01, 0x85, 0xb7, 0x04,
|
||||
0x08, 0xbd, 0x0d, 0xab, 0x01, 0x0e, 0x99, 0xd3, 0x71, 0x82, 0x4c, 0xfa, 0xc9, 0x89, 0xbd, 0xae,
|
||||
0x0c, 0x71, 0xe3, 0xec, 0x73, 0x0b, 0xaa, 0x91, 0x2f, 0x63, 0x40, 0x5e, 0x00, 0x2a, 0x8a, 0x1e,
|
||||
0x8b, 0x5e, 0x87, 0x45, 0x6e, 0x35, 0xcb, 0xf1, 0x3a, 0xee, 0xc0, 0x26, 0xb6, 0x28, 0x4a, 0x05,
|
||||
0xb3, 0xc4, 0x89, 0x2d, 0x45, 0x33, 0xfe, 0xac, 0x41, 0x31, 0xb5, 0xc1, 0x8f, 0xfa, 0x99, 0xf6,
|
||||
0x60, 0x19, 0xf7, 0x7a, 0x21, 0xe9, 0x61, 0x46, 0x2c, 0xea, 0xf4, 0x3c, 0xcc, 0x06, 0x21, 0x51,
|
||||
0xe5, 0x16, 0xc5, 0xac, 0xc3, 0x88, 0x63, 0xfc, 0x20, 0x0f, 0x95, 0xcc, 0x66, 0x11, 0x52, 0x97,
|
||||
0x44, 0x4b, 0xdd, 0x91, 0x4b, 0x30, 0x23, 0xca, 0xa0, 0x0a, 0x01, 0xf9, 0x81, 0xee, 0x81, 0x2e,
|
||||
0xcf, 0x3d, 0x9a, 0x2f, 0xd5, 0x0e, 0x57, 0x24, 0x3f, 0x93, 0x2c, 0xd1, 0x7d, 0xb8, 0x42, 0x02,
|
||||
0xbf, 0x73, 0x62, 0xb5, 0xfd, 0x81, 0x67, 0xe3, 0xf0, 0x7c, 0x08, 0x2a, 0xb7, 0xbb, 0x26, 0x24,
|
||||
0x1a, 0x4a, 0x20, 0x05, 0x7e, 0x1b, 0xd6, 0x64, 0x85, 0x1f, 0x5d, 0x74, 0x46, 0x20, 0x2f, 0x09,
|
||||
0x76, 0x76, 0xcd, 0xcf, 0xc1, 0x46, 0xb6, 0xe0, 0x0c, 0x61, 0x67, 0x05, 0xf6, 0x72, 0xa6, 0xa2,
|
||||
0xa4, 0x14, 0xdc, 0x18, 0xa9, 0x9c, 0x73, 0xe3, 0x0a, 0xe7, 0x67, 0x61, 0x3d, 0x11, 0x1b, 0xdd,
|
||||
0xe2, 0xbc, 0x58, 0x46, 0x8f, 0x45, 0x32, 0xdb, 0x34, 0xbe, 0x05, 0x1b, 0x19, 0x87, 0xec, 0x7b,
|
||||
0x76, 0x33, 0xf6, 0xf3, 0xeb, 0x45, 0xe0, 0x16, 0x14, 0x53, 0xa1, 0x24, 0x9c, 0x39, 0x6f, 0x42,
|
||||
0x12, 0x45, 0xc6, 0x7f, 0x67, 0xa0, 0x92, 0xe9, 0x40, 0xd1, 0x2a, 0xcc, 0x06, 0x83, 0xf6, 0x29,
|
||||
0x39, 0x57, 0x69, 0x42, 0x7d, 0xa1, 0x06, 0x6c, 0x7e, 0xe0, 0xb0, 0x13, 0x3b, 0xc4, 0x1f, 0x60,
|
||||
0xd7, 0xea, 0x84, 0xc4, 0x26, 0x1e, 0x73, 0xb0, 0x1b, 0x35, 0x31, 0x2a, 0xaa, 0xd7, 0x13, 0xa1,
|
||||
0x66, 0x22, 0xa3, 0x6c, 0xfa, 0x29, 0xd0, 0x55, 0xf7, 0x24, 0xdb, 0xb5, 0x3e, 0xf1, 0x32, 0x11,
|
||||
0xb4, 0x2a, 0xf9, 0xcd, 0x98, 0xad, 0x90, 0xd7, 0x61, 0x51, 0x21, 0x5d, 0x7c, 0x4e, 0x42, 0x1a,
|
||||
0x5d, 0x5f, 0x49, 0x7c, 0x24, 0x68, 0xe8, 0x26, 0x54, 0x70, 0x87, 0x39, 0x67, 0xf2, 0xba, 0x09,
|
||||
0x9f, 0xcd, 0xc8, 0x9c, 0x9b, 0x90, 0x85, 0xd3, 0xd6, 0x61, 0x41, 0xd4, 0x6a, 0x21, 0x32, 0x2b,
|
||||
0xf3, 0x28, 0x27, 0x08, 0xe6, 0x4d, 0xa8, 0xa4, 0x0e, 0x9a, 0xf2, 0x7c, 0x39, 0x21, 0x0b, 0xc1,
|
||||
0x1b, 0x50, 0x4e, 0x6a, 0xbf, 0x90, 0x9b, 0x97, 0x11, 0x12, 0x53, 0x85, 0xd8, 0x26, 0x40, 0xaa,
|
||||
0xb5, 0x5e, 0x90, 0x49, 0x95, 0xc4, 0x9d, 0xf4, 0x31, 0x94, 0xb8, 0xe7, 0x06, 0xd4, 0xea, 0xba,
|
||||
0xb8, 0x47, 0x75, 0xd8, 0xd6, 0x76, 0xca, 0xf5, 0xbb, 0x17, 0x1c, 0x18, 0x76, 0x0f, 0x05, 0xf6,
|
||||
0x5d, 0x0e, 0x35, 0x8b, 0x34, 0xf9, 0xe0, 0xad, 0x51, 0x5c, 0xe7, 0x46, 0x8c, 0x5d, 0x94, 0x77,
|
||||
0x2e, 0xaa, 0x61, 0x59, 0x6b, 0xdf, 0x8f, 0x5b, 0x86, 0x48, 0x45, 0x48, 0x28, 0x89, 0x4e, 0x59,
|
||||
0x12, 0x47, 0x50, 0x1d, 0x83, 0x8a, 0x55, 0x53,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50, 0x1e, 0xa6, 0x24, 0xc6, 0xd0, 0xd2, 0xc6, 0xd8, 0x80, 0x85,
|
||||
0x64, 0xdd, 0xdc, 0x76, 0x7e, 0x67, 0xd1, 0x4c, 0x08, 0xa8, 0x0e, 0x2b, 0xcc, 0x67, 0xd8, 0xb5,
|
||||
0x12, 0x7b, 0xa7, 0x47, 0xd0, 0x65, 0xc1, 0x8c, 0x63, 0x5e, 0xb6, 0x21, 0x3f, 0xcd, 0x45, 0x83,
|
||||
0xb7, 0x30, 0xc3, 0x58, 0x3b, 0x7e, 0x1c, 0x50, 0x80, 0x43, 0x1e, 0xf1, 0xa3, 0x26, 0xac, 0x4a,
|
||||
0x4e, 0x2a, 0xd7, 0xdf, 0x86, 0x25, 0x7e, 0x75, 0xc8, 0x98, 0x92, 0x56, 0x11, 0x8c, 0x94, 0xec,
|
||||
0x1d, 0xb8, 0xa4, 0x32, 0x51, 0x48, 0xce, 0x08, 0x76, 0x87, 0xcb, 0x18, 0x92, 0x3c, 0x53, 0xb0,
|
||||
0x14, 0x62, 0x42, 0x17, 0x36, 0x33, 0xa9, 0x0b, 0xdb, 0x80, 0x85, 0xa4, 0x98, 0xcf, 0x8a, 0x31,
|
||||
0x24, 0x21, 0xf0, 0x8a, 0xd0, 0xf6, 0xed, 0x73, 0x91, 0x93, 0xa6, 0x54, 0x84, 0x94, 0x81, 0x1a,
|
||||
0xfc, 0x62, 0x09, 0x90, 0xf1, 0x9f, 0x1c, 0x54, 0x32, 0x1c, 0xf4, 0x05, 0x28, 0x0d, 0x0d, 0x1f,
|
||||
0x32, 0x36, 0xae, 0x5f, 0xa0, 0xd4, 0x98, 0x43, 0x40, 0xf4, 0x14, 0x50, 0x10, 0xfa, 0x81, 0x4f,
|
||||
0x49, 0x68, 0x51, 0x17, 0xd3, 0x13, 0xc7, 0xeb, 0x51, 0xe1, 0xf2, 0x29, 0x8d, 0xf5, 0x13, 0x85,
|
||||
0x38, 0x54, 0x00, 0x73, 0x29, 0xc8, 0x50, 0x28, 0xfa, 0x32, 0x54, 0x3b, 0x98, 0x06, 0x43, 0x6a,
|
||||
0xf3, 0xd3, 0x23, 0xb8, 0x29, 0xe4, 0x63, 0xa5, 0x95, 0xce, 0xd0, 0x37, 0x45, 0xf7, 0x61, 0x5e,
|
||||
0x19, 0x9e, 0x97, 0x12, 0xae, 0x6a, 0xeb, 0x65, 0xb3, 0x4c, 0x0c, 0x40, 0x75, 0x98, 0xe1, 0xf9,
|
||||
0x5b, 0x3e, 0x4b, 0x14, 0xeb, 0x1b, 0x93, 0x90, 0x7c, 0xd4, 0x33, 0xa5, 0xa8, 0xf1, 0xc3, 0x1c,
|
||||
0x94, 0x94, 0xa6, 0x96, 0x17, 0x0c, 0xd8, 0xc4, 0x3a, 0xbb, 0x0b, 0xcb, 0x41, 0xe8, 0xfb, 0x5d,
|
||||
0xcb, 0xef, 0x5a, 0x81, 0x4f, 0x29, 0xa1, 0xf1, 0x44, 0x50, 0x12, 0xc6, 0xf1, 0xbb, 0x8f, 0xbb,
|
||||
0x4f, 0x62, 0xc6, 0xcb, 0xeb, 0x72, 0xfe, 0xf5, 0xea, 0x72, 0x61, 0x6a, 0x5d, 0x9e, 0x5a, 0x65,
|
||||
0x66, 0xa6, 0x56, 0x19, 0xe3, 0x19, 0x20, 0xe9, 0x7d, 0xec, 0xf2, 0x16, 0x95, 0xd8, 0xaf, 0xd8,
|
||||
0x8f, 0xde, 0x86, 0xa5, 0x49, 0x8d, 0x68, 0xa5, 0x9d, 0x49, 0x90, 0x7f, 0xd3, 0x60, 0x49, 0x78,
|
||||
0x1f, 0xb7, 0x5d, 0xc2, 0x67, 0x23, 0xb1, 0x56, 0x0d, 0x56, 0x52, 0x0d, 0x92, 0x75, 0x87, 0xe7,
|
||||
0x7a, 0x87, 0xcf, 0xee, 0x9a, 0xc8, 0x53, 0x28, 0x69, 0x95, 0xee, 0xb4, 0x24, 0x27, 0x0b, 0xa9,
|
||||
0xc5, 0x90, 0x5c, 0x16, 0x52, 0x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xbe, 0xb7, 0x35, 0x4a, 0xbf, 0x79, 0x71, 0x55, 0xfb, 0xed, 0x8b, 0xab, 0xda, 0x5f, 0x5f,
|
||||
0x5c, 0xd5, 0xda, 0xb3, 0xe2, 0x5f, 0x30, 0x77, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0xae, 0xfd,
|
||||
0x67, 0xd5, 0xda, 0x19, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@ message BeaconState {
|
||||
repeated uint64 validator_balances = 5; // Balance in Gwei
|
||||
|
||||
// Randomness and committees [1001-2000]
|
||||
repeated ShardAndCommitteeArray shard_and_committees_at_slots = 1001;
|
||||
repeated bytes latest_randao_mixes_hash32s = 1002;
|
||||
repeated bytes latest_vdf_outputs_hash32s = 1003;
|
||||
repeated ShardCommitteeArray shard_committees_at_slots = 1003;
|
||||
repeated bytes latest_randao_mixes_hash32s = 1004;
|
||||
repeated bytes latest_vdf_outputs_hash32s = 1005;
|
||||
|
||||
// Finality [2001-3000]
|
||||
uint64 previous_justified_slot = 2001;
|
||||
@@ -126,11 +126,11 @@ message CrosslinkRecord {
|
||||
bytes shard_block_root_hash32 = 2;
|
||||
}
|
||||
|
||||
message ShardAndCommitteeArray {
|
||||
repeated ShardAndCommittee array_shard_and_committee = 1;
|
||||
message ShardCommitteeArray {
|
||||
repeated ShardCommittee array_shard_committee = 1;
|
||||
}
|
||||
|
||||
message ShardAndCommittee {
|
||||
message ShardCommittee {
|
||||
uint64 shard = 1;
|
||||
repeated uint32 committee = 2;
|
||||
uint64 total_validator_count = 3;
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
|
||||
func TestMerkleRoot(t *testing.T) {
|
||||
valueSet := [][]byte{
|
||||
[]byte{'a'},
|
||||
[]byte{'b'},
|
||||
[]byte{'c'},
|
||||
[]byte{'d'},
|
||||
{'a'},
|
||||
{'b'},
|
||||
{'c'},
|
||||
{'d'},
|
||||
}
|
||||
|
||||
hashedV1 := Hash([]byte{'a'})
|
||||
|
||||
@@ -54,7 +54,6 @@ func (s *Service) healthzHandler(w http.ResponseWriter, _ *http.Request) {
|
||||
|
||||
if _, err := buf.WriteString(fmt.Sprintf("%s: %s\n", k, status)); err != nil {
|
||||
hasError = true
|
||||
status = "ERROR " + err.Error()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user