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

     1  // Copyright 2020 Prysmatic Labs.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  syntax = "proto3";
    15  
    16  package ethereum.eth.v1;
    17  
    18  import "google/protobuf/descriptor.proto";
    19  
    20  import "proto/eth/ext/options.proto";
    21  
    22  option csharp_namespace = "Ethereum.Eth.v1";
    23  option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1";
    24  option java_multiple_files = true;
    25  option java_outer_classname = "ValidatorProto";
    26  option java_package = "org.ethereum.eth.v1";
    27  option php_namespace = "Ethereum\\Eth\\v1";
    28  
    29  message ValidatorContainer {
    30      uint64 index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];;
    31      uint64 balance = 2;
    32      ValidatorStatus status = 3;
    33      Validator validator = 4;
    34  }
    35  
    36  // An Ethereum validator.
    37  message Validator {
    38      // 48 byte BLS public key used for the validator's activities.
    39      bytes pubkey = 1 [(ethereum.eth.ext.ssz_size) = "48", (ethereum.eth.ext.spec_name) = "pubkey"];
    40  
    41      // 32 byte hash of the withdrawal destination public key.
    42      bytes withdrawal_credentials = 2 [(ethereum.eth.ext.ssz_size) = "32"];
    43  
    44      // The validators current effective balance in gwei.
    45      uint64 effective_balance = 3;
    46  
    47      // Whether or not the validator has been slashed.
    48      bool slashed = 4;
    49  
    50      // Epoch when the validator became eligible for activation. This field may
    51      // be zero if the validator was present in the Ethereum proof of stake genesis. This
    52      // field is FAR_FUTURE_EPOCH if the validator has not been activated.
    53      uint64 activation_eligibility_epoch = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
    54  
    55      // Epoch when the validator was activated. This field may be zero if the
    56      // validator was present in the Ethereum proof of stake genesis. This field is
    57      // FAR_FUTURE_EPOCH if the validator has not been activated.
    58      uint64 activation_epoch = 6 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
    59  
    60      // Epoch when the validator was exited. This field is FAR_FUTURE_EPOCH if
    61      // the validator has not exited.
    62      // FAR_FUTURE_EPOCH is a constant defined by the official Ethereum Beacon Chain specification:
    63      // https://github.com/ethereum/eth2.0-specs/blob/v0.9.2/specs/core/0_beacon-chain.md#constants
    64      uint64 exit_epoch = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
    65  
    66      // Epoch when the validator is eligible to withdraw their funds. This field
    67      // is FAR_FUTURE_EPOCH if the validator has not exited.
    68      // FAR_FUTURE_EPOCH is a constant defined by the official Ethereum Beacon Chain specification:
    69      // https://github.com/ethereum/eth2.0-specs/blob/v0.9.2/specs/core/0_beacon-chain.md#constants
    70      uint64 withdrawable_epoch = 8 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
    71  }
    72  
    73  enum ValidatorStatus {
    74      PENDING_INITIALIZED  = 0;
    75      PENDING_QUEUED = 1;
    76      ACTIVE_ONGOING = 2;
    77      ACTIVE_EXITING = 3;
    78      ACTIVE_SLASHED = 4;
    79      EXITED_UNSLASHED = 5;
    80      EXITED_SLASHED = 6;
    81      WITHDRAWAL_POSSIBLE = 7;
    82      WITHDRAWAL_DONE = 8;
    83      ACTIVE = 9;
    84      PENDING = 10;
    85      EXITED = 11;
    86      WITHDRAWAL = 12;
    87  }