state.blockrecords.block_info.proto Maven / Gradle / Ivy
syntax = "proto3";
package proto;
/*-
*
* Hedera Network Services Protobuf
*
* Copyright (C) 2018 - 2023 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;
/**
* Information about ongoing, most recently completed, and last 256 blocks.
*/
message BlockInfo {
/**
* The last block number, this is the last completed immutable block.
*/
int64 last_block_number = 1;
/**
* The consensus time of the first transaction of the last block, this is the last completed immutable block.
*/
Timestamp first_cons_time_of_last_block = 2;
/**
* SHA384 48 byte hashes of the last 256 blocks in single byte array.
* First 48 bytes is the oldest block.
* Last 48 bytes is the newest block, which is the last fully completed immutable block.
* If we are shortly after genesis and there are less than 256 blocks then this could contain less than 256 hashes.
*/
bytes block_hashes = 3;
/**
* The consensus time of the last transaction that was handled by the node. This property is how we 'advance the
* consensus clock', i.e. continually setting this property to the latest consensus timestamp (and thus transaction)
* handled by the node.
*/
Timestamp cons_time_of_last_handled_txn = 4;
/**
* A flag indicating whether migration records have been published. This property should be marked 'false'
* immediately following a node upgrade, and marked 'true' once the migration records (if any) are published, which
* should happen during the first transaction handled by the node.
*/
bool migration_records_streamed = 5;
/**
* The consensus time of the first transaction in the current block; necessary for reconnecting nodes to detect
* when the current block is finished.
*/
Timestamp first_cons_time_of_current_block = 6;
}