NetNode class final
A validator or observer running BFT consensus over a gossip mesh, with no socket and no clock of its own. Every input returns an Outbound: send each relay to that peer over your transport, arm each timeout for a duration you choose, and feed what arrives back through onGossip and onTimeout. Blocks carry the transactions from setTransactions when this node proposes.
- Implemented types
- Available extensions
Properties
- committed → bool
-
Whether the current height has committed.
no setter
-
eventStream
→ Stream<
ChainEvent> -
Available on NetNode, provided by the NetNodeObservability extension
Every event as it happens, on the microtask after the input that caused it. Listening redirects events from the buffer to this broadcast stream until the node is freed, which closes it.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
Available on NetNode, provided by the NetNodeQueries extension
The committed chain height.no setter - isReleased → bool
-
Whether the native handle has already been released.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addPeer(
int peer) → void - Adds a mesh neighbour.
-
advance(
) → Outbound - After committed, rolls into the next height. Throws otherwise.
-
balance(
Uint8List address) → int -
Available on NetNode, provided by the NetNodeQueries extension
The balance of an address on this account model chain. -
events(
) → List< ChainEvent> -
Available on NetNode, provided by the NetNodeObservability extension
Events buffered since the last call. Empty while eventStream is live. -
free(
) → void - Releases the native node.
-
metrics(
) → String -
Available on NetNode, provided by the NetNodeObservability extension
A Prometheus format metrics snapshot. -
metricValues(
) → Map< String, double> -
Available on NetNode, provided by the NetNodeObservability extension
metrics as values keyed by sample name. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onGossip(
int from, Uint8List payload) → Outbound -
Handles a gossip payload received from
from. Duplicates and payloads from banned peers produce nothing; undecodable ones penalize the peer. -
onTimeout(
TimeoutRequest t) → Outbound - Fires a timeout this node asked for.
-
peerBanned(
int peer) → bool -
Available on NetNode, provided by the NetNodeQueries extension
Whetherpeerhas been banned for misbehaviour. -
proveAccount(
Uint8List address) → Uint8List -
Available on NetNode, provided by the NetNodeQueries extension
A state inclusion proof for an address. -
proveRecord(
Uint8List key) → Uint8List -
Available on NetNode, provided by the NetNodeQueries extension
Record model networks: a state inclusion proof for the record atkey. -
record(
Uint8List key) → RecordEntry? -
Available on NetNode, provided by the NetNodeQueries extension
Record model networks: the committed record atkey, or null. -
recordNonce(
Uint8List address) → int -
Available on NetNode, provided by the NetNodeQueries extension
Record model networks: the next nonceaddressmust use. -
replayLog(
) → List< Uint8List> -
Available on NetNode, provided by the NetNodeQueries extension
Every unique consensus payload of the current height, in arrival order. Replay it to a peer whose link connects after consensus started. -
setTransactions(
List< Uint8List> encodedTxs) → void - The encoded transactions this node includes when it proposes at the current height; cleared when it commits, so set the next height's list before advance. Throws on a malformed transaction.
-
start(
) → Outbound - Begins consensus for the current height.
-
stateRoot(
) → Uint8List -
Available on NetNode, provided by the NetNodeQueries extension
The 32 byte state root. -
tip(
) → Uint8List -
Available on NetNode, provided by the NetNodeQueries extension
The encoded tip header. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited