Ashroot implementation and qualification
2 November 2026. The optional crate is implemented. This is the final decision and measured scope for this attempt; earlier research files contain proposals and superseded alternatives.
Resulting design
- One closed database memory owns separate private table modules. Applications receive transient database/read capabilities; individual table keys, tickets, mutable rows and mutable indexes remain private. Business services can remain separate modules. Strong foreign keys stay inside the closed database domain.
- Tables independently select Nyxus, Hylix or hybrid Minima. Indexes use exact old/new deltas; unchanged projections cause no index writes. Ordinary writes stage foreign checks on the stack and do not allocate a cascade plan.
- Ordered, descending, unique, composite and sparse projections are supported. Foreign indexes also provide complete reverse lookup for strict restrict and bounded cascades. Diamonds delete each dependent once; all-cascade schema cycles reject during compilation. Complete-domain clear removes both sides.
- Independent custom indexes select their own storage, copyable delta and borrowed query capability. The maintained spatial-grid test demonstrates rectangle queries without an ordered-storage interface. Unsafe adapters must certify exact maintenance, immutability, disposal and semantic policies.
- Primary key scans and bounded primary-row traversal use the actual ordered primary storage. Queries do not reconstruct primaries from secondary indexes.
- Reindex moves unchanged primary storage and rebuilds indexes; Recode constructs target-owned rows for explicit row/engine conversion. IDs, declared relation shape and every row's outgoing foreign facts are checked. Failed conversions trap for whole IC execution rollback. There is no local undo journal.
Existing SDK collection users acquire no Ashroot dependency or hooks. No SDK source, source pin, RRT, RRts or HRRT runtime changed.
Source and artifacts
Factory HEAD was b2cb4b9fb01073a3cd55131362fc226355b65853, with the new
uncommitted Ashroot/qualification sources captured in exact build archives.
SDK HEAD was clean at d0e53afc7b7fdc4b7cf4e2ccbe1e55a386133c4b.
The compiler was pinned rustc 1.101.0-nightly (7df81381d 2026-10-14);
canonical wasm64 release builds used opt-level 3, thin LTO and one codegen unit.
Each build has unchanged-before/after source receipts, exact source hashes,
Wire descriptors, prepared/raw module hashes and a complete artifact manifest.
The actual PocketIC executable was the unchanged v16.1.0 binary with SHA-256
6a9a75ad9b4551d2b0f4a0d954ffb8bd5bbd0ebc44ac00290679b06ad0b2f8e6.
Its loader environment omitted LD_LIBRARY_PATH and LD_PRELOAD. The neighboring
IC source review and this measured binary remain distinct identities.
Thirteen separate feature images built successfully. The engine-change image converted populated People Nyxus→Hylix, Cars Hylix→Minima and Passes Minima→Nyxus while Locks stayed Hylix. V1 and V2 declarations remained separately compiled.
Readable evidence is in evidence, including per-operation comparison, CSV, size attribution and the final gate receipt. The frozen archive preserves build/source receipts, full traces, authoring outputs and failures. Absolute paths in historical receipts identify this run, not a fresh build in another checkout.
Verification
| Gate | Result |
|---|---|
| Default-feature native suite | 36 passed |
| All-feature native suite | 46 passed |
| Hylix-only focused suite | 4 passed |
| Minima-only focused suite | 7 passed |
| Independent authoring client | Valid client ran; all 13 intended compiler rejections passed |
| Runnable top-100 leaderboard example | Passed on final source |
| Canonical feature images | 13 built and validated |
| Actual IC cohorts | Two independent 32-row/table cohorts and one 1,000-row/table cohort passed |
The all-feature count includes one unit test and 45 integration tests. One illustrative macro doctest is explicitly ignored; it is not counted as passing. Native tests include independent CRUD/graph models, real owning nested Hylix rows and retirement, actual Minima slot bytes/generation reuse, query borrowing, complete catalog traversal, spatial indexes and migrations preserving native row/nested allocation addresses.
Each IC cohort passed 24 checks and captured 66 ordinary update executions: 22 each for native Ashroot, mixed Ashroot and handwritten native control. Checks independently compared every primary and every secondary/reverse index; verified rejected operations and stable-byte purity; tested retargeting, restriction, all deletion bounds and diamond deletion; cleared/reseeded; checked update traps, populated KEEP, wrong-contract rejection and admitted restore traps. Changed-schema upgrades rebuilt all indexes, rejected undeclared downgrades and remained writable after another KEEP. Duplicate new uniqueness rejected with complete rollback and the target worked on valid fresh data. Late native Reindex and mixed engine-change traps restored all source data and the stable image. The separate mixed same-engine late-trap companion was not run.
Matched native cost screen
The control has the same four private table memories, primary records, seven secondary/reverse indexes, unique/FK checks, operation gate, bounded deletion semantics and public protocol. It shares the public planner and descending-key wrapper. This measures table-coordination overhead, not the cost of adding integrity features to an unchecked map. Mixed engines have no matched handwritten control here and are not folded into these overhead percentages.
Whole replicated instructions include page charges. Traps, KEEP, migrations, queries and inspection are separate lifecycle evidence outside these update totals. Completed row mutations include repeated writes, clear and reseeding; they are not the final population. Both seed counts are verified by the oracle.
| Rows per table | Calls per arm | Completed row mutations per arm | Native Ashroot instructions | Manual instructions | Delta |
|---|---|---|---|---|---|
| 32, sample 1 | 22 | 389 | 14,192,210 | 13,876,064 | +2.28% |
| 32, sample 2 | 22 | 389 | 14,192,210 | 13,876,064 | +2.28% |
| 1,000 | 22 | 12,005 | 96,997,393 | 96,082,243 | +0.95% |
Excluding the two seed calls gives 20 calls per arm: +2.43% at 32 rows/table (133 completed mutations) and +3.60% at 1,000 (4,005 mutations). At 1,000, complete-domain clear cost +5.83%, unchanged-projection replacement +0.028%, country/name replacement +0.0053% and three-row diamond deletion +0.058%. All operations, including less favorable ones and expected failures, remain in the CSV. The two 32-row cohorts exactly repeat every per-operation instruction, body counter, included page charge, accessed/dirty-page count and cycle debit.
At 1,000 rows/table, total cycle debits were 336,358,786 versus 334,528,486 (+0.55%). Included page charges were 23.12M versus 22.72M instructions, already inside the totals above; summed dirty-page counts were equal at 111. In-body counter intervals are retained but are not isolated compute overhead: first-touch page charges can move across the counter boundary. Local per-call milliseconds are retained with fixed native→mixed→manual execution order. Two small samples and one larger sample do not establish latency quantiles or mainnet throughput.
Wasm size and memory
| Metric | Native Ashroot | Manual native | Difference |
|---|---|---|---|
| Prepared installed Wasm bytes | 540,913 | 482,968 | +57,945 (+12.00%) |
| Deterministic Node gzip transport bytes | 122,039 | 108,766 | +13,273 (+12.20%) |
| Final Wasm capacity bytes | 16,842,752 | 16,842,752 | 0 |
| Final native stable capacity bytes | 0 | 0 | 0 |
WABT attribution separates the prepared-size difference: executable code +25,359 bytes, function names +25,185, data +7,360, with small remaining section deltas. Formatting support is equal. A first screen exposed repeated sorting in the probe's secondary-derived primary snapshots. Direct primary traversal removed all those sorts, saved 42,207 native image bytes and 36,967 mixed image bytes, and strengthened independent index verification. The superseded size receipt is preserved rather than presented as the selected result.
Final total native IC memory accounting was +13,274 bytes, almost entirely the transport/binary accounting difference plus one custom-section byte. Equal capacity does not establish equal live allocation or peak working memory. The mixed backend's actual stable capacity at 1,000 rows/table was 655,360 bytes; that different engine population is not a native-overhead control.
Failures preserved and scope
The first build batch stopped at a V2-only generic associated-constant inference error in the fixture. The fixed expression uses a fully qualified ModuleMemory contract; the complete final thirteen-image batch was rebuilt on frozen Rust sources. The authoring checker initially used a diagnostic mode that did not provide the JSON events it parsed, and one expected private-constructor error code differed on the pinned compiler. The final real checker corrected those matchers and passed all cases with unchanged source inventory.
The first 1,000-row run reached the platform's install-code rate limit after a deliberately expensive failed engine conversion. Its 44 captured measurements and exact failure remain preserved and excluded from paired PASS totals. A runner-only change retries exactly CanisterInstallCodeRateLimited, at most three times, allowing 100 normal scheduler rounds per refusal. It does not disable limits or change application data, compiled Rust or artifacts. The fresh successful 1,000-row run recorded two such repayments. The documented behavior is to retry after quota replenishment. Earlier and final runner hashes are recorded separately.
Boundaries remain explicit: at most eight tables/indexes per tuple; one primary key representation per database; strict immediate restrict; synchronous bounded conversion preserving table order/count and declared relationship shape. Minima is a hybrid fixed-slot backend, not a mutable stable B-tree. R-tree and HashMap implementations, arbitrary effectful triggers, cross-domain strong FKs, live reindexing across awaits and arbitrary graph-shape migrations are not claimed. Custom adapters and TableSpec have explicit unsafe/policy obligations. Native callers must restore/discard a failed outer Store snapshot; caught panic does not create IC rollback, and late Store flush failure is not fully covered by the database's inner-operation poison flag.
The larger research matrix remains unrun. No 10k/100k population, mixed manual cost control, 30-sample timing distribution or general nested-owning-row engine conversion result is inferred from this screen. Shared SDK/runtime changes were not made, so existing Heavy16 results were neither modified nor relabelled as Ashroot evidence. Current Ashroot documentation links pass; the repository-wide documentation checker still reports 16 pre-existing missing crypto benchmark artifacts. Research navigation is current.