prysm-pulse/proto/beacon/rpc/v1/services.proto
Raul Jordan e19920aec1
Miscellaneous Runtime Fixes & Improvements - Raul (#1674)
* fatal if impossible to receive chainstart

* fix tests

* fix

* custom delay

* completed custom delay

* errors

* better logs, nothing at genesis

* use demo in val

* add gazelle

* log

* starting to log stuff

* pass in ops

* avoid printing the large #s for debug, still working on tests..

* all around better logging

* fixed build error in epoch process

* fixed state transiton tests

* fixed block tests

* lint

* verify sigs in randao

* ready for inclusion falg

* only print waiting when slot is not valid

* fix build

* mod config

* fixed last justified slot issue

* fix inclusion

* fixed attestation issue

* using zero hash from params instead

* fix tests

* update balance

* removed swp

* more `- genesis_slot` for logs

* rem unused log

* fix broken tests

* account for skip slots in state root computation

* fixes done

* validator guide bug fixes - 671

* epoch boundary at the last slot of the epoch

* fix epoch issue

* more balance cal logs for debugging

* greater balance

* attestaton fixes

* fixes

* addressed testrun

* fixed ejection balance

* fix tests with far future epoch

* revert sync change

* revert initial sync change

* fix changes

* off by one att fix

* revert the att fix

* address comments

* format

* fix build

* rem file
2019-02-24 20:09:45 -06:00

158 lines
4.1 KiB
Protocol Buffer

syntax = "proto3";
package ethereum.beacon.rpc.v1;
import "proto/beacon/p2p/v1/types.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
service BeaconService {
rpc WaitForChainStart(google.protobuf.Empty) returns (stream ChainStartResponse);
// CanonicalHead can be called on demand to fetch the current, head block of a beacon node.
rpc CanonicalHead(google.protobuf.Empty) returns (ethereum.beacon.p2p.v1.BeaconBlock);
// LatestAttestation streams the latest aggregated attestation to connected validator clients.
rpc LatestAttestation(google.protobuf.Empty) returns (stream ethereum.beacon.p2p.v1.Attestation);
rpc PendingDeposits(google.protobuf.Empty) returns (PendingDepositsResponse);
rpc Eth1Data(google.protobuf.Empty) returns (Eth1DataResponse);
rpc ForkData(google.protobuf.Empty) returns (ethereum.beacon.p2p.v1.Fork);
}
service AttesterService {
rpc AttestHead(ethereum.beacon.p2p.v1.Attestation) returns (AttestResponse);
rpc AttestationInfoAtSlot(AttestationInfoRequest) returns (AttestationInfoResponse);
}
service ProposerService {
rpc ProposerIndex(ProposerIndexRequest) returns (ProposerIndexResponse);
rpc PendingAttestations(PendingAttestationsRequest) returns (PendingAttestationsResponse);
rpc ProposeBlock(ethereum.beacon.p2p.v1.BeaconBlock) returns (ProposeResponse);
rpc ComputeStateRoot(ethereum.beacon.p2p.v1.BeaconBlock) returns (StateRootResponse);
}
service ValidatorService {
rpc ValidatorIndex(ValidatorIndexRequest) returns (ValidatorIndexResponse);
rpc ValidatorEpochAssignments(ValidatorEpochAssignmentsRequest) returns (ValidatorEpochAssignmentsResponse);
rpc ValidatorCommitteeAtSlot(CommitteeRequest) returns (CommitteeResponse);
rpc NextEpochCommitteeAssignment(ValidatorIndexRequest) returns (CommitteeAssignmentResponse);
}
message CommitteeRequest {
uint64 slot = 1;
uint64 validator_index = 2;
}
message CommitteeResponse {
repeated uint64 committee = 1;
uint64 shard = 2;
}
message AttestationInfoRequest {
uint64 shard = 1;
}
message AttestationInfoResponse {
bytes beacon_block_root_hash32 = 1;
bytes epoch_boundary_root_hash32 = 2;
uint64 justified_epoch = 3;
bytes justified_block_root_hash32 = 4;
ethereum.beacon.p2p.v1.Crosslink latest_crosslink = 5;
}
message PendingAttestationsRequest {
bool filter_ready_for_inclusion = 1;
}
message PendingAttestationsResponse {
repeated ethereum.beacon.p2p.v1.Attestation pending_attestations = 1;
}
message CrosslinkCommitteeRequest {
uint64 slot = 1;
}
message CrosslinkCommitteeResponse {
repeated uint64 committee = 1;
uint64 shard = 2;
}
message ChainStartResponse {
bool started = 1;
uint64 genesis_time = 2;
}
message ProposeRequest {
bytes parent_hash = 1;
uint64 slot_number = 2;
bytes randao_reveal = 3;
bytes attestation_bitmask = 4;
repeated uint64 attestation_aggregate_sig = 5;
google.protobuf.Timestamp timestamp = 6;
}
message ProposeResponse {
bytes block_hash = 1;
}
message ProposerIndexRequest {
uint64 slot_number = 1;
}
message ProposerIndexResponse {
uint64 index = 1;
}
message StateRootResponse {
bytes state_root = 1;
}
message AttestResponse {
bytes attestation_hash = 1;
}
enum ValidatorRole {
UNKNOWN = 0;
ATTESTER = 1;
PROPOSER = 2;
BOTH = 3;
}
// Assignment defines a validator's assignment responsibilities.
message Assignment {
bytes public_key = 1;
uint64 shard = 2;
uint64 attester_slot = 3;
uint64 proposer_slot = 4;
}
message ValidatorIndexRequest {
bytes public_key = 1;
}
message ValidatorIndexResponse {
uint64 index = 1;
}
message ValidatorEpochAssignmentsRequest {
uint64 epoch_start = 1;
bytes public_key = 2;
}
message ValidatorEpochAssignmentsResponse {
Assignment assignment = 2;
}
message PendingDepositsResponse {
repeated ethereum.beacon.p2p.v1.Deposit pending_deposits = 1;
}
message CommitteeAssignmentResponse {
repeated uint64 committee = 1;
uint64 shard = 2;
uint64 slot = 3;
bool is_proposer = 4;
}
message Eth1DataResponse {
ethereum.beacon.p2p.v1.Eth1Data eth1_data = 1;
}