mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 10:41:19 +00:00
07c0387be1
* begin reorder * move into beacon server * add proposer server * fix * add proposer server * wrap up rpc reorder * eliminated deprecated RPC endpoints * formatted nicely * RPC protos * fix lint * integrate hash proto * epoch assignments * deprecated committee code * remove deprecated messages * fixed mocks, added tests for validator epoch assignments * gazelle * fix broken bazel * nishant comment
96 lines
2.3 KiB
Protocol Buffer
96 lines
2.3 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 {
|
|
// 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);
|
|
}
|
|
|
|
service AttesterService {
|
|
rpc AttestHead(AttestRequest) returns (AttestResponse);
|
|
}
|
|
|
|
service ProposerService {
|
|
rpc ProposerIndex(ProposerIndexRequest) returns (ProposerIndexResponse);
|
|
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);
|
|
}
|
|
|
|
message ProposeRequest {
|
|
bytes parent_hash = 1;
|
|
uint64 slot_number = 2;
|
|
bytes randao_reveal_hash32 = 3;
|
|
bytes attestation_bitmask = 4;
|
|
repeated uint32 attestation_aggregate_sig = 5;
|
|
google.protobuf.Timestamp timestamp = 6;
|
|
}
|
|
|
|
message ProposeResponse {
|
|
bytes block_hash = 1;
|
|
}
|
|
|
|
message ProposerIndexRequest {
|
|
uint64 slot_number = 1;
|
|
}
|
|
|
|
message ProposerIndexResponse {
|
|
uint32 index = 1;
|
|
}
|
|
|
|
message StateRootResponse {
|
|
bytes state_root = 1;
|
|
}
|
|
|
|
message AttestRequest {
|
|
ethereum.beacon.p2p.v1.Attestation attestation = 1;
|
|
}
|
|
|
|
message AttestResponse {
|
|
bytes attestation_hash = 1;
|
|
}
|
|
|
|
enum ValidatorRole {
|
|
UNKNOWN = 0;
|
|
ATTESTER = 1;
|
|
PROPOSER = 2;
|
|
}
|
|
|
|
// 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 {
|
|
uint32 index = 1;
|
|
}
|
|
|
|
message ValidatorEpochAssignmentsRequest {
|
|
uint64 epoch_start = 1;
|
|
bytes public_key = 2;
|
|
}
|
|
|
|
message ValidatorEpochAssignmentsResponse {
|
|
Assignment assignment = 2;
|
|
}
|