Skip to content

Commit 13d9dcb

Browse files
committed
Fix stale CellScript 0.21 documentation
1 parent b9824fd commit 13d9dcb

39 files changed

Lines changed: 573 additions & 136 deletions

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ or CellFabric intent engine.
438438
- [Collections matrix example](docs/examples/collections_matrix.md)
439439
- [Deployment manifest example](docs/examples/deployment_manifest.md)
440440
- [Output append example](docs/examples/output_append.md)
441-
- [0.20 generated builder roadmap](docs/CELLSCRIPT_0_20_ROADMAP.md)
441+
- [0.20 generated builder roadmap](docs/archive/0.20/CELLSCRIPT_0_20_ROADMAP.md)
442442
- [Roadmap overview](roadmap/CELLSCRIPT_ROADMAP.md)
443443
- [0.13 release scope](docs/releases/CELLSCRIPT_0_13_RELEASE_SCOPE.md)
444444
- [0.14 roadmap](roadmap/CELLSCRIPT_0_14_ROADMAP.md)
@@ -448,8 +448,8 @@ or CellFabric intent engine.
448448
- [0.16 roadmap](roadmap/CELLSCRIPT_0_16_ROADMAP.md)
449449
- [0.16 release notes](docs/releases/CELLSCRIPT_0_16_RELEASE_NOTES.md)
450450
- [0.17 roadmap](docs/archive/0.17/CELLSCRIPT_0_17_ROADMAP.md)
451-
- [0.18 roadmap](docs/CELLSCRIPT_0_18_ROADMAP.md)
452-
- [0.19 roadmap](docs/CELLSCRIPT_0_19_ROADMAP.md)
451+
- [0.18 roadmap](docs/archive/0.18/CELLSCRIPT_0_18_ROADMAP.md)
452+
- [0.19 roadmap](docs/archive/0.19/CELLSCRIPT_0_19_ROADMAP.md)
453453

454454
---
455455

‎docs/CELLSCRIPT_CKB_ADAPTER.md‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# CellScript CKB Adapter
22

3-
**Status**: formal 0.19 headless Rust adapter crate with full transaction lifecycle
4-
bridge plus focused local-node acceptance evidence.
3+
**Status**: production contract for the current CellScript CKB profile. The
4+
headless Rust adapter crate landed in the 0.19 line; 0.21 extends the builder
5+
resolution surface with materialised action plans, action-aware scan selector
6+
evidence, variable-length `args_parts`, manifest-backed CellDep completion, and
7+
fail-closed live-cell evidence validation.
58

69
This document defines which CKB-facing responsibilities belong to CellScript,
710
`ckb-std`, `ckb-sdk-rust`, and the adapter.
@@ -304,6 +307,11 @@ Focused local gate:
304307
./scripts/cellscript_ckb_ecosystem_reuse_gate.sh full
305308
```
306309

310+
These ecosystem-reuse scripts are standalone manual tools, not unified gate
311+
modes and not release-evidence claims. See
312+
[`CELLSCRIPT_GATE_POLICY.md`](CELLSCRIPT_GATE_POLICY.md) for the release gate
313+
boundary.
314+
307315
Focused local-node adapter gate:
308316

309317
```text
@@ -314,7 +322,8 @@ That script starts a local CKB devnet, checks a compiler action plan, verifies
314322
the formal adapter crate materialization path, runs `estimate_cycles`, runs
315323
`test_tx_pool_accept`, submits the deploy transaction, generates blocks until
316324
committed, and verifies the code cell is live on-chain. It is adapter-boundary
317-
evidence, not a replacement for stateful business-flow acceptance.
325+
evidence, not a replacement for stateful business-flow acceptance and not a
326+
unified `cellscript_gate.sh` release mode.
318327

319328
## Validation Loop
320329

‎docs/CELLSCRIPT_CKB_STD_COMPAT.md‎

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# CellScript ckb-std Compatibility
22

3-
**Status**: 0.19 scope compatibility contract with implementation landed for
4-
ckb-std constant parity, SourceView decoding, WitnessArgs layout fixtures,
5-
occupied-capacity field lowering, the formal headless CKB adapter crate, and
6-
focused local-node adapter acceptance.
3+
**Status**: production compatibility contract for the current CellScript CKB
4+
profile. The 0.19 line landed ckb-std constant parity, SourceView decoding,
5+
WitnessArgs layout fixtures, occupied-capacity field lowering, the formal
6+
headless CKB adapter crate, and focused local-node adapter acceptance; 0.21
7+
extends the builder-facing boundary with action-aware scan selectors,
8+
`args_parts`, manifest-backed CellDep completion, and helper-backed aggregate
9+
invariant evidence.
710

