| name | ecdsafail-toffoli-reduction |
| description | Durable levers for lowering AVG EXECUTED TOFFOLI in the ecdsafail / reversible secp256k1 point-add circuit (Toffoli is one factor of score = avg executed Toffoli × peak qubits), while keeping peak qubits flat. Use whenever the qubit peak is at a wall and the win must come from cheaper gates. Frontier-number independent — re-apply to whatever phase dominates the Toffoli budget. Keywords: Toffoli, CCX, measured uncompute, Hmr, exact adder, truncated comparator, carry truncation, ancilla cleanup, value-exact. |
ecdsafail — Toffoli-Count Reduction (peak-flat, value-exact-or-island-exact)
Subagent invocation: this document is run standalone by an independent subagent. Follow the flow below to run one round of Toffoli reduction, report the result (whether an improvement was found, the new score) back to the main agent, then shut down.
These levers cut the avg-executed-Toffoli factor without raising peak qubits.
They are the complement of the peak-reduction skill (ecdsafail-peak-reduction):
when the qubit peak is walled, this is where the score win comes from. Each is a
real frontier win from the last 10 commits; re-apply the method to new phases.
Work on host machine3 (ssh machine3, dir ~/temp/ecdsafail-challenge,
export PATH=$HOME/.cargo/bin:$PATH). Edit ONLY src/point_add/. NEVER
git push. git fetch/ecdsafail sync to the live frontier first.
STEP 0 — Profile before you brainstorm (measurement-driven — read this FIRST)
Do NOT pick a lever by guessing where the Toffolis are. MEASURE first, then act on
what the measurement surfaces. This skill is measurement-backed: references/profiling.md
points to RUNNABLE tools, not just prose.
- Score:
build_circuit THEN eval_circuit. (Gotcha: eval_circuit reads a pre-built
ops.bin and IGNORES env/source — ALWAYS build_circuit first.) Read avg executed Toffoli (the scored term, NOT emitted) + qubits + 0/0/0.
- Where the Toffolis are (hotspot): run the op-loop region breakdown
(
gpu-nonce/src/bin/missed_fold_v2.rs — build-once + parallel bit-sliced op-loop; its
"by region" output attributes CCX to GCD-forward / GCD-inverse / square / apply / fold).
Spend effort on the measured-hot region, not a guessed one.
- Certification rule — provable, NOT sampling: a value-exact lever must hold on ALL
inputs. Empirical constancy over a shot sample NEVER certifies it (a control firing
1/1e6 passes 1e6 shots, yet folding it adds hard inputs → over-cliff). Use STATIC proofs
(def-use liveness, algebraic identity) or constprop's
CONSTPROP_VERIFY. (Hard lesson:
the sampling-based "missed_fold" analyzer is DEAD for exactly this reason — see
references/profiling.md.)
Then pick the lever below that targets the measured hotspot.
⚡ CURRENT FRONTIER — trailmix_ludicrous era (frontier numbers move daily — run STEP 0 for live qubits/avg-T; don't trust any score hardcoded in this doc)
The circuit migrated (commit bdb1d22) from the old dialog_gcd env-knob path to a
NEW module src/point_add/trailmix_ludicrous/ (Schrottenloher jump-GCD rewrite: arith /
gcd / fused / square / comparator + an aggressive constant-propagation peephole
constprop.rs). build() now calls trailmix_ludicrous::build_trailmix_ludicrous_ops()
— the dialog_gcd path is DEAD. mod.rs still contains dozens of DIALOG_GCD_*
set_default_env lines but they are inert/vestigial — do NOT treat them as live levers.
Recent frontier technique log (the live levers the field is actually shipping)
Score progression on the 985eaec line (peak fixed at 1156 throughout; avgT = score/1156):
| commit | submission | what changed | avgT | Δscore |
|---|
6c0769f | af65258d | base | 1,366,238 | — |
27d4627 | 19995b2a (BitWonka) | coord_add3x_orig→coord_add3x classical-fold + dead-idx regen | 1,365,959 | −322k |
985eaec | 12e55298 | SCHED_J2 more-aggressive truncation + dead-idx regen | 1,365,020 | −1.087M |
Three live levers confirmed by these commits (in descending payoff):
SCHED_J2 GCD-width truncation (island-exact, BIGGEST recent win −939 avgT): the
per-step width envelope in trailmix_ludicrous/schedule.rs. Lowering tail entries / trimming
steps drops subtract+comparator CCX but truncates needed bits on more inputs → raises λ →
re-hunt a clean nonce. Pure array edit + build_circuit+eval_circuit — the most
immediately screenable forward lever. This is the trailmix incarnation of Lever A.
- Classical-fold (value-exact, −279 avgT, ZERO λ): any quantum arithmetic on a
classically-known value (the offset
ox/oy in ec_add.rs) folds into the free BitId
domain (BitStore/BitInvert score 0 Toffoli). coord_add3x did coord+2*coord (~754 T) →
one classical *3 mod q + one mod-add (~326 T). See classical_times3_mod_q. Largely
mined for the coord steps now (the remaining ones are already single mod-ops); coord_rsub
(sub+neg = 2 mod-ops) is the only possible sliver left.
- dead-CCX
.idx re-screen (island-exact): regenerate dead_*.idx for the post-fanout
stream (charged-but-inert CCX, see cost-model lens below). Generated by an EXTERNAL tool
(BitWonka's public ecdsafail-tools dead-ccx-finder) — only the .idx is shipped, no
generator in-tree. Pushing it more aggressively (drop more, accept higher λ) is open but at
the λ cliff.
Competitor note: BitWonka (authored sub 19995b2a + the public BitWonka/ecdsafail-tools
dead-ccx repo) is an active competitor; the field's dead-CCX drops use that tool. The maintainer
also ships pure-infra commits (zstd/BufWriter ops.bin) that change bin/ only — NOT levers,
and off-limits to edit.
Live Toffoli knobs are now CONSTPROP_*, the single_ccx_fanout loop, and TLM_*/LUD_*
flags. Everything in "Levers A–H" below is the historical dialog-era playbook — keep it
as METHOD templates, but the live frontier plays out in the trailmix modules.
Dominant Toffoli lever now = constprop.rs (value-exact, ZERO new hard inputs)
Forward abstract interpretation over the op-stream tracks each wire in {Zero, One, Unknown},
seeded from the true classical init (all |0⟩ except IO inputs). Folds only PROVABLE CCX:
known-0 control → drop; known-1 control → fold to CX; both known-1 → fold to X.
Affine/XOR extension (analyze_affine) adds: controls provably EQUAL → fold to CX;
controls provably COMPLEMENTARY → drop. Self-checked via CONSTPROP_VERIFY=<n>. Value-
exact by construction (no new hard inputs ⇒ no λ cost).
Other value-exact structural levers
single_ccx_fanout.rs: identity CCX(a,b,t);CX(t,u);CCX(a,b,t) = CX(t,u);CCX(a,b,u)
re-targets a CCX across a CX blocker → net −1 CCX/site. Looped to fixpoint.
- GCD lane-0 cswap elision (
gcd.rs): divstep 0..n → 1..n (lane-0 swap is a no-op).
- NAF f-fold in square (
apply_f_times_value over F_NAF_TERMS): signed-digit constant
multiply → fewer add/sub (CCX) terms.
- Fused fold-control compute/uncompute (
fused.rs): shared AND-tree CCX not paid twice.
CONSTPROP_MAX_ITERS is TAPPED — NOT a lever (measured)
constprop reaches its own fixpoint in just a few iterations (well under the baked default),
so raising CONSTPROP_MAX_ITERS is a no-op — verified identical to baseline. Do NOT
screen it as a candidate. (single_ccx_fanout likewise already loops to convergence on its
own.) This was a misleading "free dial" claim; it's false on the current circuit.
jump=4 (wider-jump GCD rewrite) is REFUTED — do NOT re-attempt (measured, decisive)
The "jump=2 → jump=4 jump-GCD" rewrite was the supposed high-ceiling lever (modeled −14%).
After a full value-correct in-circuit build (commits 35d2aa4→9268de9, all gated by
TLM_JUMP4, baseline byte-identical 0/0/0), the decisive measurement says jump=4 is
structurally +32–67% MORE expensive and the cost is INHERENT (not tunable away):
- Measured: jump=2 body=630k, jump=4 body=892–995k (+42–58%); jump=4 total (M1 cascade)
= 2.298M vs frontier 1.379M.
- ROOT CAUSE (the durable lesson):
controlled_right_shift = one circ.cswap per bit,
and a cswap (Fredkin) = 1 Toffoli, scored by its CLASSICAL condition regardless of
whether it fires. jump=4 does 3 controlled-shift stages/step (s2,s3,s4) vs jump=2's 1
→ +234k inherent Toffoli that drop-dead CANNOT remove (they fire data-dependently). Plus
jump=4 needs a WIDER swap-decision comparator (GAP≈128 vs jump=2's ~30, +~100k), which
eats the −20% subtract-Σ-width savings the de-risk relied on. Total doublings (apply) are
input-fixed, so the apply does NOT shrink either.
- The de-risk's −14% modeled ONLY the subtract Σ-width and missed all three real costs.
TLM_FORCE_BRANCH0 (full Gidney), TLM_LIVE_* (uncapped), and narrow TLM_J4_GAP=20
did NOT close the gap — the subtract is ~1 CCX/bit regardless and the shift cost is the
cost of removing more zeros/step (a barrel shifter would be ~the same ~n CCX/shift-unit).
- Genuine knowledge salvaged: jump=4 IS value-correct in-circuit — the old "drift wall"
and "constprop is value-determining" blockers were debunked as drop-dead artifacts
(see methodology note below). The algorithm/codec/cascade-apply all work; it just can't
win. Reusable diagnostic flags from the arc:
TLM_J4_NOAPPLY/NOFOLD/SAFE/FULLCMP/GAP,
TLM_FORCE_BRANCH0, TLM_LIVE_COUTK/FFG/GCDK, per-schedule TLM_LIVE_* (7fa651a).
Reusable cost-model lens (from the jump=4 arc): cswap/CCX are billed by CLASSICAL condition
The scorer (src/sim.rs) does toffoli_gates += cond.count_ones() where cond is ONLY the
classical PushCondition/c_condition mask — it does NOT depend on the quantum controls
c1 & c2. Consequences worth re-using as a lens:
- A
cswap/Fredkin costs a full Toffoli; reducing controlled-shift count is a real lever,
and adding shift stages is expensive (this is what sank jump=4).
- A CCX whose quantum controls are never both-1 (never fires) still costs its full
classical-condition count → it is charged-but-inert. Dropping it is value-neutral on
the island. This is exactly the frontier's
dead_*_notc.idx drop-dead lever (island-exact:
re-rolls the FS island → re-hunt a clean nonce). It is a SUPERSET of constprop's provable
folds. NOT the same as the dead missed_fold value-exact misframing below — the difference
is: drop-dead is shipped as ISLAND-exact (accept λ, re-hunt), not claimed value-exact.
Methodology: when experimenting, set DROP_DEAD_ROBUST_DISABLE=1 (hard-won)
drop-dead is ON by default and its .idx is keyed to the EXACT op-stream indices. ANY
gate-changing experiment shifts indices → drop-dead drops the WRONG gates → eval shows
classical 9024 (total garbage). This produced TWO false "fundamental walls" (a phantom
"drift wall" and a phantom "constprop is value-determining" paradox) that burned days. Always
experiment with DROP_DEAD_ROBUST_DISABLE=1 and read the classical-mismatch count as
stale-nonce density (~7–17 = VALUE-CORRECT), not 0. Re-enable drop-dead + regenerate the
.idx only for the final ship build.
Where the next Toffoli win likely is
Not in constprop depth (tapped) and NOT in wider jump-GCD (refuted above). Live axes:
STATIC/provable structural folds (extend analyze_affine); apply-phase measured-uncompute
venting (Lever B/H, value-exact, the tlm_apply_* ancillae); and the frontier-proven
island-exact axes (drop-dead .idx pushed more aggressively, SCHED_J2 truncation) at the
λ cliff. Do NOT chase sampling-found "constant" controls as a VALUE-EXACT fold (the
missed_fold analyzer is dead — see STEP 0 / references); only STATIC/provable folds — but the
same never-fires signal IS valid as an island-exact drop-dead drop (see cost-model lens above).
EMITTED vs EXECUTED Toffoli — what is actually scored
The scored term is avg EXECUTED Toffoli over the 9024 Fiat–Shamir shots, NOT
the emitted/static gate count. A gate that is present in the circuit but only
fires on a fraction of shots (data-dependent or measurement-conditioned) costs
its firing fraction, not 1. This opens a whole axis distinct from shrinking the
static circuit: make expensive gates fire less often (Levers E, B) — exact on
every shot, but cheaper on average. When you measure a lever, read the
avg executed Toffoli line, not the emitted-ops count; an "emit-T" delta and an
"exec-T" delta can differ a lot.
Two correctness regimes — know which one a lever is in
- Value-exact (preferred): the change computes the SAME function on ALL inputs
(only gate scheduling / ancilla handling differs). It adds ZERO new hard inputs.
Levers B (measured uncompute) and C (exact-adder swap) are here.
- Island-exact (truncation): the change drops high bits that are provably
zero on the hunted Fiat–Shamir island but not on all inputs. It SAVES Toffoli
but ADDS hard inputs → raises λ → needs a fresh clean-nonce hunt (see the
ecdsafail-clean-nonce skill). Levers A (truncated comparator) and D (carry
notches) are here.
Either way, ANY change to the op stream re-rolls the FS island ⇒ the baked
DIALOG_TAIL_NONCE goes stale ⇒ re-hunt + re-validate 0/0/0.
Lever A — truncated-suffix cleanup comparator (island-exact)
Row-windowed / chunked operations leave an inter-window carry/borrow ancilla that
must be cleared after each window. The baseline recomputes that carry with a
full-width comparator (~2n CCX). Instead recompute it from a high suffix
of the segment only — the dropped low bits don't affect the boundary carry on the
island. Fewer CCX, peak-flat.
SQUARE_ROW_WINDOW_CLEAN_COMPARE_BITS=<k> (round84 square boundary cleanup;
commits 1a5e620 introduced it, tuned 22/18/22 across the stack; 5a783e4
cut 22→21 as a standalone frontier win — confirmed still huntable with the
GCD-based pre-filter).
DIALOG_GCD_APPLY_CLEAN_COMPARE_BITS=<k> (apply ripple cleanup).
DIALOG_GCD_COMPARE_BITS=<k> (GCD compare width).
Lower k = fewer Toffoli but more carry-escape hard inputs → re-hunt. Find the
smallest k whose first GCD-clean candidate still hits a fully clean island.
Current frontier values (461a4a3): SQUARE_ROW_WINDOW_CLEAN_COMPARE_BITS=21,
DIALOG_GCD_APPLY_CLEAN_COMPARE_BITS=19, DIALOG_GCD_COMPARE_BITS=46. Each knob
is an independent axis — try each individually, screen with a FAIL row first.
Lever B — measurement-based uncompute instead of coherent recompute (value-exact)
A cleanup bit that is coherently recomputed to uncompute it costs CCX. Instead
measure it out and replay the predicate classically:
Hmr(cout) (measure-and-reset in the Hadamard basis), then replay the comparator
predicate conditioned on the measurement result to cancel the phase. The
replay is classically-controlled ⇒ 0 Toffoli, phase-exact. As long as the
comparator borrows an already-clean high tail, peak is unchanged.
SQUARE_ROW_WINDOW_MEASURED_CARRY_CLEAR=1 (commit d636d62 — recovered ~387
avg-Toffoli at 1218q, value-exact).
DIALOG_GCD_FUSED_OVFCLEAR_MEASURED=1 (commit bde4caa) — fuse the GCD
overflow-clear uncompute with a measurement, collapsing its Toffoli to 0.
Enabled in current frontier base.
This is the cleanest class: value-exact (no new hard inputs) AND Toffoli-negative.
Look for every place a cleanup/scratch bit is coherently recomputed purely to
return it to |0⟩ — those are measured-uncompute candidates.
Lever H — phase-conditioned comparator replay (value-exact, executed-Toffoli only)
An extension of Lever B to entire comparator paths, not just single cleanup
bits. Instead of running a full cmp_lt coherently:
- Measure out the comparison flag via HMR (Hadamard-measure-reset).
- Replay the comparator predicate classically (CZ / CX tree conditioned on
the measurement result) to cancel the global phase.
- Result: the Toffoli cost of the comparison gate collapses to near 0 on most
shots; peak is flat (no new scratch).
Committed in 98dd2ad and bfd3fa6; baked into the frontier base:
MOD_FAST_FLAG_CONDITIONAL_REPLAY=1 — modular-inversion comparison flags.
DIALOG_GCD_REVERSE_BRANCH_CONDITIONAL_REPLAY=1 — branch-direction comparison.
DIALOG_GCD_SPECIAL_CLEAN_CONDITIONAL_REPLAY=1 — overflow-clean comparator.
DIALOG_GCD_APPLY_BOUNDARY_CONDITIONAL_REPLAY=1 — apply-phase boundary comparison.
All four are already ON in the 461a4a3 baseline — they are not tuning knobs
for the next win; they are committed wins that show the class. Apply this pattern
to any remaining comparator (or cmod_add/cmod_sub) that is still coherent:
find it with TRACE_PEAK, check it emits measurable Toffoli, write a
_phase_conditioned variant, gate behind an env flag.
The key primitive is cmp_lt_phase_conditioned() /
cmp_lt_phase_conditioned_borrowed_carries() in compare.rs — study these for
the pattern before writing a new variant.
Lever C — exact-adder swap (removing a truncation can REDUCE Toffoli) (value-exact)
Counterintuitive but real: a truncated / top-clean'd adder can cost MORE Toffoli
than an EXACT full-carry adder, because the truncation needs carry-escape
correction logic. Swapping back to the exact adder is value-exact (drops zero
value bits, no new hard inputs, peak unchanged) AND recovers Toffoli.
DIALOG_GCD_APPLY_FINAL_TOPCLEAN=0 (commit 98e1322: apply-final adder
exact-full-carry instead of top-clean default → recovered ~2,597 avg-Toffoli,
value-exact). Bonus: fewer truncations ⇒ FEWER hard inputs ⇒ easier nonce hunt.
Audit every truncated adder/comparator: if its correction overhead exceeds the
bits it saves, the exact variant is a free Toffoli win AND a λ reduction.
Lever D — carry-truncation notches (island-exact)
Drop one more high carry bit from a modular fold/reduction ripple. Saves Toffoli
(shorter ripple), peak-flat, but adds carry-escape hard inputs → re-hunt.
KAL_FOLD_CARRY_TRUNC_W (in-place fold modular reduction; 00fb66d 18→17).
KAL_DOUBLE_CARRY_TRUNC_W (double_y fold).
ROUND84_INPLACE_QUOTIENT_CARRY_TRUNC_W (round84 quotient carry; f4404de=20).
DIALOG_GCD_FOLD_CARRY_TRUNC_W (fused fold; 461a4a3 cut 19→18 as a
frontier win — confirmed in combination with APPLY_CHUNKED_F_BLOCKS +
SQUARE_ROW_MAX_SEG + SPECIAL_FOLD_BORROW_CARRIES).
Trajectory (KAL_FOLD_CARRY_TRUNC_W): 21 (da55bbb) → 20 → 19 → 18 → 17 (00fb66d).
Current frontier (461a4a3): DIALOG_GCD_FOLD_CARRY_TRUNC_W=18, KAL_FOLD_CARRY_TRUNC_W not present (removed or absorbed).
The next notch (→17) may still be possible depending on the new base's λ — screen
first, then judge re-hunt cost.
These are at/near the cliff on a mature base — each extra dropped bit raises λ
steeply, and the Toffoli headroom can be too tight to afford the re-hunt cost.
Cheap to try (flip the env, measure avg-Toffoli on a FAIL row) but low-odds for a
net win once the base is tuned. Don't grind here if λ is already high.
Lever E — data-dependent gate eliding (value-exact, executed-Toffoli only)
Skip gates whose control is known zero on this shot. The binary-GCD / Kaliski
path has conditional double/halve shifts gated by an edge bit; on shots where that
edge bit is 0 the shift is a no-op, so eliding it removes its EXECUTED Toffoli
while staying exact on every shot. Emitted count unchanged; AVERAGE executed drops
by the gate's fire fraction. (zero-edge conditional-shift skip, commits
7822c37/b8ce940.) Look for any conditional sub-circuit whose controlling bit
is frequently 0 across the island — eliding it is a free executed-Toffoli win.
Lever F — measured-fast adders on NON-peak-setting adders (value-exact)
A coherent ripple adder costs ~2 CCX/bit. A measured-fast adder (measurement-
based carry, Hadamard+CZ) costs ~1 Toffoli/bit. Converting an adder is value-exact
(composes to identity, ancilla-garbage 0) and peak-flat ONLY if that adder is not
the one setting the peak — so convert the small / non-binding adders and LEAVE
the wide peak-setting adder coherent (converting it wouldn't lower width anyway).
c27e8a5: round84 fold's three small fixed-width adders → measured-fast,
−1,434 exec-T, peak flat (large 224/256-bit fold adders left coherent).
b7515d5: big-fold split adder — convert a wide adder to an asymmetric
2-block windowed measured-fast adder (a small low block with cheap carry
uncompute + a wide fully-fast high block) to capture most of the fast saving
without raising peak (−2,124 exec-T); plus measured control-ride uncompute
(Hadamard+CZ instead of a coherent Toffoli, −528 exec-T).
General rule: every coherent adder/uncompute that is NOT peak-binding is a
measured-fast candidate. (Lever B is the cleanup-bit special case of this.)
Lever G — cheaper exact primitives & constant recoding (value-exact)
Replace a primitive with a Boolean-identical but cheaper one, or recode a constant:
- Majority folding identity:
maj(a,k,c) = c ⊕ ((a⊕c) & (k⊕c)) computes a
controlled-const add/sub carry with fewer Toffoli than a literal 3-input
majority, same carry (2a87f33).
- NAF / signed-digit recoding of a constant product: e.g.
977 = 2^10 − 2^5 − 2^4 + 1 (4 signed terms) instead of 1 + 2^4 + 2^6 + 2^7 + 2^8 + 2^9 (6
unsigned terms) → fewer add/sub passes in the reversible product/unproduct
(ed94ad2, R84_QPROD_NAF=1). Audit every constant multiply (secp256k1's
c = 2^32 + 977, the Solinas folds) for a shorter signed-digit expansion.
GCD iteration / body tuning knobs (mixed peak/Toffoli)
The binary-GCD reduction exposes structural knobs that trade executed Toffoli vs
peak — tune them together with TRACE_PEAK:
DIALOG_GCD_ACTIVE_ITERATIONS=<n> — fewer reduction iterations = fewer executed
Toffoli, exact if the dropped iterations are provably redundant on the support
(f6f9536=258, 2a87f33=260).
DIALOG_GCD_BINDER_NOTCH_MAP=11:1,12:1,... — per-binder-iteration notch map;
extend by one step at a time. Trajectory: "13:1" → "11:1,12:1,13:1" → more
steps (ab5469b, 2dcf00d). Add one entry at a time; check λ after each.
DIALOG_GCD_BINDER_NOTCH_EXTRA=<n> — global extra-notch count for all binder
steps (a4db9a5: 2→3). Cheap to try; raises λ if too aggressive.
DIALOG_GCD_BINDER_NOTCH_STEPS="8,9,10,11" — which GCD steps have fallback
notches enabled (73f4f48, f3820d0: expanded from "9" to "8,9" to
"8,9,10,11"). More steps = finer body width control per iteration.
DIALOG_GCD_BODY_CARRY_BAND_TRIMS="0,2,2,2,..." — per-step carry-band trim
vector; each element tunes the carry-band width for one GCD step independently
(bde4caa, 8983da8). Gives per-step precision beyond a single global trim.
Notation: "0,3,3,3,..." means step 0 untrimmed, steps 1+ trimmed by 3 bits.
DIALOG_GCD_BODY_STEP_GIVEBACKS=10:6 + step-stream top-clean — the
carry-relief exchange: spend top-clean coherent uncompute to avoid extra
live carry lanes (peak-neutral), then spend the recovered Toffoli budget on one
more GCD iteration / a fuller body (2a87f33). A peak↔Toffoli rebalance, not a
pure cut.
Tuning order: ACTIVE_ITERATIONS first (global budget), then BINDER_NOTCH_MAP
(per-step fallback), then BODY_CARRY_BAND_TRIMS (per-step fine-grain). Each step
raises λ independently — screen with a FAIL row and measure hard-input count
before committing to a re-hunt.
Workflow
git fetch to the live frontier; TRACE_PEAK=1 build_circuit to confirm the
qubit peak is walled (else use ecdsafail-peak-reduction instead).
- Pick a lever; flip its env in
src/point_add/mod.rs set_default_env (or export
it for a quick eval_circuit). A correctness FAIL still prints avg-executed
Toffoli + qubits — read the score impact BEFORE hunting a nonce.
- Value-exact lever (B, C) → the only failures should be the base's intrinsic
hard inputs; a clean nonce exists at ~the base rate. Island-exact lever (A, D)
→ confirm the classical-mismatch count didn't blow up, then re-hunt.
- Re-hunt clean nonce (
ecdsafail-clean-nonce skill) → eval_circuit 0/0/0 +
score < live frontier. Rebuild agent/fast-screen + agent/gpu-nonce
(cargo clean) so they aren't stale; re-run the toolkit CLEAN-check.
Discipline
- Prefer value-exact levers (B, C) — no λ cost, easiest to ship. Truncation levers
(A, D) trade Toffoli for hard inputs; only worth it if the hunt stays feasible.
- Every op-stream change ⇒ stale nonce ⇒ re-hunt. Budget that cost into the win.
- Re-check the live frontier before submitting; the leaderboard moves several
times a day and a stale base wastes the hunt.