Problem
src/simlin-engine/src/vdf.rs::find_slot_table uses a min_stride >= 4 rule when scoring candidate slot tables. This rule rejects valid leading-extra-slot layouts that appear in certain edited or large VDF fixtures, causing the Rust parser to under-count slot entries relative to the reference implementation (tools/vdf_xray.py).
Concrete cases:
test/bobby/vdf/econ/risk2.vdf -- Rust returns 46 entries; Python returns 106 entries.
test/metasd/WRLD3-03/SCEN01.VDF -- Rust returns 404 entries; Python returns 420 entries.
The block1[7] header word in both files matches Python's slot count exactly, which is an independent cross-check that Python's count is correct and Rust is wrong.
Why it matters
Correctness of the VDF parser downstream. Under-counting slot entries loses variable data and blocks further name-to-OT mapping work -- notably, closing this gap should unblock downstream mapping improvements on SCEN01.VDF (WRLD3-03).
Component
src/simlin-engine/src/vdf.rs (find_slot_table)
Current workaround
src/simlin-engine/tests/vdf_structural_invariants.rs contains a new test test_block1_word7_matches_slot_count_within_small_delta that asserts block1[7] ~= slot_count across VDF fixtures. The two fixtures above are exempted via a rust_slot_table_undercount_known() helper. Closing the parser gap lets that exemption be removed.
Possible approaches
- Investigate the
min_stride >= 4 heuristic: understand which legitimate layouts it rejects and whether a weaker stride check (e.g., allowing a leading extra slot that doesn't match the rest of the stride) preserves the signal that motivated the rule in the first place.
- Compare the candidate scoring against
tools/vdf_xray.py's slot-table detection and port the Python heuristic where it diverges.
- Relates to (but is distinct from) tech-debt entry 19 "Rust VDF Parser Boundary Parity" in
docs/tech-debt.md, which covers slot-table offset disambiguation in SCEN01.VDF rather than entry-count scoring.
Context
Identified while adding VDF format structural invariant tests. The test exemption is in place so we can land the invariant test without blocking on this fix, but the exemption should go away once the parser matches Python.
Problem
src/simlin-engine/src/vdf.rs::find_slot_tableuses amin_stride >= 4rule when scoring candidate slot tables. This rule rejects valid leading-extra-slot layouts that appear in certain edited or large VDF fixtures, causing the Rust parser to under-count slot entries relative to the reference implementation (tools/vdf_xray.py).Concrete cases:
test/bobby/vdf/econ/risk2.vdf-- Rust returns 46 entries; Python returns 106 entries.test/metasd/WRLD3-03/SCEN01.VDF-- Rust returns 404 entries; Python returns 420 entries.The
block1[7]header word in both files matches Python's slot count exactly, which is an independent cross-check that Python's count is correct and Rust is wrong.Why it matters
Correctness of the VDF parser downstream. Under-counting slot entries loses variable data and blocks further name-to-OT mapping work -- notably, closing this gap should unblock downstream mapping improvements on
SCEN01.VDF(WRLD3-03).Component
src/simlin-engine/src/vdf.rs(find_slot_table)Current workaround
src/simlin-engine/tests/vdf_structural_invariants.rscontains a new testtest_block1_word7_matches_slot_count_within_small_deltathat assertsblock1[7] ~= slot_countacross VDF fixtures. The two fixtures above are exempted via arust_slot_table_undercount_known()helper. Closing the parser gap lets that exemption be removed.Possible approaches
min_stride >= 4heuristic: understand which legitimate layouts it rejects and whether a weaker stride check (e.g., allowing a leading extra slot that doesn't match the rest of the stride) preserves the signal that motivated the rule in the first place.tools/vdf_xray.py's slot-table detection and port the Python heuristic where it diverges.docs/tech-debt.md, which covers slot-table offset disambiguation inSCEN01.VDFrather than entry-count scoring.Context
Identified while adding VDF format structural invariant tests. The test exemption is in place so we can land the invariant test without blocking on this fix, but the exemption should go away once the parser matches Python.