mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-09 03:01:19 +00:00
1065617087
* first commit, remote att types * no more agg attestation proto * regen mock * only attestations * proto * att process * fix att references * more tests passing * use att protos * complete * Update dependency com_github_deckarep_golang_set to v1 (#1159) * Update dependency com_github_edsrzf_mmap_go to v1 (#1160) * Update dependency com_github_go_stack_stack to v1 (#1161) * Update dependency com_github_rs_cors to v1 (#1162) * Update dependency in_gopkg_urfave_cli_v1 to v1 (#1163) * change visibility
108 lines
3.1 KiB
Protocol Buffer
108 lines
3.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 {
|
|
// 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);
|
|
// CurrentAssignmentsAndGenesisTime is called by a validator client upon first connecting
|
|
// to a beacon node in order to determine the current validator assignments
|
|
// and genesis timestamp of the protocol.
|
|
rpc CurrentAssignmentsAndGenesisTime(ValidatorAssignmentRequest) returns (CurrentAssignmentsResponse);
|
|
// ValidatorAssignments streams validator assignments to clients
|
|
// for a subset of public keys in the active validator set.
|
|
rpc ValidatorAssignments(ValidatorAssignmentRequest) returns(stream ValidatorAssignmentResponse);
|
|
}
|
|
|
|
service AttesterService {
|
|
rpc AttestHead(AttestRequest) returns (AttestResponse);
|
|
}
|
|
|
|
service ProposerService {
|
|
rpc ProposeBlock(ProposeRequest) returns (ProposeResponse);
|
|
}
|
|
|
|
service ValidatorService {
|
|
// These endpoints can be called on demand in the future
|
|
// by some web3 API for users to conveniently know their assignment.
|
|
rpc ValidatorShardID(PublicKey) returns (ShardIDResponse);
|
|
rpc ValidatorIndex(PublicKey) returns (IndexResponse);
|
|
rpc ValidatorSlotAndResponsibility(PublicKey) returns (SlotResponsibilityResponse);
|
|
}
|
|
|
|
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 AttestRequest {
|
|
ethereum.beacon.p2p.v1.Attestation attestation = 1;
|
|
}
|
|
|
|
message AttestResponse {
|
|
bytes attestation_hash = 1;
|
|
}
|
|
|
|
// Request assignment updates for either all validators or a subset of validators
|
|
// defined by their public keys.
|
|
message ValidatorAssignmentRequest {
|
|
bool all_validators = 1;
|
|
repeated PublicKey public_keys = 2;
|
|
}
|
|
|
|
message ValidatorAssignmentResponse {
|
|
repeated Assignment assignments = 1;
|
|
}
|
|
|
|
enum ValidatorRole {
|
|
UNKNOWN = 0;
|
|
ATTESTER = 1;
|
|
PROPOSER = 2;
|
|
}
|
|
|
|
// Assignment defines a validator's assignment responsibilities.
|
|
message Assignment {
|
|
PublicKey public_key = 1;
|
|
uint64 shard_id = 2;
|
|
ValidatorRole role = 3;
|
|
uint64 assigned_slot = 4;
|
|
}
|
|
|
|
message PublicKey {
|
|
bytes public_key = 1;
|
|
}
|
|
|
|
message SlotResponsibilityResponse {
|
|
uint64 slot = 1;
|
|
ValidatorRole role = 2;
|
|
}
|
|
|
|
message IndexResponse {
|
|
uint32 index = 1;
|
|
}
|
|
|
|
message ShardIDResponse {
|
|
uint64 shard_id = 1;
|
|
}
|
|
|
|
message CurrentAssignmentsResponse {
|
|
repeated Assignment assignments = 1;
|
|
google.protobuf.Timestamp genesis_timestamp = 2;
|
|
}
|