Skip to content

CellScript 0.13.2

Choose a tag to compare

@a19q3 a19q3 released this 03 May 17:31
· 492 commits to main since this release

Key Updates

  • Stack-backed Vec<T> helpers with fixed-width elements and local runtime support.

  • Canonical action/update syntax:

    • action f(input: T) -> output: T
    • where proof block
    • Explicit move for state transitions
  • Lock-boundary data sources: protected, witness, lock_args

  • Stdlib & metadata patterns enforce explicit verifier obligations.

  • Full stateful scenario coverage: 7 end-to-end scenarios + 43 production actions.

Not Included (Future Work)

  • Hidden signer authority or default sighash
  • Full generic maps
  • Cell-backed collection ownership
  • Declarative capacity/since policies

Compatibility

  • Canonical actions follow signature-direction outputs.
  • State transitions use move before.state: A -> after.state: B.
  • Persistent outputs named explicitly: create output = T { ... }.
  • Tooling: VS Code extension 0.13.2, metadata schema 30.

Collections & Vec<T>

  • Stack-backed helpers: Vec<u64>, Vec<Address>, Vec<Hash>.
  • Full runtime lowering: push, pop, insert, remove, first, last, reverse, etc.
  • Does not support full generic HashMap<K,V> or cell-backed Vec<Cell<T>>.
  • Option<T> reserved for future use.

Surface Syntax & Examples

  • Module/import style: module cellscript::token
  • Persistent declarations use capability lists.
  • Action outputs are deterministic and named.
  • move + where for state transitions and proofs.
  • require condition for verifier guards.
  • Flow declarations explicitly describe state graphs.
  • Clean examples separated from profiled acceptance tests.

Verification & Release Gate

  • ./scripts/cellscript_ckb_release_gate.sh full runs:

    • Rust formatting, checks, tests, clippy
    • VS Code extension dry-run
    • Syntax-combination audits + stateful business-flow coverage

Stateful CKB Evidence

  • 7 end-to-end scenarios: token, NFT sale, timelock, launch, AMM, vesting, multisig.
  • 46 committed steps + 20 action-branch scenarios.
  • Covers all 43 production actions with dry-run, committed tx, cycles, size, capacity checks.

Stdlib & CLI

  • Lifecycle helpers: transfer, claim, settle.
  • CLI (cellc) commands: build, new, explain, explain-generics.
  • Typed Vec<T> helpers report element width, capacity, and helper usage.

Backend & ELF

  • Internal ELF assembler restricted to allowed mnemonics.
  • Stack-frame load/store, large immediates, and u128 ops materialized explicitly.
  • State storage remains explicit cell data; create uses declared state names.
  • Preserved-field verification strictly fail-closed.

Important Boundaries

  • Address is not a signer proof.
  • witness Address is not sighash authorization.
  • Full GNU/RISC-V instruction support is not included.
  • No implicit signer defaults or Cell-backed ownership in 0.13.