agentleFS
odinfreeodinfree/storm-ecdsa-harness/skills/greedyfrog-method/SKILL.md

greedyfrog-method

Skill4 starsChanged 21 days agoMITView on GitHub

BitWonka's greedyfrog process, reconstructed so we can repeat it. Use when redesigning a reversible traversal or inversion (ecdsa.fail Euclid / GCD walk) so the state carries its own reverse decisions instead of a history stack, when building, porting or moving greedyfrog rows (825 / 815 / 849 trees, cap-dependent family), or when asked how greedyfrog was invented.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Design forward and reverse rules together: Search for an invariant, monotone quantity or cofactor that identifies the previous operation.

    line 31
  2. Very specific:

    Price the error budget explicitly: Every emitter shortcut gets a predicate in the predictor (his G1 act_const shortcut was not added to the …

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Gumpifrosch (greedyfrog-method)

Greedyfrog (BitWonka, ecdsa.fail, 27-28 Oct 2026) replaced froghop-one's inversion traversal inside an unchanged point-add shell: 903 slots plus a quantum quotient stack became 254 uniform slots and no stack. First row 825 x 6,107,471; same-width refinement 825 x 5,485,974 (-10.2 %). The leading word of the method is self-describing state: pick the forward step and the register layout together so that the state after a step already contains the instruction for undoing it. Fast forward step without that = you still pay for history; stackless reverse without a fast step = you still pay for alignment. Greedyfrog has both halves.

The mechanism, concretely: state (A, tA), (B, tB) with invariant A*tB + B*tA = p, start (p, x', 0, 1). Each step keeps A and B top-aligned, subtracts the largest power-of-two multiple of B that fits (e = bl(A) - bl(B), d = [(B << e) > A], A -= B << (e-d), tA += tB << (e-d)), renormalises, swaps if 0 < A < B. Within one Euclid level tA = t0 + Q*tB, so the last applied digit is lowest_set_bit(floor(tA / tB)): the growing cofactors encode the history. The inverse reads 28-bit cofactor windows, runs up to 21 non-restoring division rows and finds the last set row. Inputs are reflected (x' = min(dx, p - dx)) to kill the first-quotient-1 ambiguity (75 % shot failure without it). Classical X-measurement records remain for phase repair only.

Steps (each ends on its output; do not start the next without it)

  1. Freeze the baseline and the component boundary. Rebuild the parent row from its commit with an empty environment until its ops.bin sha256 matches the note; find the active dispatcher for the component you will replace. Output: byte-exact baseline stream + the interface the new component must satisfy.
  2. Cost the structure, not the constants. Split the component's cost into useful arithmetic, alignment / routing, stored decisions, inverse cleanup, peak workspace. Output: a one-sentence bottleneck with a measurable prediction ("~900 alignment slots and the quotient stack dominate width and Toffoli").
  3. Design forward and reverse rules together. Search for an invariant, monotone quantity or cofactor that identifies the previous operation; choose a layout that makes the forward step local and the reverse decision cheap; enumerate ambiguity cases now. Output: recurrence + invariant + decoder + preconditions, checked by an unwindowed integer script exhaustively on small primes (e.g. all inputs mod 101 and mod 65,537) and on a few thousand random secp256k1 inputs, zero assertion failures.
  4. Keep two executable models. An integer model (Spec) and a physical lane model (Lanes: markers, wrap-around, control bits), compared after every step. Output: a per-step equality test passing on >= 200 walks, able to name the first divergent step.
  5. Census the walk before fixing the schedule. Per-slot active fraction, operand lengths, rotations, row counts and tails from 200,000 walks (fit), then a fresh corpus (test). Derive windows and per-slot row budgets from the census; keep generator version, seed and margins. Output: a committed envelope file + a categorised fresh-input failure estimator (greedyfrog: 70 failing divisions / 200,000 walks -> about 6.3 failing shots per 9,024).
  6. Build the smallest checkable cell. One forward slot against the lane model, then forward/inverse round trip with zero phase and clean scratch, then borrowed lanes randomised and restored. Output: cell tests that catch a deliberately wrong forward mutant (a round trip alone hides a wrong forward function).
  7. Integrate through the shell interface and replay concrete failures. Run the trusted evaluator; replay every failing shot's exact inputs through the model (his first full build failed shot 7806: too few division rows in one slot; fixed for ~180k Toffoli). Output: each failure classified as recurrence bug, implementation mismatch, or window exit.
  8. Profile the binding phase. Per-section live high-water marks and Toffoli; cut width where it binds (greedyfrog 815: inverse decode on idle passenger lanes via borrowed-lane ANDs). Output: a before/after section table with the new peak.
  9. Parameterise by the cap. Clean pools where room exists, borrowed lanes or recomputation where it does not, carry pools only while used. Output: one emitter that builds at >= 3 caps (his G3 / G4 are one-line cap changes of G2: 849, 815, 825).
  10. Price the error budget explicitly. Every emitter shortcut gets a predicate in the predictor (his G1 act_const shortcut was not added to the predictor: the gap to avoid). Output: a fixed-input A/B against the parent where the shots that fail outside the predicted set number zero.
  11. Prescreen nonces on the exact stream, then bind the real evaluator. Finalise the gate list first; the scanner hashes the prefix once and varies the 48-bit identity tail (96 X ops). Output: first clean value in scan order, trusted eval_circuit all 9,024 OK, an independent twin build with the same sha256.
  12. Write the note as mechanism + limits. Invariant, layout, census provenance, profile, constants, results at several caps, what is not proven. Output: a note another worker can reproduce from, >= 5,200 bytes, in our own words (never paste inherited notice blocks).

Working on greedyfrog trees

Sources (Layr-Labs/ecdsafail-challenge; all five are validator snapshots with the same parent 2120d8a2; code lineage is SnehalRaj's shell ab98dd15 / commit 38bf9d65, a +3,265 / -11 line delta ignoring line endings):

rowQ x Tcommitops.bin sha256 (note)
G0 39ef23e2825 x 6,107,4717e5e771226a667bf...b516b6
G1 ec1e870b815 x 6,792,7614cd9e8daf7a8573b...50cd41
G2 954016db849 x 4,918,4797e0933a19778ab2b...fc86d5
G3 73799fca815 x 6,360,7212885dc51968ff62c...43b5b2
G4 1d06c635825 x 5,485,974a5f1fa594b00ddad...250006

Fetch with git fetch origin <commit> in a challenge checkout. New files: greedyfrog.rs, greedyfrog_model.rs, greedyfrog_diag.rs (predictor + nonce scanner, test-only), greedyfrog_data/env.txt, pointadd_greedyfrog.rs.

Entry points (tests live in --bin build_circuit; the expensive bodies return early unless their variable is set, so a green cargo test ... greedyfrog_ does not prove they ran):

purposecommand / setting
gate-level suite (13 tests, ~1 s)cargo test --release --bin build_circuit greedyfrog_
whole traversalGREEDYFROG_TRAV=1 + greedyfrog_traversal_gate_level
section profileGREEDYFROG_PROF=1 (+ GREEDYFROG_SLOTS)
G2-family caps in testsGREEDYFROG_TEST_CAP=583 / 593 / 617 for shell caps 815 / 825 / 849 (232 below)
fresh failure rateGREEDYFROG_DIAG_N=200000 + greedyfrog_diag_rate
replay the emitted packetGREEDYFROG_DIAG_OPS=<ops.bin> + greedyfrog_diag_shots
nonce scanGREEDYFROG_SCAN_OPS=<ops.bin>, GREEDYFROG_SCAN_START/MAX/WANT + greedyfrog_nonce_scan

Measured on his trees (our own scout lane, 28 Oct 2026):

  • 815 = rings 2 x 258 + passenger 256 + LA, LB 2 x 9 + reflection 1 (791 base) + 24 slot scratch; binders: late inverse sweep / rows undo 815, cofactor ladder 814, value ladder and swap decode 813, shell products 777 + c0 + k + pool >= 34 = 813.
  • Gotchas: upstream files are CRLF (patch tools turn them LF: harmless, mention it); FH_CK only prints; greedyfrog_env.txt is a test output, not read by the build; the default model test decodes with (32, 22), the circuit with (28, 21); A/B phase-only one-sided shots appear in both directions because measurement words follow each circuit's own measurement count.

What the evidence does not show

The private chronology, prompts, Python prototypes (greedyfrog1.py, greedyfrog2.py, prefilter-shadow/ predict_fast.rs are named in comments, not published), the human / model split, and any use of loop-engine or fasteval for this design. State these as unknown; resemblance to Stein, plus-minus or Brent-Kung is ours, not his.

Sources not bundled

The forensic report behind this skill (timeline, diffs per refinement, citations, nonce table) is a campaign record and is not part of this copy. The commits and notes it cites are public: see "Sources" above.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.