Fresh query 105 to update 100 radix certificate experiment

radix.mjs measures the experimental protocol described in query-batch-hints. A real query independently checks 105 incoming BIP340 records with distinct messages/nonces and checked P/R hints. Records 100–104 have a changed message and false signature equations while retaining canonical signature and point bytes. The query returns the exact 100 accepted full records, rejected input indices and a canonical radix certificate. An update receives all 100 records, the proof and explicit parameters, then recomputes the statement and checks both certificate relations. No input, point table, proof or verdict is cached between calls.

Build a fresh artifact with wasm-schnorr-msm-simd, then run with a fresh result directory and the exact qualified PocketIC executable:

node benches/crypto/radix.mjs \
  --artifact /absolute/fresh-artifact \
  --out /absolute/fresh-results \
  --pocket-ic /absolute/qualified-pocket-ic \
  --population distinct --variant current \
  --samples 3 --primary 16,128,7 --query-window 6 --screen 1 --profiles 1

--help lists all options. --population selects an explicit signer contract:

Population Accepted key multiplicities Accepted unique keys Incoming unique keys
distinct 100 keys with one record each 100 105
ten-shared One key signs ten records, 90 other keys sign one each 91 96
ten-groups Ten keys sign ten records each 10 15
same-key One key signs all 100 records; diagnostic 1 6

Every accepted cohort has 100 distinct 32-byte messages, signatures and nonce points. The five extra records use separate signer keys and distinct messages and nonces. Only their messages change in the actual query, producing five well-formed false equations. The host verifies the real signer multiplicities, all point hints, every signature and every expected query verdict. A mixed-key population cannot be relabelled as distinct.

--corpus-only writes the selected schnorr-radix-corpus-v1 corpus and its exact contract without an artifact or server. --corpus PATH --population NAME reverifies and reuses those records for comparisons. A standard schnorr-wire-v1 corpus is also an explicit input for distinct, preserving its first 100 records exactly and appending five extras when necessary. It does not supply either repeated-key contract. The default seed and distinct control retain the original byte-identical corpus and independent proof.

For a fast old/new comparison, first create one corpus directory per population:

for population in distinct ten-shared ten-groups; do
  node benches/crypto/radix.mjs --population "$population" --corpus-only \
    --screen 0 --out "/absolute/new-corpora/$population"
done

Reuse each generated-corpus.json on the old artifact with --variant current and on the candidate artifact with --variant current or --variant fast, always using a fresh output directory. The focused measurement flags are:

--population ten-shared --corpus /absolute/new-corpora/ten-shared/generated-corpus.json \
--samples 1 --screen 0 --profiles 0 --provers four-columns \
--primary 16,128,7 --query-window 6

current selects fresh_schnorr_radix_query/fresh_schnorr_radix_verify; fast selects the explicit fresh_schnorr_radix_fast_query/fresh_schnorr_radix_fast_verify candidate pair and requires an artifact exposing both methods. The ordinary backend 6 update remains a matched control. The variant, endpoint names, actual population contract, exact request hashes and logical counts appear in receipts and summaries. Every mode still sends all original records and coordinate hints.

The host independently reconstructs every radix proof with OpenSSL SHA256 and ChaCha20 plus Noble point arithmetic. It recomputes the ordered transcript, full-width nonzero batch weights, standard BIP340 challenges and all 201 original terms, then evaluates every small-digit column and its canonical XY/identity encoding. The oracle imports no Rust/Wasm implementation. Its cache belongs only to the host and stores one expected proof per digit width for the fixed accepted statement. Every successful query proof, including profile replies, must match these bytes. Oracle computation/checking stays outside the PocketIC trace and host invocation latency; proof-oracle.json records its hashes, work and the actual measured module identity.

