Show / Hide Table of Contents

Class Block

A block from the Hiero block stream: the unit of consensus output containing events, transactions, results, state changes and traces for one consensus round, framed by a header, footer and proof.

Inheritance
object
Block
Implements
IEquatable<Block>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero.BlockNode
Assembly: Hiero.dll
Syntax
[Experimental("HIERO001", UrlFormat = "https://github.com/bugbytesinc/Hiero/blob/main/docs/blocknode-client-plan.md")]
public sealed record Block : IEquatable<Block>
Remarks

The universally-needed header fields (number, timestamp, versions) and the footer/proof are promoted to typed properties; everything else is available in wire order through Items, each item exposing the underlying protobuf via ToProtobuf(). The full block round-trips losslessly through ToProtobuf() and FromProtobuf(Block).

Properties

| Edit this page View Source

Footer

The block footer carrying the chaining merkle roots, or

null

when absent (e.g. a filtered or still incomplete block).

Declaration
public BlockFooter? Footer { get; }
Property Value
Type Description
BlockFooter
| Edit this page View Source

HapiVersion

The version of the HAPI protobuf specification the block was produced under.

Declaration
public SemanticVersion HapiVersion { get; }
Property Value
Type Description
SemanticVersion
| Edit this page View Source

Items

All block items in wire order (header first; footer and proof last when present).

Declaration
public IReadOnlyList<BlockItem> Items { get; }
Property Value
Type Description
IReadOnlyList<BlockItem>
| Edit this page View Source

Number

The block number (monotonically increasing from genesis).

Declaration
public ulong Number { get; }
Property Value
Type Description
ulong
| Edit this page View Source

Proof

The block proof, or 
null

when the block is not yet proven or the proof was filtered out.

Declaration
public BlockProof? Proof { get; }
Property Value
Type Description
BlockProof
| Edit this page View Source

SoftwareVersion

The version of the consensus node software that produced the block.

Declaration
public SemanticVersion SoftwareVersion { get; }
Property Value
Type Description
SemanticVersion
| Edit this page View Source

Timestamp

The consensus timestamp of the start of this block.

Declaration
public ConsensusTimeStamp Timestamp { get; }
Property Value
Type Description
ConsensusTimeStamp
| Edit this page View Source

VerifiedRootHash

The SHA-384 merkle root hash this client computed for the block; populated only when the block was obtained with HashChain verification (or an explicitly verified query), empty otherwise. Persist together with Number as a BlockStreamCheckpoint to resume verified streaming across process restarts.

Declaration
public ReadOnlyMemory<byte> VerifiedRootHash { get; }
Property Value
Type Description
ReadOnlyMemory<byte>

Methods

| Edit this page View Source

FromProtobuf(Block)

Constructs a 
Block

from a raw block stream protobuf (round-trip counterpart of ToProtobuf(); also the entry point for constructing blocks to publish).

Declaration
public static Block FromProtobuf(Block block)
Parameters
Type Name Description
Block block

The protobuf block to wrap.

Returns
Type Description
Block
A 
Block

exposing the protobuf's content.

Exceptions
Type Condition
ArgumentNullException

If the block is null.

| Edit this page View Source

ToProtobuf()

Returns the underlying block stream protobuf — the lossless escape hatch to the complete block structure.

Declaration
public Block ToProtobuf()
Returns
Type Description
Block

Implements

IEquatable<T>
  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph