Historical Candid phase measurement
Results measure the archived wasm32 application fixtures from
2f1a09e2d49a5ba301a0ac90432c6d8f1a77e8b2. This is a diagnostic of that earlier
table; the current SDK remains wasm64-only. No SDK or application code changed.
Each canister contains 100,000 accounts, 100,000 stock rows and 10,000 historical receipts. Transfer, checkout and preview each use 32 distinct requests from the original seeded traces, one trial. Every trace starts from the populated snapshot, then one untimed no-op, then 32 uninterrupted updates. Preview retains the four missing-stock responses in the original trace. Host Candid work is excluded.
All 1,152 business calls across the plain original, historical whole observer and new phase observer passed identical outcome/state/memory checks. Every phase count is exactly 32 per trace. All 12 historical whole-observer totals reproduce all three trials of the earlier table exactly. The 44-entry source/artifact/server inventory is unchanged across the run; the PocketIC server was stopped.
Core Candid covers constructor through successful internal destructor, including allocation and IC memory charges incurred there. It does not include surrounding transport, business work or all SDK cleanup. The residual remains unclassified. The measured whole-counter increase is 1,914 instructions per call; it is not the exact price of every probe instruction, because some observer bookkeeping follows the counter read. Percentages divide summed decode plus encode by the same 32 calls' phase-instrumented whole sum. No per-call median/P95 or universal Candid CPU-cost claim is made. The heap fixture serializes its ordinary small request and reply, not its populated heap.
Evidence
- Compressed raw counters and complete oracles and derived numeric summary.
- Source/server/artifact SHA-256 inventory, matching after-run inventory, and packaging proof.
- Reviewed phase coordinates, semantic review,
compressed function inventory, and the four
phase-plan-*-calls.jsonfiles. Earlier investigation sections retain their original chronology; the final runtime section records the completed run. - Exact measured runner and instrumenter source snapshots, instrumenter receipts/tests, run log, and cleanup receipt.
- Reporting-only changes identify the published gzip-capable renderer separately from the original frozen renderer. Measured runner/instrumenter snapshots are unchanged.
Wasms are not committed in this compact packet. Original and historical
whole-observer files are still at the absolute paths in
historical-controls.json, under
tmp/2026-10-18-app-targets/worktrees/apps/research/experiments/2026-10-18-app-targets/wasm32-2026-10-18-143100/inputs/.
New phase Wasms are in tmp/2026-10-18-candid-cost/phase/. All twelve artifact
hashes are pinned in the source inventory and individual proof receipts. Rebuild
missing originals from the frozen historical revision, never from the current
SDK. The instrumenter rejects an unmatched hash or probe coordinate.
Reproduce
Regenerate the report using only committed compressed data, from the repo root:
python3 research/experiments/2026-10-18-candid-cost/report.py \
research/experiments/2026-10-18-candid-cost \
research/experiments/2026-10-18-app-targets/wasm32-2026-10-18-143100
For a fresh measurement, use the pinned compiler environment and PocketIC 16. Keep output directories separate from this frozen packet:
source ver1/tools/env.sh
export CARGO_TARGET_DIR="$PWD/bench/target"
export POCKET_IC_BIN="$PWD/ver1/tmp/pocketic16/pocket-ic"
export TMPDIR="$PWD/tmp/p-candid"
mkdir -p "$TMPDIR"
cargo build --locked --release --target "$ICRUSTMEM_HOST_TARGET" \
--manifest-path research/experiments/2026-10-18-candid-cost/runner/Cargo.toml
cargo build --locked --target "$ICRUSTMEM_HOST_TARGET" \
--manifest-path research/experiments/2026-10-18-candid-cost/instrument/Cargo.toml
The instrumenter CLI is candid-cost-instrument ORIGINAL.wasm PLAN.json OUTPUT.wasm.
Use each exact absolute original path from historical-controls.json with
phase-plan-probes.json; output must not exist. Compare the output SHA against
its phase-proofs/*.instructions.json receipt. The plan pins input paths as well
as bytes, so preserve those paths when reproducing this exact packet.
The runner CLI is candid-cost-runner ORIGINAL_ARCHIVE PHASE_DIRECTORY OUTPUT_DIRECTORY.
ORIGINAL_ARCHIVE contains the original controls.json and both original and
whole-observer artifacts. PHASE_DIRECTORY contains the four newly instrumented
{control}.wasm files and receipts. Run with the pinned server hash in the source
inventory, capture source/tool/artifact inventories before and after, then run
report.py OUTPUT_DIRECTORY HISTORICAL_ARCHIVE. This report independently checks
all three modes' oracles and compares with the historical raw results. Uncompressed
and per-mode duplicates from the recorded run are retained only in ignored
tmp/2026-10-18-candid-cost/measurement-full/.