stream.block.proto Maven / Gradle / Ivy
/**
* # Block Stream
* The base element of the block stream _at rest_.
* A `Block` contains a record of all transactions, results, and outputs for
* a block in the chain. Each `Block` also contains a state proof for
* validation and a header with version and algorithm information.
*
* Block entries are not designed for streaming, but for storing blocks in
* persistent storage, verifying block stream data, and as query responses
* when a block is requested from a block node.
*
* ### Keywords
* The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
* "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
* document are to be interpreted as described in
* [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in
* [RFC8174](https://www.ietf.org/rfc/rfc8174).
*/
syntax = "proto3";
package com.hedera.hapi.block.stream;
/*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
option java_package = "com.hedera.hapi.block.stream.protoc";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;
import "stream/block_item.proto";
/**
* A single complete Hedera block chain block.
*
* This is a single block structure and SHALL NOT represent the primary
* mechanism to transmit a block stream.
* The primary mechanism for transmitting block stream data SHALL be to
* stream individual block items to the block node(s).
* The only delimiter between blocks when streamed SHALL be the `BlockHeader`
* item and `BlockProof` item.
*
* This block SHALL be verifiable as correct using only data in the block,
* including the `BlockProof`, and public keys for the consensus nodes.
*/
message Block {
/**
* A list of items that, together, make up this block.
*
* This list SHALL begin with a `BlockHeader`.
* This list SHALL end with a `BlockProof`.
* Items in this list SHALL be in exactly the same order produced by
* consensus.
* Items in this list MAY be filtered, if so requested.
* If this list is filtered, removed items SHALL be replaced with
* `FilteredBlockItem` entries.
*/
repeated BlockItem items = 1;
}