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