github.com/prysmaticlabs/prysm@v1.4.4/proto/beacon/rpc/v1/slasher.proto (about) 1 syntax = "proto3"; 2 3 package ethereum.beacon.rpc.v1; 4 5 import "proto/eth/ext/options.proto"; 6 import "proto/eth/v1alpha1/beacon_block.proto"; 7 8 import "google/api/annotations.proto"; 9 import "google/protobuf/empty.proto"; 10 11 // Slasher service API 12 // 13 // Slasher service provides an interface for checking if attestations or blocks are slashable. 14 service Slasher { 15 // Returns any found attester slashings for an input indexed attestation. 16 rpc IsSlashableAttestation(ethereum.eth.v1alpha1.IndexedAttestation) returns (AttesterSlashingResponse) { 17 option (google.api.http) = { 18 post: "/eth/v1alpha1/slasher/attestations/slashable", 19 body: "*" 20 }; 21 } 22 23 // Returns any found proposer slashings for an input signed block header. 24 rpc IsSlashableBlock(ethereum.eth.v1alpha1.SignedBeaconBlockHeader) returns (ProposerSlashingResponse) { 25 option (google.api.http) = { 26 get: "/eth/v1alpha1/slasher/blocks/slashable" 27 }; 28 } 29 30 // Returns the highest source and target attestation for validator indices that have been observed by slasher. 31 rpc HighestAttestations(HighestAttestationRequest) returns (HighestAttestationResponse) { 32 option (google.api.http) = { 33 get: "/eth/v1alpha1/slasher/attestations/highest" 34 }; 35 } 36 } 37 38 message AttesterSlashingResponse { 39 ethereum.eth.v1alpha1.AttesterSlashing attester_slashing = 1; 40 } 41 42 message ProposerSlashingResponse { 43 ethereum.eth.v1alpha1.ProposerSlashing proposer_slashing = 1; 44 } 45 46 message HighestAttestationRequest { 47 repeated uint64 validator_indices = 1; 48 } 49 50 message HighestAttestationResponse { 51 repeated HighestAttestation attestations = 1; 52 } 53 54 message HighestAttestation { 55 uint64 validator_index = 1; 56 uint64 highest_source_epoch = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"]; 57 uint64 highest_target_epoch = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"]; 58 }