All Downloads are FREE. Search and download functionalities are using the official Maven repository.

state.blockstream.block_stream_info.proto Maven / Gradle / Ivy

There is a newer version: 0.54.0
Show newest version
/**
 * # Block Stream Info
 * Information stored in consensus state at the beginning of each block to
 * record the status of the immediately prior block.
 *
 * ### 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.node.state.blockstream;

/*
 * 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.
 */

import "timestamp.proto";

option java_package = "com.hederahashgraph.api.proto.java";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

/**
 * A message stored in state to maintain block stream parameters.
* Nodes use this information for three purposes. * 1. To maintain hash chain continuity at restart and reconnect boundaries. * 1. To store historical hashes for implementation of the EVM `BLOCKHASH` * and `PREVRANDAO` opcodes. * 1. To track the amount of consensus time that has passed between blocks. * * This value MUST be updated for every block.
* This value MUST be transmitted in the "state changes" section of * _each_ block, but MUST be updated at the beginning of the _next_ block.
* This value SHALL contain the block hash up to, and including, the * immediately prior completed block. */ message BlockStreamInfo { /** * A block number.
* This is the current block number. */ uint64 block_number = 1; /** * A consensus time for the current block.
* This is the _first_ consensus time in the current block, and * is used to determine if this block was the first across an * important boundary in consensus time, such as UTC midnight. * This may also be used to purge entities expiring between the last * block time and this time. */ proto.Timestamp block_time = 2; /** * A concatenation of hash values.
* This combines several trailing output block item hashes and * is used as a seed value for a pseudo-random number generator.
* This is also requiried to implement the EVM `PREVRANDAO` opcode. */ bytes trailing_output_hashes = 3; /** * A concatenation of hash values.
* This field combines up to 256 trailing block hashes. *

* If this message is for block number N, then the earliest available * hash SHALL be for block number N-256.
* The latest available hash SHALL be for block N-1.
* This is REQUIRED to implement the EVM `BLOCKHASH` opcode. */ bytes trailing_block_hashes = 4; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy