shared: Split P2P Topics And Introduce Middleware (Adapters) (#421)

This commit is contained in:
Preston Van Loon
2018-08-29 12:32:54 -04:00
committed by Raul Jordan
parent 5adc94b2ae
commit b02042dbe9
27 changed files with 869 additions and 509 deletions

View File

@@ -12,6 +12,18 @@ proto/
sharding/
p2p/
v1/
testing/
```
We specify messages available for p2p communication common to beacon chain nodes and sharding clients.
We specify messages available for p2p communication common to beacon chain nodes and sharding clients.
For now, we are checking in all generated code to support native go dependency
management. The generated pb.go files can be derived from bazel's bin
directory.
For example, when we build the testing go proto library
`bazel build //proto/testing:ethereum_testing_go_proto` there is a pb.go
generated at
`bazel-bin/proto/testing/linux_amd64_stripped/ethereum_testing_go_proto\~/github.com/prysmaticlabs/prysm/proto/testing/test.pb.go`.
This generated file can be copied, or you can use you protoc locally if you
prefer.

309
proto/beacon/p2p/v1/messages.pb.go Normal file → Executable file
View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: proto/beacon/p2p/v1/messages.proto
package ethereum_beacon_p2p_v1
package v1
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
@@ -19,6 +19,56 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Topic int32
const (
Topic_UNKNOWN Topic = 0
Topic_BEACON_BLOCK_HASH_ANNOUNCE Topic = 1
Topic_BEACON_BLOCK_REQUEST Topic = 2
Topic_BEACON_BLOCK_REQUEST_BY_SLOT_NUMBER Topic = 3
Topic_BEACON_BLOCK_RESPONSE Topic = 4
Topic_CRYSTALLIZED_STATE_HASH_ANNOUNCE Topic = 5
Topic_CRYSTALLIZED_STATE_REQUEST Topic = 6
Topic_CRYSTALLIZED_STATE_RESPONSE Topic = 7
Topic_ACTIVE_STATE_HASH_ANNOUNCE Topic = 8
Topic_ACTIVE_STATE_REQUEST Topic = 9
Topic_ACTIVE_STATE_RESPONSE Topic = 10
)
var Topic_name = map[int32]string{
0: "UNKNOWN",
1: "BEACON_BLOCK_HASH_ANNOUNCE",
2: "BEACON_BLOCK_REQUEST",
3: "BEACON_BLOCK_REQUEST_BY_SLOT_NUMBER",
4: "BEACON_BLOCK_RESPONSE",
5: "CRYSTALLIZED_STATE_HASH_ANNOUNCE",
6: "CRYSTALLIZED_STATE_REQUEST",
7: "CRYSTALLIZED_STATE_RESPONSE",
8: "ACTIVE_STATE_HASH_ANNOUNCE",
9: "ACTIVE_STATE_REQUEST",
10: "ACTIVE_STATE_RESPONSE",
}
var Topic_value = map[string]int32{
"UNKNOWN": 0,
"BEACON_BLOCK_HASH_ANNOUNCE": 1,
"BEACON_BLOCK_REQUEST": 2,
"BEACON_BLOCK_REQUEST_BY_SLOT_NUMBER": 3,
"BEACON_BLOCK_RESPONSE": 4,
"CRYSTALLIZED_STATE_HASH_ANNOUNCE": 5,
"CRYSTALLIZED_STATE_REQUEST": 6,
"CRYSTALLIZED_STATE_RESPONSE": 7,
"ACTIVE_STATE_HASH_ANNOUNCE": 8,
"ACTIVE_STATE_REQUEST": 9,
"ACTIVE_STATE_RESPONSE": 10,
}
func (x Topic) String() string {
return proto.EnumName(Topic_name, int32(x))
}
func (Topic) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_messages_bd1ed2903542c11b, []int{0}
}
type BeaconBlockHashAnnounce struct {
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -30,7 +80,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_a20b723c3c4695b7, []int{0}
return fileDescriptor_messages_bd1ed2903542c11b, []int{0}
}
func (m *BeaconBlockHashAnnounce) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BeaconBlockHashAnnounce.Unmarshal(m, b)
@@ -68,7 +118,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_a20b723c3c4695b7, []int{1}
return fileDescriptor_messages_bd1ed2903542c11b, []int{1}
}
func (m *BeaconBlockRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BeaconBlockRequest.Unmarshal(m, b)
@@ -96,7 +146,7 @@ func (m *BeaconBlockRequest) GetHash() []byte {
}
type BeaconBlockRequestBySlotNumber struct {
SlotNumber uint64 `protobuf:"varint,1,opt,name=slot_number,json=slotNumber,proto3" json:"slot_number,omitempty"`
SlotNumber uint64 `protobuf:"varint,1,opt,name=slot_number,json=slotNumber" json:"slot_number,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -106,7 +156,7 @@ func (m *BeaconBlockRequestBySlotNumber) Reset() { *m = BeaconBlockReque
func (m *BeaconBlockRequestBySlotNumber) String() string { return proto.CompactTextString(m) }
func (*BeaconBlockRequestBySlotNumber) ProtoMessage() {}
func (*BeaconBlockRequestBySlotNumber) Descriptor() ([]byte, []int) {
return fileDescriptor_messages_a20b723c3c4695b7, []int{2}
return fileDescriptor_messages_bd1ed2903542c11b, []int{2}
}
func (m *BeaconBlockRequestBySlotNumber) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BeaconBlockRequestBySlotNumber.Unmarshal(m, b)
@@ -134,7 +184,7 @@ func (m *BeaconBlockRequestBySlotNumber) GetSlotNumber() uint64 {
}
type BeaconBlockResponse struct {
Block *BeaconBlock `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
Block *BeaconBlock `protobuf:"bytes,1,opt,name=block" json:"block,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -144,7 +194,7 @@ 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_a20b723c3c4695b7, []int{3}
return fileDescriptor_messages_bd1ed2903542c11b, []int{3}
}
func (m *BeaconBlockResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BeaconBlockResponse.Unmarshal(m, b)
@@ -173,13 +223,13 @@ func (m *BeaconBlockResponse) GetBlock() *BeaconBlock {
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"`
SlotNumber uint64 `protobuf:"varint,2,opt,name=slot_number,json=slotNumber" json:"slot_number,omitempty"`
RandaoReveal []byte `protobuf:"bytes,3,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty"`
PowChainRef []byte `protobuf:"bytes,4,opt,name=pow_chain_ref,json=powChainRef,proto3" json:"pow_chain_ref,omitempty"`
ActiveStateHash []byte `protobuf:"bytes,5,opt,name=active_state_hash,json=activeStateHash,proto3" json:"active_state_hash,omitempty"`
CrystallizedStateHash []byte `protobuf:"bytes,6,opt,name=crystallized_state_hash,json=crystallizedStateHash,proto3" json:"crystallized_state_hash,omitempty"`
Timestamp *timestamp.Timestamp `protobuf:"bytes,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Attestations []*AttestationRecord `protobuf:"bytes,8,rep,name=attestations,proto3" json:"attestations,omitempty"`
Timestamp *timestamp.Timestamp `protobuf:"bytes,7,opt,name=timestamp" json:"timestamp,omitempty"`
Attestations []*AttestationRecord `protobuf:"bytes,8,rep,name=attestations" json:"attestations,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -189,7 +239,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_messages_a20b723c3c4695b7, []int{4}
return fileDescriptor_messages_bd1ed2903542c11b, []int{4}
}
func (m *BeaconBlock) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BeaconBlock.Unmarshal(m, b)
@@ -276,7 +326,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_a20b723c3c4695b7, []int{5}
return fileDescriptor_messages_bd1ed2903542c11b, []int{5}
}
func (m *CrystallizedStateHashAnnounce) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CrystallizedStateHashAnnounce.Unmarshal(m, b)
@@ -314,7 +364,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_a20b723c3c4695b7, []int{6}
return fileDescriptor_messages_bd1ed2903542c11b, []int{6}
}
func (m *CrystallizedStateRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CrystallizedStateRequest.Unmarshal(m, b)
@@ -342,7 +392,7 @@ func (m *CrystallizedStateRequest) GetHash() []byte {
}
type CrystallizedStateResponse struct {
CrystallizedState *CrystallizedState `protobuf:"bytes,1,opt,name=crystallized_state,json=crystallizedState,proto3" json:"crystallized_state,omitempty"`
CrystallizedState *CrystallizedState `protobuf:"bytes,1,opt,name=crystallized_state,json=crystallizedState" json:"crystallized_state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -352,7 +402,7 @@ func (m *CrystallizedStateResponse) Reset() { *m = CrystallizedStateResp
func (m *CrystallizedStateResponse) String() string { return proto.CompactTextString(m) }
func (*CrystallizedStateResponse) ProtoMessage() {}
func (*CrystallizedStateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_messages_a20b723c3c4695b7, []int{7}
return fileDescriptor_messages_bd1ed2903542c11b, []int{7}
}
func (m *CrystallizedStateResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CrystallizedStateResponse.Unmarshal(m, b)
@@ -380,18 +430,18 @@ func (m *CrystallizedStateResponse) GetCrystallizedState() *CrystallizedState {
}
type CrystallizedState struct {
LastStateRecalc uint64 `protobuf:"varint,1,opt,name=last_state_recalc,json=lastStateRecalc,proto3" json:"last_state_recalc,omitempty"`
JustifiedStreak uint64 `protobuf:"varint,2,opt,name=justified_streak,json=justifiedStreak,proto3" json:"justified_streak,omitempty"`
LastJustifiedSlot uint64 `protobuf:"varint,3,opt,name=last_justified_slot,json=lastJustifiedSlot,proto3" json:"last_justified_slot,omitempty"`
LastFinalizedSlot uint64 `protobuf:"varint,4,opt,name=last_finalized_slot,json=lastFinalizedSlot,proto3" json:"last_finalized_slot,omitempty"`
CurrentDynasty uint64 `protobuf:"varint,5,opt,name=current_dynasty,json=currentDynasty,proto3" json:"current_dynasty,omitempty"`
CrosslinkingStartShard uint64 `protobuf:"varint,6,opt,name=crosslinking_start_shard,json=crosslinkingStartShard,proto3" json:"crosslinking_start_shard,omitempty"`
TotalDeposits uint64 `protobuf:"varint,7,opt,name=total_deposits,json=totalDeposits,proto3" json:"total_deposits,omitempty"`
LastStateRecalc uint64 `protobuf:"varint,1,opt,name=last_state_recalc,json=lastStateRecalc" json:"last_state_recalc,omitempty"`
JustifiedStreak uint64 `protobuf:"varint,2,opt,name=justified_streak,json=justifiedStreak" json:"justified_streak,omitempty"`
LastJustifiedSlot uint64 `protobuf:"varint,3,opt,name=last_justified_slot,json=lastJustifiedSlot" json:"last_justified_slot,omitempty"`
LastFinalizedSlot uint64 `protobuf:"varint,4,opt,name=last_finalized_slot,json=lastFinalizedSlot" json:"last_finalized_slot,omitempty"`
CurrentDynasty uint64 `protobuf:"varint,5,opt,name=current_dynasty,json=currentDynasty" json:"current_dynasty,omitempty"`
CrosslinkingStartShard uint64 `protobuf:"varint,6,opt,name=crosslinking_start_shard,json=crosslinkingStartShard" json:"crosslinking_start_shard,omitempty"`
TotalDeposits uint64 `protobuf:"varint,7,opt,name=total_deposits,json=totalDeposits" json:"total_deposits,omitempty"`
DynastySeed []byte `protobuf:"bytes,8,opt,name=dynasty_seed,json=dynastySeed,proto3" json:"dynasty_seed,omitempty"`
DynastySeedLastReset uint64 `protobuf:"varint,9,opt,name=dynasty_seed_last_reset,json=dynastySeedLastReset,proto3" json:"dynasty_seed_last_reset,omitempty"`
CrosslinkRecords []*CrosslinkRecord `protobuf:"bytes,10,rep,name=crosslink_records,json=crosslinkRecords,proto3" json:"crosslink_records,omitempty"`
Validators []*ValidatorRecord `protobuf:"bytes,11,rep,name=validators,proto3" json:"validators,omitempty"`
IndicesForSlots []*ShardAndCommitteeArray `protobuf:"bytes,12,rep,name=indices_for_slots,json=indicesForSlots,proto3" json:"indices_for_slots,omitempty"`
DynastySeedLastReset uint64 `protobuf:"varint,9,opt,name=dynasty_seed_last_reset,json=dynastySeedLastReset" json:"dynasty_seed_last_reset,omitempty"`
CrosslinkRecords []*CrosslinkRecord `protobuf:"bytes,10,rep,name=crosslink_records,json=crosslinkRecords" json:"crosslink_records,omitempty"`
Validators []*ValidatorRecord `protobuf:"bytes,11,rep,name=validators" json:"validators,omitempty"`
IndicesForSlots []*ShardAndCommitteeArray `protobuf:"bytes,12,rep,name=indices_for_slots,json=indicesForSlots" json:"indices_for_slots,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -401,7 +451,7 @@ 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_a20b723c3c4695b7, []int{8}
return fileDescriptor_messages_bd1ed2903542c11b, []int{8}
}
func (m *CrystallizedState) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CrystallizedState.Unmarshal(m, b)
@@ -506,7 +556,7 @@ func (m *CrystallizedState) GetIndicesForSlots() []*ShardAndCommitteeArray {
}
type ShardAndCommitteeArray struct {
ArrayShardAndCommittee []*ShardAndCommittee `protobuf:"bytes,1,rep,name=array_shard_and_committee,json=arrayShardAndCommittee,proto3" json:"array_shard_and_committee,omitempty"`
ArrayShardAndCommittee []*ShardAndCommittee `protobuf:"bytes,1,rep,name=array_shard_and_committee,json=arrayShardAndCommittee" json:"array_shard_and_committee,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -516,7 +566,7 @@ func (m *ShardAndCommitteeArray) Reset() { *m = ShardAndCommitteeArray{}
func (m *ShardAndCommitteeArray) String() string { return proto.CompactTextString(m) }
func (*ShardAndCommitteeArray) ProtoMessage() {}
func (*ShardAndCommitteeArray) Descriptor() ([]byte, []int) {
return fileDescriptor_messages_a20b723c3c4695b7, []int{9}
return fileDescriptor_messages_bd1ed2903542c11b, []int{9}
}
func (m *ShardAndCommitteeArray) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ShardAndCommitteeArray.Unmarshal(m, b)
@@ -554,7 +604,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_a20b723c3c4695b7, []int{10}
return fileDescriptor_messages_bd1ed2903542c11b, []int{10}
}
func (m *ActiveStateHashAnnounce) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ActiveStateHashAnnounce.Unmarshal(m, b)
@@ -592,7 +642,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_a20b723c3c4695b7, []int{11}
return fileDescriptor_messages_bd1ed2903542c11b, []int{11}
}
func (m *ActiveStateRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ActiveStateRequest.Unmarshal(m, b)
@@ -620,8 +670,8 @@ func (m *ActiveStateRequest) GetHash() []byte {
}
type ShardAndCommittee struct {
ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
Committee []uint32 `protobuf:"varint,2,rep,packed,name=committee,proto3" json:"committee,omitempty"`
ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId" json:"shard_id,omitempty"`
Committee []uint32 `protobuf:"varint,2,rep,packed,name=committee" json:"committee,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -631,7 +681,7 @@ func (m *ShardAndCommittee) Reset() { *m = ShardAndCommittee{} }
func (m *ShardAndCommittee) String() string { return proto.CompactTextString(m) }
func (*ShardAndCommittee) ProtoMessage() {}
func (*ShardAndCommittee) Descriptor() ([]byte, []int) {
return fileDescriptor_messages_a20b723c3c4695b7, []int{12}
return fileDescriptor_messages_bd1ed2903542c11b, []int{12}
}
func (m *ShardAndCommittee) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ShardAndCommittee.Unmarshal(m, b)
@@ -666,7 +716,7 @@ func (m *ShardAndCommittee) GetCommittee() []uint32 {
}
type ActiveStateResponse struct {
ActiveState *ActiveState `protobuf:"bytes,1,opt,name=active_state,json=activeState,proto3" json:"active_state,omitempty"`
ActiveState *ActiveState `protobuf:"bytes,1,opt,name=active_state,json=activeState" json:"active_state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -676,7 +726,7 @@ 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_a20b723c3c4695b7, []int{13}
return fileDescriptor_messages_bd1ed2903542c11b, []int{13}
}
func (m *ActiveStateResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ActiveStateResponse.Unmarshal(m, b)
@@ -704,7 +754,7 @@ func (m *ActiveStateResponse) GetActiveState() *ActiveState {
}
type ActiveState struct {
PendingAttestations []*AttestationRecord `protobuf:"bytes,1,rep,name=pending_attestations,json=pendingAttestations,proto3" json:"pending_attestations,omitempty"`
PendingAttestations []*AttestationRecord `protobuf:"bytes,1,rep,name=pending_attestations,json=pendingAttestations" json:"pending_attestations,omitempty"`
RecentBlockHashes [][]byte `protobuf:"bytes,2,rep,name=recent_block_hashes,json=recentBlockHashes,proto3" json:"recent_block_hashes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -715,7 +765,7 @@ 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_a20b723c3c4695b7, []int{14}
return fileDescriptor_messages_bd1ed2903542c11b, []int{14}
}
func (m *ActiveState) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ActiveState.Unmarshal(m, b)
@@ -750,13 +800,13 @@ func (m *ActiveState) GetRecentBlockHashes() [][]byte {
}
type ValidatorRecord struct {
PublicKey uint64 `protobuf:"varint,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
WithdrawalShard uint64 `protobuf:"varint,2,opt,name=withdrawal_shard,json=withdrawalShard,proto3" json:"withdrawal_shard,omitempty"`
PublicKey uint64 `protobuf:"varint,1,opt,name=public_key,json=publicKey" json:"public_key,omitempty"`
WithdrawalShard uint64 `protobuf:"varint,2,opt,name=withdrawal_shard,json=withdrawalShard" json:"withdrawal_shard,omitempty"`
WithdrawalAddress []byte `protobuf:"bytes,3,opt,name=withdrawal_address,json=withdrawalAddress,proto3" json:"withdrawal_address,omitempty"`
RandaoCommitment []byte `protobuf:"bytes,4,opt,name=randao_commitment,json=randaoCommitment,proto3" json:"randao_commitment,omitempty"`
Balance uint64 `protobuf:"varint,5,opt,name=balance,proto3" json:"balance,omitempty"`
StartDynasty uint64 `protobuf:"varint,6,opt,name=start_dynasty,json=startDynasty,proto3" json:"start_dynasty,omitempty"`
EndDynasty uint64 `protobuf:"varint,7,opt,name=end_dynasty,json=endDynasty,proto3" json:"end_dynasty,omitempty"`
Balance uint64 `protobuf:"varint,5,opt,name=balance" json:"balance,omitempty"`
StartDynasty uint64 `protobuf:"varint,6,opt,name=start_dynasty,json=startDynasty" json:"start_dynasty,omitempty"`
EndDynasty uint64 `protobuf:"varint,7,opt,name=end_dynasty,json=endDynasty" json:"end_dynasty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -766,7 +816,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_a20b723c3c4695b7, []int{15}
return fileDescriptor_messages_bd1ed2903542c11b, []int{15}
}
func (m *ValidatorRecord) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ValidatorRecord.Unmarshal(m, b)
@@ -836,12 +886,12 @@ func (m *ValidatorRecord) GetEndDynasty() uint64 {
}
type AttestationRecord struct {
Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"`
ShardId uint64 `protobuf:"varint,2,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
Slot uint64 `protobuf:"varint,1,opt,name=slot" json:"slot,omitempty"`
ShardId uint64 `protobuf:"varint,2,opt,name=shard_id,json=shardId" json:"shard_id,omitempty"`
ShardBlockHash []byte `protobuf:"bytes,3,opt,name=shard_block_hash,json=shardBlockHash,proto3" json:"shard_block_hash,omitempty"`
AttesterBitfield []byte `protobuf:"bytes,4,opt,name=attester_bitfield,json=attesterBitfield,proto3" json:"attester_bitfield,omitempty"`
ObliqueParentHashes [][]byte `protobuf:"bytes,5,rep,name=oblique_parent_hashes,json=obliqueParentHashes,proto3" json:"oblique_parent_hashes,omitempty"`
AggregateSig []uint64 `protobuf:"varint,6,rep,packed,name=aggregate_sig,json=aggregateSig,proto3" json:"aggregate_sig,omitempty"`
AggregateSig []uint64 `protobuf:"varint,6,rep,packed,name=aggregate_sig,json=aggregateSig" json:"aggregate_sig,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -851,7 +901,7 @@ func (m *AttestationRecord) Reset() { *m = AttestationRecord{} }
func (m *AttestationRecord) String() string { return proto.CompactTextString(m) }
func (*AttestationRecord) ProtoMessage() {}
func (*AttestationRecord) Descriptor() ([]byte, []int) {
return fileDescriptor_messages_a20b723c3c4695b7, []int{16}
return fileDescriptor_messages_bd1ed2903542c11b, []int{16}
}
func (m *AttestationRecord) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AttestationRecord.Unmarshal(m, b)
@@ -914,7 +964,7 @@ func (m *AttestationRecord) GetAggregateSig() []uint64 {
}
type CrosslinkRecord struct {
Dynasty uint64 `protobuf:"varint,1,opt,name=dynasty,proto3" json:"dynasty,omitempty"`
Dynasty uint64 `protobuf:"varint,1,opt,name=dynasty" json:"dynasty,omitempty"`
Blockhash []byte `protobuf:"bytes,2,opt,name=blockhash,proto3" json:"blockhash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -925,7 +975,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_messages_a20b723c3c4695b7, []int{17}
return fileDescriptor_messages_bd1ed2903542c11b, []int{17}
}
func (m *CrosslinkRecord) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CrosslinkRecord.Unmarshal(m, b)
@@ -978,83 +1028,94 @@ func init() {
proto.RegisterType((*ValidatorRecord)(nil), "ethereum.beacon.p2p.v1.ValidatorRecord")
proto.RegisterType((*AttestationRecord)(nil), "ethereum.beacon.p2p.v1.AttestationRecord")
proto.RegisterType((*CrosslinkRecord)(nil), "ethereum.beacon.p2p.v1.CrosslinkRecord")
proto.RegisterEnum("ethereum.beacon.p2p.v1.Topic", Topic_name, Topic_value)
}
func init() {
proto.RegisterFile("proto/beacon/p2p/v1/messages.proto", fileDescriptor_messages_a20b723c3c4695b7)
proto.RegisterFile("proto/beacon/p2p/v1/messages.proto", fileDescriptor_messages_bd1ed2903542c11b)
}
var fileDescriptor_messages_a20b723c3c4695b7 = []byte{
// 1121 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x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1d, 0x03, 0x9c, 0xe1, 0x0a, 0x00,
0x00,
var fileDescriptor_messages_bd1ed2903542c11b = []byte{
// 1287 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xdd, 0x72, 0xdb, 0x44,
0x14, 0xc6, 0x8e, 0xf3, 0x77, 0xec, 0xd4, 0xf6, 0xa6, 0x4d, 0x95, 0x42, 0x9b, 0xa0, 0xc2, 0x34,
0x2d, 0x53, 0x67, 0x9a, 0x0e, 0x4c, 0xb9, 0x94, 0x5d, 0x97, 0x86, 0xa6, 0x4e, 0x91, 0x9c, 0x42,
0x3b, 0x30, 0x9a, 0xb5, 0xb4, 0xb6, 0x45, 0x64, 0xad, 0xba, 0xbb, 0x4e, 0xc6, 0x5c, 0x70, 0xc7,
0x33, 0x70, 0xc1, 0x13, 0xf0, 0x32, 0x3c, 0x0c, 0x4f, 0xc0, 0xec, 0x6a, 0x25, 0xcb, 0x3f, 0x49,
0x87, 0x3b, 0xe9, 0xfb, 0xbe, 0x73, 0x74, 0xfe, 0xf6, 0xac, 0xc0, 0x8c, 0x19, 0x15, 0xf4, 0xb0,
0x47, 0xb0, 0x47, 0xa3, 0xc3, 0xf8, 0x28, 0x3e, 0xbc, 0x78, 0x72, 0x38, 0x22, 0x9c, 0xe3, 0x01,
0xe1, 0x0d, 0x45, 0xa2, 0x1d, 0x22, 0x86, 0x84, 0x91, 0xf1, 0xa8, 0x91, 0xc8, 0x1a, 0xf1, 0x51,
0xdc, 0xb8, 0x78, 0x72, 0x67, 0x6f, 0x40, 0xe9, 0x20, 0x24, 0x87, 0x4a, 0xd5, 0x1b, 0xf7, 0x0f,
0x45, 0x30, 0x22, 0x5c, 0xe0, 0x51, 0x9c, 0x18, 0x9a, 0x8f, 0xe1, 0x76, 0x53, 0x59, 0x34, 0x43,
0xea, 0x9d, 0xbf, 0xc4, 0x7c, 0x68, 0x45, 0x11, 0x1d, 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,
0x6f, 0xfa, 0x29, 0x32, 0x0c, 0x00, 0x00,
}

View File

@@ -4,6 +4,20 @@ package ethereum.beacon.p2p.v1;
import "google/protobuf/timestamp.proto";
enum Topic {
UNKNOWN = 0;
BEACON_BLOCK_HASH_ANNOUNCE = 1;
BEACON_BLOCK_REQUEST = 2;
BEACON_BLOCK_REQUEST_BY_SLOT_NUMBER = 3;
BEACON_BLOCK_RESPONSE = 4;
CRYSTALLIZED_STATE_HASH_ANNOUNCE = 5;
CRYSTALLIZED_STATE_REQUEST = 6;
CRYSTALLIZED_STATE_RESPONSE = 7;
ACTIVE_STATE_HASH_ANNOUNCE = 8;
ACTIVE_STATE_REQUEST = 9;
ACTIVE_STATE_RESPONSE = 10;
}
message BeaconBlockHashAnnounce {
bytes hash = 1;
}

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: messages.proto
// source: proto/sharding/p2p/v1/messages.proto
package ethereum_sharding_p2p_v1
package v1
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
@@ -18,69 +18,38 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// TODO: Split the topics into p2p for beacon chain and p2p for sharding.
type Topic int32
const (
Topic_UNKNOWN Topic = 0
Topic_COLLATION_BODY_REQUEST Topic = 1
Topic_COLLATION_BODY_RESPONSE Topic = 2
Topic_TRANSACTIONS Topic = 3
Topic_BEACON_BLOCK_HASH_ANNOUNCE Topic = 4
Topic_BEACON_BLOCK_REQUEST Topic = 5
Topic_BEACON_BLOCK_REQUEST_BY_SLOT_NUMBER Topic = 6
Topic_BEACON_BLOCK_RESPONSE Topic = 7
Topic_CRYSTALLIZED_STATE_HASH_ANNOUNCE Topic = 8
Topic_CRYSTALLIZED_STATE_REQUEST Topic = 9
Topic_CRYSTALLIZED_STATE_RESPONSE Topic = 10
Topic_ACTIVE_STATE_HASH_ANNOUNCE Topic = 11
Topic_ACTIVE_STATE_REQUEST Topic = 12
Topic_ACTIVE_STATE_RESPONSE Topic = 13
Topic_UNKNOWN Topic = 0
Topic_COLLATION_BODY_REQUEST Topic = 1
Topic_COLLATION_BODY_RESPONSE Topic = 2
Topic_TRANSACTIONS Topic = 3
)
var Topic_name = map[int32]string{
0: "UNKNOWN",
1: "COLLATION_BODY_REQUEST",
2: "COLLATION_BODY_RESPONSE",
3: "TRANSACTIONS",
4: "BEACON_BLOCK_HASH_ANNOUNCE",
5: "BEACON_BLOCK_REQUEST",
6: "BEACON_BLOCK_REQUEST_BY_SLOT_NUMBER",
7: "BEACON_BLOCK_RESPONSE",
8: "CRYSTALLIZED_STATE_HASH_ANNOUNCE",
9: "CRYSTALLIZED_STATE_REQUEST",
10: "CRYSTALLIZED_STATE_RESPONSE",
11: "ACTIVE_STATE_HASH_ANNOUNCE",
12: "ACTIVE_STATE_REQUEST",
13: "ACTIVE_STATE_RESPONSE",
0: "UNKNOWN",
1: "COLLATION_BODY_REQUEST",
2: "COLLATION_BODY_RESPONSE",
3: "TRANSACTIONS",
}
var Topic_value = map[string]int32{
"UNKNOWN": 0,
"COLLATION_BODY_REQUEST": 1,
"COLLATION_BODY_RESPONSE": 2,
"TRANSACTIONS": 3,
"BEACON_BLOCK_HASH_ANNOUNCE": 4,
"BEACON_BLOCK_REQUEST": 5,
"BEACON_BLOCK_REQUEST_BY_SLOT_NUMBER": 6,
"BEACON_BLOCK_RESPONSE": 7,
"CRYSTALLIZED_STATE_HASH_ANNOUNCE": 8,
"CRYSTALLIZED_STATE_REQUEST": 9,
"CRYSTALLIZED_STATE_RESPONSE": 10,
"ACTIVE_STATE_HASH_ANNOUNCE": 11,
"ACTIVE_STATE_REQUEST": 12,
"ACTIVE_STATE_RESPONSE": 13,
"UNKNOWN": 0,
"COLLATION_BODY_REQUEST": 1,
"COLLATION_BODY_RESPONSE": 2,
"TRANSACTIONS": 3,
}
func (x Topic) String() string {
return proto.EnumName(Topic_name, int32(x))
}
func (Topic) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_messages_2d61a34a4bdb49bc, []int{0}
return fileDescriptor_messages_8b1affe159ebec96, []int{0}
}
type CollationBodyRequest struct {
ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"`
ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId" json:"shard_id,omitempty"`
Period uint64 `protobuf:"varint,2,opt,name=period" json:"period,omitempty"`
ChunkRoot []byte `protobuf:"bytes,3,opt,name=chunk_root,json=chunkRoot,proto3" json:"chunk_root,omitempty"`
ProposerAddress []byte `protobuf:"bytes,4,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"`
Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
@@ -93,7 +62,7 @@ func (m *CollationBodyRequest) Reset() { *m = CollationBodyRequest{} }
func (m *CollationBodyRequest) String() string { return proto.CompactTextString(m) }
func (*CollationBodyRequest) ProtoMessage() {}
func (*CollationBodyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_messages_2d61a34a4bdb49bc, []int{0}
return fileDescriptor_messages_8b1affe159ebec96, []int{0}
}
func (m *CollationBodyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollationBodyRequest.Unmarshal(m, b)
@@ -160,7 +129,7 @@ func (m *CollationBodyResponse) Reset() { *m = CollationBodyResponse{} }
func (m *CollationBodyResponse) String() string { return proto.CompactTextString(m) }
func (*CollationBodyResponse) ProtoMessage() {}
func (*CollationBodyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_messages_2d61a34a4bdb49bc, []int{1}
return fileDescriptor_messages_8b1affe159ebec96, []int{1}
}
func (m *CollationBodyResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollationBodyResponse.Unmarshal(m, b)
@@ -195,13 +164,13 @@ func (m *CollationBodyResponse) GetBody() []byte {
}
type Transaction struct {
Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
GasPrice uint64 `protobuf:"varint,2,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"`
GasLimit uint64 `protobuf:"varint,3,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"`
Nonce uint64 `protobuf:"varint,1,opt,name=nonce" json:"nonce,omitempty"`
GasPrice uint64 `protobuf:"varint,2,opt,name=gas_price,json=gasPrice" json:"gas_price,omitempty"`
GasLimit uint64 `protobuf:"varint,3,opt,name=gas_limit,json=gasLimit" json:"gas_limit,omitempty"`
Recipient []byte `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"`
Value uint64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"`
Value uint64 `protobuf:"varint,5,opt,name=value" json:"value,omitempty"`
Input []byte `protobuf:"bytes,6,opt,name=input,proto3" json:"input,omitempty"`
Signature *Signature `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"`
Signature *Signature `protobuf:"bytes,7,opt,name=signature" json:"signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -211,7 +180,7 @@ func (m *Transaction) Reset() { *m = Transaction{} }
func (m *Transaction) String() string { return proto.CompactTextString(m) }
func (*Transaction) ProtoMessage() {}
func (*Transaction) Descriptor() ([]byte, []int) {
return fileDescriptor_messages_2d61a34a4bdb49bc, []int{2}
return fileDescriptor_messages_8b1affe159ebec96, []int{2}
}
func (m *Transaction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Transaction.Unmarshal(m, b)
@@ -281,9 +250,9 @@ func (m *Transaction) GetSignature() *Signature {
}
type Signature struct {
V uint64 `protobuf:"varint,1,opt,name=v,proto3" json:"v,omitempty"`
R uint64 `protobuf:"varint,2,opt,name=r,proto3" json:"r,omitempty"`
S uint64 `protobuf:"varint,3,opt,name=s,proto3" json:"s,omitempty"`
V uint64 `protobuf:"varint,1,opt,name=v" json:"v,omitempty"`
R uint64 `protobuf:"varint,2,opt,name=r" json:"r,omitempty"`
S uint64 `protobuf:"varint,3,opt,name=s" json:"s,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -293,7 +262,7 @@ func (m *Signature) Reset() { *m = Signature{} }
func (m *Signature) String() string { return proto.CompactTextString(m) }
func (*Signature) ProtoMessage() {}
func (*Signature) Descriptor() ([]byte, []int) {
return fileDescriptor_messages_2d61a34a4bdb49bc, []int{3}
return fileDescriptor_messages_8b1affe159ebec96, []int{3}
}
func (m *Signature) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Signature.Unmarshal(m, b)
@@ -342,44 +311,39 @@ func init() {
proto.RegisterEnum("ethereum.sharding.p2p.v1.Topic", Topic_name, Topic_value)
}
func init() { proto.RegisterFile("messages.proto", fileDescriptor_messages_2d61a34a4bdb49bc) }
var fileDescriptor_messages_2d61a34a4bdb49bc = []byte{
// 569 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xed, 0x4e, 0xd4, 0x4c,
0x18, 0x7d, 0x0b, 0xfb, 0xc1, 0x3e, 0xdb, 0x57, 0x9b, 0x09, 0x60, 0x01, 0x95, 0x0d, 0x98, 0x88,
0xfe, 0x68, 0x22, 0xc6, 0x0b, 0xe8, 0x96, 0x26, 0x10, 0x6a, 0x8b, 0x6d, 0x57, 0x83, 0x7f, 0x26,
0x43, 0x3b, 0xd9, 0x4e, 0x5c, 0x3a, 0x75, 0xa6, 0xdd, 0x84, 0x4b, 0xf1, 0x32, 0xbc, 0x2d, 0xaf,
0xc2, 0x4c, 0x3f, 0x10, 0xd6, 0xf5, 0xdf, 0x9e, 0x8f, 0x9c, 0xe7, 0x9c, 0xd9, 0x14, 0x9e, 0xdc,
0x52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e, 0xb7, 0xa3, 0x73, 0x6c, 0xfb, 0x7e, 0x30, 0xf3, 0x1d, 0xd7, 0xe8, 0x21, 0x13, 0xb6, 0x1f,
0xe9, 0xdd, 0xa1, 0x3e, 0x7a, 0x0d, 0xc7, 0xeb, 0x14, 0x3c, 0xbd, 0xc6, 0x91, 0x17, 0xc4, 0xd8,
0x9f, 0x7d, 0x9c, 0xba, 0xa1, 0x31, 0x40, 0x7b, 0xb0, 0xb3, 0x62, 0x6c, 0xfb, 0x0c, 0xd1, 0x2b,
0x98, 0x38, 0xe1, 0x75, 0x14, 0xdb, 0x9e, 0x77, 0xf1, 0xd5, 0x3d, 0xc3, 0x51, 0x6c, 0xc7, 0xee,
0x4a, 0x87, 0x2d, 0xd5, 0x71, 0x8d, 0xab, 0x6b, 0x32, 0x42, 0x87, 0x70, 0xb0, 0x56, 0x6f, 0xcf,
0x80, 0x0a, 0x50, 0x8b, 0x3f, 0xbb, 0x6b, 0x0f, 0x8c, 0xd5, 0xc8, 0x47, 0x7a, 0x17, 0xad, 0xab,
0xee, 0x2b, 0x4a, 0x1b, 0xfa, 0xff, 0xcd, 0xa0, 0xfe, 0xc4, 0xdf, 0xff, 0x0e, 0x00, 0x00, 0xff,
0xff, 0xdb, 0xf5, 0x43, 0x2a, 0xf4, 0x03, 0x00, 0x00,
func init() {
proto.RegisterFile("proto/sharding/p2p/v1/messages.proto", fileDescriptor_messages_8b1affe159ebec96)
}
var fileDescriptor_messages_8b1affe159ebec96 = []byte{
// 459 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xdf, 0x6e, 0xd3, 0x30,
0x14, 0xc6, 0xf1, 0xd6, 0x3f, 0xeb, 0x69, 0x24, 0x22, 0x6b, 0x8c, 0xc0, 0x40, 0x54, 0x85, 0x8b,
0xc2, 0x45, 0xaa, 0x15, 0xf1, 0x00, 0x59, 0xa9, 0xc4, 0x44, 0x95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 0xba, 0x08,
0x9f, 0xc3, 0xd3, 0x7f, 0xba, 0xe4, 0x3a, 0x0a, 0x93, 0x8d, 0x7b, 0x84, 0x5d, 0x70, 0xd2, 0x38,
0x08, 0x93, 0x60, 0xdd, 0xd5, 0x89, 0x7b, 0x7c, 0x3b, 0x32, 0xff, 0xe9, 0xfb, 0xdf, 0x01, 0x00,
0x00, 0xff, 0xff, 0x1e, 0x58, 0xa9, 0xa1, 0xcf, 0x02, 0x00, 0x00,
}

View File

@@ -2,22 +2,11 @@ syntax = "proto3";
package ethereum.sharding.p2p.v1;
// TODO: Split the topics into p2p for beacon chain and p2p for sharding.
enum Topic {
UNKNOWN = 0;
COLLATION_BODY_REQUEST = 1;
COLLATION_BODY_RESPONSE = 2;
TRANSACTIONS = 3;
BEACON_BLOCK_HASH_ANNOUNCE = 4;
BEACON_BLOCK_REQUEST = 5;
BEACON_BLOCK_REQUEST_BY_SLOT_NUMBER = 6;
BEACON_BLOCK_RESPONSE = 7;
CRYSTALLIZED_STATE_HASH_ANNOUNCE = 8;
CRYSTALLIZED_STATE_REQUEST = 9;
CRYSTALLIZED_STATE_RESPONSE = 10;
ACTIVE_STATE_HASH_ANNOUNCE = 11;
ACTIVE_STATE_REQUEST = 12;
ACTIVE_STATE_RESPONSE = 13;
}
message CollationBodyRequest {

24
proto/testing/BUILD.bazel Normal file
View File

@@ -0,0 +1,24 @@
package(default_testonly = True)
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
proto_library(
name = "ethereum_testing_proto",
srcs = ["test.proto"],
visibility = ["//visibility:public"],
)
go_proto_library(
name = "ethereum_testing_go_proto",
importpath = "github.com/prysmaticlabs/prysm/proto/testing",
proto = ":ethereum_testing_proto",
visibility = ["//visibility:public"],
)
go_library(
name = "go_default_library",
embed = [":ethereum_testing_go_proto"],
importpath = "github.com/prysmaticlabs/prysm/proto/testing",
visibility = ["//visibility:public"],
)

123
proto/testing/test.pb.go Executable file
View File

@@ -0,0 +1,123 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: proto/testing/test.proto
package testing
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type TestMessage struct {
Foo string `protobuf:"bytes,1,opt,name=foo" json:"foo,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TestMessage) Reset() { *m = TestMessage{} }
func (m *TestMessage) String() string { return proto.CompactTextString(m) }
func (*TestMessage) ProtoMessage() {}
func (*TestMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_test_efe8e22469748e36, []int{0}
}
func (m *TestMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TestMessage.Unmarshal(m, b)
}
func (m *TestMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TestMessage.Marshal(b, m, deterministic)
}
func (dst *TestMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_TestMessage.Merge(dst, src)
}
func (m *TestMessage) XXX_Size() int {
return xxx_messageInfo_TestMessage.Size(m)
}
func (m *TestMessage) XXX_DiscardUnknown() {
xxx_messageInfo_TestMessage.DiscardUnknown(m)
}
var xxx_messageInfo_TestMessage proto.InternalMessageInfo
func (m *TestMessage) GetFoo() string {
if m != nil {
return m.Foo
}
return ""
}
type Puzzle struct {
Challenge string `protobuf:"bytes,1,opt,name=challenge" json:"challenge,omitempty"`
Answer string `protobuf:"bytes,2,opt,name=answer" json:"answer,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Puzzle) Reset() { *m = Puzzle{} }
func (m *Puzzle) String() string { return proto.CompactTextString(m) }
func (*Puzzle) ProtoMessage() {}
func (*Puzzle) Descriptor() ([]byte, []int) {
return fileDescriptor_test_efe8e22469748e36, []int{1}
}
func (m *Puzzle) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Puzzle.Unmarshal(m, b)
}
func (m *Puzzle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Puzzle.Marshal(b, m, deterministic)
}
func (dst *Puzzle) XXX_Merge(src proto.Message) {
xxx_messageInfo_Puzzle.Merge(dst, src)
}
func (m *Puzzle) XXX_Size() int {
return xxx_messageInfo_Puzzle.Size(m)
}
func (m *Puzzle) XXX_DiscardUnknown() {
xxx_messageInfo_Puzzle.DiscardUnknown(m)
}
var xxx_messageInfo_Puzzle proto.InternalMessageInfo
func (m *Puzzle) GetChallenge() string {
if m != nil {
return m.Challenge
}
return ""
}
func (m *Puzzle) GetAnswer() string {
if m != nil {
return m.Answer
}
return ""
}
func init() {
proto.RegisterType((*TestMessage)(nil), "ethereum.testing.TestMessage")
proto.RegisterType((*Puzzle)(nil), "ethereum.testing.Puzzle")
}
func init() { proto.RegisterFile("proto/testing/test.proto", fileDescriptor_test_efe8e22469748e36) }
var fileDescriptor_test_efe8e22469748e36 = []byte{
// 135 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0x28, 0xca, 0x2f,
0xc9, 0xd7, 0x2f, 0x49, 0x2d, 0x2e, 0xc9, 0xcc, 0x4b, 0x07, 0xd3, 0x7a, 0x60, 0x21, 0x21, 0x81,
0xd4, 0x92, 0x8c, 0xd4, 0xa2, 0xd4, 0xd2, 0x5c, 0x3d, 0xa8, 0xa4, 0x92, 0x3c, 0x17, 0x77, 0x48,
0x6a, 0x71, 0x89, 0x6f, 0x6a, 0x71, 0x71, 0x62, 0x7a, 0xaa, 0x90, 0x00, 0x17, 0x73, 0x5a, 0x7e,
0xbe, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x88, 0xa9, 0x64, 0xc7, 0xc5, 0x16, 0x50, 0x5a,
0x55, 0x95, 0x93, 0x2a, 0x24, 0xc3, 0xc5, 0x99, 0x9c, 0x91, 0x98, 0x93, 0x93, 0x9a, 0x97, 0x9e,
0x0a, 0x55, 0x81, 0x10, 0x10, 0x12, 0xe3, 0x62, 0x4b, 0xcc, 0x2b, 0x2e, 0x4f, 0x2d, 0x92, 0x60,
0x02, 0x4b, 0x41, 0x79, 0x49, 0x6c, 0x60, 0x9b, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7f,
0xb3, 0xa3, 0x6b, 0x95, 0x00, 0x00, 0x00,
}

13
proto/testing/test.proto Normal file
View File

@@ -0,0 +1,13 @@
syntax = "proto3";
package ethereum.testing;
message TestMessage {
string foo = 1;
}
// Used in shared/p2p/feed_example_test.go
message Puzzle {
string challenge = 1;
string answer = 2;
}