811
See also [`CELLSCRIPT_CKB_ADAPTER.md`](CELLSCRIPT_CKB_ADAPTER.md) for the
912
transaction-realisation boundary with `ckb-sdk-rust`.
@@ -12,10 +15,9 @@ transaction-realisation boundary with `ckb-sdk-rust`.
1215
CellScript should treat it as the contract-side ABI and runtime oracle, not as a
1316
transaction builder and not as a compiler-core dependency.
1417

15-
This document belongs to the 0.19 registry/deployment/adapter scope. It defines
16-
the compatibility contract that the 0.19 adapter boundary and the 0.20
17-
generated Action Builder must respect; it is not counted as 0.18
18-
protocol-equivalence evidence.
18+
This document defines the compatibility contract that the adapter boundary,
19+
generated Action Builder, and CKB-facing metadata must respect across the
20+
current 0.21 RC line. It is not counted as 0.18 protocol-equivalence evidence.
1921

2022
In practical terms:
2123

@@ -35,6 +37,24 @@ The three components sit on different sides of the same production workflow:
3537
| `ckb-sdk-rust` (5.x) | Provide off-chain CKB data structures (`ckb-types` 1.0.0), sync and async RPC / indexer clients, `CellCollector` (Default / Offchain / LightClient), `CellDepResolver`, `HeaderDepResolver`, `Signer` and lock-specific `ScriptUnlocker` (SecpSighash, SecpMultisig Legacy/V2, ACP, Cheque, OmniLock), `CapacityBalancer` / `CapacityProvider`, protocol `tx_builder` modules, acceptance, and submission. |
3638
| CKB node | Execute the script, measure cycles, and accept or reject the concrete transaction. |
3739

40+
## 0.21 Extensions
41+
42+
The 0.21 RC keeps the same ckb-std compatibility boundary but extends what
43+
builders and adapters must preserve:
44+
45+
- action-aware scan selectors identify which live-cell or transaction-shape
46+
evidence a builder must supply;
47+
- `args_parts` lets adapters construct variable-length `Script.args` from
48+
typed byte fragments while rejecting ambiguous drafts that also set non-empty
49+
`args`;
50+
- manifest-backed CellDep completion resolves script dependencies from
51+
deployment records rather than action-name convention;
52+
- helper-backed aggregate invariant evidence distinguishes
53+
`gap:metadata-only`, `gap:runtime-helper-required`, and `checked-runtime`.
54+
55+
These extensions do not turn compile-only evidence into CKB node acceptance.
56+
They make the adapter contract fail closed before signing or submission.
57+
3858
## Boundary
3959

4060
The compiler core must not depend on `ckb-std`.
@@ -209,10 +229,10 @@ that a CellScript artifact behaves like the corresponding CKB contract-side
209229
ABI, and that a concrete transaction carrying that artifact is accepted or
210230
rejected by the node for the expected reason.
211231

212-
The current 0.19 evidence now covers ABI compatibility, headless adapter
213-
materialization, and focused local-node adapter acceptance. It is still not a
214-
wallet UI, CellFabric, package registry production gate, external audit, or
215-
exhaustive adversarial state-space proof.
232+
The current evidence covers ABI compatibility, headless adapter materialization,
233+
0.21 builder-resolution metadata, and focused local-node adapter acceptance. It
234+
is still not a wallet UI, CellFabric, package registry production gate,
235+
external audit, or exhaustive adversarial state-space proof.
216236

217237
## Cookbook Topics
218238

‎docs/CELLSCRIPT_EXAMPLE_BUSINESS_FLOWS.md‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ locks strict-compile under the CKB profile and are exercised with builder-backed
2929
local CKB valid-spend and invalid-spend transactions. The production report keeps
3030
the matrix explicit in `lock_acceptance_scope.onchain_lock_spend_matrix_scope`.
3131

32-
`examples/registry.cell` and every checked-in `examples/language/*.cell` file
33-
are not part of the seven-example CKB production action matrix. They are
34-
language/tooling examples for compiler surfaces such as bounded local `Vec<T>`,
35-
stdlib patterns, CKB source/witness, TYPE_ID, Spawn/IPC, capacity/time, and
36-
dynamic BLAKE2b.
32+
`examples/registry.cell`, `examples/atomic_swap.cell`,
33+
`examples/multi_phase_dao.cell`, and every checked-in `examples/language/*.cell`
34+
file are not part of the seven-example CKB production action matrix. They are
35+
language/tooling or explicitly non-production business-flow examples for
36+
compiler surfaces such as bounded local `Vec<T>`, stdlib patterns, CKB
37+
source/witness, TYPE_ID, Spawn/IPC, capacity/time, dynamic BLAKE2b,
38+
flow-edge membership validation, and multi-stage state-transition lifecycle
39+
checks.
3740

