Skip to content

Commit 415554b

Browse files
committed
Implement CellScript 0.26 dynamic Cell batching
1 parent 8ae6dc4 commit 415554b

95 files changed

Lines changed: 3369 additions & 3736 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BRANCHES.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# Branch Context
22

3+
## nightly-0.26
4+
5+
`nightly-0.26` is the active consensus-runtime development line for bounded
6+
Cell-group consumption and bounded output-plan correspondence. The first
7+
supported shape is deliberately limited to exact Type Script groups with a
8+
compile-time cardinality bound, canonical Molecule decoding, deterministic
9+
group-relative order, and independently checked machine evidence. Treat the
10+
line as non-production until the positive CKB-VM/stateful fixtures, mutation
11+
checks, resource measurements, independent security review, and the `dev`,
12+
`ci`, and `backend` gates agree.
13+
314
## nightly-0.25
415

5-
`nightly-0.25` is the active language-completeness development line. It adds
16+
`nightly-0.25` is the language-completeness predecessor. It adds
617
bounded value generics, explicit visibility and package interfaces, exhaustive
718
IR-surface classification, and the typed-semantics v2 / lowering-record v3
819
boundary. Treat it as merge-ready only when compiler, independent checker,

CHANGELOG.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## 0.26.0 - Unreleased
4+
5+
- Implement the first bounded consensus-runtime contracts. Fixed-width
6+
`BoundedCellSet<Resource, N>` now scans the exact current Type Script
7+
`GroupInput`, checks role, exact data size, runtime cardinality including an
8+
`N + 1` probe, and executes predicates once per element. Fixed-width
9+
`BoundedList<Plan, N>` now uses the versioned `CSBPLv1\0` Molecule FixVec
10+
witness plan and verifies one canonical `GroupOutput` per element, including
11+
complete data, exact lock, declared capacity floor, predicate execution, and
12+
final count. Bounded bodies admit only pure predicates, one create template,
13+
and numeric outer `+=` accumulators. Dynamic layouts, other sources, custom
14+
identities, incomplete templates, and implicit lock/capacity policy remain
15+
fail-closed.
16+
17+
- Add production-policy and real CKB-VM coverage for zero/one/N/N+1 inputs,
18+
malformed codecs and cell data, predicate failures, output
19+
count/order/data/lock/capacity mismatches, and typed/machine artifact
20+
mutations. Add checked `.cell` examples for variable-cardinality claims,
21+
1–16 order settlement, fragmented Cell merging, and bridge/rollup batches.
22+
Advance compile metadata to schema 62, constraints metadata to schema 3,
23+
verified lowering records to v4, and typed semantics to v3.
24+
325
## 0.25.0 - Unreleased
426

527
- Rebase the 0.25 development line on the complete 0.24 trust boundary,
@@ -995,7 +1017,7 @@
9951017
invalid `extend_from_slice` element types, and unrefined `Vec::new()` slice
9961018
extension cases fail at compile time instead of drifting into hidden runtime
9971019
paths.
998-
- Add `examples/language/order_book.cell` as a non-production language example
1020+
- Add `examples/language/collections/order_book.cell` as a non-production language example
9991021
for local stack-backed order vectors.
10001022
- Add the CKB release-gate wrapper script and document the difference between
10011023
quick compile-only evidence and full production acceptance.

CODING_STYLE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,20 @@ project contract.
2828
short reason; crate-wide or module-wide clippy allowances are only for
2929
documented legacy or transition boundaries.
3030

31+
## CellScript Example Organization
32+
33+
- Organize `examples/language/` by semantic purpose: `core`, `ckb`,
34+
`ownership`, `verification`, `collections`, or `batches`.
35+
- A `.cell` filename must describe behavior and must not contain a release or
36+
version marker. The native source-policy gate checks tracked and untracked
37+
CellScript sources and rejects forms such as `v0_26_batch.cell`,
38+
`contract-v1.cell`, and `token_0.26.0.cell`.
39+
- Keep release history in `CHANGELOG.md` and release notes. Do not encode it in
40+
source paths, module names, fixture identities, or user-facing example names.
41+
- When moving an example, update its module declaration, documentation links,
42+
embedded fixtures, website references, and production-evidence inventory in
43+
the same change.
44+
3145
## On-Chain Registry Script Rules
3246

3347
`contracts/registry-type-script` is an independent `no_std` CKB Script crate.

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resolver = "3"
2121

2222
[package]
2323
name = "cellscript"
24-
version = "0.25.0"
24+
version = "0.26.0"
2525
edition = "2024"
2626
rust-version = "1.97.1"
2727
autobins = false
@@ -84,7 +84,7 @@ blake2b_simd = "1.0"
8484
toml = "0.8"
8585
hex = "0.4"
8686
semver = "1.0"
87-
cellscript-artifact-checker = { version = "=0.25.0", path = "crates/cellscript-artifact-checker" }
87+
cellscript-artifact-checker = { version = "=0.26.0", path = "crates/cellscript-artifact-checker" }
8888

