Tidy services.proto
This commit is contained in:
parent
6d0ad99358
commit
e758e71753
@ -12,22 +12,52 @@ syntax = "proto3";
|
|||||||
|
|
||||||
package ethereum.beacon.rpc.v1;
|
package ethereum.beacon.rpc.v1;
|
||||||
|
|
||||||
|
|
||||||
|
/// Service that handles block production
|
||||||
service BeaconBlockService {
|
service BeaconBlockService {
|
||||||
rpc ProduceBeaconBlock(ProduceBeaconBlockRequest) returns (ProduceBeaconBlockResponse);
|
rpc ProduceBeaconBlock(ProduceBeaconBlockRequest) returns (ProduceBeaconBlockResponse);
|
||||||
rpc PublishBeaconBlock(PublishBeaconBlockRequest) returns (PublishBeaconBlockResponse);
|
rpc PublishBeaconBlock(PublishBeaconBlockRequest) returns (PublishBeaconBlockResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Service that provides the validator client with requisite knowledge about
|
||||||
|
//its public keys
|
||||||
service ValidatorService {
|
service ValidatorService {
|
||||||
// rpc ValidatorAssignment(ValidatorAssignmentRequest) returns (ValidatorAssignmentResponse);
|
|
||||||
rpc ProposeBlockSlot(ProposeBlockSlotRequest) returns (ProposeBlockSlotResponse);
|
rpc ProposeBlockSlot(ProposeBlockSlotRequest) returns (ProposeBlockSlotResponse);
|
||||||
rpc ValidatorIndex(PublicKey) returns (IndexResponse);
|
rpc ValidatorIndex(PublicKey) returns (IndexResponse);
|
||||||
|
// rpc ValidatorAssignment(ValidatorAssignmentRequest) returns (ValidatorAssignmentResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Service that handles validator attestations
|
||||||
service AttestationService {
|
service AttestationService {
|
||||||
rpc ProduceAttestationData (ProduceAttestationDataRequest) returns (ProduceAttestationDataResponse);
|
rpc ProduceAttestationData (ProduceAttestationDataRequest) returns (ProduceAttestationDataResponse);
|
||||||
rpc PublishAttestationData (PublishAttestationDataRequest) returns (PublishAttestationDataResponse);
|
rpc PublishAttestationData (PublishAttestationDataRequest) returns (PublishAttestationDataResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Block Production Service Messages
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Validator requests an unsigned proposal.
|
||||||
|
message ProduceBeaconBlockRequest {
|
||||||
|
uint64 slot = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Beacon node returns an unsigned proposal.
|
||||||
|
message ProduceBeaconBlockResponse {
|
||||||
|
BeaconBlock block = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validator submits a signed proposal.
|
||||||
|
message PublishBeaconBlockRequest {
|
||||||
|
BeaconBlock block = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Beacon node indicates a sucessfully submitted proposal.
|
||||||
|
message PublishBeaconBlockResponse {
|
||||||
|
bool success = 1;
|
||||||
|
bytes msg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
message BeaconBlock {
|
message BeaconBlock {
|
||||||
uint64 slot = 1;
|
uint64 slot = 1;
|
||||||
bytes block_root = 2;
|
bytes block_root = 2;
|
||||||
@ -35,6 +65,73 @@ message BeaconBlock {
|
|||||||
bytes signature = 4;
|
bytes signature = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Validator Service Messages
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
message ValidatorAssignmentRequest {
|
||||||
|
uint64 epoch = 1;
|
||||||
|
bytes validator_index = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// A validators duties for some epoch.
|
||||||
|
// TODO: add shard duties.
|
||||||
|
message ValidatorAssignment {
|
||||||
|
oneof block_production_slot_oneof {
|
||||||
|
bool block_production_slot_none = 1;
|
||||||
|
uint64 block_production_slot = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Validator Assignment
|
||||||
|
|
||||||
|
message PublicKey {
|
||||||
|
bytes public_key = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message IndexResponse {
|
||||||
|
uint64 index = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Propose slot
|
||||||
|
|
||||||
|
message ProposeBlockSlotRequest {
|
||||||
|
uint64 epoch = 1;
|
||||||
|
uint64 validator_index = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ProposeBlockSlotResponse {
|
||||||
|
oneof slot_oneof {
|
||||||
|
bool none = 1;
|
||||||
|
uint64 slot = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Attestation Service Messages
|
||||||
|
*/
|
||||||
|
|
||||||
|
message ProduceAttestationDataRequest {
|
||||||
|
uint64 slot = 1;
|
||||||
|
uint64 shard = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ProduceAttestationDataResponse {
|
||||||
|
AttestationData attestation_data = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PublishAttestationDataRequest {
|
||||||
|
FreeAttestation free_attestation = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PublishAttestationDataResponse {
|
||||||
|
bool success = 1;
|
||||||
|
bytes msg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
message Crosslink {
|
message Crosslink {
|
||||||
uint64 epoch = 1;
|
uint64 epoch = 1;
|
||||||
bytes crosslink_data_root = 2;
|
bytes crosslink_data_root = 2;
|
||||||
@ -58,84 +155,3 @@ message FreeAttestation {
|
|||||||
bytes signature = 2;
|
bytes signature = 2;
|
||||||
uint64 validator_index = 3;
|
uint64 validator_index = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validator requests an unsigned proposal.
|
|
||||||
message ProduceBeaconBlockRequest {
|
|
||||||
uint64 slot = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Beacon node returns an unsigned proposal.
|
|
||||||
message ProduceBeaconBlockResponse {
|
|
||||||
BeaconBlock block = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validator submits a signed proposal.
|
|
||||||
message PublishBeaconBlockRequest {
|
|
||||||
BeaconBlock block = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Beacon node indicates a sucessfully submitted proposal.
|
|
||||||
message PublishBeaconBlockResponse {
|
|
||||||
bool success = 1;
|
|
||||||
bytes msg = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ProduceAttestationDataRequest {
|
|
||||||
uint64 slot = 1;
|
|
||||||
uint64 shard = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ProduceAttestationDataResponse {
|
|
||||||
AttestationData attestation_data = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message PublishAttestationDataRequest {
|
|
||||||
FreeAttestation free_attestation = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message PublishAttestationDataResponse {
|
|
||||||
bool success = 1;
|
|
||||||
bytes msg = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// A validators duties for some epoch.
|
|
||||||
// TODO: add shard duties.
|
|
||||||
message ValidatorAssignment {
|
|
||||||
oneof block_production_slot_oneof {
|
|
||||||
bool block_production_slot_none = 1;
|
|
||||||
uint64 block_production_slot = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
message ValidatorAssignmentRequest {
|
|
||||||
uint64 epoch = 1;
|
|
||||||
bytes validator_index = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Propose slot
|
|
||||||
*/
|
|
||||||
|
|
||||||
message ProposeBlockSlotRequest {
|
|
||||||
uint64 epoch = 1;
|
|
||||||
uint64 validator_index = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ProposeBlockSlotResponse {
|
|
||||||
oneof slot_oneof {
|
|
||||||
bool none = 1;
|
|
||||||
uint64 slot = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Validator Assignment
|
|
||||||
*/
|
|
||||||
|
|
||||||
message PublicKey {
|
|
||||||
bytes public_key = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message IndexResponse {
|
|
||||||
uint64 index = 1;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user