diff --git a/beacon-chain/blockchain/service_test.go b/beacon-chain/blockchain/service_test.go index d8356f875..68e389253 100644 --- a/beacon-chain/blockchain/service_test.go +++ b/beacon-chain/blockchain/service_test.go @@ -255,9 +255,12 @@ func TestRunningChainServiceFaultyPOWChain(t *testing.T) { } block := &pb.BeaconBlock{ - Slot: 2, - ParentRootHash32: parentHash[:], - DepositRootHash32: []byte("a"), + Slot: 2, + ParentRootHash32: parentHash[:], + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte("a"), + BlockHash32: []byte("b"), + }, } exitRoutine := make(chan bool) @@ -347,10 +350,13 @@ func TestRunningChainService(t *testing.T) { attestationSlot := uint64(0) block := &pb.BeaconBlock{ - Slot: currentSlot + 1, - StateRootHash32: stateRoot[:], - ParentRootHash32: parentHash[:], - DepositRootHash32: []byte("a"), + Slot: currentSlot + 1, + StateRootHash32: stateRoot[:], + ParentRootHash32: parentHash[:], + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte("a"), + BlockHash32: []byte("b"), + }, Body: &pb.BeaconBlockBody{ Attestations: []*pb.Attestation{{ ParticipationBitfield: []byte{128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -402,7 +408,7 @@ func TestDoesPOWBlockExist(t *testing.T) { } // Using a faulty client should throw error. - powHash := bytesutil.ToBytes32(beaconState.LatestDepositRootHash32) + powHash := bytesutil.ToBytes32(beaconState.LatestEth1Data.DepositRootHash32) exists := chainService.doesPoWBlockExist(powHash) if exists { t.Error("Block corresponding to nil powchain reference should not exist") @@ -465,10 +471,13 @@ func TestUpdateHead(t *testing.T) { enc, _ := proto.Marshal(tt.state) stateRoot := hashutil.Hash(enc) block := &pb.BeaconBlock{ - Slot: tt.blockSlot, - StateRootHash32: stateRoot[:], - ParentRootHash32: genesisHash[:], - DepositRootHash32: []byte("a"), + Slot: tt.blockSlot, + StateRootHash32: stateRoot[:], + ParentRootHash32: genesisHash[:], + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte("a"), + BlockHash32: []byte("b"), + }, } if err := chainService.beaconDB.SaveBlock(block); err != nil { t.Fatal(err) @@ -527,18 +536,23 @@ func TestIsBlockReadyForProcessing(t *testing.T) { t.Fatal("block processing succeeded despite block slot being invalid") } - h := bytesutil.ToBytes32([]byte("a")) - beaconState.LatestDepositRootHash32 = h[:] + beaconState.LatestEth1Data = &pb.Eth1Data{ + DepositRootHash32: []byte{2}, + BlockHash32: []byte{3}, + } beaconState.Slot = 0 currentSlot := uint64(1) attestationSlot := uint64(0) block3 := &pb.BeaconBlock{ - Slot: currentSlot, - StateRootHash32: stateRoot[:], - ParentRootHash32: parentHash[:], - DepositRootHash32: []byte("a"), + Slot: currentSlot, + StateRootHash32: stateRoot[:], + ParentRootHash32: parentHash[:], + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte("a"), + BlockHash32: []byte("b"), + }, Body: &pb.BeaconBlockBody{ Attestations: []*pb.Attestation{{ ParticipationBitfield: []byte{128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/beacon-chain/chaintest/backend/helpers.go b/beacon-chain/chaintest/backend/helpers.go index 957d3eb36..88c1711d5 100644 --- a/beacon-chain/chaintest/backend/helpers.go +++ b/beacon-chain/chaintest/backend/helpers.go @@ -37,6 +37,10 @@ func generateSimulatedBlock( RandaoRevealHash32: randaoReveal[:], ParentRootHash32: prevBlockRoot[:], StateRootHash32: stateRoot[:], + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{1}, + BlockHash32: []byte{2}, + }, Body: &pb.BeaconBlockBody{ ProposerSlashings: []*pb.ProposerSlashing{}, AttesterSlashings: []*pb.AttesterSlashing{}, diff --git a/beacon-chain/chaintest/backend/simulated_backend.go b/beacon-chain/chaintest/backend/simulated_backend.go index 0081b7866..445dcc042 100644 --- a/beacon-chain/chaintest/backend/simulated_backend.go +++ b/beacon-chain/chaintest/backend/simulated_backend.go @@ -234,7 +234,10 @@ func (sb *SimulatedBackend) RunStateTransitionTest(testCase *StateTestCase) erro return fmt.Errorf("could not generate simulated beacon block %v", err) } latestRoot := depositsTrie.Root() - beaconState.LatestDepositRootHash32 = latestRoot[:] + beaconState.LatestEth1Data = &pb.Eth1Data{ + DepositRootHash32: latestRoot[:], + BlockHash32: []byte{}, + } startTime := time.Now() newState, err := state.ExecuteStateTransition( diff --git a/beacon-chain/core/blocks/block_operations.go b/beacon-chain/core/blocks/block_operations.go index 6f5f84d80..048a69d6d 100644 --- a/beacon-chain/core/blocks/block_operations.go +++ b/beacon-chain/core/blocks/block_operations.go @@ -35,36 +35,35 @@ func VerifyProposerSignature( return nil } -// ProcessDepositRoots processes the proof-of-work chain's receipts -// contained in a beacon block and appends them as candidate receipt roots -// in the beacon state. +// ProcessEth1Data is an operation performed on each +// beacon block to ensure the ETH1 data votes are processed +// into the beacon state. // -// Official spec definition for processing deposit roots: -// If block.deposit_root is deposit_root_vote.deposit_root -// for some deposit_root_vote in state.deposit_root_votes, -// set deposit_root_vote.vote_count += 1. -// Otherwise, append to state.deposit_root_votes a -// new DepositRootVote( -// deposit_root=block.deposit_root, -// vote_count=1 -// ) -func ProcessDepositRoots( - beaconState *pb.BeaconState, - block *pb.BeaconBlock, -) *pb.BeaconState { - var newCandidateReceiptRoots []*pb.DepositRootVote - currentCandidateReceiptRoots := beaconState.DepositRootVotes - for idx, root := range currentCandidateReceiptRoots { - if bytes.Equal(block.DepositRootHash32, root.DepositRootHash32) { - currentCandidateReceiptRoots[idx].VoteCount++ - } else { - newCandidateReceiptRoots = append(newCandidateReceiptRoots, &pb.DepositRootVote{ - DepositRootHash32: block.DepositRootHash32, - VoteCount: 1, - }) +// Official spec definition of ProcessEth1Data +// If block.eth1_data equals eth1_data_vote.eth1_data for some eth1_data_vote +// in state.eth1_data_votes, set eth1_data_vote.vote_count += 1. +// Otherwise, append to state.eth1_data_votes a new Eth1DataVote(eth1_data=block.eth1_data, vote_count=1). +func ProcessEth1Data(beaconState *pb.BeaconState, block *pb.BeaconBlock) *pb.BeaconState { + var eth1DataVoteAdded bool + + for _, Eth1DataVote := range beaconState.Eth1DataVotes { + if bytes.Equal(Eth1DataVote.Eth1Data.BlockHash32, block.Eth1Data.BlockHash32) && bytes.Equal(Eth1DataVote.Eth1Data.DepositRootHash32, block.Eth1Data.DepositRootHash32) { + Eth1DataVote.VoteCount++ + eth1DataVoteAdded = true + break } } - beaconState.DepositRootVotes = append(currentCandidateReceiptRoots, newCandidateReceiptRoots...) + + if !eth1DataVoteAdded { + beaconState.Eth1DataVotes = append( + beaconState.Eth1DataVotes, + &pb.Eth1DataVote{ + Eth1Data: block.Eth1Data, + VoteCount: 1, + }, + ) + } + return beaconState } @@ -623,7 +622,7 @@ func ProcessValidatorDeposits( func verifyDeposit(beaconState *pb.BeaconState, deposit *pb.Deposit) error { // Verify Merkle proof of deposit and deposit trie root. - receiptRoot := bytesutil.ToBytes32(beaconState.LatestDepositRootHash32) + receiptRoot := bytesutil.ToBytes32(beaconState.LatestEth1Data.DepositRootHash32) if ok := trieutil.VerifyMerkleBranch( hashutil.Hash(deposit.DepositData), deposit.MerkleBranchHash32S, diff --git a/beacon-chain/core/blocks/block_operations_test.go b/beacon-chain/core/blocks/block_operations_test.go index 4e7566e73..d1555cc81 100644 --- a/beacon-chain/core/blocks/block_operations_test.go +++ b/beacon-chain/core/blocks/block_operations_test.go @@ -15,57 +15,6 @@ import ( "github.com/prysmaticlabs/prysm/shared/trieutil" ) -func TestProcessPOWReceiptRoots_SameRootHash(t *testing.T) { - beaconState := &pb.BeaconState{ - DepositRootVotes: []*pb.DepositRootVote{ - { - DepositRootHash32: []byte{1}, - VoteCount: 5, - }, - }, - } - block := &pb.BeaconBlock{ - DepositRootHash32: []byte{1}, - } - beaconState = ProcessDepositRoots(beaconState, block) - newRoots := beaconState.DepositRootVotes - if newRoots[0].VoteCount != 6 { - t.Errorf("expected votes to increase from 5 to 6, received %d", newRoots[0].VoteCount) - } -} - -func TestProcessPOWReceiptRoots_NewCandidateRecord(t *testing.T) { - beaconState := &pb.BeaconState{ - DepositRootVotes: []*pb.DepositRootVote{ - { - DepositRootHash32: []byte{0}, - VoteCount: 5, - }, - }, - } - block := &pb.BeaconBlock{ - DepositRootHash32: []byte{1}, - } - beaconState = ProcessDepositRoots(beaconState, block) - newRoots := beaconState.DepositRootVotes - if len(newRoots) == 1 { - t.Error("expected new receipt roots to have length > 1") - } - if newRoots[1].VoteCount != 1 { - t.Errorf( - "expected new receipt roots to have a new element with votes = 1, received votes = %d", - newRoots[1].VoteCount, - ) - } - if !bytes.Equal(newRoots[1].DepositRootHash32, []byte{1}) { - t.Errorf( - "expected new receipt roots to have a new element with root = %#x, received root = %#x", - []byte{1}, - newRoots[1].DepositRootHash32, - ) - } -} - func TestProcessBlockRandao_UnequalBlockAndProposerRandao(t *testing.T) { validators := make([]*pb.ValidatorRecord, config.EpochLength*2) for i := 0; i < len(validators); i++ { @@ -136,6 +85,71 @@ func TestProcessBlockRandao_CreateRandaoMixAndUpdateProposer(t *testing.T) { } } +func TestProcessEth1Data_SameRootHash(t *testing.T) { + beaconState := &pb.BeaconState{ + Eth1DataVotes: []*pb.Eth1DataVote{ + &pb.Eth1DataVote{ + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{1}, + BlockHash32: []byte{2}, + }, + VoteCount: 5, + }, + }, + } + block := &pb.BeaconBlock{ + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{1}, + BlockHash32: []byte{2}, + }, + } + beaconState = ProcessEth1Data(beaconState, block) + newETH1DataVotes := beaconState.Eth1DataVotes + if newETH1DataVotes[0].VoteCount != 6 { + t.Errorf("expected votes to increase from 5 to 6, received %d", newETH1DataVotes[0].VoteCount) + } +} + +func TestProcessEth1Data_NewDepositRootHash(t *testing.T) { + beaconState := &pb.BeaconState{ + Eth1DataVotes: []*pb.Eth1DataVote{ + &pb.Eth1DataVote{ + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{0}, + BlockHash32: []byte{1}, + }, + VoteCount: 5, + }, + }, + } + + block := &pb.BeaconBlock{ + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{2}, + BlockHash32: []byte{3}, + }, + } + + beaconState = ProcessEth1Data(beaconState, block) + newETH1DataVotes := beaconState.Eth1DataVotes + if len(newETH1DataVotes) <= 1 { + t.Error("expected new ETH1 data votes to have length > 1") + } + if newETH1DataVotes[1].VoteCount != 1 { + t.Errorf( + "expected new ETH1 data votes to have a new element with votes = 1, received votes = %d", + newETH1DataVotes[1].VoteCount, + ) + } + if !bytes.Equal(newETH1DataVotes[1].Eth1Data.DepositRootHash32, []byte{2}) { + t.Errorf( + "expected new ETH1 data votes to have a new element with deposit root = %#x, received deposit root = %#x", + []byte{1}, + newETH1DataVotes[1].Eth1Data.DepositRootHash32, + ) + } +} + func TestProcessProposerSlashings_ThresholdReached(t *testing.T) { slashings := make([]*pb.ProposerSlashing, config.MaxProposerSlashings+1) registry := []*pb.ValidatorRecord{} @@ -1190,7 +1204,10 @@ func TestProcessValidatorDeposits_MerkleBranchFailsVerification(t *testing.T) { }, } beaconState := &pb.BeaconState{ - LatestDepositRootHash32: []byte{}, + LatestEth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{0}, + BlockHash32: []byte{1}, + }, } want := "merkle branch of deposit root did not verify" if _, err := ProcessValidatorDeposits( @@ -1267,11 +1284,14 @@ func TestProcessValidatorDeposits_ProcessDepositHelperFuncFails(t *testing.T) { balances := []uint64{0} root := depositTrie.Root() beaconState := &pb.BeaconState{ - ValidatorRegistry: registry, - ValidatorBalances: balances, - LatestDepositRootHash32: root[:], - Slot: currentSlot, - GenesisTime: uint64(genesisTime), + ValidatorRegistry: registry, + ValidatorBalances: balances, + LatestEth1Data: &pb.Eth1Data{ + DepositRootHash32: root[:], + BlockHash32: root[:], + }, + Slot: currentSlot, + GenesisTime: uint64(genesisTime), } want := "expected withdrawal credentials to match" if _, err := ProcessValidatorDeposits( @@ -1344,11 +1364,14 @@ func TestProcessValidatorDeposits_ProcessCorrectly(t *testing.T) { balances := []uint64{0} root := depositTrie.Root() beaconState := &pb.BeaconState{ - ValidatorRegistry: registry, - ValidatorBalances: balances, - LatestDepositRootHash32: root[:], - Slot: currentSlot, - GenesisTime: uint64(genesisTime), + ValidatorRegistry: registry, + ValidatorBalances: balances, + LatestEth1Data: &pb.Eth1Data{ + DepositRootHash32: root[:], + BlockHash32: root[:], + }, + Slot: currentSlot, + GenesisTime: uint64(genesisTime), } newState, err := ProcessValidatorDeposits( beaconState, diff --git a/beacon-chain/core/blocks/validity_conditions.go b/beacon-chain/core/blocks/validity_conditions.go index ec70b4fe3..4a7547946 100644 --- a/beacon-chain/core/blocks/validity_conditions.go +++ b/beacon-chain/core/blocks/validity_conditions.go @@ -47,7 +47,7 @@ func IsValidBlock( } if enablePOWChain { - h := common.BytesToHash(state.LatestDepositRootHash32) + h := common.BytesToHash(state.LatestEth1Data.DepositRootHash32) powBlock, err := GetPOWBlock(ctx, h) if err != nil { return fmt.Errorf("unable to retrieve POW chain reference block %v", err) @@ -57,7 +57,7 @@ func IsValidBlock( // The block pointed to by the state in state.processed_pow_receipt_root has // been processed in the ETH 1.0 chain. if powBlock == nil { - return fmt.Errorf("proof-of-Work chain reference in state does not exist %#x", state.LatestDepositRootHash32) + return fmt.Errorf("proof-of-Work chain reference in state does not exist %#x", state.LatestEth1Data.DepositRootHash32) } } diff --git a/beacon-chain/core/blocks/validity_conditions_test.go b/beacon-chain/core/blocks/validity_conditions_test.go index b2396b267..dbfa0817d 100644 --- a/beacon-chain/core/blocks/validity_conditions_test.go +++ b/beacon-chain/core/blocks/validity_conditions_test.go @@ -74,6 +74,10 @@ func TestBadBlock(t *testing.T) { block.Slot = 4 powClient.blockExists = false + beaconState.LatestEth1Data = &pb.Eth1Data{ + DepositRootHash32: []byte{2}, + BlockHash32: []byte{3}, + } if err := IsValidBlock(ctx, beaconState, block, true, db.HasBlock, powClient.BlockByHash, genesisTime); err == nil { @@ -107,9 +111,13 @@ func TestValidBlock(t *testing.T) { genesisTime := params.BeaconConfig().GenesisTime powClient.blockExists = true + beaconState.LatestEth1Data = &pb.Eth1Data{ + DepositRootHash32: []byte{2}, + BlockHash32: []byte{3}, + } + if err := IsValidBlock(ctx, beaconState, block, true, db.HasBlock, powClient.BlockByHash, genesisTime); err != nil { t.Fatal(err) } - } diff --git a/beacon-chain/core/epoch/epoch_processing.go b/beacon-chain/core/epoch/epoch_processing.go index da223b47d..875b220c6 100644 --- a/beacon-chain/core/epoch/epoch_processing.go +++ b/beacon-chain/core/epoch/epoch_processing.go @@ -25,13 +25,13 @@ func CanProcessEpoch(state *pb.BeaconState) bool { return state.Slot%config.EpochLength == 0 } -// CanProcessDepositRoots checks the eligibility to process deposit root. -// The deposit root can be processed every DEPOSIT_ROOT_VOTING_PERIOD. +// CanProcessEth1Data checks the eligibility to process the eth1 data. +// The eth1 data can be processed every ETH1_DATA_VOTING_PERIOD. // // Spec pseudocode definition: -// If state.slot % DEPOSIT_ROOT_VOTING_PERIOD == 0: -func CanProcessDepositRoots(state *pb.BeaconState) bool { - return state.Slot%config.DepositRootVotingPeriod == 0 +// If state.slot % ETH1_DATA_VOTING_PERIOD == 0: +func CanProcessEth1Data(state *pb.BeaconState) bool { + return state.Slot%config.Eth1DataVotingPeriod == 0 } // CanProcessValidatorRegistry checks the eligibility to process validator registry. @@ -61,16 +61,27 @@ func CanProcessValidatorRegistry(state *pb.BeaconState) bool { return true } -// ProcessDeposits processes deposit roots by checking its vote count. -// With sufficient votes (>2*DEPOSIT_ROOT_VOTING_PERIOD), it then -// assigns root hash to processed receipt vote in state. -func ProcessDeposits(state *pb.BeaconState) *pb.BeaconState { - for _, receiptRoot := range state.DepositRootVotes { - if receiptRoot.VoteCount*2 > config.DepositRootVotingPeriod { - state.LatestDepositRootHash32 = receiptRoot.DepositRootHash32 +// ProcessEth1Data processes eth1 block deposit roots by checking its vote count. +// With sufficient votes (>2*ETH1_DATA_VOTING_PERIOD), it then +// marks the voted Eth1 data as the latest data set. +// +// Official spec definition: +// if state.slot % ETH1_DATA_VOTING_PERIOD == 0: +// Set state.latest_eth1_data = eth1_data_vote.data +// if eth1_data_vote.vote_count * 2 > ETH1_DATA_VOTING_PERIOD for +// some eth1_data_vote in state.eth1_data_votes. +// Set state.eth1_data_votes = []. +// +func ProcessEth1Data(state *pb.BeaconState) *pb.BeaconState { + if state.Slot%config.Eth1DataVotingPeriod == 0 { + for _, eth1DataVote := range state.Eth1DataVotes { + if eth1DataVote.VoteCount*2 > config.Eth1DataVotingPeriod { + state.LatestEth1Data.DepositRootHash32 = eth1DataVote.Eth1Data.DepositRootHash32 + state.LatestEth1Data.BlockHash32 = eth1DataVote.Eth1Data.BlockHash32 + } } + state.Eth1DataVotes = make([]*pb.Eth1DataVote, 0) } - state.DepositRootVotes = make([]*pb.DepositRootVote, 0) return state } diff --git a/beacon-chain/core/epoch/epoch_processing_test.go b/beacon-chain/core/epoch/epoch_processing_test.go index fcd96bb81..3ec2e5ee6 100644 --- a/beacon-chain/core/epoch/epoch_processing_test.go +++ b/beacon-chain/core/epoch/epoch_processing_test.go @@ -51,78 +51,152 @@ func TestCanProcessEpoch(t *testing.T) { } } -func TestCanProcessReceiptRoots(t *testing.T) { - if config.DepositRootVotingPeriod != 1024 { - t.Errorf("PowReceiptRootVotingPeriod should be 1024 for these tests to pass") +func TestCanProcessEth1Data(t *testing.T) { + if config.Eth1DataVotingPeriod != 1024 { + t.Errorf("Eth1DataVotingPeriod should be 1024 for these tests to pass") } tests := []struct { - slot uint64 - canProcessReceiptRoots bool + slot uint64 + canProcessEth1Data bool }{ { - slot: 1, - canProcessReceiptRoots: false, + slot: 1, + canProcessEth1Data: false, }, { - slot: 1022, - canProcessReceiptRoots: false, + slot: 1022, + canProcessEth1Data: false, }, { - slot: 1024, - canProcessReceiptRoots: true, - }, { - slot: 4096, - canProcessReceiptRoots: true, - }, { - slot: 234234, - canProcessReceiptRoots: false, + slot: 1024, + canProcessEth1Data: true, + }, + { + slot: 4096, + canProcessEth1Data: true, + }, + { + slot: 234234, + canProcessEth1Data: false, }, } for _, tt := range tests { state := &pb.BeaconState{Slot: tt.slot} - if CanProcessDepositRoots(state) != tt.canProcessReceiptRoots { + if CanProcessEth1Data(state) != tt.canProcessEth1Data { t.Errorf( - "CanProcessReceiptRoots(%d) = %v. Wanted %v", + "CanProcessEth1Data(%d) = %v. Wanted %v", tt.slot, - CanProcessDepositRoots(state), - tt.canProcessReceiptRoots, + CanProcessEth1Data(state), + tt.canProcessEth1Data, ) } } } -func TestProcessReceipt(t *testing.T) { - if config.DepositRootVotingPeriod != 1024 { - t.Errorf("PowReceiptRootVotingPeriod should be 1024 for these tests to pass") +func TestProcessEth1Data(t *testing.T) { + if config.Eth1DataVotingPeriod != 1024 { + t.Errorf("Eth1DataVotingPeriod should be 1024 for these tests to pass") } - requiredVoteCount := config.DepositRootVotingPeriod + requiredVoteCount := config.Eth1DataVotingPeriod state := &pb.BeaconState{ - DepositRootVotes: []*pb.DepositRootVote{ - {VoteCount: 0, DepositRootHash32: []byte{'A'}}, + LatestEth1Data: &pb.Eth1Data{ + DepositRootHash32: nil, + BlockHash32: nil, + }, + Eth1DataVotes: []*pb.Eth1DataVote{ + { + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{'A'}, + BlockHash32: []byte{'B'}, + }, + VoteCount: 0, + }, // DepositRootHash32 ['B'] gets to process with sufficient vote count. - {VoteCount: requiredVoteCount/2 + 1, DepositRootHash32: []byte{'B'}}, - {VoteCount: requiredVoteCount / 2, DepositRootHash32: []byte{'C'}}, + { + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{'C'}, + BlockHash32: []byte{'D'}, + }, + VoteCount: requiredVoteCount/2 + 1, + }, + { + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{'E'}, + BlockHash32: []byte{'F'}, + }, + VoteCount: requiredVoteCount / 2, + }, }, } - newState := ProcessDeposits(state) - if !bytes.Equal(newState.LatestDepositRootHash32, []byte{'B'}) { - t.Errorf("Incorrect LatestDepositRootHash32. Wanted: %v, got: %v", - []byte{'B'}, newState.LatestDepositRootHash32) + newState := ProcessEth1Data(state) + if !bytes.Equal(newState.LatestEth1Data.DepositRootHash32, []byte{'C'}) { + t.Errorf("Incorrect DepositRootHash32. Wanted: %v, got: %v", + []byte{'C'}, newState.LatestEth1Data.DepositRootHash32) } // Adding a new receipt root ['D'] which should be the new processed receipt root. - state.DepositRootVotes = append(state.DepositRootVotes, - &pb.DepositRootVote{VoteCount: requiredVoteCount, - DepositRootHash32: []byte{'D'}}) - newState = ProcessDeposits(state) - if !bytes.Equal(newState.LatestDepositRootHash32, []byte{'D'}) { - t.Errorf("Incorrect LatestDepositRootHash32. Wanted: %v, got: %v", - []byte{'D'}, newState.LatestDepositRootHash32) + state.Eth1DataVotes = append(state.Eth1DataVotes, + &pb.Eth1DataVote{ + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{'G'}, + BlockHash32: []byte{'H'}, + }, + VoteCount: requiredVoteCount, + }, + ) + newState = ProcessEth1Data(state) + if !bytes.Equal(newState.LatestEth1Data.DepositRootHash32, []byte{'G'}) { + t.Errorf("Incorrect DepositRootHash32. Wanted: %v, got: %v", + []byte{'G'}, newState.LatestEth1Data.DepositRootHash32) } - if len(newState.DepositRootVotes) != 0 { - t.Errorf("Failed to clean up DepositRootVotes slice. Length: %d", - len(newState.DepositRootVotes)) + if len(newState.Eth1DataVotes) != 0 { + t.Errorf("Failed to clean up Eth1DataVotes slice. Length: %d", + len(newState.Eth1DataVotes)) + } +} + +func TestProcessEth1Data_InactionSlot(t *testing.T) { + if config.Eth1DataVotingPeriod != 1024 { + t.Errorf("Eth1DataVotingPeriod should be 1024 for these tests to pass") + } + requiredVoteCount := config.Eth1DataVotingPeriod + state := &pb.BeaconState{ + Slot: 4, + LatestEth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{'A'}, + BlockHash32: []byte{'B'}, + }, + Eth1DataVotes: []*pb.Eth1DataVote{ + { + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{'C'}, + BlockHash32: []byte{'D'}, + }, + VoteCount: requiredVoteCount/2 + 1, + }, + { + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{'E'}, + BlockHash32: []byte{'F'}, + }, + VoteCount: requiredVoteCount / 2, + }, + { + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{'G'}, + BlockHash32: []byte{'H'}, + }, + VoteCount: requiredVoteCount, + }, + }, + } + + // Adding a new receipt root ['D'] which should be the new processed receipt root. + newState := ProcessEth1Data(state) + if !bytes.Equal(newState.LatestEth1Data.DepositRootHash32, []byte{'A'}) { + t.Errorf("Incorrect DepositRootHash32. Wanted: %v, got: %v", + []byte{'A'}, newState.LatestEth1Data.DepositRootHash32) } } diff --git a/beacon-chain/core/state/state.go b/beacon-chain/core/state/state.go index e986f6b56..915a07341 100644 --- a/beacon-chain/core/state/state.go +++ b/beacon-chain/core/state/state.go @@ -119,9 +119,12 @@ func InitialBeaconState( LatestAttestations: []*pb.PendingAttestationRecord{}, BatchedBlockRootHash32S: [][]byte{}, - // deposit root. - LatestDepositRootHash32: processedPowReceiptRoot, - DepositRootVotes: []*pb.DepositRootVote{}, + // Eth1 data. + LatestEth1Data: &pb.Eth1Data{ + DepositRootHash32: processedPowReceiptRoot, + BlockHash32: []byte{}, + }, + Eth1DataVotes: []*pb.Eth1DataVote{}, } // Process initial deposits. diff --git a/beacon-chain/core/state/state_test.go b/beacon-chain/core/state/state_test.go index d945626f4..7f529e963 100644 --- a/beacon-chain/core/state/state_test.go +++ b/beacon-chain/core/state/state_test.go @@ -150,11 +150,11 @@ func TestInitialBeaconState_Ok(t *testing.T) { } // deposit root checks. - if !bytes.Equal(state.LatestDepositRootHash32, processedPowReceiptRoot) { - t.Error("LatestDepositRootHash32 was not correctly initialized") + if !bytes.Equal(state.LatestEth1Data.DepositRootHash32, processedPowReceiptRoot) { + t.Error("LatestEth1Data DepositRootHash32 was not correctly initialized") } - if !reflect.DeepEqual(state.DepositRootVotes, []*pb.DepositRootVote{}) { - t.Error("DepositRootVotes was not correctly initialized") + if !reflect.DeepEqual(state.Eth1DataVotes, []*pb.Eth1DataVote{}) { + t.Error("Eth1DataVotes was not correctly initialized") } } diff --git a/beacon-chain/core/state/transition.go b/beacon-chain/core/state/transition.go index 2e16b5f95..2f48afaa3 100644 --- a/beacon-chain/core/state/transition.go +++ b/beacon-chain/core/state/transition.go @@ -74,7 +74,6 @@ func ProcessBlock(state *pb.BeaconState, block *pb.BeaconBlock, verifySignatures } } var err error - state = b.ProcessDepositRoots(state, block) state, err = b.ProcessBlockRandao(state, block) if err != nil { return nil, fmt.Errorf("could not verify and process block randao: %v", err) @@ -83,6 +82,7 @@ func ProcessBlock(state *pb.BeaconState, block *pb.BeaconBlock, verifySignatures if err != nil { return nil, fmt.Errorf("could not verify block proposer slashings: %v", err) } + state = b.ProcessEth1Data(state, block) state, err = b.ProcessAttesterSlashings(state, block, verifySignatures) if err != nil { return nil, fmt.Errorf("could not verify block attester slashings: %v", err) @@ -175,9 +175,9 @@ func ProcessEpoch(state *pb.BeaconState) (*pb.BeaconState, error) { } prevHeadAttestingBalances := e.TotalBalance(state, prevHeadAttesterIndices) - // Process receipt roots. - if e.CanProcessDepositRoots(state) { - e.ProcessDeposits(state) + // Process eth1 data + if e.CanProcessEth1Data(state) { + state = e.ProcessEth1Data(state) } // Update justification. diff --git a/beacon-chain/core/state/transition_test.go b/beacon-chain/core/state/transition_test.go index 4056d3971..dcd1cfbe9 100644 --- a/beacon-chain/core/state/transition_test.go +++ b/beacon-chain/core/state/transition_test.go @@ -58,6 +58,10 @@ func TestProcessBlock_IncorrectProposerSlashing(t *testing.T) { block := &pb.BeaconBlock{ Slot: 5, RandaoRevealHash32: []byte{}, + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{2}, + BlockHash32: []byte{3}, + }, Body: &pb.BeaconBlockBody{ ProposerSlashings: slashings, }, @@ -96,6 +100,10 @@ func TestProcessBlock_IncorrectAttesterSlashing(t *testing.T) { block := &pb.BeaconBlock{ Slot: 5, RandaoRevealHash32: []byte{}, + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{2}, + BlockHash32: []byte{3}, + }, Body: &pb.BeaconBlockBody{ ProposerSlashings: slashings, AttesterSlashings: attesterSlashings, @@ -157,6 +165,10 @@ func TestProcessBlock_IncorrectProcessBlockAttestations(t *testing.T) { block := &pb.BeaconBlock{ Slot: 5, RandaoRevealHash32: []byte{}, + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{2}, + BlockHash32: []byte{3}, + }, Body: &pb.BeaconBlockBody{ ProposerSlashings: proposerSlashings, AttesterSlashings: attesterSlashings, @@ -243,6 +255,10 @@ func TestProcessBlock_IncorrectProcessExits(t *testing.T) { block := &pb.BeaconBlock{ Slot: 64, RandaoRevealHash32: []byte{}, + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{2}, + BlockHash32: []byte{3}, + }, Body: &pb.BeaconBlockBody{ ProposerSlashings: proposerSlashings, AttesterSlashings: attesterSlashings, @@ -335,6 +351,10 @@ func TestProcessBlock_PassesProcessingConditions(t *testing.T) { block := &pb.BeaconBlock{ Slot: 64, RandaoRevealHash32: []byte{}, + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{2}, + BlockHash32: []byte{3}, + }, Body: &pb.BeaconBlockBody{ ProposerSlashings: proposerSlashings, AttesterSlashings: attesterSlashings, diff --git a/beacon-chain/core/validators/validator.go b/beacon-chain/core/validators/validator.go index 8887b23e0..7946ffb25 100644 --- a/beacon-chain/core/validators/validator.go +++ b/beacon-chain/core/validators/validator.go @@ -7,6 +7,7 @@ package validators import ( "bytes" "fmt" + "github.com/gogo/protobuf/proto" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" "github.com/prysmaticlabs/prysm/shared/bytesutil" diff --git a/beacon-chain/sync/initial-sync/service_test.go b/beacon-chain/sync/initial-sync/service_test.go index f9ae1f922..b9957bd94 100644 --- a/beacon-chain/sync/initial-sync/service_test.go +++ b/beacon-chain/sync/initial-sync/service_test.go @@ -83,10 +83,13 @@ func TestSetBlockForInitialSync(t *testing.T) { genericHash[0] = 'a' block := &pb.BeaconBlock{ - DepositRootHash32: []byte{1, 2, 3}, - ParentRootHash32: genericHash, - Slot: uint64(1), - StateRootHash32: genericHash, + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{1, 2, 3}, + BlockHash32: []byte{4, 5, 6}, + }, + ParentRootHash32: genericHash, + Slot: uint64(1), + StateRootHash32: genericHash, } blockResponse := &pb.BeaconBlockResponse{Block: block} @@ -163,10 +166,13 @@ func TestSavingBlocksInSync(t *testing.T) { getBlockResponseMsg := func(Slot uint64) p2p.Message { block := &pb.BeaconBlock{ - DepositRootHash32: []byte{1, 2, 3}, - ParentRootHash32: genericHash, - Slot: Slot, - StateRootHash32: beaconStateRootHash32[:], + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{1, 2, 3}, + BlockHash32: []byte{4, 5, 6}, + }, + ParentRootHash32: genericHash, + Slot: Slot, + StateRootHash32: beaconStateRootHash32[:], } blockResponse := &pb.BeaconBlockResponse{ @@ -273,10 +279,13 @@ func TestDelayChan(t *testing.T) { beaconStateRootHash32 := hashutil.Hash(enc) block := &pb.BeaconBlock{ - DepositRootHash32: []byte{1, 2, 3}, - ParentRootHash32: genericHash, - Slot: uint64(1), - StateRootHash32: beaconStateRootHash32[:], + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{1, 2, 3}, + BlockHash32: []byte{4, 5, 6}, + }, + ParentRootHash32: genericHash, + Slot: uint64(1), + StateRootHash32: beaconStateRootHash32[:], } blockResponse := &pb.BeaconBlockResponse{ @@ -353,10 +362,13 @@ func TestRequestBlocksBySlot(t *testing.T) { getBlockResponseMsg := func(Slot uint64) (p2p.Message, [32]byte) { block := &pb.BeaconBlock{ - DepositRootHash32: []byte{1, 2, 3}, - ParentRootHash32: genericHash, - Slot: Slot, - StateRootHash32: nil, + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{1, 2, 3}, + BlockHash32: []byte{4, 5, 6}, + }, + ParentRootHash32: genericHash, + Slot: Slot, + StateRootHash32: nil, } blockResponse := &pb.BeaconBlockResponse{ diff --git a/beacon-chain/sync/regular_sync_test.go b/beacon-chain/sync/regular_sync_test.go index 256facf98..3e9fa294d 100644 --- a/beacon-chain/sync/regular_sync_test.go +++ b/beacon-chain/sync/regular_sync_test.go @@ -155,9 +155,12 @@ func TestProcessBlock(t *testing.T) { } data := &pb.BeaconBlock{ - DepositRootHash32: []byte{1, 2, 3, 4, 5}, - ParentRootHash32: parentHash[:], - Slot: 1, + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{1, 2, 3, 4, 5}, + BlockHash32: []byte{6, 7, 8, 9, 10}, + }, + ParentRootHash32: parentHash[:], + Slot: 1, } attestation := &pb.Attestation{ Data: &pb.AttestationData{ @@ -235,9 +238,12 @@ func TestProcessMultipleBlocks(t *testing.T) { } data1 := &pb.BeaconBlock{ - DepositRootHash32: []byte{1, 2, 3, 4, 5}, - ParentRootHash32: parentHash[:], - Slot: 1, + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{1, 2, 3, 4, 5}, + BlockHash32: []byte{6, 7, 8, 9, 10}, + }, + ParentRootHash32: parentHash[:], + Slot: 1, } responseBlock1 := &pb.BeaconBlockResponse{ @@ -258,9 +264,12 @@ func TestProcessMultipleBlocks(t *testing.T) { } data2 := &pb.BeaconBlock{ - DepositRootHash32: []byte{6, 7, 8, 9, 10}, - ParentRootHash32: []byte{}, - Slot: 1, + Eth1Data: &pb.Eth1Data{ + DepositRootHash32: []byte{11, 12, 13, 14, 15}, + BlockHash32: []byte{16, 17, 18, 19, 20}, + }, + ParentRootHash32: []byte{}, + Slot: 1, } responseBlock2 := &pb.BeaconBlockResponse{ diff --git a/proto/beacon/p2p/v1/types.pb.go b/proto/beacon/p2p/v1/types.pb.go index 247bcd9ce..fca897009 100755 --- a/proto/beacon/p2p/v1/types.pb.go +++ b/proto/beacon/p2p/v1/types.pb.go @@ -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_7db40fc8cc7c68ea, []int{7, 0} + return fileDescriptor_types_c5c400077180044e, []int{6, 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_7db40fc8cc7c68ea, []int{20, 0} + return fileDescriptor_types_c5c400077180044e, []int{19, 0} } type BeaconState struct { @@ -92,8 +92,8 @@ type BeaconState struct { LatestPenalizedBalances []uint64 `protobuf:"varint,3005,rep,packed,name=latest_penalized_balances,json=latestPenalizedBalances,proto3" json:"latest_penalized_balances,omitempty"` LatestAttestations []*PendingAttestationRecord `protobuf:"bytes,3006,rep,name=latest_attestations,json=latestAttestations,proto3" json:"latest_attestations,omitempty"` LatestIndexRootHash32S [][]byte `protobuf:"bytes,3007,rep,name=latest_index_root_hash32s,json=latestIndexRootHash32s,proto3" json:"latest_index_root_hash32s,omitempty"` - LatestDepositRootHash32 []byte `protobuf:"bytes,4001,opt,name=latest_deposit_root_hash32,json=latestDepositRootHash32,proto3" json:"latest_deposit_root_hash32,omitempty"` - DepositRootVotes []*DepositRootVote `protobuf:"bytes,4002,rep,name=deposit_root_votes,json=depositRootVotes,proto3" json:"deposit_root_votes,omitempty"` + LatestEth1Data *Eth1Data `protobuf:"bytes,4001,opt,name=latest_eth1_data,json=latestEth1Data,proto3" json:"latest_eth1_data,omitempty"` + Eth1DataVotes []*Eth1DataVote `protobuf:"bytes,4002,rep,name=eth1_data_votes,json=eth1DataVotes,proto3" json:"eth1_data_votes,omitempty"` GenesisTime uint64 `protobuf:"varint,5001,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` Fork *Fork `protobuf:"bytes,5002,opt,name=fork,proto3" json:"fork,omitempty"` Slot uint64 `protobuf:"varint,5003,opt,name=slot,proto3" json:"slot,omitempty"` @@ -106,7 +106,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_7db40fc8cc7c68ea, []int{0} + return fileDescriptor_types_c5c400077180044e, []int{0} } func (m *BeaconState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -282,16 +282,16 @@ func (m *BeaconState) GetLatestIndexRootHash32S() [][]byte { return nil } -func (m *BeaconState) GetLatestDepositRootHash32() []byte { +func (m *BeaconState) GetLatestEth1Data() *Eth1Data { if m != nil { - return m.LatestDepositRootHash32 + return m.LatestEth1Data } return nil } -func (m *BeaconState) GetDepositRootVotes() []*DepositRootVote { +func (m *BeaconState) GetEth1DataVotes() []*Eth1DataVote { if m != nil { - return m.DepositRootVotes + return m.Eth1DataVotes } return nil } @@ -330,7 +330,7 @@ func (m *Fork) Reset() { *m = Fork{} } func (m *Fork) String() string { return proto.CompactTextString(m) } func (*Fork) ProtoMessage() {} func (*Fork) Descriptor() ([]byte, []int) { - return fileDescriptor_types_7db40fc8cc7c68ea, []int{1} + return fileDescriptor_types_c5c400077180044e, []int{1} } func (m *Fork) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -380,61 +380,6 @@ func (m *Fork) GetSlot() uint64 { return 0 } -type DepositRootVote struct { - DepositRootHash32 []byte `protobuf:"bytes,1,opt,name=deposit_root_hash32,json=depositRootHash32,proto3" json:"deposit_root_hash32,omitempty"` - VoteCount uint64 `protobuf:"varint,2,opt,name=vote_count,json=voteCount,proto3" json:"vote_count,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -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_7db40fc8cc7c68ea, []int{2} -} -func (m *DepositRootVote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DepositRootVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DepositRootVote.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *DepositRootVote) XXX_Merge(src proto.Message) { - xxx_messageInfo_DepositRootVote.Merge(dst, src) -} -func (m *DepositRootVote) XXX_Size() int { - return m.Size() -} -func (m *DepositRootVote) XXX_DiscardUnknown() { - xxx_messageInfo_DepositRootVote.DiscardUnknown(m) -} - -var xxx_messageInfo_DepositRootVote proto.InternalMessageInfo - -func (m *DepositRootVote) GetDepositRootHash32() []byte { - if m != nil { - return m.DepositRootHash32 - } - return nil -} - -func (m *DepositRootVote) GetVoteCount() uint64 { - if m != nil { - return m.VoteCount - } - return 0 -} - type PendingAttestationRecord struct { Data *AttestationData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` ParticipationBitfield []byte `protobuf:"bytes,2,opt,name=participation_bitfield,json=participationBitfield,proto3" json:"participation_bitfield,omitempty"` @@ -449,7 +394,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_7db40fc8cc7c68ea, []int{3} + return fileDescriptor_types_c5c400077180044e, []int{2} } func (m *PendingAttestationRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -520,7 +465,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_7db40fc8cc7c68ea, []int{4} + return fileDescriptor_types_c5c400077180044e, []int{3} } func (m *Attestation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -595,7 +540,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_7db40fc8cc7c68ea, []int{5} + return fileDescriptor_types_c5c400077180044e, []int{4} } func (m *AttestationData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -692,7 +637,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_7db40fc8cc7c68ea, []int{6} + return fileDescriptor_types_c5c400077180044e, []int{5} } func (m *AttestationDataAndCustodyBit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -755,7 +700,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_7db40fc8cc7c68ea, []int{7} + return fileDescriptor_types_c5c400077180044e, []int{6} } func (m *ValidatorRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -868,7 +813,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_7db40fc8cc7c68ea, []int{8} + return fileDescriptor_types_c5c400077180044e, []int{7} } func (m *ShardReassignmentRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -930,7 +875,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_7db40fc8cc7c68ea, []int{9} + return fileDescriptor_types_c5c400077180044e, []int{8} } func (m *CrosslinkRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -978,7 +923,7 @@ type BeaconBlock struct { ParentRootHash32 []byte `protobuf:"bytes,2,opt,name=parent_root_hash32,json=parentRootHash32,proto3" json:"parent_root_hash32,omitempty"` StateRootHash32 []byte `protobuf:"bytes,3,opt,name=state_root_hash32,json=stateRootHash32,proto3" json:"state_root_hash32,omitempty"` RandaoRevealHash32 []byte `protobuf:"bytes,4,opt,name=randao_reveal_hash32,json=randaoRevealHash32,proto3" json:"randao_reveal_hash32,omitempty"` - DepositRootHash32 []byte `protobuf:"bytes,5,opt,name=deposit_root_hash32,json=depositRootHash32,proto3" json:"deposit_root_hash32,omitempty"` + Eth1Data *Eth1Data `protobuf:"bytes,5,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"` Signature [][]byte `protobuf:"bytes,6,rep,name=signature,proto3" json:"signature,omitempty"` Body *BeaconBlockBody `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -990,7 +935,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_7db40fc8cc7c68ea, []int{10} + return fileDescriptor_types_c5c400077180044e, []int{9} } func (m *BeaconBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1047,9 +992,9 @@ func (m *BeaconBlock) GetRandaoRevealHash32() []byte { return nil } -func (m *BeaconBlock) GetDepositRootHash32() []byte { +func (m *BeaconBlock) GetEth1Data() *Eth1Data { if m != nil { - return m.DepositRootHash32 + return m.Eth1Data } return nil } @@ -1083,7 +1028,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_7db40fc8cc7c68ea, []int{11} + return fileDescriptor_types_c5c400077180044e, []int{10} } func (m *BeaconBlockBody) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1162,7 +1107,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_7db40fc8cc7c68ea, []int{12} + return fileDescriptor_types_c5c400077180044e, []int{11} } func (m *DepositInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1239,7 +1184,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_7db40fc8cc7c68ea, []int{13} + return fileDescriptor_types_c5c400077180044e, []int{12} } func (m *ProposalSignedData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1303,7 +1248,7 @@ func (m *SlashableVote) Reset() { *m = SlashableVote{} } func (m *SlashableVote) String() string { return proto.CompactTextString(m) } func (*SlashableVote) ProtoMessage() {} func (*SlashableVote) Descriptor() ([]byte, []int) { - return fileDescriptor_types_7db40fc8cc7c68ea, []int{14} + return fileDescriptor_types_c5c400077180044e, []int{13} } func (m *SlashableVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1373,7 +1318,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_7db40fc8cc7c68ea, []int{15} + return fileDescriptor_types_c5c400077180044e, []int{14} } func (m *DepositData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1438,7 +1383,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_7db40fc8cc7c68ea, []int{16} + return fileDescriptor_types_c5c400077180044e, []int{15} } func (m *ProposerSlashing) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1514,7 +1459,7 @@ func (m *AttesterSlashing) Reset() { *m = AttesterSlashing{} } func (m *AttesterSlashing) String() string { return proto.CompactTextString(m) } func (*AttesterSlashing) ProtoMessage() {} func (*AttesterSlashing) Descriptor() ([]byte, []int) { - return fileDescriptor_types_7db40fc8cc7c68ea, []int{17} + return fileDescriptor_types_c5c400077180044e, []int{16} } func (m *AttesterSlashing) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1570,7 +1515,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_7db40fc8cc7c68ea, []int{18} + return fileDescriptor_types_c5c400077180044e, []int{17} } func (m *Deposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1633,7 +1578,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_7db40fc8cc7c68ea, []int{19} + return fileDescriptor_types_c5c400077180044e, []int{18} } func (m *Exit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1698,7 +1643,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_7db40fc8cc7c68ea, []int{20} + return fileDescriptor_types_c5c400077180044e, []int{19} } func (m *ValidatorRegistryDeltaBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1762,10 +1707,119 @@ func (m *ValidatorRegistryDeltaBlock) GetFlag() ValidatorRegistryDeltaBlock_Vali return ValidatorRegistryDeltaBlock_ACTIVATION } +type Eth1Data struct { + DepositRootHash32 []byte `protobuf:"bytes,1,opt,name=deposit_root_hash32,json=depositRootHash32,proto3" json:"deposit_root_hash32,omitempty"` + BlockHash32 []byte `protobuf:"bytes,2,opt,name=block_hash32,json=blockHash32,proto3" json:"block_hash32,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Eth1Data) Reset() { *m = Eth1Data{} } +func (m *Eth1Data) String() string { return proto.CompactTextString(m) } +func (*Eth1Data) ProtoMessage() {} +func (*Eth1Data) Descriptor() ([]byte, []int) { + return fileDescriptor_types_c5c400077180044e, []int{20} +} +func (m *Eth1Data) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Eth1Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Eth1Data.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Eth1Data) XXX_Merge(src proto.Message) { + xxx_messageInfo_Eth1Data.Merge(dst, src) +} +func (m *Eth1Data) XXX_Size() int { + return m.Size() +} +func (m *Eth1Data) XXX_DiscardUnknown() { + xxx_messageInfo_Eth1Data.DiscardUnknown(m) +} + +var xxx_messageInfo_Eth1Data proto.InternalMessageInfo + +func (m *Eth1Data) GetDepositRootHash32() []byte { + if m != nil { + return m.DepositRootHash32 + } + return nil +} + +func (m *Eth1Data) GetBlockHash32() []byte { + if m != nil { + return m.BlockHash32 + } + return nil +} + +type Eth1DataVote struct { + Eth1Data *Eth1Data `protobuf:"bytes,1,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"` + VoteCount uint64 `protobuf:"varint,2,opt,name=vote_count,json=voteCount,proto3" json:"vote_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Eth1DataVote) Reset() { *m = Eth1DataVote{} } +func (m *Eth1DataVote) String() string { return proto.CompactTextString(m) } +func (*Eth1DataVote) ProtoMessage() {} +func (*Eth1DataVote) Descriptor() ([]byte, []int) { + return fileDescriptor_types_c5c400077180044e, []int{21} +} +func (m *Eth1DataVote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Eth1DataVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Eth1DataVote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Eth1DataVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_Eth1DataVote.Merge(dst, src) +} +func (m *Eth1DataVote) XXX_Size() int { + return m.Size() +} +func (m *Eth1DataVote) XXX_DiscardUnknown() { + xxx_messageInfo_Eth1DataVote.DiscardUnknown(m) +} + +var xxx_messageInfo_Eth1DataVote proto.InternalMessageInfo + +func (m *Eth1DataVote) GetEth1Data() *Eth1Data { + if m != nil { + return m.Eth1Data + } + return nil +} + +func (m *Eth1DataVote) GetVoteCount() uint64 { + if m != nil { + return m.VoteCount + } + return 0 +} + func init() { proto.RegisterType((*BeaconState)(nil), "ethereum.beacon.p2p.v1.BeaconState") proto.RegisterType((*Fork)(nil), "ethereum.beacon.p2p.v1.Fork") - proto.RegisterType((*DepositRootVote)(nil), "ethereum.beacon.p2p.v1.DepositRootVote") proto.RegisterType((*PendingAttestationRecord)(nil), "ethereum.beacon.p2p.v1.PendingAttestationRecord") proto.RegisterType((*Attestation)(nil), "ethereum.beacon.p2p.v1.Attestation") proto.RegisterType((*AttestationData)(nil), "ethereum.beacon.p2p.v1.AttestationData") @@ -1784,6 +1838,8 @@ func init() { proto.RegisterType((*Deposit)(nil), "ethereum.beacon.p2p.v1.Deposit") proto.RegisterType((*Exit)(nil), "ethereum.beacon.p2p.v1.Exit") proto.RegisterType((*ValidatorRegistryDeltaBlock)(nil), "ethereum.beacon.p2p.v1.ValidatorRegistryDeltaBlock") + proto.RegisterType((*Eth1Data)(nil), "ethereum.beacon.p2p.v1.Eth1Data") + proto.RegisterType((*Eth1DataVote)(nil), "ethereum.beacon.p2p.v1.Eth1DataVote") proto.RegisterEnum("ethereum.beacon.p2p.v1.ValidatorRecord_StatusFlags", ValidatorRecord_StatusFlags_name, ValidatorRecord_StatusFlags_value) proto.RegisterEnum("ethereum.beacon.p2p.v1.ValidatorRegistryDeltaBlock_ValidatorRegistryDeltaFlags", ValidatorRegistryDeltaBlock_ValidatorRegistryDeltaFlags_name, ValidatorRegistryDeltaBlock_ValidatorRegistryDeltaFlags_value) } @@ -2013,18 +2069,22 @@ func (m *BeaconState) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], b) } } - if len(m.LatestDepositRootHash32) > 0 { + if m.LatestEth1Data != nil { dAtA[i] = 0x8a i++ dAtA[i] = 0xfa i++ dAtA[i] = 0x1 i++ - i = encodeVarintTypes(dAtA, i, uint64(len(m.LatestDepositRootHash32))) - i += copy(dAtA[i:], m.LatestDepositRootHash32) + i = encodeVarintTypes(dAtA, i, uint64(m.LatestEth1Data.Size())) + n5, err := m.LatestEth1Data.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 } - if len(m.DepositRootVotes) > 0 { - for _, msg := range m.DepositRootVotes { + if len(m.Eth1DataVotes) > 0 { + for _, msg := range m.Eth1DataVotes { dAtA[i] = 0x92 i++ dAtA[i] = 0xfa @@ -2056,11 +2116,11 @@ func (m *BeaconState) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Fork.Size())) - n5, err := m.Fork.MarshalTo(dAtA[i:]) + n6, err := m.Fork.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n5 + i += n6 } if m.Slot != 0 { dAtA[i] = 0xd8 @@ -2113,38 +2173,6 @@ func (m *Fork) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *DepositRootVote) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DepositRootVote) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DepositRootHash32) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(len(m.DepositRootHash32))) - i += copy(dAtA[i:], m.DepositRootHash32) - } - if m.VoteCount != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.VoteCount)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - func (m *PendingAttestationRecord) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2164,11 +2192,11 @@ func (m *PendingAttestationRecord) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Data.Size())) - n6, err := m.Data.MarshalTo(dAtA[i:]) + n7, err := m.Data.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n6 + i += n7 } if len(m.ParticipationBitfield) > 0 { dAtA[i] = 0x12 @@ -2212,11 +2240,11 @@ func (m *Attestation) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Data.Size())) - n7, err := m.Data.MarshalTo(dAtA[i:]) + n8, err := m.Data.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n7 + i += n8 } if len(m.ParticipationBitfield) > 0 { dAtA[i] = 0x12 @@ -2327,11 +2355,11 @@ func (m *AttestationDataAndCustodyBit) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Data.Size())) - n8, err := m.Data.MarshalTo(dAtA[i:]) + n9, err := m.Data.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n9 } if m.CustodyBit { dAtA[i] = 0x10 @@ -2531,11 +2559,15 @@ func (m *BeaconBlock) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.RandaoRevealHash32))) i += copy(dAtA[i:], m.RandaoRevealHash32) } - if len(m.DepositRootHash32) > 0 { + if m.Eth1Data != nil { dAtA[i] = 0x2a i++ - i = encodeVarintTypes(dAtA, i, uint64(len(m.DepositRootHash32))) - i += copy(dAtA[i:], m.DepositRootHash32) + i = encodeVarintTypes(dAtA, i, uint64(m.Eth1Data.Size())) + n10, err := m.Eth1Data.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 } if len(m.Signature) > 0 { for _, b := range m.Signature { @@ -2549,11 +2581,11 @@ func (m *BeaconBlock) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x3a i++ i = encodeVarintTypes(dAtA, i, uint64(m.Body.Size())) - n9, err := m.Body.MarshalTo(dAtA[i:]) + n11, err := m.Body.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n11 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -2746,21 +2778,21 @@ func (m *SlashableVote) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if len(m.ValidatorIndices) > 0 { - dAtA11 := make([]byte, len(m.ValidatorIndices)*10) - var j10 int + dAtA13 := make([]byte, len(m.ValidatorIndices)*10) + var j12 int for _, num := range m.ValidatorIndices { for num >= 1<<7 { - dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) + dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j10++ + j12++ } - dAtA11[j10] = uint8(num) - j10++ + dAtA13[j12] = uint8(num) + j12++ } dAtA[i] = 0xa i++ - i = encodeVarintTypes(dAtA, i, uint64(j10)) - i += copy(dAtA[i:], dAtA11[:j10]) + i = encodeVarintTypes(dAtA, i, uint64(j12)) + i += copy(dAtA[i:], dAtA13[:j12]) } if len(m.CustodyBitfield) > 0 { dAtA[i] = 0x12 @@ -2772,11 +2804,11 @@ func (m *SlashableVote) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintTypes(dAtA, i, uint64(m.Data.Size())) - n12, err := m.Data.MarshalTo(dAtA[i:]) + n14, err := m.Data.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n14 } if len(m.AggregateSignature) > 0 { dAtA[i] = 0x22 @@ -2809,11 +2841,11 @@ func (m *DepositData) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.DepositInput.Size())) - n13, err := m.DepositInput.MarshalTo(dAtA[i:]) + n15, err := m.DepositInput.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n15 } if m.Amount != 0 { dAtA[i] = 0x10 @@ -2855,11 +2887,11 @@ func (m *ProposerSlashing) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.ProposalData_1.Size())) - n14, err := m.ProposalData_1.MarshalTo(dAtA[i:]) + n16, err := m.ProposalData_1.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n16 } if len(m.ProposalSignature_1) > 0 { dAtA[i] = 0x1a @@ -2871,11 +2903,11 @@ func (m *ProposerSlashing) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintTypes(dAtA, i, uint64(m.ProposalData_2.Size())) - n15, err := m.ProposalData_2.MarshalTo(dAtA[i:]) + n17, err := m.ProposalData_2.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n17 } if len(m.ProposalSignature_2) > 0 { dAtA[i] = 0x2a @@ -2908,21 +2940,21 @@ func (m *AttesterSlashing) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.SlashableVote_1.Size())) - n16, err := m.SlashableVote_1.MarshalTo(dAtA[i:]) + n18, err := m.SlashableVote_1.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n18 } if m.SlashableVote_2 != nil { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.SlashableVote_2.Size())) - n17, err := m.SlashableVote_2.MarshalTo(dAtA[i:]) + n19, err := m.SlashableVote_2.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n19 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -3055,6 +3087,75 @@ func (m *ValidatorRegistryDeltaBlock) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *Eth1Data) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Eth1Data) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DepositRootHash32) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.DepositRootHash32))) + i += copy(dAtA[i:], m.DepositRootHash32) + } + if len(m.BlockHash32) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.BlockHash32))) + i += copy(dAtA[i:], m.BlockHash32) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Eth1DataVote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Eth1DataVote) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Eth1Data != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Eth1Data.Size())) + n20, err := m.Eth1Data.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + if m.VoteCount != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.VoteCount)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -3165,12 +3266,12 @@ func (m *BeaconState) Size() (n int) { n += 3 + l + sovTypes(uint64(l)) } } - l = len(m.LatestDepositRootHash32) - if l > 0 { + if m.LatestEth1Data != nil { + l = m.LatestEth1Data.Size() n += 3 + l + sovTypes(uint64(l)) } - if len(m.DepositRootVotes) > 0 { - for _, e := range m.DepositRootVotes { + if len(m.Eth1DataVotes) > 0 { + for _, e := range m.Eth1DataVotes { l = e.Size() n += 3 + l + sovTypes(uint64(l)) } @@ -3212,25 +3313,6 @@ func (m *Fork) Size() (n int) { return n } -func (m *DepositRootVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DepositRootHash32) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.VoteCount != 0 { - n += 1 + sovTypes(uint64(m.VoteCount)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - func (m *PendingAttestationRecord) Size() (n int) { if m == nil { return 0 @@ -3452,8 +3534,8 @@ func (m *BeaconBlock) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } - l = len(m.DepositRootHash32) - if l > 0 { + if m.Eth1Data != nil { + l = m.Eth1Data.Size() n += 1 + l + sovTypes(uint64(l)) } if len(m.Signature) > 0 { @@ -3748,6 +3830,45 @@ func (m *ValidatorRegistryDeltaBlock) Size() (n int) { return n } +func (m *Eth1Data) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DepositRootHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.BlockHash32) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Eth1DataVote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Eth1Data != nil { + l = m.Eth1Data.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.VoteCount != 0 { + n += 1 + sovTypes(uint64(m.VoteCount)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func sovTypes(x uint64) (n int) { for { n++ @@ -4411,38 +4532,7 @@ func (m *BeaconState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4001: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LatestDepositRootHash32", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LatestDepositRootHash32 = append(m.LatestDepositRootHash32[:0], dAtA[iNdEx:postIndex]...) - if m.LatestDepositRootHash32 == nil { - m.LatestDepositRootHash32 = []byte{} - } - iNdEx = postIndex - case 4002: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRootVotes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LatestEth1Data", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4466,8 +4556,41 @@ func (m *BeaconState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DepositRootVotes = append(m.DepositRootVotes, &DepositRootVote{}) - if err := m.DepositRootVotes[len(m.DepositRootVotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.LatestEth1Data == nil { + m.LatestEth1Data = &Eth1Data{} + } + if err := m.LatestEth1Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4002: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Eth1DataVotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Eth1DataVotes = append(m.Eth1DataVotes, &Eth1DataVote{}) + if err := m.Eth1DataVotes[len(m.Eth1DataVotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4672,107 +4795,6 @@ func (m *Fork) Unmarshal(dAtA []byte) error { } return nil } -func (m *DepositRootVote) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DepositRootVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DepositRootVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRootHash32", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DepositRootHash32 = append(m.DepositRootHash32[:0], dAtA[iNdEx:postIndex]...) - if m.DepositRootHash32 == nil { - m.DepositRootHash32 = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VoteCount", wireType) - } - m.VoteCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VoteCount |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *PendingAttestationRecord) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6111,9 +6133,9 @@ func (m *BeaconBlock) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRootHash32", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Eth1Data", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -6123,21 +6145,23 @@ func (m *BeaconBlock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.DepositRootHash32 = append(m.DepositRootHash32[:0], dAtA[iNdEx:postIndex]...) - if m.DepositRootHash32 == nil { - m.DepositRootHash32 = []byte{} + if m.Eth1Data == nil { + m.Eth1Data = &Eth1Data{} + } + if err := m.Eth1Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex case 6: @@ -7832,6 +7856,222 @@ func (m *ValidatorRegistryDeltaBlock) Unmarshal(dAtA []byte) error { } return nil } +func (m *Eth1Data) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Eth1Data: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Eth1Data: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositRootHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DepositRootHash32 = append(m.DepositRootHash32[:0], dAtA[iNdEx:postIndex]...) + if m.DepositRootHash32 == nil { + m.DepositRootHash32 = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash32", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash32 = append(m.BlockHash32[:0], dAtA[iNdEx:postIndex]...) + if m.BlockHash32 == nil { + m.BlockHash32 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Eth1DataVote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Eth1DataVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Eth1DataVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Eth1Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Eth1Data == nil { + m.Eth1Data = &Eth1Data{} + } + if err := m.Eth1Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VoteCount", wireType) + } + m.VoteCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VoteCount |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 @@ -7938,139 +8178,143 @@ var ( ) func init() { - proto.RegisterFile("proto/beacon/p2p/v1/types.proto", fileDescriptor_types_7db40fc8cc7c68ea) + proto.RegisterFile("proto/beacon/p2p/v1/types.proto", fileDescriptor_types_c5c400077180044e) } -var fileDescriptor_types_7db40fc8cc7c68ea = []byte{ - // 2080 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0x1b, 0xc9, - 0x11, 0xde, 0x21, 0x29, 0x4b, 0x2e, 0x52, 0x24, 0xd5, 0xb2, 0xc5, 0x59, 0x4b, 0x96, 0xb4, 0xe3, - 0x75, 0x24, 0x3b, 0x89, 0xb4, 0xa2, 0xb1, 0x71, 0x10, 0xe7, 0x25, 0x4a, 0x72, 0xcc, 0xc0, 0x59, - 0x1b, 0x23, 0xad, 0x9c, 0x43, 0x80, 0x49, 0x73, 0xa6, 0x45, 0x8e, 0x35, 0x9c, 0x19, 0x4c, 0x37, - 0xb5, 0x56, 0x90, 0x3f, 0x90, 0x07, 0x92, 0xdc, 0x73, 0x4a, 0x7e, 0x43, 0x0e, 0x09, 0xf2, 0x3a, - 0x05, 0xc8, 0x31, 0xcf, 0x4b, 0x80, 0x04, 0x81, 0x81, 0x00, 0x39, 0xe4, 0x7d, 0x0f, 0x10, 0xf4, - 0x63, 0x9e, 0x24, 0x65, 0xef, 0xfa, 0x92, 0x13, 0x31, 0x55, 0xdf, 0x57, 0x5d, 0x5d, 0x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0x40, 0x74, - 0x14, 0x20, 0x43, 0x7e, 0x1b, 0x5a, 0x62, 0xf9, 0x09, 0x8b, 0xce, 0x08, 0xe6, 0x15, 0xa1, 0x2e, - 0xae, 0xf9, 0x19, 0x58, 0x29, 0x76, 0x8b, 0x1c, 0xf7, 0x92, 0xe0, 0xbe, 0x5e, 0x68, 0x07, 0x19, - 0x03, 0x37, 0xc7, 0xda, 0xde, 0xec, 0xa4, 0xae, 0xf7, 0x29, 0x58, 0x4e, 0x61, 0xe3, 0x2e, 0xce, - 0x89, 0x65, 0xf4, 0x04, 0x52, 0x70, 0xd3, 0xf8, 0x2a, 0xac, 0x14, 0x0e, 0x64, 0xd7, 0x77, 0xf6, - 0x92, 0x73, 0x7e, 0xb5, 0x0c, 0x5c, 0x83, 0x6a, 0x26, 0x95, 0xc4, 0x61, 0xce, 0x99, 0x90, 0x66, - 0x91, 0xf1, 0xdd, 0x0a, 0x34, 0x0a, 0x93, 0x2c, 0x5a, 0x82, 0x4b, 0xe1, 0xa8, 0x77, 0x4a, 0xce, - 0x55, 0x99, 0x50, 0x5f, 0xa8, 0x03, 0xd7, 0xdf, 0x73, 0xd9, 0xc0, 0x89, 0xf0, 0x7b, 0xd8, 0xb3, - 0xec, 0x88, 0x38, 0xc4, 0x67, 0x2e, 0xf6, 0xe2, 0x21, 0x50, 0x65, 0xf5, 0x72, 0x0a, 0xda, 0x4b, - 0x31, 0x2a, 0xa6, 0x1f, 0x07, 0x5d, 0x8d, 0x8f, 0x7c, 0x34, 0x77, 0xd9, 0x90, 0x57, 0xba, 0x5c, - 0x06, 0x2d, 0x49, 0xfd, 0x5e, 0xa2, 0x56, 0xcc, 0x1b, 0x30, 0xaf, 0x98, 0x1e, 0x3e, 0x27, 0x11, - 0x8d, 0xaf, 0xaf, 0x14, 0x3e, 0x14, 0x32, 0x5e, 0x3e, 0xb1, 0xcd, 0xdc, 0xb3, 0xcc, 0x4c, 0x36, - 0x23, 0xcb, 0x67, 0x2a, 0x16, 0x87,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0xf0, - 0x22, 0x3c, 0xb1, 0xa8, 0x4c, 0x98, 0x7e, 0x4a, 0x13, 0xa7, 0x9f, 0x5c, 0x57, 0x96, 0x8b, 0xa4, - 0x02, 0xe3, 0x0f, 0x25, 0x58, 0x3e, 0x9e, 0xf8, 0x5f, 0xad, 0x9c, 0x51, 0x1e, 0xc0, 0x1b, 0xf1, - 0x7f, 0xae, 0xf9, 0x3f, 0x7e, 0xc7, 0xdf, 0xf2, 0xd7, 0xd5, 0x1f, 0xaf, 0x59, 0x23, 0x99, 0xe9, - 0xe0, 0xa5, 0x1d, 0x4e, 0x5b, 0x4b, 0x39, 0xd7, 0x5a, 0xe2, 0x28, 0x54, 0x32, 0x51, 0xb0, 0xa1, - 0xc2, 0x07, 0x5a, 0x91, 0x89, 0xf5, 0xf6, 0xa3, 0x97, 0x98, 0x67, 0x8b, 0x3b, 0x9c, 0xa2, 0x93, - 0xb3, 0xae, 0x30, 0x6e, 0xdc, 0x9d, 0x16, 0x22, 0x39, 0xd5, 0xd6, 0x01, 0x76, 0xf7, 0x8e, 0xba, - 0xc7, 0xbb, 0x47, 0xdd, 0x47, 0xef, 0x34, 0x5f, 0x43, 0x73, 0x50, 0x91, 0xe3, 0x6c, 0xa7, 0xf6, - 0xcb, 0xe7, 0xab, 0xda, 0xaf, 0x9e, 0xaf, 0x6a, 0x7f, 0x7e, 0xbe, 0xaa, 0xf5, 0x2e, 0x89, 0xbf, - 0xfe, 0xef, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x9c, 0x60, 0x1e, 0x52, 0x18, 0x00, 0x00, +var fileDescriptor_types_c5c400077180044e = []byte{ + // 2137 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4b, 0x73, 0x1b, 0x59, + 0xf5, 0x9f, 0x96, 0xe5, 0xd8, 0x39, 0x92, 0x25, 0xf9, 0x3a, 0xb1, 0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 0xfb, 0x85, 0xee, 0x7e, 0x43, 0x43, 0x0d, 0xa8, 0x3e, 0xed, 0xee, + 0x3f, 0xdc, 0x31, 0xb7, 0x9e, 0x6e, 0x75, 0x1e, 0xed, 0x36, 0x4a, 0x86, 0x07, 0x4d, 0x31, 0xe6, + 0x9a, 0x04, 0x53, 0x5e, 0x5d, 0x78, 0x38, 0x54, 0x92, 0xac, 0x41, 0x3d, 0x9d, 0xf0, 0x45, 0x03, + 0x57, 0xf5, 0xa3, 0x96, 0x88, 0x45, 0xd7, 0x9e, 0x52, 0x49, 0x26, 0x35, 0x97, 0x2f, 0x42, 0xbd, + 0x30, 0x50, 0x4d, 0x2c, 0x4d, 0xa7, 0x94, 0x83, 0xd2, 0xf4, 0x72, 0x60, 0xfc, 0xbc, 0x14, 0xbf, + 0x98, 0x09, 0xcd, 0x44, 0xd3, 0x1f, 0x01, 0x14, 0x62, 0xd1, 0x1a, 0xc7, 0xad, 0x36, 0xa4, 0x26, + 0x53, 0x1f, 0xee, 0xc0, 0x22, 0x8f, 0x06, 0x99, 0x50, 0x06, 0xeb, 0x42, 0x91, 0xc1, 0xbe, 0x05, + 0x17, 0x54, 0xf6, 0x46, 0xe4, 0x98, 0x60, 0x2f, 0x5f, 0xfa, 0x90, 0xd4, 0x99, 0x42, 0xa5, 0x18, + 0xef, 0xc0, 0xf9, 0x74, 0xb6, 0x99, 0x3d, 0xe3, 0x68, 0x33, 0x1f, 0x8f, 0x22, 0xe8, 0x32, 0x9c, + 0x4f, 0xfb, 0xc1, 0x39, 0x31, 0x4c, 0xa5, 0x02, 0x5e, 0x54, 0x7a, 0x81, 0x73, 0x22, 0xd2, 0xfa, + 0x94, 0xa2, 0x92, 0xf1, 0x57, 0x27, 0x70, 0x4e, 0x4c, 0x41, 0x32, 0xfe, 0x53, 0x82, 0x7a, 0x41, + 0x83, 0x3e, 0x0b, 0xd5, 0xdc, 0xa4, 0x28, 0x5f, 0x70, 0x6f, 0x9c, 0xa1, 0x5a, 0x99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, 0xde, + 0xef, 0x1e, 0x6c, 0xed, 0x77, 0x1f, 0xbf, 0xd7, 0x78, 0x03, 0xcd, 0x43, 0x59, 0x4e, 0xb7, 0xc6, + 0x97, 0x60, 0x3e, 0xf9, 0xe2, 0xb3, 0x01, 0x4b, 0x71, 0xb8, 0xc7, 0x5d, 0xb7, 0xa8, 0x54, 0x19, + 0x77, 0x5d, 0x87, 0xaa, 0x6c, 0x0f, 0xb9, 0x89, 0xb0, 0x22, 0x64, 0xaa, 0x2b, 0x78, 0x50, 0xcd, + 0x7e, 0x14, 0xca, 0x8f, 0x6f, 0xda, 0x2b, 0x8f, 0x6f, 0x57, 0x00, 0xc4, 0x1d, 0xb2, 0x33, 0x55, + 0xf3, 0x3c, 0x97, 0x6c, 0x73, 0x41, 0xa7, 0xfa, 0x8b, 0x17, 0x57, 0xb5, 0x5f, 0xbe, 0xb8, 0xaa, + 0xfd, 0xe9, 0xc5, 0x55, 0xad, 0x77, 0x4e, 0xfc, 0xf5, 0x70, 0xf7, 0xbf, 0x01, 0x00, 0x00, 0xff, + 0xff, 0xa8, 0x6f, 0x56, 0x23, 0xd2, 0x18, 0x00, 0x00, } diff --git a/proto/beacon/p2p/v1/types.proto b/proto/beacon/p2p/v1/types.proto index 26d236e6a..a440cc22e 100644 --- a/proto/beacon/p2p/v1/types.proto +++ b/proto/beacon/p2p/v1/types.proto @@ -5,7 +5,7 @@ package ethereum.beacon.p2p.v1; import "proto/common/messages.proto"; message BeaconState { - // Validator registry [1-1000] + // Validator registry [1-1000] repeated ValidatorRecord validator_registry = 1; uint64 validator_registry_update_slot = 2; bytes validator_registry_delta_chain_tip_hash32 = 3; @@ -20,7 +20,7 @@ message BeaconState { bytes previous_epoch_seed_hash32 = 1009; bytes current_epoch_seed_hash32 = 1010; - // Finality [2001-3000] + // Finality [2001-3000] uint64 previous_justified_slot = 2001; uint64 justified_slot = 2002; uint64 justification_bitfield = 2003; @@ -34,9 +34,9 @@ message BeaconState { repeated PendingAttestationRecord latest_attestations = 3006; repeated bytes latest_index_root_hash32s = 3007; - // Ethereum 1.0 deposit root [4001-5000] - bytes latest_deposit_root_hash32 = 4001; - repeated DepositRootVote deposit_root_votes = 4002; + // Ethereum 1.0 chain data [4001-5000] + Eth1Data latest_eth1_data = 4001; + repeated Eth1DataVote eth1_data_votes = 4002; // Miscellaneous [5001-6000] uint64 genesis_time = 5001; @@ -50,11 +50,6 @@ message Fork { uint64 slot = 3; } -message DepositRootVote { - bytes deposit_root_hash32 = 1; - uint64 vote_count = 2; -} - message PendingAttestationRecord { AttestationData data = 1; bytes participation_bitfield = 2; @@ -126,7 +121,7 @@ message BeaconBlock { bytes parent_root_hash32 = 2; bytes state_root_hash32 = 3; bytes randao_reveal_hash32 = 4; - bytes deposit_root_hash32 = 5; + Eth1Data eth1_data = 5; repeated bytes signature = 6; // Type of [uint384]? // Block Body @@ -205,3 +200,13 @@ message ValidatorRegistryDeltaBlock { } ValidatorRegistryDeltaFlags flag = 5; } + +message Eth1Data { + bytes deposit_root_hash32 = 1; + bytes block_hash32 = 2; +} + +message Eth1DataVote { + Eth1Data eth1_data = 1; + uint64 vote_count = 2; +} diff --git a/shared/params/config.go b/shared/params/config.go index 327277ce6..617d4f469 100644 --- a/shared/params/config.go +++ b/shared/params/config.go @@ -50,7 +50,7 @@ type BeaconChainConfig struct { EpochLength uint64 // EpochLength is the number of slots in an epoch. SeedLookahead uint64 // SeedLookahead is the duration of randao look ahead seed. EntryExitDelay uint64 // EntryExitDelay is the duration a validator has to wait for entry and exit. - DepositRootVotingPeriod uint64 // DepositRootVotingPeriod defines how often the merkle root of deposit receipts get updated in beacon node. + Eth1DataVotingPeriod uint64 // Eth1DataVotingPeriod defines how often the merkle root of deposit receipts get updated in beacon node. MinValidatorWithdrawalTime uint64 // MinValidatorWithdrawalTime is the shortest amount of time a validator can get the deposit out. FarFutureSlot uint64 // FarFutureSlot represents a slot extremely far away in the future used as the default penalization slot for validators. @@ -122,7 +122,7 @@ var defaultBeaconConfig = &BeaconChainConfig{ EpochLength: 64, SeedLookahead: 64, EntryExitDelay: 256, - DepositRootVotingPeriod: 1024, + Eth1DataVotingPeriod: 1024, // Reward and penalty quotients constants. BaseRewardQuotient: 32, @@ -178,7 +178,7 @@ var demoBeaconConfig = &BeaconChainConfig{ EpochLength: defaultBeaconConfig.EpochLength, SeedLookahead: defaultBeaconConfig.SeedLookahead, EntryExitDelay: defaultBeaconConfig.EntryExitDelay, - DepositRootVotingPeriod: defaultBeaconConfig.DepositRootVotingPeriod, + Eth1DataVotingPeriod: defaultBeaconConfig.Eth1DataVotingPeriod, // Reward and penalty quotients constants. BaseRewardQuotient: defaultBeaconConfig.BaseRewardQuotient,