IC measurement contract
The benchmark records actual execution charges with the locally selected PocketIC binary. Source reading explains those charges; it does not qualify an unrun algorithm or another server. This note was checked on 25 October 2026. No throughput or instruction result is inferred from compilation or native tests. The ordinary-query write path was additionally measured on 26 October 2026 in the query/write control.
The qualified executable reports
pocket-ic-server 16.1.0, SHA-256
6a9a75ad9b4551d2b0f4a0d954ffb8bd5bbd0ebc44ac00290679b06ad0b2f8e6.
Its standalone catalog identity is
593a25a7fca34ea95347c764ae7d87034c3ae7267796490c3daef528cfe9d8f8.
pocket-ic explain --compact exports the complete compiled catalog without
starting a server; pocket-ic explain --rule ic.memory.heap.access.v1 narrows it.
The runner pins the executable hash and saves the catalog bytes and hash for
each new owned session. Its actual subnet configuration remains distinct from
compiled source defaults. The default executable path can be replaced by other
work; select a verified copy matching this hash rather than assuming that path
still identifies the qualified binary.
The original source review used /srv/shared/ic at HEAD
ee8086a9773725fd1058832a9400297cf0990112 with working-tree changes. The file
hashes below, rather than a later checkout HEAD, identify the reviewed runtime
excerpts embedded in the qualified binary:
| Source | SHA-256 |
|---|---|
rs/memory_tracker/src/deterministic.rs |
e9377f7f1585506be3bf76d33aaa38815b4fd2b0b9165249cec6cf2c096a546c |
rs/config/src/subnet_config.rs |
e168eb929b47908879c25267334fb7105be7239f18590875760f3e27508ac4d6 |
rs/embedders/src/wasmtime_embedder/linker.rs |
503c1924b2f577924467342abad86dd173c2f2bc6b539ae39582ecb297f85dbf |
rs/embedders/src/wasm_utils/system_api_replacements.rs |
bcd14591d712e72cdb38a0813b5e72c3007efc43e9a18dbf36c376c464c38a42 |
DeterministicMemoryTracker::mark_wasm_page_accessed and
mark_wasm_page_dirty each debit the aligned native 64 KiB region's OS page
count times configured page overhead. With 4096-byte OS pages and the
application default 5000 instructions per OS page:
| Event in one physical execution | Instructions |
|---|---|
| First native access to a 64 KiB region, by read or write | 80,000 |
| First dirtying when modification tracking is enabled | Additional 80,000 |
| Update: first write to an untouched region | 160,000 total |
| Ordinary query: first write to an untouched region | 80,000 total |
| Later accesses/writes of the same kind in that execution | No additional region fee |
This is not 160,000 per allocation or per read/write pair. A 4 KiB allocation
can share a charged 64 KiB region with other allocations; metadata, stack,
serialization and host copies can open the region before the algorithm. Allocator
placement changes can move first-fault attribution without removing its fee.
Every new update/callback/query has a new tracking epoch. DTS pauses/resumes
preserve the physical execution's epoch. A previous message's warmup does not
make later-message pages free. Ordinary queries select modification tracking
Ignore: their first read or write maps the region readable/writable and debits
access only. Normal store and bulk-memory instructions still count. Composite
queries use a different tracking path; do not generalize this rule to them.
Query measurements require an actual completed query trace, not a cached reply,
and keep query instructions separate from replicated update instructions.
Stable reads have an additional distinction: an entirely untouched range of
4 KiB stable bytemap granules can use stable_read_first_access and copy from
PageMap without native stable mapping. API/copy work and heap destination fees
remain. Overlap selects native stable copying for that read; actual native
faults, not the number of logical stable reads, determine native region fees.
The profiles preserve direct/native decision rules instead of estimating fees
from API byte counts.
rs/config/src/embedders.rs also defines dirty-copy scheduling overhead of
3000 instructions per OS page. wasm_executor.rs applies it to round accounting
when the dirty-page copying optimization has triggered, with zero overhead from
that path otherwise. It is a separate scheduling category, not a second name
for the native access/dirty tax or a charge per small heap allocation.
The catalog's compiled application defaults include 40,000,000,000 instructions per update, 2,000,000,000 per DTS slice, 5,000,000,000 per query and 6 GiB wasm64 heap capacity. A same-message warmup and post-timing verification consume the same endpoint budget. Capacity limits and cycle prices are separate quantities: the default wasm64 execution price is 20 cycles per ten instructions before subnet scaling, with other fees independent. The runner reports exact cycle debits separately and never converts them into an invented instruction count.
The Counter 0 linker charges its 200-instruction API overhead before reading the current message counter. Thus a difference includes the ending probe's overhead. IC metering prepays basic blocks, so counter boundaries also have block-boundary effects. The non-inlined dynamic kernel keeps its work observable but does not turn Counter 0 into a source-exclusive CPU timer. Raw intervals, controls and complete endpoint totals remain separate. No page subtraction or no-op subtraction is applied to reported results.
Canonical builds use build-app.py --debug-artifacts: optimized raw DWARF is
preserved, debug stripping is checked to change only debug sections, the SDK
prepares the stripped module, and an exact raw/prepared function-body origin
map is generated. The source archive includes generated code and dependencies.
The symbolizer checks the installed module hash, origin map, debug sidecars and
source hashes against the exported trace. A block-boundary line identifies
compiler context; it does not allocate the whole prepaid block cost to that
line. Inline frames are not dynamic caller stacks.
Profiles retain reconciled complete ledgers independently of bounded source maps and physical stacks. Inspect dropped executions, detail/profile truncation, origin-map unavailable/truncated flags and stack truncation separately. The shared session uses 2,097,152 origin ranges and a 512 MiB retained trace budget, selected before module compilation. A shorter capture cannot repair a module map truncated at compilation. These diagnostic limits do not raise the guest instruction budget or waive page fees.
The benchmark guide defines fixture admission, grouped logical-operation accounting, fresh-message and same-message-warm modes, verification coverage and exact build/run commands. Every result must retain its actual prepared artifact and server identity; this note contains no measured crypto performance claims.
Fresh signer contract
The primary ECDSA row receives 100 public keys, signatures, digests and optional
client-provided inverses in one update. Keys can belong to different people.
All key validation and temporary precomputation count toward that call. A
within-call table or batch normalization is permitted; a validated key table
stored by an earlier update is not part of this workload. Hints remain
untrusted: check scalar encoding, ranges and s * w == 1, with the same
signature and low-S policy as the ordinary path.
Staged raw-byte fixtures can isolate the algorithm including fresh SEC1 parsing. They omit input transport and are labeled accordingly. The complete uncached Wire endpoint must separately account for all public-key and hint bytes. Compare 33-byte compressed and 65-byte uncompressed SEC1 encodings; neither encoding is free to parse.
Unbatched and compiler-generated scratch
A bulk mean is not a single-call cost. For unbatched verification, send one record per physical update, vary the inputs, and retain every whole-call trace. Run a preliminary update before timing; record it separately without preparing keys. Keep the actual N100 loop measurement as a different scope. The R11 single-call study includes both.
Source guards do not prove that compiler-generated temporary copies are wiped.
Inlining a large Copy value may introduce linear-stack staging outside its
source guard, even with an output parameter. Review exact emitted destinations,
last writes and guard coverage when optimizing secret buffers. Direct vector
stores fixed the observed X25519 copies; this is not a general guarantee about
compiler spills or JIT registers. Keep public decode scratch distinguished from
secret buffers instead of clearing an entire compiler frame indiscriminately.