github.com/prysmaticlabs/prysm@v1.4.4/proto/slashing/slashing.proto (about)

     1  syntax = "proto3";
     2  
     3  package ethereum.slashing;
     4  
     5  import "proto/eth/ext/options.proto";
     6  import "proto/eth/v1alpha1/beacon_block.proto";
     7  
     8  // Slasher service API
     9  //
    10  // Slasher service provides an interface for validators and beacon chain server to query
    11  // and subscribe for slashable events on the network as well as to make sure that the
    12  // attestation or proposal they are going to submit to the network are not going to
    13  // produce a slashable event.
    14  service Slasher {
    15      // Returns any found attester slashings if the passed in attestation conflicts with a validators history.
    16      rpc IsSlashableAttestation(ethereum.eth.v1alpha1.IndexedAttestation) returns (AttesterSlashingResponse) {
    17          option deprecated = true;
    18      };
    19  
    20      // Returns any found proposer slashings if the passed in proposal conflicts with a validators history.
    21      rpc IsSlashableBlock(ethereum.eth.v1alpha1.SignedBeaconBlockHeader) returns (ProposerSlashingResponse) {
    22          option deprecated = true;
    23      };
    24  
    25      // Returns if a given indexed attestation could be slashable when compared to the slashers history for the attesters.
    26      // This function is read-only, and does not need the indexed attestation to be signed.
    27      rpc IsSlashableAttestationNoUpdate(ethereum.eth.v1alpha1.IndexedAttestation) returns (Slashable) {
    28          option deprecated = true;
    29      };
    30  
    31      // Returns if a given beacon block header could be slashable when compared to the slashers history for the proposer.
    32      // This function is read-only, and does not need the beacon block header to be signed.
    33      rpc IsSlashableBlockNoUpdate(ethereum.eth.v1alpha1.BeaconBlockHeader) returns (Slashable) {
    34          option deprecated = true;
    35      };
    36  
    37      // Returns the highest source and target attestation for validator indexes that have been observed by the slasher.
    38      rpc HighestAttestations(HighestAttestationRequest) returns (HighestAttestationResponse) {
    39          option deprecated = true;
    40      };
    41  
    42  }
    43  
    44  message HighestAttestationRequest {
    45      repeated uint64 validator_ids = 1 [deprecated = true];
    46  }
    47  
    48  message HighestAttestationResponse {
    49      repeated HighestAttestation attestations = 1 [deprecated = true];
    50  }
    51  
    52  message HighestAttestation {
    53      uint64 validator_id = 1 [deprecated = true];
    54      uint64 highest_source_epoch = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch", deprecated = true];
    55      uint64 highest_target_epoch = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
    56  }
    57  
    58  message ProposerSlashingResponse {
    59      repeated ethereum.eth.v1alpha1.ProposerSlashing proposer_slashing = 1 [deprecated = true];
    60  }
    61  
    62  message Slashable {
    63      bool slashable = 1 [deprecated = true];
    64  }
    65  
    66  message AttesterSlashingResponse {
    67      repeated ethereum.eth.v1alpha1.AttesterSlashing attester_slashing = 1 [deprecated = true];
    68  }
    69  
    70  // ProposalHistory defines the structure for recording a validator's historical proposals.
    71  // Using a bitlist to represent the epochs and an uint64 to mark the latest marked
    72  // epoch of the bitlist, we can easily store which epochs a validator has proposed
    73  // a block for while pruning the older data.
    74  message ProposalHistory {
    75      bytes epoch_bits = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitlist", deprecated = true];
    76      uint64 latest_epoch_written = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch", deprecated = true];
    77  }
    78  
    79  // AttestationHistory defines the structure for recording a validator's historical attestation.
    80  // Using a map[uint64]uint64 to map its target epoch to its source epoch, in order to detect if a
    81  // vote being created is not a double vote and surrounded by, or surrounding any other votes.
    82  // Using an uint64 to mark the latest written epoch, we can safely perform a rolling prune whenever
    83  // the history is updated.
    84  message AttestationHistory {
    85      map<uint64, uint64> target_to_source = 1 [deprecated = true];
    86      uint64 latest_epoch_written = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch", deprecated = true];
    87  }