2018-07-17 18:39:04 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2018-07-31 18:54:45 +00:00
|
|
|
package ethereum.beacon.p2p.v1;
|
2018-07-17 18:39:04 +00:00
|
|
|
|
2018-07-28 19:53:02 +00:00
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
|
2018-08-29 16:32:54 +00:00
|
|
|
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;
|
2018-09-09 03:05:36 +00:00
|
|
|
}
|
2018-08-29 16:32:54 +00:00
|
|
|
|
2018-07-28 19:53:02 +00:00
|
|
|
message BeaconBlockHashAnnounce {
|
|
|
|
bytes hash = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BeaconBlockRequest {
|
|
|
|
bytes hash = 1;
|
|
|
|
}
|
|
|
|
|
2018-08-07 12:12:10 +00:00
|
|
|
message BeaconBlockRequestBySlotNumber{
|
|
|
|
uint64 slot_number = 1;
|
|
|
|
}
|
|
|
|
|
2018-07-28 19:53:02 +00:00
|
|
|
message BeaconBlockResponse {
|
2018-08-05 23:23:31 +00:00
|
|
|
BeaconBlock block = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BeaconBlock {
|
2018-07-28 19:53:02 +00:00
|
|
|
bytes parent_hash = 1;
|
|
|
|
uint64 slot_number = 2;
|
|
|
|
bytes randao_reveal = 3;
|
2018-08-14 00:58:37 +00:00
|
|
|
bytes pow_chain_ref = 4;
|
|
|
|
bytes active_state_hash = 5;
|
|
|
|
bytes crystallized_state_hash = 6;
|
|
|
|
google.protobuf.Timestamp timestamp = 7;
|
|
|
|
repeated AttestationRecord attestations = 8;
|
2018-07-28 19:53:02 +00:00
|
|
|
}
|
|
|
|
|
2018-07-31 00:29:40 +00:00
|
|
|
message CrystallizedStateHashAnnounce {
|
|
|
|
bytes hash = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CrystallizedStateRequest {
|
|
|
|
bytes hash = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CrystallizedStateResponse {
|
2018-08-05 23:23:31 +00:00
|
|
|
CrystallizedState crystallized_state = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CrystallizedState {
|
2018-08-14 00:58:37 +00:00
|
|
|
uint64 last_state_recalc = 1;
|
|
|
|
uint64 justified_streak = 2;
|
|
|
|
uint64 last_justified_slot = 3;
|
|
|
|
uint64 last_finalized_slot = 4;
|
|
|
|
uint64 current_dynasty = 5;
|
2018-09-14 00:36:57 +00:00
|
|
|
uint64 total_deposits = 6;
|
|
|
|
bytes dynasty_seed = 7;
|
|
|
|
uint64 dynasty_start = 8;
|
|
|
|
repeated CrosslinkRecord crosslink_records = 9;
|
|
|
|
repeated ValidatorRecord validators = 10;
|
|
|
|
repeated ShardAndCommitteeArray shard_and_committees_for_slots = 11;
|
2018-08-14 00:58:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ShardAndCommitteeArray {
|
|
|
|
repeated ShardAndCommittee array_shard_and_committee = 1;
|
2018-07-31 00:29:40 +00:00
|
|
|
}
|
|
|
|
|
2018-07-31 01:13:25 +00:00
|
|
|
message ActiveStateHashAnnounce {
|
|
|
|
bytes hash = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ActiveStateRequest {
|
|
|
|
bytes hash = 1;
|
|
|
|
}
|
|
|
|
|
2018-08-14 00:58:37 +00:00
|
|
|
message ShardAndCommittee {
|
|
|
|
uint64 shard_id = 1;
|
|
|
|
repeated uint32 committee = 2;
|
|
|
|
}
|
|
|
|
|
2018-07-31 01:13:25 +00:00
|
|
|
message ActiveStateResponse {
|
2018-08-05 23:23:31 +00:00
|
|
|
ActiveState active_state = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ActiveState {
|
2018-08-14 00:58:37 +00:00
|
|
|
repeated AttestationRecord pending_attestations = 1;
|
|
|
|
repeated bytes recent_block_hashes = 2;
|
2018-07-28 19:53:02 +00:00
|
|
|
}
|
|
|
|
|
2018-07-31 00:29:40 +00:00
|
|
|
message ValidatorRecord {
|
2018-07-31 18:54:45 +00:00
|
|
|
uint64 public_key = 1;
|
2018-07-31 00:29:40 +00:00
|
|
|
uint64 withdrawal_shard = 2;
|
|
|
|
bytes withdrawal_address = 3;
|
|
|
|
bytes randao_commitment = 4;
|
|
|
|
uint64 balance = 5;
|
2018-08-14 00:58:37 +00:00
|
|
|
uint64 start_dynasty = 6;
|
|
|
|
uint64 end_dynasty = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AttestationRecord {
|
|
|
|
uint64 slot = 1;
|
|
|
|
uint64 shard_id = 2;
|
2018-09-02 06:34:29 +00:00
|
|
|
uint64 justified_slot = 3;
|
|
|
|
bytes justified_block_hash = 4;
|
|
|
|
bytes shard_block_hash = 5;
|
|
|
|
bytes attester_bitfield = 6;
|
|
|
|
repeated bytes oblique_parent_hashes = 7;
|
|
|
|
repeated uint64 aggregate_sig = 8;
|
2018-08-01 05:35:08 +00:00
|
|
|
}
|
2018-08-14 00:58:37 +00:00
|
|
|
|
|
|
|
message CrosslinkRecord {
|
|
|
|
uint64 dynasty = 1;
|
|
|
|
bytes blockhash = 2;
|
2018-09-08 15:20:06 +00:00
|
|
|
uint64 slot = 3;
|
|
|
|
}
|
2018-09-09 01:52:18 +00:00
|
|
|
|
|
|
|
message AttestationHashes {
|
|
|
|
repeated bytes attestation_hash = 1;
|
|
|
|
}
|