RRT benchmark (Heavy16)
The benchmark application is benches/rrt/canister, package
rrt-fourcans-canister. This directory owns the matched PocketIC workload,
exact-work assertions, typed block/certificate checks and trace collection.
The current public endpoints, Reactor messages and Rechain blocks use bounded
IC Wire. A native verifier checks sampled block payloads against the actual
application contract; JavaScript checks V3 BLAKE3 body commitments and header chains independently with
pinned @noble/hashes 1.8.0 and verifies protocol SHA-256 certificate trees with
the IC agent. RRT Rechain advertises blake3-header-body-v3; its canonical header
encoder comes from each selected artifact's generated Wire interface. Source and
artifact integrity receipts keep SHA-256. The
V3 qualification
records +3.22% replicated instructions and unchanged simulated latency/capacity
for its pinned artifact. Later source changes require fresh qualification.
The benchmark uses sparse Wire request and reply roots for typed public
methods, including a nested evolving Start record. Reactor batches,
segments, frames and payload records carry sparse extensions. Payload cases
use stable tags. The work.dispatch, work.observe and Takt schedule message
types project their own evolving fields. Rechain block commitments and
workflow identity keys have independent byte contracts. Install the same
benchmark image on all peers.
Build and run from the repository root with a qualified PocketIC executable:
source tools/env.sh
export POCKET_IC_BIN=/absolute/path/to/pocket-ic
python3 benches/rrt/tools/build.py \
--output benches/rrt/tmp/build --target-dir "$CARGO_TARGET_DIR" \
--pocket-ic "$POCKET_IC_BIN"
export CDK_RSX_WIRE_RUNTIME
CDK_RSX_WIRE_RUNTIME=$(jq -r '.wireRuntime.module.path' benches/rrt/tmp/build/manifest.json)
python3 benches/rrt/tools/run.py --artifact benches/rrt/tmp/build \
--output benches/rrt/tmp/heavy16
node benches/rrt/tools/lifecycle.mjs \
--artifact="$PWD/benches/rrt/tmp/build" \
--output="$PWD/benches/rrt/tmp/lifecycle"
Use fresh artifact and result directories. The canonical builder pins the local
compiler, locked offline dependency graph, exact source archive, fresh native
Wire descriptor, typed-root transform and final Wire/export checks. The RRT
packager builds the actual typed block verifier and pins its executable, the
PocketIC binary and all canonical outputs. benches/rrt/tools/package.py can finish an
existing canonical SDK artifact without recompiling its canister. Generated Wire
modules belong to the artifact (wire-runtime/ by default), or an explicitly
selected absolute CDK_RSX_WIRE_RUNTIME location owned by that run. The manifest
pins the module and codec; the canonical run and lifecycle commands select them
automatically. For direct host/profile entry points, export
CDK_RSX_WIRE_RUNTIME to the selected manifest's wireRuntime.module.path before
launching Node or Bun. Parallel runs must own separate runtime directories.
tools/run.py fixes the qualification workload at sixteen same-subnet canisters,
thirty 600 ms arrival rounds, 1,000 roots/second, batch 1024/1.9 MB, a 500M
instruction budget, concurrency 4096 and callbacks 40. It preserves ordinary
replica limits and DTS, source guards, complete native traces and the scheduled
publication/maintenance tail. tools/audit.mjs checks seven frozen graph hashes,
exact work, all queues drained, certified tips, trace hashes/page charges and
latency/memory totals. See the committed
promotion qualification.
The runner pins the artifact, host dependencies, server and source bytes through
the final audit. --source-root and --source-revision identify independently
frozen source copies when reproducing a recorded run.
The general host/benchmark.mjs entrypoint still accepts explicit matched
settings for research. Its instruction-profile feature snapshots provide
nested phase attribution; counters overlap and instrumentation has a cost.
Use separately built diagnostic artifacts. Native server tracing observes the
ordinary artifact without adding Wasm probes. Page instrumentation is a separate
calibration tool. No obsolete Wasm observer or historical artifact packager is
part of the current build path.
Ingress returns a durable queued-request receipt. Admission starts workflow, scheduled-delay and replay-expiry clocks; saved receipt time supports queue latency. Admitted retries keep their original identity, bytes and timestamps. The maintenance tail submits no forced collector calls. It waits for transport, workflow and Store readiness to drain and for every final block to be certified. Management memory snapshots happen outside the measured feeder/tail.
Install pinned clients with npm ci --ignore-scripts --prefix benches/rrt and
npm ci --ignore-scripts --prefix tests/pocketic from the repository root.
Run npm --prefix benches/rrt test for host checks. npm run correctness runs actor
behavior tests against an explicitly selected artifact. Runtime scripts use Bun.
The shared PicJS 0.16.1 adapter keeps owned instances under ignored benches/rrt/tmp;
RRT_PIC_SERVER_URL selects an existing qualified server. For deep worktrees,
RRT_PIC_STATE_DIR can select a short repository-local server-state path.
Rust has no Motoko RTS/GC counters; unavailable metrics stay null. Finished native traces count page charges once and report query/inspection separately; they do not include aborted DTS attempts or replica scheduler-only work. Simulated throughput is not a mainnet prediction. Grown linear-memory capacity is not live payload or resident RAM. Historical controlled source, receipts and comparisons retain their own original formats and stated scope.
Protocol comparison
Wire is the default for this workload. To build the Tripwire workload variant,
pass --features tripwire,tripwire-workload to benches/rrt/tools/build.py and use its generated
manifest/layouts with the same host runner. The artifact guard requires matching
features; it never tries another decoder. Use a fresh canister population for
each format. The recorded comparison
keeps source/artifact identities, full-workload costs and rejected experiments.
Source layout and native checks
| Path | Owns |
|---|---|
| canister | Seven workflow graphs and benchmark application |
| host | Feeder, completion, latency, maintenance and trace checks |
| support | Artifact loading, protocol and block verification helpers |
| verifier | Native typed action decoder and workflow generation checks |
| tools | Build, Heavy16 run, audit, lifecycle and profiling entry points |
| controls/motoko | Original Heavy16 reference harness |
rrt-fourcans-canister, rrt-fourcans-wire-verify and reactor_cell are internal
package/artifact names. The public benchmark is RRT Heavy16.
source tools/env.sh
cargo fmt --manifest-path benches/rrt/Cargo.toml -- --check
cargo metadata --manifest-path benches/rrt/Cargo.toml --locked --offline --format-version=1
cargo test --manifest-path benches/rrt/Cargo.toml --workspace --locked --offline
python3 -m unittest discover -s benches/rrt/tools -p 'test_*.py'
npm --prefix benches/rrt test
Reactor, Rechain, Takt, Takt derive/generation and the DCID helper live in the CDK workspace. Chat and lifecycle probes are test fixtures.