Class SubscribeBlockStreamParams
The parameters for subscribing to a block node's block stream, receiving whole assembled blocks.
Inherited Members
Namespace: Hiero.BlockNode
Assembly: Hiero.dll
Syntax
[Experimental("HIERO001", UrlFormat = "https://github.com/bugbytesinc/Hiero/blob/main/docs/blocknode-client-plan.md")]
public sealed class SubscribeBlockStreamParams
Remarks
The client owns the sharp edges of the unverified stream: it assembles item frames into whole blocks, discards partial blocks superseded by a resend, drops duplicate blocks, validates each block per VerificationLevel, and recovers from gaps and transport drops per GapPolicy. Only completed blocks are ever written to BlockWriter.
Properties
| Edit this page View SourceBlockWriter
The .NET Channel receiving each assembled Block.
Declaration
public ChannelWriter<Block> BlockWriter { get; set; }
Property Value
| Type | Description |
|---|---|
| ChannelWriter<Block> |
CancellationToken
An optional token that can interrupt the subscription; firing it completes the subscription normally.
Declaration
public CancellationToken CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken |
CompleteChannelWhenFinished
When
true
(the default), the BlockWriter channel is marked complete when the subscription finishes for any reason.
Declaration
public bool CompleteChannelWhenFinished { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
EndingBlockNumber
The last block number to stream (inclusive). A
null
value streams indefinitely.
Declaration
public ulong? EndingBlockNumber { get; set; }
Property Value
| Type | Description |
|---|---|
| ulong? |
GapPolicy
The reaction to stream gaps, malformed blocks and transport drops; defaults to Resubscribe.
Declaration
public BlockStreamGapPolicy GapPolicy { get; set; }
Property Value
| Type | Description |
|---|---|
| BlockStreamGapPolicy |
MaxCount
The maximum number of blocks to deliver before returning; zero (the default) imposes no limit.
Declaration
public ulong MaxCount { get; set; }
Property Value
| Type | Description |
|---|---|
| ulong |
ResumeFromCheckpoint
A previously persisted point of verified progress to resume from: streaming starts at the checkpoint's block number + 1 and the first block must chain from the checkpoint's root hash — cryptographic continuity across process restarts. Requires VerificationLevel of HashChain; mutually exclusive with StartingBlockNumber.
Declaration
public BlockStreamCheckpoint? ResumeFromCheckpoint { get; set; }
Property Value
| Type | Description |
|---|---|
| BlockStreamCheckpoint |
StartingBlockNumber
The first block number to stream. A
null
value starts at the node's latest available block (tailing mode). Mutually exclusive with ResumeFromCheckpoint.
Declaration
public ulong? StartingBlockNumber { get; set; }
Property Value
| Type | Description |
|---|---|
| ulong? |
VerificationLevel
The validation applied to each assembled block before delivery; defaults to Structural.
Declaration
public BlockVerificationLevel VerificationLevel { get; set; }
Property Value
| Type | Description |
|---|---|
| BlockVerificationLevel |