Shared SDK and Tripwire optimization round 2 — 29 October 2026

Selected C's implementation, with Wire remaining the default. Its matched Wire workload uses 0.31% fewer instructions, while opt-in Tripwire uses 1.23% fewer than the previous Tripwire best. Tripwire still costs 1.35% more than current Wire for Heavy16. All compared runs complete identical work, latency and grown memory; do not attribute a combined cohort's change to one edit.

Complete replicated workload + maintenance Instructions, including heap fees Included heap fees Other instructions by subtraction
Wire, earlier control 93,843,009,985 47,376,480,000 46,466,529,985
Wire, selected shared SDK 93,549,758,138 47,077,920,000 46,471,838,138
Tripwire, earlier best 95,985,080,127 49,928,560,000 46,056,520,127
Tripwire A: direct output/packet lifetime/packed rows 95,443,039,946 49,246,800,000 46,196,239,946
Tripwire B: source enum/inline ACKs 95,663,486,909 49,343,920,000 46,319,566,909
Tripwire C: compact borrowing/raw validation 94,808,165,875 49,099,120,000 45,709,045,875

Other instructions include dynamic Wasm and system APIs; this is not a pure CPU counter. SourceRef B is rejected: it expanded view metadata and the full cohort regressed versus A. C keeps the original four-word view, an optional borrowing hook, and cheaper raw row validation. The native owned reply's u16 length avoids the initially observed larger native call-state allocation; native layout alone is not evidence of Wasm page savings.

Selected full-run property Wire Tripwire C
Complete model time 29,400 ms 29,400 ms
Root p50 / p95 / maximum 4,800 / 12,600 / 19,200 ms same
Workflow p50 / p95 / maximum 4,800 / 11,400 / 18,600 ms same
Queue p50 / p95 / maximum 600 / 600 / 1,200 ms same
Physical peer calls 2,434 2,422
Fleet grown Wasm / stable bytes 269,484,032 / 0 same
Recorded traps / rejected ingress / reoffered frames 0 / 0 / 0 same

Which work became cheaper

Complete Tripwire cohort Earlier best A Rejected B Selected C
Reactor/workflow turns 50,595,540,655 50,199,754,369 50,219,468,447 50,194,398,253
Peer receive 14,811,213,252 14,827,797,218 15,179,707,370 14,350,935,476
Peer ACK callbacks 16,509,408,649 16,334,817,203 16,182,110,128 16,182,160,990

Outgoing encoded packets now move into the existing Call API and are released after sending, rather than on the later callback. Batches allocate/fill their final output once; receiver rows stay packed. Every row still validates before admission or payload access, but C checks raw shape and bounds without building throwaway FrameRefs. An actual public typed-Batch input regression was fixed with borrowed native frame slices, without restoring expanded fixture vectors.

For owned bytes already in heap, Tripwire can lend a checked slice. Native nested decoders reuse it; IC argument sources retain explicit reads. Bounded small call replies can use an owned inline array. ACK allocation uses its known prefix count. No automatic cache, old-format decoder, journal, effect change, reduced workload, altered admission/fairness or relaxed delivery policy was used.

The bounded 16-Fanout diagnostic sees one fewer Global allocation in B's ACK than A, yet both sampled ACKs still pay 1.36M heap-page instructions. A first opener moving or one allocation disappearing does not imply a region disappears. Full workload effects and diagnostic effects remain separately reported.

Evidence and boundaries

All full auditors PASS: exactly 18,000 roots, 1,200 children, 19,200 workflows, 594,000 steps, 202,800 attempts, 180,000 endpoint messages, 27,600 dispatches, 360,000 protocol items and 1,024 canonical block/certificate checks. Same pinned 6a server, same-subnet16 layout, 30 arrival rounds at 1,000 roots/s, 600ms rounds, 500M turn budget, limits/DTS and complete native trace accounting were used. Queries are separate. Finished-entry totals exclude aborted DTS slices and scheduler accounting. Model time is not host time or predicted mainnet capacity.

SDK tests/doctests, broad Common/Reactor/Rechain/Takt/application suites, reference byte checks, malformed-row/source-spy cases and independent reviews passed. B and C each pass 15 actual IC callback recovery checks: real rejects, trapped callbacks, malformed/oversized replies, exact retries, no duplicates, permit cleanup, KEEP barriers and fresh post-KEEP calls. These are fresh-install protocol and same-artifact KEEP checks, not a Wire-to-Tripwire migration or cross-SDK-version KEEP qualification. No compatibility alias was added.

Comparison and source/artifact evidence retain exact commits, hashes, audits, source archives, test/review records and rejected proposals. Full raw trace shards and executables remain local; compact receipts alone do not independently replay their audit. Profiles qualify their origin-map truncation separately from complete ledgers/details. Selected source was copied to main without changing its runtime files; reported costs remain those of the pinned artifacts. Ordinary release builds contain absolute source paths, so rebuilding elsewhere can change static placement and needs its own measurements. Build-only normalization/rlib proposals were deferred; forwarding the receipt tooling fingerprint to the native verifier reduced its observed rebuild from about69s to about3s without changing Wasm flags.