3841
## Cell Lifecycle Vocabulary
3942

‎docs/CELLSCRIPT_GATE_POLICY.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ deciding whether a change is ready.
1414

1515
| Mode | When to run | Evidence boundary |
1616
|---|---|---|
17-
| `dev` | Local development before pushing | Formatting, Rust check, strict backend quick audit, syntax-combination quick audit, whitespace diff check |
18-
| `ci` | Pull requests, pushes, and routine merge readiness | Full Rust tests, clippy, strict backend CI audit, syntax-combination CI audit through the strict backend runner, package verification, script syntax checks |
17+
| `dev` | Local development before pushing | Formatting, Rust check, strict backend quick audit, syntax-combination quick audit, skill-pack freshness, README-linked CellScript doc Status freshness, local markdown link check, whitespace diff check |
18+
| `ci` | Pull requests, pushes, and routine merge readiness | Full Rust tests, clippy, strict backend CI audit, syntax-combination CI audit through the strict backend runner, package verification, skill-pack and CellScript doc Status freshness, local markdown link check, script syntax checks |
1919
| `backend` | Changes touching IR, codegen, assembler, ABI, ELF, or RISC-V behavior | Full Rust tests, clippy, and strict backend full audit, including stateful CKB scenarios |
2020
| `release` | Nightly/stable release candidates and any production CKB claim | `ci` plus tooling/docs boundary checks, VS Code validation, builder-backed CKB production acceptance, and stateful scenario/action coverage |
2121
| `release-quick` | Wrapper compatibility and local compile-only preflight | `ci` plus compile-only production acceptance; not external live/devnet evidence |

‎docs/CELLSCRIPT_GRAMMAR_GOVERNANCE_RFC.md‎

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
## Status
44

5-
Active 0.19 grammar-governance contract.
5+
Active grammar-governance contract. The 0.19 matrix below remains the baseline
6+
for canonical action/lock syntax; the current 0.21 RC extends that surface with
7+
aggregate-invariant helper coverage, flow-edge membership validation,
8+
TemplateLayout metadata, compile receipts, nested CLI command groups,
9+
structured diagnostic transport, and the `cellscript-mcp` skill-pack surface.
610

711
This document defines the public syntax boundary that parser, formatter, LSP,
812
examples, docs, lowering metadata, and release gates must keep aligned.
@@ -24,7 +28,7 @@ Short form:
2428
2529
## Canonical Surface
2630

27-
The 0.19 public action form is:
31+
The canonical public action form is:
2832

2933
```cellscript
3034
action NAME(params...) -> outputs {
@@ -43,7 +47,7 @@ action NAME(params...) -> outputs {
4347
}
4448
```
4549

46-
The 0.19 public lock form is:
50+
The canonical public lock form is:
4751

