2018-08-01 05:35:08 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package ethereum.beacon.rpc.v1;
|
|
|
|
|
2018-11-20 19:43:07 +00:00
|
|
|
import "proto/beacon/p2p/v1/types.proto";
|
2018-08-09 22:54:59 +00:00
|
|
|
import "google/protobuf/empty.proto";
|
2018-09-05 03:35:32 +00:00
|
|
|
import "google/protobuf/timestamp.proto";
|
2018-08-01 05:35:08 +00:00
|
|
|
|
|
|
|
service BeaconService {
|
2019-01-30 12:28:53 +00:00
|
|
|
rpc WaitForChainStart(google.protobuf.Empty) returns (stream ChainStartResponse);
|
|
|
|
// CanonicalHead can be called on demand to fetch the current, head block of a beacon node.
|
2018-09-21 14:32:20 +00:00
|
|
|
rpc CanonicalHead(google.protobuf.Empty) returns (ethereum.beacon.p2p.v1.BeaconBlock);
|
2019-01-30 12:28:53 +00:00
|
|
|
// LatestAttestation streams the latest aggregated attestation to connected validator clients.
|
2018-12-22 20:30:59 +00:00
|
|
|
rpc LatestAttestation(google.protobuf.Empty) returns (stream ethereum.beacon.p2p.v1.Attestation);
|
2019-02-05 13:47:25 +00:00
|
|
|
rpc PendingDeposits(google.protobuf.Empty) returns (PendingDepositsResponse);
|
|
|
|
rpc Eth1Data(google.protobuf.Empty) returns (Eth1DataResponse);
|
2018-08-09 22:54:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
service AttesterService {
|
2019-02-06 16:20:38 +00:00
|
|
|
rpc AttestHead(ethereum.beacon.p2p.v1.Attestation) returns (AttestResponse);
|
|
|
|
rpc AttestationInfoAtSlot(AttestationInfoRequest) returns (AttestationInfoResponse);
|
2018-08-09 22:54:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
service ProposerService {
|
2019-01-28 19:41:04 +00:00
|
|
|
rpc ProposerIndex(ProposerIndexRequest) returns (ProposerIndexResponse);
|
2019-02-16 00:36:40 +00:00
|
|
|
rpc PendingAttestations(google.protobuf.Empty) returns (PendingAttestationsResponse);
|
2019-01-10 02:56:26 +00:00
|
|
|
rpc ProposeBlock(ethereum.beacon.p2p.v1.BeaconBlock) returns (ProposeResponse);
|
|
|
|
rpc ComputeStateRoot(ethereum.beacon.p2p.v1.BeaconBlock) returns (StateRootResponse);
|
2018-08-01 05:35:08 +00:00
|
|
|
}
|
|
|
|
|
2018-09-18 02:36:09 +00:00
|
|
|
service ValidatorService {
|
2019-01-29 12:56:14 +00:00
|
|
|
rpc ValidatorIndex(ValidatorIndexRequest) returns (ValidatorIndexResponse);
|
2019-01-25 03:26:03 +00:00
|
|
|
rpc ValidatorEpochAssignments(ValidatorEpochAssignmentsRequest) returns (ValidatorEpochAssignmentsResponse);
|
2019-02-11 16:15:25 +00:00
|
|
|
rpc ValidatorCommitteeAtSlot(CommitteeRequest) returns (CommitteeResponse);
|
2019-02-19 23:31:04 +00:00
|
|
|
rpc NextEpochCommitteeAssignment(ValidatorIndexRequest) returns (CommitteeAssignmentResponse);
|
2019-02-11 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CommitteeRequest {
|
|
|
|
uint64 slot = 1;
|
|
|
|
uint64 validator_index = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CommitteeResponse {
|
|
|
|
repeated uint64 committee = 1;
|
|
|
|
uint64 shard = 2;
|
2018-08-01 05:35:08 +00:00
|
|
|
}
|
|
|
|
|
2019-02-06 16:20:38 +00:00
|
|
|
message AttestationInfoRequest {
|
2019-02-19 05:49:56 +00:00
|
|
|
uint64 shard = 1;
|
2019-02-06 16:20:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message AttestationInfoResponse {
|
|
|
|
bytes beacon_block_root_hash32 = 1;
|
|
|
|
bytes epoch_boundary_root_hash32 = 2;
|
|
|
|
uint64 justified_epoch = 3;
|
|
|
|
bytes justified_block_root_hash32 = 4;
|
2019-02-10 17:59:17 +00:00
|
|
|
ethereum.beacon.p2p.v1.Crosslink latest_crosslink = 5;
|
2019-02-06 16:20:38 +00:00
|
|
|
}
|
|
|
|
|
2019-02-16 00:36:40 +00:00
|
|
|
message PendingAttestationsResponse {
|
|
|
|
repeated ethereum.beacon.p2p.v1.Attestation pending_attestations = 1;
|
|
|
|
}
|
|
|
|
|
2019-02-06 16:20:38 +00:00
|
|
|
message CrosslinkCommitteeRequest {
|
|
|
|
uint64 slot = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CrosslinkCommitteeResponse {
|
|
|
|
repeated uint64 committee = 1;
|
|
|
|
uint64 shard = 2;
|
|
|
|
}
|
|
|
|
|
2019-01-30 12:28:53 +00:00
|
|
|
message ChainStartResponse {
|
|
|
|
bool started = 1;
|
|
|
|
uint64 genesis_time = 2;
|
|
|
|
}
|
|
|
|
|
2018-08-01 05:35:08 +00:00
|
|
|
message ProposeRequest {
|
2018-09-22 18:19:34 +00:00
|
|
|
bytes parent_hash = 1;
|
|
|
|
uint64 slot_number = 2;
|
2019-02-19 20:24:00 +00:00
|
|
|
bytes randao_reveal = 3;
|
2018-09-22 18:19:34 +00:00
|
|
|
bytes attestation_bitmask = 4;
|
2019-01-30 10:11:13 +00:00
|
|
|
repeated uint64 attestation_aggregate_sig = 5;
|
2018-09-22 18:19:34 +00:00
|
|
|
google.protobuf.Timestamp timestamp = 6;
|
2018-08-01 05:35:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ProposeResponse {
|
|
|
|
bytes block_hash = 1;
|
|
|
|
}
|
|
|
|
|
2019-01-10 02:56:26 +00:00
|
|
|
message ProposerIndexRequest {
|
|
|
|
uint64 slot_number = 1;
|
|
|
|
}
|
|
|
|
|
2019-01-28 19:41:04 +00:00
|
|
|
message ProposerIndexResponse {
|
2019-01-30 10:11:13 +00:00
|
|
|
uint64 index = 1;
|
2019-01-28 19:41:04 +00:00
|
|
|
}
|
|
|
|
|
2019-01-10 02:56:26 +00:00
|
|
|
message StateRootResponse {
|
|
|
|
bytes state_root = 1;
|
|
|
|
}
|
|
|
|
|
2018-09-11 17:08:31 +00:00
|
|
|
message AttestResponse {
|
|
|
|
bytes attestation_hash = 1;
|
2018-09-05 03:35:32 +00:00
|
|
|
}
|
2018-09-18 02:36:09 +00:00
|
|
|
|
2018-09-24 15:18:27 +00:00
|
|
|
enum ValidatorRole {
|
2018-09-27 02:34:35 +00:00
|
|
|
UNKNOWN = 0;
|
|
|
|
ATTESTER = 1;
|
|
|
|
PROPOSER = 2;
|
2019-02-18 22:51:49 +00:00
|
|
|
BOTH = 3;
|
2018-09-27 02:34:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Assignment defines a validator's assignment responsibilities.
|
|
|
|
message Assignment {
|
2018-09-25 03:01:26 +00:00
|
|
|
bytes public_key = 1;
|
2019-01-29 12:56:14 +00:00
|
|
|
uint64 shard = 2;
|
|
|
|
uint64 attester_slot = 3;
|
|
|
|
uint64 proposer_slot = 4;
|
2018-09-18 02:36:09 +00:00
|
|
|
}
|
|
|
|
|
2019-01-29 12:56:14 +00:00
|
|
|
message ValidatorIndexRequest {
|
|
|
|
bytes public_key = 1;
|
2018-09-18 02:36:09 +00:00
|
|
|
}
|
|
|
|
|
2019-01-28 19:41:04 +00:00
|
|
|
message ValidatorIndexResponse {
|
2019-01-30 10:11:13 +00:00
|
|
|
uint64 index = 1;
|
2018-09-18 02:36:09 +00:00
|
|
|
}
|
|
|
|
|
2019-01-25 03:26:03 +00:00
|
|
|
message ValidatorEpochAssignmentsRequest {
|
2019-02-06 16:20:38 +00:00
|
|
|
uint64 epoch_start = 1;
|
|
|
|
bytes public_key = 2;
|
2019-01-25 03:26:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ValidatorEpochAssignmentsResponse {
|
2019-02-06 16:20:38 +00:00
|
|
|
Assignment assignment = 2;
|
2019-01-25 03:26:03 +00:00
|
|
|
}
|
2019-02-05 13:47:25 +00:00
|
|
|
|
|
|
|
message PendingDepositsResponse {
|
2019-02-06 16:20:38 +00:00
|
|
|
repeated ethereum.beacon.p2p.v1.Deposit pending_deposits = 1;
|
2019-02-05 13:47:25 +00:00
|
|
|
}
|
|
|
|
|
2019-02-19 23:31:04 +00:00
|
|
|
message CommitteeAssignmentResponse {
|
|
|
|
repeated uint64 committee = 1;
|
|
|
|
uint64 shard = 2;
|
|
|
|
uint64 slot = 3;
|
|
|
|
bool is_proposer = 4;
|
|
|
|
}
|
|
|
|
|
2019-02-05 13:47:25 +00:00
|
|
|
message Eth1DataResponse {
|
2019-02-06 16:20:38 +00:00
|
|
|
ethereum.beacon.p2p.v1.Eth1Data eth1_data = 1;
|
2019-02-05 13:47:25 +00:00
|
|
|
}
|