Chains topic

Chains

Composable chains: a blueprint picks the engine, state model and proposer, genesis commits it, and the assembled chain follows one propose, seal or mine, submit flow. Foreign components written in Dart plug into the same mixture.

Classes

Blueprint
A declared mixture of engine, state model and proposer ids plus params. Commit it with AviaryGenesis.commitBlueprint.
Chain
An assembled node behind the uniform propose, justify, submit flow.
ForeignEngine
A consensus engine implemented in Dart and plugged into a mixture by id. The pipeline stays native; Dart supplies the justification policy. Both methods run synchronously inside consensus, must be deterministic, and must not call back into the chain.

Extensions

AviaryForeign on Aviary
Foreign components: engines and proposer policies implemented in Dart.
AviaryMixtures on Aviary
Composable chains: mixtures, registry discovery and assembly.
AviaryPersistence on Aviary
Bringing chains and chain trees back from a snapshot.
ChainBlocks on Chain
The propose, justify and submit flow in one call.
ChainPersistence on Chain
Saving a chain and keeping its blocks.

Typedefs

ArchiveRange = ({int first, int last})
The first and last archived block heights of a chain.
ProposerPolicy = int Function(int height, int validators)
A proposer policy: the proposer index for height among validators.