github.com/prysmaticlabs/prysm@v1.4.4/proto/prysm/v2/beacon_block.proto (about) 1 // Copyright 2021 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.prysm.v2; 17 18 import "proto/eth/ext/options.proto"; 19 20 import "proto/eth/v1alpha1/beacon_block.proto"; 21 import "proto/eth/v1alpha1/attestation.proto"; 22 23 option csharp_namespace = "Ethereum.Prysm.V2"; 24 option go_package = "github.com/prysmaticlabs/prysm/proto/prysm/v2;v2"; 25 option java_multiple_files = true; 26 option java_outer_classname = "BeaconBlockProto"; 27 option java_package = "org.ethereum.prysm.v2"; 28 option php_namespace = "Ethereum\\Prysm\\v2"; 29 30 // The signed version of a (HF1) beacon block. 31 message SignedBeaconBlockAltair { 32 // The unsigned beacon block itself. 33 BeaconBlockAltair block = 1; 34 35 // 96 byte BLS signature from the validator that produced this block. 36 bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"]; 37 } 38 39 // The unsigned version of a (HF1) beacon block. The message does not contain a validator signature. 40 message BeaconBlockAltair { 41 // Beacon chain slot that this block represents. 42 uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Slot"]; 43 44 // Validator index of the validator that proposed the block header. 45 uint64 proposer_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.ValidatorIndex"]; 46 47 // 32 byte root of the parent block. 48 bytes parent_root = 3 [(ethereum.eth.ext.ssz_size) = "32"]; 49 50 // 32 byte root of the resulting state after processing this block. 51 bytes state_root = 4 [(ethereum.eth.ext.ssz_size) = "32"]; 52 53 // The beacon block body. 54 BeaconBlockBodyAltair body = 5; 55 } 56 57 // The block body of an (HF1) beacon block. 58 // The new addition for is SyncAggregate for light client support. 59 message BeaconBlockBodyAltair { 60 // The validators RANDAO reveal 96 byte value. 61 bytes randao_reveal = 1 [(ethereum.eth.ext.ssz_size) = "96"]; 62 63 // A reference to the Ethereum 1.x chain. 64 ethereum.eth.v1alpha1.Eth1Data eth1_data = 2; 65 66 // 32 byte field of arbitrary data. This field may contain any data and 67 // is not used for anything other than a fun message. 68 bytes graffiti = 3 [(ethereum.eth.ext.ssz_size) = "32"]; 69 70 // Block operations 71 // Refer to spec constants at https://github.com/ethereum/eth2.0-specs/blob/dev/specs/core/0_beacon-chain.md#max-operations-per-block 72 73 // At most MAX_PROPOSER_SLASHINGS. 74 repeated ethereum.eth.v1alpha1.ProposerSlashing proposer_slashings = 4 [(ethereum.eth.ext.ssz_max) = "16"]; 75 76 // At most MAX_ATTESTER_SLASHINGS. 77 repeated ethereum.eth.v1alpha1.AttesterSlashing attester_slashings = 5 [(ethereum.eth.ext.ssz_max) = "2"]; 78 79 // At most MAX_ATTESTATIONS. 80 repeated ethereum.eth.v1alpha1.Attestation attestations = 6 [(ethereum.eth.ext.ssz_max) = "128"]; 81 82 // At most MAX_DEPOSITS. 83 repeated ethereum.eth.v1alpha1.Deposit deposits = 7 [(ethereum.eth.ext.ssz_max) = "16"]; 84 85 // At most MAX_VOLUNTARY_EXITS. 86 repeated ethereum.eth.v1alpha1.SignedVoluntaryExit voluntary_exits = 8 [(ethereum.eth.ext.ssz_max) = "16"]; 87 88 // Sync aggregate object to track sync committee votes for light client support. [New in ] 89 SyncAggregate sync_aggregate = 9; 90 } 91 92 // The sync aggregate object for the beacon chain to track sync committee votes and to 93 // support light client infra. 94 message SyncAggregate { 95 // Sync committee bits as Bitvector to track votes. 96 bytes sync_committee_bits = 1 [(ethereum.eth.ext.ssz_size) = "sync_committee_bytes.size", (ethereum.eth.ext.cast_type) = "sync_committee_bits.type"]; 97 98 // BLS aggregated signature of the sync committee for the ones that voted. 99 bytes sync_committee_signature = 2 [(ethereum.eth.ext.ssz_size) = "96"]; 100 }