Architecture¶
This section is the architectural truth of the Myelin workspace — what each crate is for, what runs where, and how the pieces fit together. If you read Concepts first, the crate names will already mean something.
Pages¶
-
The whole system in one diagram: from CellScript source to committee-finalised block, with the projection layer attached.
-
CellScript & typed-cell metadata
The compiler contract that hands the runtime typed Cell identities, conflict hashes, scheduler witnesses, and proof obligations.
-
The
myelin-execcrate: CellTx shape, script groups, VM/syscall glue, Molecule serialisation, and the execution report. -
How Myelin admits, parallelises, and rejects CellTxs without a fee market.
-
Live/consumed/created Cells, the state root, DA manifests, segment proofs, and the boundary between local-only and production-ready DA.
-
The CellTx pool: deterministic conflict scoring, RBF, dependency tracking, and the rejection taxonomy.
-
StaticClosedCommitteeandTendermint-style weighted precommit — same trait, selectable from TOML. -
The credibility hinge: every chunk ships a projection report showing whether it's projectable into a CKB-style context.
Crate map¶
The workspace is organised as one first-party kernel plus three support crates, with a CLI and a vendored compiler:
cellscript/ vendored CellScript compiler (typed-cell profile)
exec/ -> myelin-exec CellTx, scripts, VM/syscall, scheduler
state/ -> myelin-state live/consumed/created Cells, state root, DA proofs
mempool/ -> myelin-mempool CellTx pool, deterministic conflict scoring
consensus/ -> myelin-consensus static committee + Tendermint BFT
cli/ -> myelin-cli executable command surface
core-utils/ -> myelin-core-utils deterministic hot-path helpers
crypto/ -> myelin-hashes hashing primitives
math/ -> myelin-math integer + accumulator support
Support crates never depend on the kernel; the kernel never depends on the CLI. The CLI is the only thing that knows about report formats. This keeps the kernel auditable.
Where to start¶
If you're new to Myelin:
- Read System overview for the picture.
- Read Execution pipeline and CKB-style projection for the spine.
- Read Consensus engines for the finality model.
If you're a CKB expert landing in this codebase:
- Read CellScript & typed-cell metadata — the compiler contract is the part most likely to surprise you.
- Read State & data availability for how the state root and DA manifest fit together.
- Read CKB-style projection for what Myelin does (and doesn't) try to mirror from CKB.