The default run records an unmeasured noop update, three identical-population filter-only queries, three current-control updates, and three primary trials. The control is the unchanged fresh_verify_schnorr backend 6 SIMD GLV W7 with the same exact 100 accepted records. The screen samples every b8/16/32, t128/160 and W2 through W8 cell once, for 42 cells. Each cell measures the reference column MSMs and default four-column SIMD proof production, requires byte-identical proofs, and measures one update for their identical request. It selects the lowest complete update instruction count and the cheaper query producer, then takes three fresh trials of that selection. Selection is exploratory; the final trials remain separate from the one-sample screen. --samples, --screen and --provers allow smaller diagnostic runs. --query-window 6 uses W6 for primary, filter-only, selected and profile queries while retaining the chosen update window, such as W7. Screen queries use their own cell window. The runner selects the cheapest observed producer with the chosen query window and matching digit/challenge widths. Records and proof bytes stay identical across execution windows; each row reports queryParams and updateParams explicitly. --profile-kinds update retains only the matched update profile pair; the default profiles filter, query, update and baseline.

After selecting the best parameters, the runner installs the same artifact in a fresh second canister and sends no query to it. An unmeasured noop precedes one direct update carrying the host's full 100-record population and a proof from the independent host oracle. Its complete request must match the latest selected query-backed update byte for byte, including the archived length and hash. offchain-direct-update.json records the two-call noop/update history, module identity, separate whole/body/page costs and comparison with the selected update. The normal session cleanup tears down both canisters. Proof construction stays outside every IC timing window.

Every physical query uses a distinct synthetic 29-byte caller. The IC query cache keys include the caller; arguments and record bytes stay identical across trials. The runner requires one actual completed non-replicated query trace row, with not_applicable state disposition, exact installed module hash, complete instruction counters and complete memory details. A cached reply with no Wasm execution fails the run. Query modification tracking is disabled by the IC: query page access charges are real, while update dirty-write charges do not apply. Query instructions are reported separately from replicated update instructions.

The response exposes raw filter/proof/body counters, exact independent check counts, original/check term counts, scalar encodings, prepared affines, buckets, proof length and caller-owned scratch bytes. Each update allocates its original 201 terms, 201+m check terms and SIMD scratch inside the call. Query proof storage is allocated after the independent filter scratch retires. The default four-column prover requests four times the reference bucket count and up to 804 scalar/affine slots for the accepted 100 records. The library's prove uses four-column SIMD; prove_reference_columns retains the separately measured reference control. Reported scratch is the explicit vector backing. It excludes decoded inputs, returned records/proof, descriptors, fixed protocol column/challenge/normalization arrays, scalar temporaries, compiler frames and allocator metadata; it is not peak process memory. The complete trace retains all touched stack page charges.

Whole-call traces include Wire decoding/encoding, preparation, normalization, proof point checks, temporary retirement and actual page fees. Body and phase counters are overlapping subsets and are never subtracted from whole costs. Local PocketIC elapsed times are archived as host diagnostics; they are not real-time IC latency promises. Query and update cycle snapshots remain separate.

The runner also submits tampered/truncated proofs, reordered valid records, changed messages and a well-formed invalid record to the update. Every case must reject. Repeated-key populations also corrupt a later occurrence's public-Y hint with another key's canonical even Y. The update must reject it, and a filter-only query must still check all 105 records, returning exactly 99 accepted records and the precise extra rejected index/error. These diagnostics are separate from the 100-record primary statistics. Optional matched reference/profile calls retain complete block/API/page ledgers and source attribution with separate stack completeness. All request and response .wire files, the corpus, exact artifact/server/host receipts and raw compressed traces remain in the fresh result directory. A failure preserves completed rows and its trace instead of qualifying the missing cells.

These are measurements of a derived experimental Fiat–Shamir batch certificate. They do not establish an unconditional 128/160-bit noninteractive security claim or replace a cryptographic review. Host tests run without a server:

node --test benches/crypto/radix-*.test.mjs benches/crypto/artifacts.test.mjs benches/crypto/schnorr-wire-vectors.test.mjs