mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 13:28:01 -05:00
Refactor Proto Struct to Be More Semantic (#381)
This commit is contained in:
@@ -61,7 +61,7 @@ func NewBeaconChain(db ethdb.Database) (*BeaconChain, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
activeData := &pb.ActiveStateResponse{}
|
||||
activeData := &pb.ActiveState{}
|
||||
err = proto.Unmarshal(enc, activeData)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -73,7 +73,7 @@ func NewBeaconChain(db ethdb.Database) (*BeaconChain, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
crystallizedData := &pb.CrystallizedStateResponse{}
|
||||
crystallizedData := &pb.CrystallizedState{}
|
||||
err = proto.Unmarshal(enc, crystallizedData)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -212,7 +212,7 @@ func (b *BeaconChain) computeNewActiveState(seed common.Hash) (*types.ActiveStat
|
||||
|
||||
// TODO: Verify randao reveal from validator's hash pre image.
|
||||
|
||||
return types.NewActiveState(&pb.ActiveStateResponse{
|
||||
return types.NewActiveState(&pb.ActiveState{
|
||||
TotalAttesterDeposits: 0,
|
||||
AttesterBitfield: []byte{},
|
||||
}), nil
|
||||
|
||||
@@ -70,7 +70,7 @@ func TestMutateActiveState(t *testing.T) {
|
||||
beaconChain, db := startInMemoryBeaconChain(t)
|
||||
defer db.Close()
|
||||
|
||||
data := &pb.ActiveStateResponse{
|
||||
data := &pb.ActiveState{
|
||||
TotalAttesterDeposits: 4096,
|
||||
AttesterBitfield: []byte{'A', 'B', 'C'},
|
||||
}
|
||||
@@ -102,7 +102,7 @@ func TestMutateCrystallizedState(t *testing.T) {
|
||||
beaconChain, db := startInMemoryBeaconChain(t)
|
||||
defer db.Close()
|
||||
|
||||
data := &pb.CrystallizedStateResponse{
|
||||
data := &pb.CrystallizedState{
|
||||
CurrentDynasty: 3,
|
||||
CurrentCheckPoint: []byte("checkpoint"),
|
||||
}
|
||||
@@ -168,7 +168,7 @@ func TestCanProcessBlock(t *testing.T) {
|
||||
defer db.Close()
|
||||
|
||||
// Initialize a parent block
|
||||
parentBlock := NewBlock(t, &pb.BeaconBlockResponse{
|
||||
parentBlock := NewBlock(t, &pb.BeaconBlock{
|
||||
SlotNumber: 1,
|
||||
})
|
||||
parentHash, err := parentBlock.Hash()
|
||||
@@ -180,7 +180,7 @@ func TestCanProcessBlock(t *testing.T) {
|
||||
}
|
||||
|
||||
// Using a faulty fetcher should throw an error.
|
||||
block := NewBlock(t, &pb.BeaconBlockResponse{
|
||||
block := NewBlock(t, &pb.BeaconBlock{
|
||||
SlotNumber: 2,
|
||||
})
|
||||
if _, err := beaconChain.CanProcessBlock(&faultyFetcher{}, block); err == nil {
|
||||
@@ -188,21 +188,21 @@ func TestCanProcessBlock(t *testing.T) {
|
||||
}
|
||||
|
||||
// Initialize initial state
|
||||
activeState := types.NewActiveState(&pb.ActiveStateResponse{TotalAttesterDeposits: 10000})
|
||||
activeState := types.NewActiveState(&pb.ActiveState{TotalAttesterDeposits: 10000})
|
||||
beaconChain.state.ActiveState = activeState
|
||||
activeHash, err := activeState.Hash()
|
||||
if err != nil {
|
||||
t.Fatalf("Cannot hash active state: %v", err)
|
||||
}
|
||||
|
||||
crystallized := types.NewCrystallizedState(&pb.CrystallizedStateResponse{CurrentEpoch: 5})
|
||||
crystallized := types.NewCrystallizedState(&pb.CrystallizedState{CurrentEpoch: 5})
|
||||
beaconChain.state.CrystallizedState = crystallized
|
||||
crystallizedHash, err := crystallized.Hash()
|
||||
if err != nil {
|
||||
t.Fatalf("Compute crystallized state hash failed: %v", err)
|
||||
}
|
||||
|
||||
block = NewBlock(t, &pb.BeaconBlockResponse{
|
||||
block = NewBlock(t, &pb.BeaconBlock{
|
||||
SlotNumber: 2,
|
||||
ActiveStateHash: activeHash[:],
|
||||
CrystallizedStateHash: crystallizedHash[:],
|
||||
@@ -219,7 +219,7 @@ func TestCanProcessBlock(t *testing.T) {
|
||||
}
|
||||
|
||||
// Test timestamp validity condition
|
||||
block = NewBlock(t, &pb.BeaconBlockResponse{
|
||||
block = NewBlock(t, &pb.BeaconBlock{
|
||||
SlotNumber: 1000000,
|
||||
ActiveStateHash: activeHash[:],
|
||||
CrystallizedStateHash: crystallizedHash[:],
|
||||
@@ -249,18 +249,18 @@ func TestProcessBlockWithBadHashes(t *testing.T) {
|
||||
}
|
||||
|
||||
// Initialize state
|
||||
active := types.NewActiveState(&pb.ActiveStateResponse{TotalAttesterDeposits: 10000})
|
||||
active := types.NewActiveState(&pb.ActiveState{TotalAttesterDeposits: 10000})
|
||||
activeStateHash, err := active.Hash()
|
||||
if err != nil {
|
||||
t.Fatalf("Cannot hash active state: %v", err)
|
||||
}
|
||||
crystallized := types.NewCrystallizedState(&pb.CrystallizedStateResponse{CurrentEpoch: 10000})
|
||||
crystallized := types.NewCrystallizedState(&pb.CrystallizedState{CurrentEpoch: 10000})
|
||||
crystallizedStateHash, err := crystallized.Hash()
|
||||
if err != nil {
|
||||
t.Fatalf("Cannot hash crystallized state: %v", err)
|
||||
}
|
||||
|
||||
block := NewBlock(t, &pb.BeaconBlockResponse{
|
||||
block := NewBlock(t, &pb.BeaconBlock{
|
||||
SlotNumber: 1,
|
||||
ActiveStateHash: activeStateHash[:],
|
||||
CrystallizedStateHash: crystallizedStateHash[:],
|
||||
@@ -268,7 +268,7 @@ func TestProcessBlockWithBadHashes(t *testing.T) {
|
||||
})
|
||||
|
||||
// Test negative scenario where active state hash is different than node's compute
|
||||
beaconChain.state.ActiveState = types.NewActiveState(&pb.ActiveStateResponse{TotalAttesterDeposits: 9999})
|
||||
beaconChain.state.ActiveState = types.NewActiveState(&pb.ActiveState{TotalAttesterDeposits: 9999})
|
||||
|
||||
canProcess, err := beaconChain.CanProcessBlock(&mockFetcher{}, block)
|
||||
if err == nil {
|
||||
@@ -279,7 +279,7 @@ func TestProcessBlockWithBadHashes(t *testing.T) {
|
||||
}
|
||||
|
||||
// Test negative scenario where crystallized state hash is different than node's compute
|
||||
beaconChain.state.CrystallizedState = types.NewCrystallizedState(&pb.CrystallizedStateResponse{CurrentEpoch: 9999})
|
||||
beaconChain.state.CrystallizedState = types.NewCrystallizedState(&pb.CrystallizedState{CurrentEpoch: 9999})
|
||||
|
||||
canProcess, err = beaconChain.CanProcessBlock(&mockFetcher{}, block)
|
||||
if err == nil {
|
||||
@@ -295,14 +295,14 @@ func TestProcessBlockWithInvalidParent(t *testing.T) {
|
||||
defer db.Close()
|
||||
|
||||
// If parent hash is non-existent, processing block should fail.
|
||||
active := types.NewActiveState(&pb.ActiveStateResponse{TotalAttesterDeposits: 10000})
|
||||
active := types.NewActiveState(&pb.ActiveState{TotalAttesterDeposits: 10000})
|
||||
activeStateHash, err := active.Hash()
|
||||
if err != nil {
|
||||
t.Fatalf("Cannot hash active state: %v", err)
|
||||
}
|
||||
beaconChain.state.ActiveState = active
|
||||
|
||||
crystallized := types.NewCrystallizedState(&pb.CrystallizedStateResponse{CurrentEpoch: 10000})
|
||||
crystallized := types.NewCrystallizedState(&pb.CrystallizedState{CurrentEpoch: 10000})
|
||||
crystallizedStateHash, err := crystallized.Hash()
|
||||
if err != nil {
|
||||
t.Fatalf("Cannot hash crystallized state: %v", err)
|
||||
@@ -310,7 +310,7 @@ func TestProcessBlockWithInvalidParent(t *testing.T) {
|
||||
beaconChain.state.CrystallizedState = crystallized
|
||||
|
||||
// Test that block processing is invalid without a parent hash
|
||||
block := NewBlock(t, &pb.BeaconBlockResponse{
|
||||
block := NewBlock(t, &pb.BeaconBlock{
|
||||
SlotNumber: 2,
|
||||
ActiveStateHash: activeStateHash[:],
|
||||
CrystallizedStateHash: crystallizedStateHash[:],
|
||||
@@ -320,14 +320,14 @@ func TestProcessBlockWithInvalidParent(t *testing.T) {
|
||||
}
|
||||
|
||||
// If parent hash is not stored in db, processing block should fail.
|
||||
parentBlock := NewBlock(t, &pb.BeaconBlockResponse{
|
||||
parentBlock := NewBlock(t, &pb.BeaconBlock{
|
||||
SlotNumber: 1,
|
||||
})
|
||||
parentHash, err := parentBlock.Hash()
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to compute parent block's hash: %v", err)
|
||||
}
|
||||
block = NewBlock(t, &pb.BeaconBlockResponse{
|
||||
block = NewBlock(t, &pb.BeaconBlock{
|
||||
SlotNumber: 2,
|
||||
ActiveStateHash: activeStateHash[:],
|
||||
CrystallizedStateHash: crystallizedStateHash[:],
|
||||
@@ -422,7 +422,7 @@ func TestIsEpochTransition(t *testing.T) {
|
||||
beaconChain, db := startInMemoryBeaconChain(t)
|
||||
defer db.Close()
|
||||
|
||||
if err := beaconChain.MutateCrystallizedState(types.NewCrystallizedState(&pb.CrystallizedStateResponse{CurrentEpoch: 1})); err != nil {
|
||||
if err := beaconChain.MutateCrystallizedState(types.NewCrystallizedState(&pb.CrystallizedState{CurrentEpoch: 1})); err != nil {
|
||||
t.Fatalf("unable to mutate crystallizedstate: %v", err)
|
||||
}
|
||||
if !beaconChain.IsEpochTransition(128) {
|
||||
@@ -483,7 +483,7 @@ func TestResetAttesterBitfields(t *testing.T) {
|
||||
beaconChain.CrystallizedState().UpdateActiveValidators(validators)
|
||||
|
||||
testAttesterBitfield := []byte{2, 4, 6, 9}
|
||||
if err := beaconChain.MutateActiveState(types.NewActiveState(&pb.ActiveStateResponse{AttesterBitfield: testAttesterBitfield})); err != nil {
|
||||
if err := beaconChain.MutateActiveState(types.NewActiveState(&pb.ActiveState{AttesterBitfield: testAttesterBitfield})); err != nil {
|
||||
t.Fatal("unable to mutate active state")
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ func TestResetTotalAttesterDeposit(t *testing.T) {
|
||||
beaconChain, db := startInMemoryBeaconChain(t)
|
||||
defer db.Close()
|
||||
|
||||
active := types.NewActiveState(&pb.ActiveStateResponse{TotalAttesterDeposits: 10000})
|
||||
active := types.NewActiveState(&pb.ActiveState{TotalAttesterDeposits: 10000})
|
||||
if err := beaconChain.MutateActiveState(active); err != nil {
|
||||
t.Fatalf("unable to Mutate Active state: %v", err)
|
||||
}
|
||||
@@ -522,7 +522,7 @@ func TestUpdateJustifiedEpoch(t *testing.T) {
|
||||
beaconChain, db := startInMemoryBeaconChain(t)
|
||||
defer db.Close()
|
||||
|
||||
data := &pb.CrystallizedStateResponse{CurrentEpoch: 5, LastJustifiedEpoch: 4, LastFinalizedEpoch: 3}
|
||||
data := &pb.CrystallizedState{CurrentEpoch: 5, LastJustifiedEpoch: 4, LastFinalizedEpoch: 3}
|
||||
beaconChain.MutateCrystallizedState(types.NewCrystallizedState(data))
|
||||
|
||||
if beaconChain.state.CrystallizedState.LastFinalizedEpoch() != uint64(3) ||
|
||||
@@ -540,7 +540,7 @@ func TestUpdateJustifiedEpoch(t *testing.T) {
|
||||
t.Fatalf("unable to update last finalized epoch: %d", beaconChain.state.CrystallizedState.LastFinalizedEpoch())
|
||||
}
|
||||
|
||||
data = &pb.CrystallizedStateResponse{CurrentEpoch: 8, LastJustifiedEpoch: 4, LastFinalizedEpoch: 3}
|
||||
data = &pb.CrystallizedState{CurrentEpoch: 8, LastJustifiedEpoch: 4, LastFinalizedEpoch: 3}
|
||||
beaconChain.MutateCrystallizedState(types.NewCrystallizedState(data))
|
||||
|
||||
if beaconChain.state.CrystallizedState.LastFinalizedEpoch() != uint64(3) ||
|
||||
@@ -569,7 +569,7 @@ func TestComputeValidatorRewardsAndPenalties(t *testing.T) {
|
||||
validators = append(validators, validator)
|
||||
}
|
||||
|
||||
data := &pb.CrystallizedStateResponse{
|
||||
data := &pb.CrystallizedState{
|
||||
ActiveValidators: validators,
|
||||
CurrentCheckPoint: []byte("checkpoint"),
|
||||
TotalDeposits: 40000,
|
||||
@@ -583,8 +583,8 @@ func TestComputeValidatorRewardsAndPenalties(t *testing.T) {
|
||||
|
||||
//Binary representation of bitfield: 11001000 10010100 10010010 10110011 00110001
|
||||
testAttesterBitfield := []byte{200, 148, 146, 179, 49}
|
||||
types.NewActiveState(&pb.ActiveStateResponse{AttesterBitfield: testAttesterBitfield})
|
||||
ActiveState := types.NewActiveState(&pb.ActiveStateResponse{TotalAttesterDeposits: 40000, AttesterBitfield: testAttesterBitfield})
|
||||
types.NewActiveState(&pb.ActiveState{AttesterBitfield: testAttesterBitfield})
|
||||
ActiveState := types.NewActiveState(&pb.ActiveState{TotalAttesterDeposits: 40000, AttesterBitfield: testAttesterBitfield})
|
||||
if err := beaconChain.MutateActiveState(ActiveState); err != nil {
|
||||
t.Fatalf("unable to Mutate Active state: %v", err)
|
||||
}
|
||||
@@ -616,9 +616,9 @@ func TestComputeValidatorRewardsAndPenalties(t *testing.T) {
|
||||
|
||||
// NewBlock is a helper method to create blocks with valid defaults.
|
||||
// For a generic block, use NewBlock(t, nil)
|
||||
func NewBlock(t *testing.T, b *pb.BeaconBlockResponse) *types.Block {
|
||||
func NewBlock(t *testing.T, b *pb.BeaconBlock) *types.Block {
|
||||
if b == nil {
|
||||
b = &pb.BeaconBlockResponse{}
|
||||
b = &pb.BeaconBlock{}
|
||||
}
|
||||
if b.ActiveStateHash == nil {
|
||||
b.ActiveStateHash = make([]byte, 32)
|
||||
|
||||
@@ -111,7 +111,7 @@ func (sim *Simulator) run(delayChan <-chan time.Time, done <-chan struct{}) {
|
||||
log.Errorf("Could not fetch crystallized state hash: %v", err)
|
||||
}
|
||||
|
||||
block, err := types.NewBlock(&pb.BeaconBlockResponse{
|
||||
block, err := types.NewBlock(&pb.BeaconBlock{
|
||||
SlotNumber: sim.slotNum,
|
||||
Timestamp: ptypes.TimestampNow(),
|
||||
MainChainRef: sim.web3Service.LatestBlockHash().Bytes(),
|
||||
|
||||
@@ -34,11 +34,11 @@ func (mpow *mockPOWChainService) LatestBlockHash() common.Hash {
|
||||
type mockChainService struct{}
|
||||
|
||||
func (mc *mockChainService) CurrentActiveState() *types.ActiveState {
|
||||
return types.NewActiveState(&pb.ActiveStateResponse{})
|
||||
return types.NewActiveState(&pb.ActiveState{})
|
||||
}
|
||||
|
||||
func (mc *mockChainService) CurrentCrystallizedState() *types.CrystallizedState {
|
||||
return types.NewCrystallizedState(&pb.CrystallizedStateResponse{})
|
||||
return types.NewCrystallizedState(&pb.CrystallizedState{})
|
||||
}
|
||||
|
||||
func TestLifecycle(t *testing.T) {
|
||||
@@ -84,7 +84,7 @@ func TestBroadcastBlockHash(t *testing.T) {
|
||||
hook.Reset()
|
||||
}
|
||||
|
||||
func TestBlockRequestResponse(t *testing.T) {
|
||||
func TestBlockRequest(t *testing.T) {
|
||||
hook := logTest.NewGlobal()
|
||||
cfg := &Config{Delay: time.Second, BlockRequestBuf: 0}
|
||||
sim := NewSimulator(context.Background(), cfg, &mockP2P{}, &mockPOWChainService{}, &mockChainService{})
|
||||
@@ -98,7 +98,7 @@ func TestBlockRequestResponse(t *testing.T) {
|
||||
<-exitRoutine
|
||||
}()
|
||||
|
||||
block, err := types.NewBlock(&pb.BeaconBlockResponse{ParentHash: make([]byte, 32)})
|
||||
block, err := types.NewBlock(&pb.BeaconBlock{ParentHash: make([]byte, 32)})
|
||||
if err != nil {
|
||||
t.Fatalf("Could not instantiate new block from proto: %v", err)
|
||||
}
|
||||
@@ -154,7 +154,7 @@ func TestBroadcastCrystallizedHash(t *testing.T) {
|
||||
hook.Reset()
|
||||
}
|
||||
|
||||
func TestCrystallizedRequestResponse(t *testing.T) {
|
||||
func TestCrystallizedRequest(t *testing.T) {
|
||||
hook := logTest.NewGlobal()
|
||||
cfg := &Config{Delay: time.Second, BlockRequestBuf: 0}
|
||||
sim := NewSimulator(context.Background(), cfg, &mockP2P{}, &mockPOWChainService{}, &mockChainService{})
|
||||
@@ -168,7 +168,7 @@ func TestCrystallizedRequestResponse(t *testing.T) {
|
||||
<-exitRoutine
|
||||
}()
|
||||
|
||||
state := types.NewCrystallizedState(&pb.CrystallizedStateResponse{CurrentEpoch: 99})
|
||||
state := types.NewCrystallizedState(&pb.CrystallizedState{CurrentEpoch: 99})
|
||||
|
||||
h, err := state.Hash()
|
||||
if err != nil {
|
||||
|
||||
@@ -106,7 +106,7 @@ func (ss *Service) ReceiveBlockHash(data *pb.BeaconBlockHashAnnounce, peer p2p.P
|
||||
|
||||
// ReceiveBlock accepts a block to potentially be included in the local chain.
|
||||
// The service will filter blocks that have not been requested (unimplemented).
|
||||
func (ss *Service) ReceiveBlock(data *pb.BeaconBlockResponse) error {
|
||||
func (ss *Service) ReceiveBlock(data *pb.BeaconBlock) error {
|
||||
block, err := types.NewBlock(data)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not instantiate new block from proto: %v", err)
|
||||
@@ -142,7 +142,7 @@ func (ss *Service) ReceiveCrystallizedStateHash(data *pb.CrystallizedStateHashAn
|
||||
|
||||
// ReceiveCrystallizedState accepts a crystallized state object to potentially be included in the local chain.
|
||||
// The service will filter crystallized state objects that have not been requested (unimplemented).
|
||||
func (ss *Service) ReceiveCrystallizedState(data *pb.CrystallizedStateResponse) error {
|
||||
func (ss *Service) ReceiveCrystallizedState(data *pb.CrystallizedState) error {
|
||||
state := types.NewCrystallizedState(data)
|
||||
|
||||
h, err := state.Hash()
|
||||
@@ -178,7 +178,7 @@ func (ss *Service) ReceiveActiveStateHash(data *pb.ActiveStateHashAnnounce, peer
|
||||
|
||||
// ReceiveActiveState accepts a active state object to potentially be included in the local chain.
|
||||
// The service will filter active state objects that have not been requested (unimplemented).
|
||||
func (ss *Service) ReceiveActiveState(data *pb.ActiveStateResponse) error {
|
||||
func (ss *Service) ReceiveActiveState(data *pb.ActiveState) error {
|
||||
state := types.NewActiveState(data)
|
||||
|
||||
h, err := state.Hash()
|
||||
@@ -226,13 +226,13 @@ func (ss *Service) run(done <-chan struct{}) {
|
||||
}
|
||||
ss.ReceiveBlockHash(data, msg.Peer)
|
||||
case msg := <-ss.blockBuf:
|
||||
data, ok := msg.Data.(*pb.BeaconBlockResponse)
|
||||
response, ok := msg.Data.(*pb.BeaconBlockResponse)
|
||||
// TODO: Handle this at p2p layer.
|
||||
if !ok {
|
||||
log.Errorf("Received malformed beacon block p2p message")
|
||||
continue
|
||||
}
|
||||
if err := ss.ReceiveBlock(data); err != nil {
|
||||
if err := ss.ReceiveBlock(response.Block); err != nil {
|
||||
log.Errorf("Could not receive block: %v", err)
|
||||
}
|
||||
case msg := <-ss.announceCrystallizedHashBuf:
|
||||
@@ -244,13 +244,13 @@ func (ss *Service) run(done <-chan struct{}) {
|
||||
}
|
||||
ss.ReceiveCrystallizedStateHash(data, msg.Peer)
|
||||
case msg := <-ss.crystallizedStateBuf:
|
||||
data, ok := msg.Data.(*pb.CrystallizedStateResponse)
|
||||
response, ok := msg.Data.(*pb.CrystallizedStateResponse)
|
||||
// TODO: Handle this at p2p layer.
|
||||
if !ok {
|
||||
log.Errorf("Received malformed crystallized state p2p message")
|
||||
continue
|
||||
}
|
||||
if err := ss.ReceiveCrystallizedState(data); err != nil {
|
||||
if err := ss.ReceiveCrystallizedState(response.CrystallizedState); err != nil {
|
||||
log.Errorf("Could not receive crystallized state: %v", err)
|
||||
}
|
||||
case msg := <-ss.announceActiveHashBuf:
|
||||
@@ -262,13 +262,13 @@ func (ss *Service) run(done <-chan struct{}) {
|
||||
}
|
||||
ss.ReceiveActiveStateHash(data, msg.Peer)
|
||||
case msg := <-ss.activeStateBuf:
|
||||
data, ok := msg.Data.(*pb.ActiveStateResponse)
|
||||
response, ok := msg.Data.(*pb.ActiveStateResponse)
|
||||
// TODO: Handle this at p2p layer.
|
||||
if !ok {
|
||||
log.Errorf("Received malformed active state p2p message")
|
||||
continue
|
||||
}
|
||||
if err := ss.ReceiveActiveState(data); err != nil {
|
||||
if err := ss.ReceiveActiveState(response.ActiveState); err != nil {
|
||||
log.Errorf("Could not receive active state: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,21 +155,25 @@ func TestProcessBlock(t *testing.T) {
|
||||
exitRoutine <- true
|
||||
}()
|
||||
|
||||
blockResponse := &pb.BeaconBlockResponse{
|
||||
data := &pb.BeaconBlock{
|
||||
MainChainRef: []byte{1, 2, 3, 4, 5},
|
||||
ParentHash: make([]byte, 32),
|
||||
}
|
||||
|
||||
responseBlock := &pb.BeaconBlockResponse{
|
||||
Block: data,
|
||||
}
|
||||
|
||||
msg := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: blockResponse,
|
||||
Data: responseBlock,
|
||||
}
|
||||
|
||||
ss.blockBuf <- msg
|
||||
ss.cancel()
|
||||
<-exitRoutine
|
||||
|
||||
block, err := types.NewBlock(blockResponse)
|
||||
block, err := types.NewBlock(data)
|
||||
if err != nil {
|
||||
t.Fatalf("Could not instantiate new block from proto: %v", err)
|
||||
}
|
||||
@@ -198,24 +202,32 @@ func TestProcessMultipleBlocks(t *testing.T) {
|
||||
exitRoutine <- true
|
||||
}()
|
||||
|
||||
blockResponse1 := &pb.BeaconBlockResponse{
|
||||
data1 := &pb.BeaconBlock{
|
||||
MainChainRef: []byte{1, 2, 3, 4, 5},
|
||||
ParentHash: make([]byte, 32),
|
||||
}
|
||||
|
||||
msg1 := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: blockResponse1,
|
||||
responseBlock1 := &pb.BeaconBlockResponse{
|
||||
Block: data1,
|
||||
}
|
||||
|
||||
blockResponse2 := &pb.BeaconBlockResponse{
|
||||
msg1 := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: responseBlock1,
|
||||
}
|
||||
|
||||
data2 := &pb.BeaconBlock{
|
||||
MainChainRef: []byte{6, 7, 8, 9, 10},
|
||||
ParentHash: make([]byte, 32),
|
||||
}
|
||||
|
||||
responseBlock2 := &pb.BeaconBlockResponse{
|
||||
Block: data2,
|
||||
}
|
||||
|
||||
msg2 := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: blockResponse2,
|
||||
Data: responseBlock2,
|
||||
}
|
||||
|
||||
ss.blockBuf <- msg1
|
||||
@@ -223,7 +235,7 @@ func TestProcessMultipleBlocks(t *testing.T) {
|
||||
ss.cancel()
|
||||
<-exitRoutine
|
||||
|
||||
block1, err := types.NewBlock(blockResponse1)
|
||||
block1, err := types.NewBlock(data1)
|
||||
if err != nil {
|
||||
t.Fatalf("Could not instantiate new block from proto: %v", err)
|
||||
}
|
||||
@@ -232,7 +244,7 @@ func TestProcessMultipleBlocks(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
block2, err := types.NewBlock(blockResponse2)
|
||||
block2, err := types.NewBlock(data2)
|
||||
if err != nil {
|
||||
t.Fatalf("Could not instantiate new block from proto: %v", err)
|
||||
}
|
||||
@@ -266,21 +278,25 @@ func TestProcessSameBlock(t *testing.T) {
|
||||
exitRoutine <- true
|
||||
}()
|
||||
|
||||
blockResponse := &pb.BeaconBlockResponse{
|
||||
data := &pb.BeaconBlock{
|
||||
MainChainRef: []byte{1, 2, 3},
|
||||
ParentHash: make([]byte, 32),
|
||||
}
|
||||
|
||||
responseBlock := &pb.BeaconBlockResponse{
|
||||
Block: data,
|
||||
}
|
||||
|
||||
msg := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: blockResponse,
|
||||
Data: responseBlock,
|
||||
}
|
||||
ss.blockBuf <- msg
|
||||
ss.blockBuf <- msg
|
||||
ss.cancel()
|
||||
<-exitRoutine
|
||||
|
||||
block, err := types.NewBlock(blockResponse)
|
||||
block, err := types.NewBlock(data)
|
||||
if err != nil {
|
||||
t.Fatalf("Could not instantiate new block from proto: %v", err)
|
||||
}
|
||||
@@ -448,22 +464,29 @@ func TestProcessCrystallizedStates(t *testing.T) {
|
||||
exitRoutine <- true
|
||||
}()
|
||||
|
||||
stateResponse1 := &pb.CrystallizedStateResponse{
|
||||
data1 := &pb.CrystallizedState{
|
||||
LastJustifiedEpoch: 100,
|
||||
LastFinalizedEpoch: 99,
|
||||
}
|
||||
stateResponse2 := &pb.CrystallizedStateResponse{
|
||||
data2 := &pb.CrystallizedState{
|
||||
LastJustifiedEpoch: 100,
|
||||
LastFinalizedEpoch: 98,
|
||||
}
|
||||
|
||||
responseState1 := &pb.CrystallizedStateResponse{
|
||||
CrystallizedState: data1,
|
||||
}
|
||||
responseState2 := &pb.CrystallizedStateResponse{
|
||||
CrystallizedState: data2,
|
||||
}
|
||||
|
||||
msg1 := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: stateResponse1,
|
||||
Data: responseState1,
|
||||
}
|
||||
msg2 := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: stateResponse2,
|
||||
Data: responseState2,
|
||||
}
|
||||
|
||||
ss.crystallizedStateBuf <- msg1
|
||||
@@ -471,8 +494,8 @@ func TestProcessCrystallizedStates(t *testing.T) {
|
||||
ss.cancel()
|
||||
<-exitRoutine
|
||||
|
||||
state1 := types.NewCrystallizedState(stateResponse1)
|
||||
state2 := types.NewCrystallizedState(stateResponse2)
|
||||
state1 := types.NewCrystallizedState(data1)
|
||||
state2 := types.NewCrystallizedState(data2)
|
||||
|
||||
h, err := state1.Hash()
|
||||
if err != nil {
|
||||
@@ -507,20 +530,27 @@ func TestProcessActiveStates(t *testing.T) {
|
||||
exitRoutine <- true
|
||||
}()
|
||||
|
||||
stateResponse1 := &pb.ActiveStateResponse{
|
||||
state1 := &pb.ActiveState{
|
||||
TotalAttesterDeposits: 10000,
|
||||
}
|
||||
stateResponse2 := &pb.ActiveStateResponse{
|
||||
state2 := &pb.ActiveState{
|
||||
TotalAttesterDeposits: 10001,
|
||||
}
|
||||
|
||||
responseState1 := &pb.ActiveStateResponse{
|
||||
ActiveState: state1,
|
||||
}
|
||||
responseState2 := &pb.ActiveStateResponse{
|
||||
ActiveState: state2,
|
||||
}
|
||||
|
||||
msg1 := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: stateResponse1,
|
||||
Data: responseState1,
|
||||
}
|
||||
msg2 := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: stateResponse2,
|
||||
Data: responseState2,
|
||||
}
|
||||
|
||||
ss.activeStateBuf <- msg1
|
||||
@@ -528,7 +558,7 @@ func TestProcessActiveStates(t *testing.T) {
|
||||
ss.cancel()
|
||||
<-exitRoutine
|
||||
|
||||
state := types.NewActiveState(stateResponse1)
|
||||
state := types.NewActiveState(state1)
|
||||
h, err := state.Hash()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -538,7 +568,7 @@ func TestProcessActiveStates(t *testing.T) {
|
||||
t.Errorf("Expected processed hash to be equal to state hash. wanted=%x, got=%x", h, ms.processedActiveHashes[0])
|
||||
}
|
||||
|
||||
state = types.NewActiveState(stateResponse2)
|
||||
state = types.NewActiveState(state2)
|
||||
h, err = state.Hash()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -565,18 +595,22 @@ func TestProcessSameCrystallizedState(t *testing.T) {
|
||||
exitRoutine <- true
|
||||
}()
|
||||
|
||||
stateResponse := &pb.CrystallizedStateResponse{
|
||||
data := &pb.CrystallizedState{
|
||||
LastJustifiedEpoch: 100,
|
||||
LastFinalizedEpoch: 99,
|
||||
}
|
||||
|
||||
responseState := &pb.CrystallizedStateResponse{
|
||||
CrystallizedState: data,
|
||||
}
|
||||
|
||||
msg1 := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: stateResponse,
|
||||
Data: responseState,
|
||||
}
|
||||
msg2 := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: stateResponse,
|
||||
Data: responseState,
|
||||
}
|
||||
|
||||
ss.crystallizedStateBuf <- msg1
|
||||
@@ -584,7 +618,7 @@ func TestProcessSameCrystallizedState(t *testing.T) {
|
||||
ss.cancel()
|
||||
<-exitRoutine
|
||||
|
||||
state := types.NewCrystallizedState(stateResponse)
|
||||
state := types.NewCrystallizedState(data)
|
||||
|
||||
h, err := state.Hash()
|
||||
if err != nil {
|
||||
@@ -614,17 +648,21 @@ func TestProcessSameActiveState(t *testing.T) {
|
||||
exitRoutine <- true
|
||||
}()
|
||||
|
||||
stateResponse := &pb.ActiveStateResponse{
|
||||
data := &pb.ActiveState{
|
||||
TotalAttesterDeposits: 100,
|
||||
}
|
||||
|
||||
responseState1 := &pb.ActiveStateResponse{
|
||||
ActiveState: data,
|
||||
}
|
||||
|
||||
msg1 := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: stateResponse,
|
||||
Data: responseState1,
|
||||
}
|
||||
msg2 := p2p.Message{
|
||||
Peer: p2p.Peer{},
|
||||
Data: stateResponse,
|
||||
Data: responseState1,
|
||||
}
|
||||
|
||||
ss.activeStateBuf <- msg1
|
||||
@@ -632,7 +670,7 @@ func TestProcessSameActiveState(t *testing.T) {
|
||||
ss.cancel()
|
||||
<-exitRoutine
|
||||
|
||||
state := types.NewActiveState(stateResponse)
|
||||
state := types.NewActiveState(data)
|
||||
|
||||
h, err := state.Hash()
|
||||
if err != nil {
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
// Block defines a beacon chain core primitive.
|
||||
type Block struct {
|
||||
data *pb.BeaconBlockResponse
|
||||
data *pb.BeaconBlock
|
||||
}
|
||||
|
||||
// AggregateVote contains the fields of aggregate vote in individual shard.
|
||||
@@ -26,7 +26,7 @@ type AggregateVote struct {
|
||||
}
|
||||
|
||||
// NewBlock explicitly sets the data field of a block.
|
||||
func NewBlock(data *pb.BeaconBlockResponse) (*Block, error) {
|
||||
func NewBlock(data *pb.BeaconBlock) (*Block, error) {
|
||||
if len(data.ParentHash) != 32 {
|
||||
return nil, errors.New("invalid block data, parent hash should be 32 bytes")
|
||||
}
|
||||
@@ -42,11 +42,11 @@ func NewGenesisBlock() (*Block, error) {
|
||||
return nil, err
|
||||
}
|
||||
// TODO: Add more default fields.
|
||||
return &Block{data: &pb.BeaconBlockResponse{Timestamp: protoGenesis}}, nil
|
||||
return &Block{data: &pb.BeaconBlock{Timestamp: protoGenesis}}, nil
|
||||
}
|
||||
|
||||
// Proto returns the underlying protobuf data within a block primitive.
|
||||
func (b *Block) Proto() *pb.BeaconBlockResponse {
|
||||
func (b *Block) Proto() *pb.BeaconBlock {
|
||||
return b.data
|
||||
}
|
||||
|
||||
|
||||
@@ -11,35 +11,35 @@ import (
|
||||
// it changes every block.
|
||||
// TODO: Change ActiveState to use proto
|
||||
type ActiveState struct {
|
||||
data *pb.ActiveStateResponse
|
||||
data *pb.ActiveState
|
||||
}
|
||||
|
||||
// CrystallizedState contains fields of every epoch state,
|
||||
// it changes every epoch.
|
||||
type CrystallizedState struct {
|
||||
data *pb.CrystallizedStateResponse
|
||||
data *pb.CrystallizedState
|
||||
}
|
||||
|
||||
// NewCrystallizedState creates a new crystallized state with a explicitly set data field.
|
||||
func NewCrystallizedState(data *pb.CrystallizedStateResponse) *CrystallizedState {
|
||||
func NewCrystallizedState(data *pb.CrystallizedState) *CrystallizedState {
|
||||
return &CrystallizedState{data: data}
|
||||
}
|
||||
|
||||
// NewActiveState creates a new active state with a explicitly set data field.
|
||||
func NewActiveState(data *pb.ActiveStateResponse) *ActiveState {
|
||||
func NewActiveState(data *pb.ActiveState) *ActiveState {
|
||||
return &ActiveState{data: data}
|
||||
}
|
||||
|
||||
// NewGenesisStates initializes a beacon chain with starting parameters.
|
||||
func NewGenesisStates() (*ActiveState, *CrystallizedState) {
|
||||
active := &ActiveState{
|
||||
data: &pb.ActiveStateResponse{
|
||||
data: &pb.ActiveState{
|
||||
TotalAttesterDeposits: 0,
|
||||
AttesterBitfield: []byte{},
|
||||
},
|
||||
}
|
||||
crystallized := &CrystallizedState{
|
||||
data: &pb.CrystallizedStateResponse{
|
||||
data: &pb.CrystallizedState{
|
||||
ActiveValidators: []*pb.ValidatorRecord{},
|
||||
QueuedValidators: []*pb.ValidatorRecord{},
|
||||
ExitedValidators: []*pb.ValidatorRecord{},
|
||||
@@ -57,7 +57,7 @@ func NewGenesisStates() (*ActiveState, *CrystallizedState) {
|
||||
}
|
||||
|
||||
// Proto returns the underlying protobuf data within a state primitive.
|
||||
func (a *ActiveState) Proto() *pb.ActiveStateResponse {
|
||||
func (a *ActiveState) Proto() *pb.ActiveState {
|
||||
return a.data
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ func (a *ActiveState) SetAttesterBitfield(bitfield []byte) {
|
||||
}
|
||||
|
||||
// Proto returns the underlying protobuf data within a state primitive.
|
||||
func (c *CrystallizedState) Proto() *pb.CrystallizedStateResponse {
|
||||
func (c *CrystallizedState) Proto() *pb.CrystallizedState {
|
||||
return c.data
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ func (m *BeaconBlockHashAnnounce) Reset() { *m = BeaconBlockHashAnnounce
|
||||
func (m *BeaconBlockHashAnnounce) String() string { return proto.CompactTextString(m) }
|
||||
func (*BeaconBlockHashAnnounce) ProtoMessage() {}
|
||||
func (*BeaconBlockHashAnnounce) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_6ccfedf2f635cb05, []int{0}
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{0}
|
||||
}
|
||||
func (m *BeaconBlockHashAnnounce) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BeaconBlockHashAnnounce.Unmarshal(m, b)
|
||||
@@ -68,7 +68,7 @@ func (m *BeaconBlockRequest) Reset() { *m = BeaconBlockRequest{} }
|
||||
func (m *BeaconBlockRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*BeaconBlockRequest) ProtoMessage() {}
|
||||
func (*BeaconBlockRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_6ccfedf2f635cb05, []int{1}
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{1}
|
||||
}
|
||||
func (m *BeaconBlockRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BeaconBlockRequest.Unmarshal(m, b)
|
||||
@@ -96,26 +96,17 @@ func (m *BeaconBlockRequest) GetHash() []byte {
|
||||
}
|
||||
|
||||
type BeaconBlockResponse struct {
|
||||
ParentHash []byte `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"`
|
||||
SlotNumber uint64 `protobuf:"varint,2,opt,name=slot_number,json=slotNumber,proto3" json:"slot_number,omitempty"`
|
||||
RandaoReveal []byte `protobuf:"bytes,3,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty"`
|
||||
AttestationBitmask []byte `protobuf:"bytes,4,opt,name=attestation_bitmask,json=attestationBitmask,proto3" json:"attestation_bitmask,omitempty"`
|
||||
AttestationAggregateSig []uint32 `protobuf:"varint,5,rep,packed,name=attestation_aggregate_sig,json=attestationAggregateSig,proto3" json:"attestation_aggregate_sig,omitempty"`
|
||||
ShardAggregateVotes []*AggregateVote `protobuf:"bytes,6,rep,name=shard_aggregate_votes,json=shardAggregateVotes,proto3" json:"shard_aggregate_votes,omitempty"`
|
||||
MainChainRef []byte `protobuf:"bytes,7,opt,name=main_chain_ref,json=mainChainRef,proto3" json:"main_chain_ref,omitempty"`
|
||||
ActiveStateHash []byte `protobuf:"bytes,8,opt,name=active_state_hash,json=activeStateHash,proto3" json:"active_state_hash,omitempty"`
|
||||
CrystallizedStateHash []byte `protobuf:"bytes,9,opt,name=crystallized_state_hash,json=crystallizedStateHash,proto3" json:"crystallized_state_hash,omitempty"`
|
||||
Timestamp *timestamp.Timestamp `protobuf:"bytes,10,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Block *BeaconBlock `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BeaconBlockResponse) Reset() { *m = BeaconBlockResponse{} }
|
||||
func (m *BeaconBlockResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*BeaconBlockResponse) ProtoMessage() {}
|
||||
func (*BeaconBlockResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_6ccfedf2f635cb05, []int{2}
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{2}
|
||||
}
|
||||
func (m *BeaconBlockResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BeaconBlockResponse.Unmarshal(m, b)
|
||||
@@ -135,70 +126,117 @@ func (m *BeaconBlockResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_BeaconBlockResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *BeaconBlockResponse) GetParentHash() []byte {
|
||||
func (m *BeaconBlockResponse) GetBlock() *BeaconBlock {
|
||||
if m != nil {
|
||||
return m.Block
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type BeaconBlock struct {
|
||||
ParentHash []byte `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"`
|
||||
SlotNumber uint64 `protobuf:"varint,2,opt,name=slot_number,json=slotNumber,proto3" json:"slot_number,omitempty"`
|
||||
RandaoReveal []byte `protobuf:"bytes,3,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty"`
|
||||
AttestationBitmask []byte `protobuf:"bytes,4,opt,name=attestation_bitmask,json=attestationBitmask,proto3" json:"attestation_bitmask,omitempty"`
|
||||
AttestationAggregateSig []uint32 `protobuf:"varint,5,rep,packed,name=attestation_aggregate_sig,json=attestationAggregateSig,proto3" json:"attestation_aggregate_sig,omitempty"`
|
||||
ShardAggregateVotes []*AggregateVote `protobuf:"bytes,6,rep,name=shard_aggregate_votes,json=shardAggregateVotes,proto3" json:"shard_aggregate_votes,omitempty"`
|
||||
MainChainRef []byte `protobuf:"bytes,7,opt,name=main_chain_ref,json=mainChainRef,proto3" json:"main_chain_ref,omitempty"`
|
||||
ActiveStateHash []byte `protobuf:"bytes,8,opt,name=active_state_hash,json=activeStateHash,proto3" json:"active_state_hash,omitempty"`
|
||||
CrystallizedStateHash []byte `protobuf:"bytes,9,opt,name=crystallized_state_hash,json=crystallizedStateHash,proto3" json:"crystallized_state_hash,omitempty"`
|
||||
Timestamp *timestamp.Timestamp `protobuf:"bytes,10,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BeaconBlock) Reset() { *m = BeaconBlock{} }
|
||||
func (m *BeaconBlock) String() string { return proto.CompactTextString(m) }
|
||||
func (*BeaconBlock) ProtoMessage() {}
|
||||
func (*BeaconBlock) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{3}
|
||||
}
|
||||
func (m *BeaconBlock) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BeaconBlock.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BeaconBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BeaconBlock.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *BeaconBlock) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BeaconBlock.Merge(dst, src)
|
||||
}
|
||||
func (m *BeaconBlock) XXX_Size() int {
|
||||
return xxx_messageInfo_BeaconBlock.Size(m)
|
||||
}
|
||||
func (m *BeaconBlock) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BeaconBlock.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BeaconBlock proto.InternalMessageInfo
|
||||
|
||||
func (m *BeaconBlock) GetParentHash() []byte {
|
||||
if m != nil {
|
||||
return m.ParentHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BeaconBlockResponse) GetSlotNumber() uint64 {
|
||||
func (m *BeaconBlock) GetSlotNumber() uint64 {
|
||||
if m != nil {
|
||||
return m.SlotNumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *BeaconBlockResponse) GetRandaoReveal() []byte {
|
||||
func (m *BeaconBlock) GetRandaoReveal() []byte {
|
||||
if m != nil {
|
||||
return m.RandaoReveal
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BeaconBlockResponse) GetAttestationBitmask() []byte {
|
||||
func (m *BeaconBlock) GetAttestationBitmask() []byte {
|
||||
if m != nil {
|
||||
return m.AttestationBitmask
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BeaconBlockResponse) GetAttestationAggregateSig() []uint32 {
|
||||
func (m *BeaconBlock) GetAttestationAggregateSig() []uint32 {
|
||||
if m != nil {
|
||||
return m.AttestationAggregateSig
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BeaconBlockResponse) GetShardAggregateVotes() []*AggregateVote {
|
||||
func (m *BeaconBlock) GetShardAggregateVotes() []*AggregateVote {
|
||||
if m != nil {
|
||||
return m.ShardAggregateVotes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BeaconBlockResponse) GetMainChainRef() []byte {
|
||||
func (m *BeaconBlock) GetMainChainRef() []byte {
|
||||
if m != nil {
|
||||
return m.MainChainRef
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BeaconBlockResponse) GetActiveStateHash() []byte {
|
||||
func (m *BeaconBlock) GetActiveStateHash() []byte {
|
||||
if m != nil {
|
||||
return m.ActiveStateHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BeaconBlockResponse) GetCrystallizedStateHash() []byte {
|
||||
func (m *BeaconBlock) GetCrystallizedStateHash() []byte {
|
||||
if m != nil {
|
||||
return m.CrystallizedStateHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BeaconBlockResponse) GetTimestamp() *timestamp.Timestamp {
|
||||
func (m *BeaconBlock) GetTimestamp() *timestamp.Timestamp {
|
||||
if m != nil {
|
||||
return m.Timestamp
|
||||
}
|
||||
@@ -216,7 +254,7 @@ func (m *CrystallizedStateHashAnnounce) Reset() { *m = CrystallizedState
|
||||
func (m *CrystallizedStateHashAnnounce) String() string { return proto.CompactTextString(m) }
|
||||
func (*CrystallizedStateHashAnnounce) ProtoMessage() {}
|
||||
func (*CrystallizedStateHashAnnounce) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_6ccfedf2f635cb05, []int{3}
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{4}
|
||||
}
|
||||
func (m *CrystallizedStateHashAnnounce) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CrystallizedStateHashAnnounce.Unmarshal(m, b)
|
||||
@@ -254,7 +292,7 @@ func (m *CrystallizedStateRequest) Reset() { *m = CrystallizedStateReque
|
||||
func (m *CrystallizedStateRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CrystallizedStateRequest) ProtoMessage() {}
|
||||
func (*CrystallizedStateRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_6ccfedf2f635cb05, []int{4}
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{5}
|
||||
}
|
||||
func (m *CrystallizedStateRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CrystallizedStateRequest.Unmarshal(m, b)
|
||||
@@ -282,29 +320,17 @@ func (m *CrystallizedStateRequest) GetHash() []byte {
|
||||
}
|
||||
|
||||
type CrystallizedStateResponse struct {
|
||||
ActiveValidators []*ValidatorRecord `protobuf:"bytes,1,rep,name=active_validators,json=activeValidators,proto3" json:"active_validators,omitempty"`
|
||||
QueuedValidators []*ValidatorRecord `protobuf:"bytes,2,rep,name=queued_validators,json=queuedValidators,proto3" json:"queued_validators,omitempty"`
|
||||
ExitedValidators []*ValidatorRecord `protobuf:"bytes,3,rep,name=exited_validators,json=exitedValidators,proto3" json:"exited_validators,omitempty"`
|
||||
CurrentEpochShuffling []uint64 `protobuf:"varint,4,rep,packed,name=current_epoch_shuffling,json=currentEpochShuffling,proto3" json:"current_epoch_shuffling,omitempty"`
|
||||
CurrentEpoch uint64 `protobuf:"varint,5,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"`
|
||||
LastJustifiedEpoch uint64 `protobuf:"varint,6,opt,name=last_justified_epoch,json=lastJustifiedEpoch,proto3" json:"last_justified_epoch,omitempty"`
|
||||
LastFinalizedEpoch uint64 `protobuf:"varint,7,opt,name=last_finalized_epoch,json=lastFinalizedEpoch,proto3" json:"last_finalized_epoch,omitempty"`
|
||||
CurrentDynasty uint64 `protobuf:"varint,8,opt,name=current_dynasty,json=currentDynasty,proto3" json:"current_dynasty,omitempty"`
|
||||
NextShard uint64 `protobuf:"varint,9,opt,name=next_shard,json=nextShard,proto3" json:"next_shard,omitempty"`
|
||||
CurrentCheckPoint []byte `protobuf:"bytes,10,opt,name=current_check_point,json=currentCheckPoint,proto3" json:"current_check_point,omitempty"`
|
||||
TotalDeposits uint64 `protobuf:"varint,11,opt,name=total_deposits,json=totalDeposits,proto3" json:"total_deposits,omitempty"`
|
||||
DynastySeed []byte `protobuf:"bytes,12,opt,name=dynasty_seed,json=dynastySeed,proto3" json:"dynasty_seed,omitempty"`
|
||||
DynastySeedLastReset uint64 `protobuf:"varint,13,opt,name=dynasty_seed_last_reset,json=dynastySeedLastReset,proto3" json:"dynasty_seed_last_reset,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
CrystallizedState *CrystallizedState `protobuf:"bytes,1,opt,name=crystallized_state,json=crystallizedState,proto3" json:"crystallized_state,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) Reset() { *m = CrystallizedStateResponse{} }
|
||||
func (m *CrystallizedStateResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CrystallizedStateResponse) ProtoMessage() {}
|
||||
func (*CrystallizedStateResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_6ccfedf2f635cb05, []int{5}
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{6}
|
||||
}
|
||||
func (m *CrystallizedStateResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CrystallizedStateResponse.Unmarshal(m, b)
|
||||
@@ -324,91 +350,141 @@ func (m *CrystallizedStateResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_CrystallizedStateResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *CrystallizedStateResponse) GetActiveValidators() []*ValidatorRecord {
|
||||
func (m *CrystallizedStateResponse) GetCrystallizedState() *CrystallizedState {
|
||||
if m != nil {
|
||||
return m.CrystallizedState
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CrystallizedState struct {
|
||||
ActiveValidators []*ValidatorRecord `protobuf:"bytes,1,rep,name=active_validators,json=activeValidators,proto3" json:"active_validators,omitempty"`
|
||||
QueuedValidators []*ValidatorRecord `protobuf:"bytes,2,rep,name=queued_validators,json=queuedValidators,proto3" json:"queued_validators,omitempty"`
|
||||
ExitedValidators []*ValidatorRecord `protobuf:"bytes,3,rep,name=exited_validators,json=exitedValidators,proto3" json:"exited_validators,omitempty"`
|
||||
CurrentEpochShuffling []uint64 `protobuf:"varint,4,rep,packed,name=current_epoch_shuffling,json=currentEpochShuffling,proto3" json:"current_epoch_shuffling,omitempty"`
|
||||
CurrentEpoch uint64 `protobuf:"varint,5,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"`
|
||||
LastJustifiedEpoch uint64 `protobuf:"varint,6,opt,name=last_justified_epoch,json=lastJustifiedEpoch,proto3" json:"last_justified_epoch,omitempty"`
|
||||
LastFinalizedEpoch uint64 `protobuf:"varint,7,opt,name=last_finalized_epoch,json=lastFinalizedEpoch,proto3" json:"last_finalized_epoch,omitempty"`
|
||||
CurrentDynasty uint64 `protobuf:"varint,8,opt,name=current_dynasty,json=currentDynasty,proto3" json:"current_dynasty,omitempty"`
|
||||
NextShard uint64 `protobuf:"varint,9,opt,name=next_shard,json=nextShard,proto3" json:"next_shard,omitempty"`
|
||||
CurrentCheckPoint []byte `protobuf:"bytes,10,opt,name=current_check_point,json=currentCheckPoint,proto3" json:"current_check_point,omitempty"`
|
||||
TotalDeposits uint64 `protobuf:"varint,11,opt,name=total_deposits,json=totalDeposits,proto3" json:"total_deposits,omitempty"`
|
||||
DynastySeed []byte `protobuf:"bytes,12,opt,name=dynasty_seed,json=dynastySeed,proto3" json:"dynasty_seed,omitempty"`
|
||||
DynastySeedLastReset uint64 `protobuf:"varint,13,opt,name=dynasty_seed_last_reset,json=dynastySeedLastReset,proto3" json:"dynasty_seed_last_reset,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CrystallizedState) Reset() { *m = CrystallizedState{} }
|
||||
func (m *CrystallizedState) String() string { return proto.CompactTextString(m) }
|
||||
func (*CrystallizedState) ProtoMessage() {}
|
||||
func (*CrystallizedState) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{7}
|
||||
}
|
||||
func (m *CrystallizedState) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CrystallizedState.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CrystallizedState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CrystallizedState.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *CrystallizedState) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CrystallizedState.Merge(dst, src)
|
||||
}
|
||||
func (m *CrystallizedState) XXX_Size() int {
|
||||
return xxx_messageInfo_CrystallizedState.Size(m)
|
||||
}
|
||||
func (m *CrystallizedState) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CrystallizedState.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CrystallizedState proto.InternalMessageInfo
|
||||
|
||||
func (m *CrystallizedState) GetActiveValidators() []*ValidatorRecord {
|
||||
if m != nil {
|
||||
return m.ActiveValidators
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetQueuedValidators() []*ValidatorRecord {
|
||||
func (m *CrystallizedState) GetQueuedValidators() []*ValidatorRecord {
|
||||
if m != nil {
|
||||
return m.QueuedValidators
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetExitedValidators() []*ValidatorRecord {
|
||||
func (m *CrystallizedState) GetExitedValidators() []*ValidatorRecord {
|
||||
if m != nil {
|
||||
return m.ExitedValidators
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetCurrentEpochShuffling() []uint64 {
|
||||
func (m *CrystallizedState) GetCurrentEpochShuffling() []uint64 {
|
||||
if m != nil {
|
||||
return m.CurrentEpochShuffling
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetCurrentEpoch() uint64 {
|
||||
func (m *CrystallizedState) GetCurrentEpoch() uint64 {
|
||||
if m != nil {
|
||||
return m.CurrentEpoch
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetLastJustifiedEpoch() uint64 {
|
||||
func (m *CrystallizedState) GetLastJustifiedEpoch() uint64 {
|
||||
if m != nil {
|
||||
return m.LastJustifiedEpoch
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetLastFinalizedEpoch() uint64 {
|
||||
func (m *CrystallizedState) GetLastFinalizedEpoch() uint64 {
|
||||
if m != nil {
|
||||
return m.LastFinalizedEpoch
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetCurrentDynasty() uint64 {
|
||||
func (m *CrystallizedState) GetCurrentDynasty() uint64 {
|
||||
if m != nil {
|
||||
return m.CurrentDynasty
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetNextShard() uint64 {
|
||||
func (m *CrystallizedState) GetNextShard() uint64 {
|
||||
if m != nil {
|
||||
return m.NextShard
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetCurrentCheckPoint() []byte {
|
||||
func (m *CrystallizedState) GetCurrentCheckPoint() []byte {
|
||||
if m != nil {
|
||||
return m.CurrentCheckPoint
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetTotalDeposits() uint64 {
|
||||
func (m *CrystallizedState) GetTotalDeposits() uint64 {
|
||||
if m != nil {
|
||||
return m.TotalDeposits
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetDynastySeed() []byte {
|
||||
func (m *CrystallizedState) GetDynastySeed() []byte {
|
||||
if m != nil {
|
||||
return m.DynastySeed
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CrystallizedStateResponse) GetDynastySeedLastReset() uint64 {
|
||||
func (m *CrystallizedState) GetDynastySeedLastReset() uint64 {
|
||||
if m != nil {
|
||||
return m.DynastySeedLastReset
|
||||
}
|
||||
@@ -426,7 +502,7 @@ func (m *ActiveStateHashAnnounce) Reset() { *m = ActiveStateHashAnnounce
|
||||
func (m *ActiveStateHashAnnounce) String() string { return proto.CompactTextString(m) }
|
||||
func (*ActiveStateHashAnnounce) ProtoMessage() {}
|
||||
func (*ActiveStateHashAnnounce) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_6ccfedf2f635cb05, []int{6}
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{8}
|
||||
}
|
||||
func (m *ActiveStateHashAnnounce) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ActiveStateHashAnnounce.Unmarshal(m, b)
|
||||
@@ -464,7 +540,7 @@ func (m *ActiveStateRequest) Reset() { *m = ActiveStateRequest{} }
|
||||
func (m *ActiveStateRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ActiveStateRequest) ProtoMessage() {}
|
||||
func (*ActiveStateRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_6ccfedf2f635cb05, []int{7}
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{9}
|
||||
}
|
||||
func (m *ActiveStateRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ActiveStateRequest.Unmarshal(m, b)
|
||||
@@ -492,18 +568,17 @@ func (m *ActiveStateRequest) GetHash() []byte {
|
||||
}
|
||||
|
||||
type ActiveStateResponse struct {
|
||||
TotalAttesterDeposits uint64 `protobuf:"varint,1,opt,name=total_attester_deposits,json=totalAttesterDeposits,proto3" json:"total_attester_deposits,omitempty"`
|
||||
AttesterBitfield []byte `protobuf:"bytes,2,opt,name=attester_bitfield,json=attesterBitfield,proto3" json:"attester_bitfield,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
ActiveState *ActiveState `protobuf:"bytes,1,opt,name=active_state,json=activeState,proto3" json:"active_state,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ActiveStateResponse) Reset() { *m = ActiveStateResponse{} }
|
||||
func (m *ActiveStateResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ActiveStateResponse) ProtoMessage() {}
|
||||
func (*ActiveStateResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_6ccfedf2f635cb05, []int{8}
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{10}
|
||||
}
|
||||
func (m *ActiveStateResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ActiveStateResponse.Unmarshal(m, b)
|
||||
@@ -523,14 +598,53 @@ func (m *ActiveStateResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_ActiveStateResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *ActiveStateResponse) GetTotalAttesterDeposits() uint64 {
|
||||
func (m *ActiveStateResponse) GetActiveState() *ActiveState {
|
||||
if m != nil {
|
||||
return m.ActiveState
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ActiveState struct {
|
||||
TotalAttesterDeposits uint64 `protobuf:"varint,1,opt,name=total_attester_deposits,json=totalAttesterDeposits,proto3" json:"total_attester_deposits,omitempty"`
|
||||
AttesterBitfield []byte `protobuf:"bytes,2,opt,name=attester_bitfield,json=attesterBitfield,proto3" json:"attester_bitfield,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ActiveState) Reset() { *m = ActiveState{} }
|
||||
func (m *ActiveState) String() string { return proto.CompactTextString(m) }
|
||||
func (*ActiveState) ProtoMessage() {}
|
||||
func (*ActiveState) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{11}
|
||||
}
|
||||
func (m *ActiveState) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ActiveState.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ActiveState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ActiveState.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *ActiveState) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ActiveState.Merge(dst, src)
|
||||
}
|
||||
func (m *ActiveState) XXX_Size() int {
|
||||
return xxx_messageInfo_ActiveState.Size(m)
|
||||
}
|
||||
func (m *ActiveState) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ActiveState.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ActiveState proto.InternalMessageInfo
|
||||
|
||||
func (m *ActiveState) GetTotalAttesterDeposits() uint64 {
|
||||
if m != nil {
|
||||
return m.TotalAttesterDeposits
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ActiveStateResponse) GetAttesterBitfield() []byte {
|
||||
func (m *ActiveState) GetAttesterBitfield() []byte {
|
||||
if m != nil {
|
||||
return m.AttesterBitfield
|
||||
}
|
||||
@@ -551,7 +665,7 @@ func (m *AggregateVote) Reset() { *m = AggregateVote{} }
|
||||
func (m *AggregateVote) String() string { return proto.CompactTextString(m) }
|
||||
func (*AggregateVote) ProtoMessage() {}
|
||||
func (*AggregateVote) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_messages_6ccfedf2f635cb05, []int{9}
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{12}
|
||||
}
|
||||
func (m *AggregateVote) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AggregateVote.Unmarshal(m, b)
|
||||
@@ -615,7 +729,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_messages_6ccfedf2f635cb05, []int{10}
|
||||
return fileDescriptor_messages_8f0ba6c06432bb45, []int{13}
|
||||
}
|
||||
func (m *ValidatorRecord) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ValidatorRecord.Unmarshal(m, b)
|
||||
@@ -681,77 +795,84 @@ func init() {
|
||||
proto.RegisterType((*BeaconBlockHashAnnounce)(nil), "ethereum.beacon.p2p.v1.BeaconBlockHashAnnounce")
|
||||
proto.RegisterType((*BeaconBlockRequest)(nil), "ethereum.beacon.p2p.v1.BeaconBlockRequest")
|
||||
proto.RegisterType((*BeaconBlockResponse)(nil), "ethereum.beacon.p2p.v1.BeaconBlockResponse")
|
||||
proto.RegisterType((*BeaconBlock)(nil), "ethereum.beacon.p2p.v1.BeaconBlock")
|
||||
proto.RegisterType((*CrystallizedStateHashAnnounce)(nil), "ethereum.beacon.p2p.v1.CrystallizedStateHashAnnounce")
|
||||
proto.RegisterType((*CrystallizedStateRequest)(nil), "ethereum.beacon.p2p.v1.CrystallizedStateRequest")
|
||||
proto.RegisterType((*CrystallizedStateResponse)(nil), "ethereum.beacon.p2p.v1.CrystallizedStateResponse")
|
||||
proto.RegisterType((*CrystallizedState)(nil), "ethereum.beacon.p2p.v1.CrystallizedState")
|
||||
proto.RegisterType((*ActiveStateHashAnnounce)(nil), "ethereum.beacon.p2p.v1.ActiveStateHashAnnounce")
|
||||
proto.RegisterType((*ActiveStateRequest)(nil), "ethereum.beacon.p2p.v1.ActiveStateRequest")
|
||||
proto.RegisterType((*ActiveStateResponse)(nil), "ethereum.beacon.p2p.v1.ActiveStateResponse")
|
||||
proto.RegisterType((*ActiveState)(nil), "ethereum.beacon.p2p.v1.ActiveState")
|
||||
proto.RegisterType((*AggregateVote)(nil), "ethereum.beacon.p2p.v1.AggregateVote")
|
||||
proto.RegisterType((*ValidatorRecord)(nil), "ethereum.beacon.p2p.v1.ValidatorRecord")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("messages.proto", fileDescriptor_messages_6ccfedf2f635cb05) }
|
||||
func init() { proto.RegisterFile("messages.proto", fileDescriptor_messages_8f0ba6c06432bb45) }
|
||||
|
||||
var fileDescriptor_messages_6ccfedf2f635cb05 = []byte{
|
||||
// 936 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xe9, 0x6e, 0xdb, 0x46,
|
||||
0x10, 0x86, 0x22, 0xd9, 0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9c, 0x38, 0x70, 0xb0, 0xa4, 0x09,
|
||||
0xcd, 0x02, 0xb4, 0xdd, 0x5a, 0xfd, 0xd4, 0xe7, 0x73, 0xcd, 0x64, 0x10, 0x6f, 0x7b, 0xc8, 0xb4,
|
||||
0x68, 0xdf, 0xa0, 0xb6, 0x85, 0x96, 0xfb, 0x7a, 0xa0, 0xbf, 0xf8, 0x27, 0x00, 0x00, 0xff, 0xff,
|
||||
0x97, 0xde, 0x3e, 0xcc, 0x67, 0x08, 0x00, 0x00,
|
||||
var fileDescriptor_messages_8f0ba6c06432bb45 = []byte{
|
||||
// 998 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x5d, 0x6f, 0xdb, 0x36,
|
||||
0x14, 0x85, 0x1b, 0xa7, 0x69, 0xae, 0xed, 0x24, 0xa6, 0x9b, 0x45, 0x29, 0x50, 0xd4, 0x73, 0x56,
|
||||
0xd4, 0xdd, 0x50, 0x65, 0x4b, 0xb1, 0x61, 0xdb, 0x9b, 0x93, 0xae, 0xd8, 0x17, 0x86, 0x42, 0x2e,
|
||||
0x8a, 0xed, 0x61, 0x10, 0x68, 0xe9, 0x5a, 0xe2, 0x22, 0x89, 0xaa, 0x48, 0x39, 0xf5, 0x9e, 0xf6,
|
||||
0x53, 0xf6, 0x8f, 0xf6, 0x77, 0xf6, 0x38, 0x90, 0x94, 0x6c, 0x6a, 0x4e, 0x52, 0xf4, 0x25, 0x88,
|
||||
0xcf, 0x39, 0xf7, 0x88, 0xba, 0xba, 0x97, 0x07, 0xf6, 0x52, 0x14, 0x82, 0x46, 0x28, 0xdc, 0xbc,
|
||||
0xe0, 0x92, 0x93, 0x8f, 0x50, 0xc6, 0x58, 0x60, 0x99, 0xba, 0x33, 0xa4, 0x01, 0xcf, 0xdc, 0xfc,
|
||||
0x2c, 0x77, 0x17, 0x5f, 0x3c, 0x78, 0x14, 0x71, 0x1e, 0x25, 0x78, 0xaa, 0x55, 0xb3, 0x72, 0x7e,
|
||||
0x2a, 0x59, 0x8a, 0x42, 0xd2, 0x34, 0x37, 0x85, 0xa3, 0x67, 0x70, 0x74, 0xae, 0x2b, 0xce, 0x13,
|
||||
0x1e, 0x5c, 0x7e, 0x4f, 0x45, 0x3c, 0xc9, 0x32, 0x5e, 0x66, 0x01, 0x12, 0x02, 0xed, 0x98, 0x8a,
|
||||
0xd8, 0x69, 0x0d, 0x5b, 0xe3, 0xae, 0xa7, 0xff, 0x1f, 0x8d, 0x81, 0x58, 0x72, 0x0f, 0xdf, 0x96,
|
||||
0x28, 0xe4, 0xb5, 0xca, 0x57, 0x30, 0x68, 0x28, 0x45, 0xce, 0x33, 0x81, 0xe4, 0x1b, 0xd8, 0x9e,
|
||||
0x29, 0x40, 0x6b, 0x3b, 0x67, 0x27, 0xee, 0xf5, 0x07, 0x77, 0xed, 0x5a, 0x53, 0x31, 0xfa, 0xab,
|
||||
0x0d, 0x1d, 0x0b, 0x26, 0x8f, 0xa0, 0x93, 0xd3, 0x02, 0x33, 0xe9, 0x5b, 0x0f, 0x07, 0x03, 0xa9,
|
||||
0x17, 0x51, 0x02, 0x91, 0x70, 0xe9, 0x67, 0x65, 0x3a, 0xc3, 0xc2, 0xb9, 0x33, 0x6c, 0x8d, 0xdb,
|
||||
0x1e, 0x28, 0xe8, 0x17, 0x8d, 0x90, 0x13, 0xe8, 0x15, 0x34, 0x0b, 0x29, 0xf7, 0x0b, 0x5c, 0x20,
|
||||
0x4d, 0x9c, 0x2d, 0xed, 0xd1, 0x35, 0xa0, 0xa7, 0x31, 0x72, 0x0a, 0x03, 0x2a, 0xa5, 0x6a, 0x9a,
|
||||
0x64, 0x3c, 0xf3, 0x67, 0x4c, 0xa6, 0x54, 0x5c, 0x3a, 0x6d, 0x2d, 0x25, 0x16, 0x75, 0x6e, 0x18,
|
||||
0xf2, 0x2d, 0x1c, 0xdb, 0x05, 0x34, 0x8a, 0x0a, 0x8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c, 0xef,
|
||||
0x38, 0xb4, 0x77, 0x09, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@@ -13,6 +13,10 @@ message BeaconBlockRequest {
|
||||
}
|
||||
|
||||
message BeaconBlockResponse {
|
||||
BeaconBlock block = 1;
|
||||
}
|
||||
|
||||
message BeaconBlock {
|
||||
bytes parent_hash = 1;
|
||||
uint64 slot_number = 2;
|
||||
bytes randao_reveal = 3;
|
||||
@@ -34,6 +38,10 @@ message CrystallizedStateRequest {
|
||||
}
|
||||
|
||||
message CrystallizedStateResponse {
|
||||
CrystallizedState crystallized_state = 1;
|
||||
}
|
||||
|
||||
message CrystallizedState {
|
||||
repeated ValidatorRecord active_validators = 1;
|
||||
repeated ValidatorRecord queued_validators = 2;
|
||||
repeated ValidatorRecord exited_validators = 3;
|
||||
@@ -58,6 +66,10 @@ message ActiveStateRequest {
|
||||
}
|
||||
|
||||
message ActiveStateResponse {
|
||||
ActiveState active_state = 1;
|
||||
}
|
||||
|
||||
message ActiveState {
|
||||
uint64 total_attester_deposits = 1;
|
||||
bytes attester_bitfield = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user