github.com/prysmaticlabs/prysm@v1.4.4/proto/eth/v1alpha1/attestation.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.v1alpha1;
    17  
    18  import "proto/eth/ext/options.proto";
    19  
    20  option csharp_namespace = "Ethereum.Eth.v1alpha1";
    21  option go_package = "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1;eth";
    22  option java_multiple_files = true;
    23  option java_outer_classname = "AttestationProto";
    24  option java_package = "org.ethereum.eth.v1alpha1";
    25  option php_namespace = "Ethereum\\Eth\\v1alpha1";
    26  
    27  message Attestation {
    28      // A bitfield representation of validator indices that have voted exactly
    29      // the same vote and have been aggregated into this attestation.
    30      bytes aggregation_bits = 1 [(ethereum.eth.ext.ssz_max) = "2048", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitlist"];
    31  
    32      AttestationData data = 2;
    33  
    34      // 96 byte BLS aggregate signature.
    35      bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"];
    36  }
    37  
    38  message AggregateAttestationAndProof {
    39      // The aggregator index that submitted this aggregated attestation and proof.
    40      uint64 aggregator_index = 1  [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"];
    41  
    42      // The aggregated attestation that was submitted.
    43      Attestation aggregate = 3;
    44  
    45      // 96 byte selection proof signed by the aggregator, which is the signature of the slot to aggregate.
    46      bytes selection_proof = 2 [(ethereum.eth.ext.ssz_size) = "96"];
    47  }
    48  
    49  message SignedAggregateAttestationAndProof {
    50      // The aggregated attestation and selection proof itself.
    51      AggregateAttestationAndProof message = 1;
    52  
    53      // 96 byte BLS aggregate signature signed by the aggregator over the message.
    54      bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
    55  }
    56  
    57  message AttestationData {
    58      // Attestation data includes information on Casper the Friendly Finality Gadget's votes
    59      // See: https://arxiv.org/pdf/1710.09437.pdf
    60  
    61      // Slot of the attestation attesting for.
    62      uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"];
    63  
    64      // The committee index that submitted this attestation.
    65      uint64 committee_index = 2  [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.CommitteeIndex"];
    66  
    67      // 32 byte root of the LMD GHOST block vote.
    68      bytes beacon_block_root = 3 [(ethereum.eth.ext.ssz_size) = "32"];
    69  
    70      // The most recent justified checkpoint in the beacon state
    71      Checkpoint source = 4;
    72  
    73      // The checkpoint attempting to be justified for the current epoch and its epoch boundary block
    74      Checkpoint target = 5;
    75  }
    76  
    77  message Checkpoint {
    78      // A checkpoint is every epoch's first slot. The goal of Casper FFG
    79      // is to link the check points together for justification and finalization.
    80  
    81      // Epoch the checkpoint references.
    82      uint64 epoch = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"];
    83  
    84      // Block root of the checkpoint references.
    85      bytes root = 2 [(ethereum.eth.ext.ssz_size) = "32"];
    86  }