8989
indexmap = "=2.2.6"
9090

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -427,14 +427,17 @@ action burn(token: Token) {
427427
| `examples/amm_pool.cell` | TypeHash-bound shared pool state and swap/liquidity effects |
428428
| `examples/launch.cell` | Mint-authority bootstrap and launch/pool composition patterns |
429429

430-
Non-production language examples live under `examples/language/`. They compile
431-
and exercise compiler/tooling surfaces, but they are not part of the seven-file
432-
CKB production acceptance matrix. `registry.cell` covers bounded local
430+
Non-production language examples are classified by behavior under
431+
[`examples/language/`](examples/language/README.md). They compile and exercise
432+
compiler/tooling surfaces, but they are not part of the seven-file CKB
433+
production acceptance matrix. `collections/registry.cell` covers bounded local
433434
`Vec<Address>` / `Vec<Hash>` helpers; `examples/registry.cell` keeps that
434-
surface available from the top-level examples directory. `examples/language/order_book.cell` is a
435-
local stack-backed order-vector sketch and does not claim persistent order-book
436-
semantics. The v0.14 language examples cover CKB source/witness, capacity/time,
437-
TYPE_ID, Spawn/IPC, and dynamic BLAKE2b surfaces as compiler/tooling examples.
435+
surface available from the top-level examples directory.
436+
`examples/language/collections/order_book.cell` is a local stack-backed
437+
order-vector sketch and does not claim persistent order-book semantics. The
438+
`ckb/` examples cover source/witness, capacity/time, TYPE_ID, Spawn/IPC, and
439+
dynamic BLAKE2b surfaces. `.cell` filenames describe semantics and never encode
440+
a release version.
438441

439442
## Comparison
440443

@@ -497,7 +500,6 @@ or CellFabric intent engine.
497500
- [BIP340 verifier CellDep ABI](docs/CELLSCRIPT_SIGNATURE_VERIFIER_ABI.md)
498501
- [Collections support matrix](docs/CELLSCRIPT_COLLECTIONS_SUPPORT_MATRIX.md)
499502
- [Output bindings](docs/CELLSCRIPT_OUTPUT_BINDINGS.md)
500-
- [Historical signature-direction execution plan](docs/archive/0.13/CELLSCRIPT_SIGNATURE_DIRECTION_EXECUTION_PLAN.md)
501503
- [CKB target profile tutorial](docs/wiki/Tutorial-05-CKB-Target-Profiles.md)
502504
- [CKB deployment manifest](docs/CELLSCRIPT_CKB_DEPLOYMENT_MANIFEST.md)
503505
- [Spore and RGB++ interoperability boundaries](docs/wiki/Spore-and-RGBPP-Interop-Boundaries.md)
@@ -622,7 +624,7 @@ CKB cycle/capacity estimates.
622624
| Module | What it does |
623625
|---|---|
624626
| **Stdlib** (`stdlib/`) | Built-in functions and compiler-recognized patterns that lower to explicit verifier effects: lifecycle helpers such as `std::lifecycle::transfer`, `std::receipt::claim`, and `std::lifecycle::settle`; cell metadata helpers such as `std::cell::preserve_type`, `std::cell::preserve_lock`, and `std::cell::preserve_capacity`; plus ckb-vm syscall/runtime helpers. Module-injected, not linked separately. |
625-
| **Collections** (`stdlib/collections.rs`) | Compiler-recognized stack-backed `Vec<T: FixedWidth>` lowering remains supported for verifier-local values, including `new`, `with_capacity`, `capacity`, `push`, `extend_from_slice`, `len`, `is_empty`, indexing, `first`, `last`, `contains`, `set`, `remove`, `pop`, `insert`, `reverse`, `truncate`, `swap`, and `clear`. Generated allocation-backed collection symbols are fail-closed and are not a production allocator ABI. Cell-backed collection ownership remains unsupported. |
627+
| **Collections** (`stdlib/collections.rs`) | Compiler-recognized stack-backed `Vec<T: FixedWidth>` lowering supports verifier-local values. The 0.26 bounded Cell runtime additionally supports fixed-width `BoundedCellSet<T, N>` over the exact current Type Script `GroupInput` and `BoundedList<P, N>` through the versioned plan-to-`GroupOutput` verifier; see the [support matrix](docs/CELLSCRIPT_COLLECTIONS_SUPPORT_MATRIX.md). Dynamic element layouts, other Cell sources, and generated allocation-backed helpers remain fail-closed. |
626628

627629
### Tooling Surface
628630

@@ -726,7 +728,7 @@ policy defaults:
726728
[package]
727729
edition = "2026"
728730
name = "token"
729-
version = "0.25.0"
731+
version = "0.26.0"
730732
entry = "src/main.cell"
731733
source_roots = ["src"]
732734

0 commit comments

Comments
 (0)