4852
```cellscript
4953
lock NAME(protected cell: T, witness arg: U) -> bool {
@@ -72,7 +76,7 @@ schema gains a field, either preserving a new field without review or leaving it
7276
outside the visible audit trail. The parser therefore rejects `except` and `*`
7377
inside `preserve` blocks and asks authors to write an explicit whitelist.
7478

75-
## 0.19 Release Status Matrix
79+
## Baseline Release Status Matrix
7680

7781
| Track | Status | Implementation / evidence | Release gate |
7882
|---|---|---|---|
@@ -88,6 +92,20 @@ This matrix is compiler-governance evidence. It is not a replacement for
8892
builder-backed CKB transaction acceptance, external audit, or exhaustive
8993
adversarial state-space verification.
9094

95+
## 0.21 Governance Delta
96+
97+
The 0.21 RC adds governance requirements that build on the baseline matrix:
98+
99+
| Surface | Governance rule | Evidence |
100+
|---|---|---|
101+
| Aggregate helper coverage | xUDT group amount invariants must report `gap:metadata-only`, `gap:runtime-helper-required`, or `checked-runtime`; strict 0.17 rejects stale helper gaps with PP0170. | `CHANGELOG.md` 0.21.0-rc.1 and `tests/cli.rs` strict 0.17 cases. |
102+
| Flow-edge membership | An action transition must use an edge declared by the corresponding `flow` block; cyclic flows remain valid. | `src/flow/mod.rs` diagnostics and syntax-combo flow bug classes. |
103+
| TemplateLayout metadata | Layout records are metadata-only in this RC, mark cyclic flows as `RootRequired`, acyclic flows as `PathOnlyAllowed`, and reject unsupported `consensus_checked = true`. | `CompileMetadata.template_layouts` schema v44. |
104+
| Compile receipts | `cellc receipt`, `cellc sign-receipt`, `cellc verify-receipt`, and `verify-artifact --receipt` bind metadata/artifact evidence without claiming transaction validity. | `cellscript-compile-receipt-v1`. |
105+
| CLI command groups | Public discovery uses nested `explain`, `tx`, `deploy`, `registry`, `package`, and `auth capability` groups; hidden flat aliases are compatibility only. | `cellc --list` and CLI help. |
106+
| Diagnostic transport | `--message-format=json`, `--color=auto|always|never`, and `NO_COLOR` are part of the scripted diagnostics surface. | CLI command definitions and gate usage. |
107+
| Agent tooling | `cellscript-mcp` and the six `docs/skills/cellscript-*` skills are read-oriented compiler surfaces whose freshness is checked by dev/ci gates. | `scripts/check_cellscript_skill_pack.py`. |
108+
91109
## `verification`
92110

93111
`verification` is a section header, not an execution body. It can contain local

‎docs/CELLSCRIPT_LINEAR_OWNERSHIP.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ These are compile-time checks. Generated verifier code may also clear consumed
2525
stack slots as a runtime defense, but stack clearing is not the primary
2626
ownership model.
2727

28+
For state machines, 0.21 also validates flow-edge membership statically. An
29+
action that claims `transition before.state: A -> after.state: B` must use an
30+
edge declared by the corresponding `flow` block. This is a linearity rule for
31+
state continuation: undeclared transitions fail before lowering instead of
32+
leaving the verifier to infer protocol intent from action names.
33+
2834
## Required End States
2935

3036
Every acquired cell-backed value must reach an explicit terminal operation:

‎docs/CELLSCRIPT_MOLECULE_IFRN_DESIGN_SPACE_IMPROVEMENT_REPORT.md‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ raised during review. It does not re-audit the external Infern repository; any
1010
Infern conclusions remain engineering inferences from the described raw-layout
1111
patterns and the current CellScript capability boundary.
1212

13+
## 0.21 Closure Addendum
14+
15+
The 0.21 RC keeps this report as the 0.20-era design-space closure record and
16+
adds three concrete follow-through points:
17+
18+
- `cell_data_codec_manifest` remains the codec-identity bridge into generated
19+
builders and deployment identity;
20+
- action-aware scan selectors now give adapters a structured live-cell evidence
21+
vocabulary instead of relying on action names;
22+
- TemplateLayout records shipped as metadata-only evidence with
23+
`consensus_checked = false`; executable template-commitment verification
24+
remains future work.
25+
26+
Raw-layout DSL support, multi-ABI builder codec backends, registry/indexer
27+
support for multiple ABI families, and full Infern parity evidence remain
28+
productisation work rather than 0.21 production claims.
29+
1330
## Closure Status
1431

1532
The CellScript-repository P0/P1 design-space compression items are closed for
@@ -56,7 +73,7 @@ a real six-contract Infern parity matrix.
5673
| public scheduler policy witness remains Molecule-only | `src/lib.rs:3411-3416` |
5774
| `lock_args` is a fixed-width `Script.args` escape hatch | `docs/CELLSCRIPT_ENTRY_WITNESS_ABI.md:40-43` |
5875
| schema-backed dynamic witness payloads are Molecule data | `docs/CELLSCRIPT_ENTRY_WITNESS_ABI.md:70-80` |
59-
| raw cell data and OutPoint helpers exist | `docs/CELLSCRIPT_0_18_ROADMAP.md:93-110` |
76+
| raw cell data and OutPoint helpers exist | `docs/archive/0.18/CELLSCRIPT_0_18_ROADMAP.md:93-110` |
6077
| NovaSeal v0-mvp demonstrates raw byte-offset source expressibility | `proposals/novaseal/v0-mvp-skeleton/src/nova_state_lifecycle_type.cell:138-177`, `proposals/novaseal/v0-mvp-skeleton/src/nova_state_type.cell:125-155` |
6178
| v0-mvp packed layout is not a production ABI conclusion | `proposals/novaseal/v0-mvp-skeleton/docs/SCHEMA_LAYOUT.md:44-54` |
6279
| newer NovaSeal profiles mostly use whole-cell packed hashes | `proposals/novaseal/fungible-xudt-profile-v0/src/nova_fungible_xudt_lifecycle_type.cell:226-227`, `proposals/novaseal/btc-transaction-commitment-profile-v0/src/nova_btc_transaction_commitment_type.cell:361`, `proposals/novaseal/fiber-candidate-profile-v0/src/nova_fiber_candidate_type.cell:378` |

‎docs/CELLSCRIPT_PACKAGE_PROVENANCE_AND_DEPLOYMENT_IDENTITY.md‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# CellScript Package Provenance and Deployment Identity
22

3-
**Status**: RFC — early design discussion
3+
**Status**: implementation contract for the current CellScript CKB profile.
4+
Phase 1 landed in the 0.19 line; Phase 2 source-package, generated-builder,
5+
deployment identity, and trust-metadata checks extend through 0.20 and the
6+
0.21 RC.
47

58
**Scope**: Source package registry, deployment registry, lockfile binding, and
69
builder verification for CellScript on CKB
710

8-
**Depends on**: v0.12 stable developer surface, v0.17 CKB protocol semantics,
9-
v0.18 first-class ScriptRef / ScriptArgs work
11+
**Historical scope anchors**: v0.12 stable developer surface, v0.17 CKB
12+
protocol semantics, and v0.18 first-class ScriptRef / ScriptArgs work.
1013

1114
**Forum thread**: <https://talk.nervos.org/t/cellscript-package-and-deployment-registry-early-design-discussion/10210>
1215

@@ -412,7 +415,7 @@ namespace = "cellscript"
412415
source_hash = "blake2b:0xabcd..."
413416

414417
[package.build]
415-
compiler_version = "0.19.0"
418+
compiler_version = "0.21.0-rc.1"
416419
target_profile = "ckb"
417420
artifact_hash = "blake2b:0x1234..."
418421
metadata_hash = "blake2b:0x5678..."
@@ -583,7 +586,7 @@ version = "1.2.0"
583586
source_hash = "blake2b:0xabcd..."
584587

585588
[build]
586-
compiler_version = "0.19.0"
589+
compiler_version = "0.21.0-rc.1"
587590
artifact_hash = "blake2b:0x1234..."
588591
metadata_hash = "blake2b:0x5678..."
589592
schema_hash = "blake2b:0x9abc..."
@@ -704,7 +707,7 @@ namespace = "cellscript"
704707
source_hash = "blake2b:0xabcd..."
705708

706709
[package.build]
707-
compiler_version = "0.19.0"
710+
compiler_version = "0.21.0-rc.1"
708711
target_profile = "ckb"
709712
artifact_hash = "blake2b:0x1234..."
710713
metadata_hash = "blake2b:0x5678..."
@@ -835,7 +838,7 @@ version = "1.2.0"
835838
source_hash = "blake2b:0xabcd..."
836839

837840
[build]
838-
compiler_version = "0.19.0"
841+
compiler_version = "0.21.0-rc.1"
839842
artifact_hash = "blake2b:0x1234..."
840843
metadata_hash = "blake2b:0x5678..."
841844
schema_hash = "blake2b:0x9abc..."

‎docs/CELLSCRIPT_REGISTRY_PHASE1.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CellScript Registry Phase 1: JoyID-Rooted Package Publishing for CKB Smart Contracts
22

3+
**Status**: public walkthrough of the Phase 1 registry contract for the current
4+
CellScript CKB profile. Policy decisions defer to
5+
[`CELLSCRIPT_REGISTRY_PRODUCTION_BOUNDARY_ADR.md`](CELLSCRIPT_REGISTRY_PRODUCTION_BOUNDARY_ADR.md).
6+
37
Publishing and consuming smart contract libraries should feel like a normal
48
package workflow: `cellc publish` publishes a package, and the registry shows
59
the new entry. The CellScript public registry policy therefore treats publish
@@ -187,7 +191,7 @@ namespace = "cellscript"
187191
source_hash = "blake2b:0xabcd..."
188192

189193
[package.build]
190-
compiler_version = "0.19.0"
194+
compiler_version = "0.21.0-rc.1"
191195
target_profile = "ckb"
192196
artifact_hash = "blake2b:0x1234..."
193197

@@ -217,7 +221,7 @@ version = "1.2.0"
217221
source_hash = "blake2b:0xabcd..."
218222

219223
[build]
220-
compiler_version = "0.19.0"
224+
compiler_version = "0.21.0-rc.1"
221225
artifact_hash = "blake2b:0x1234..."
222226

223227
[[deployments]]

0 commit comments

Comments
 (0)