nx_ledger_scale_gate.nx
buildroot/runtime/nx_ledger_scale_gate.nx
about
nx_ledger_scale_gate.nx -- F981 SCALE RUNG: prove the per-account index returns the SAME answer as
the full-book scan, on a book big enough that the two paths genuinely differ in work done.
The scale claim is only worth anything if the fast path is EQUIVALENT, so the full scan is kept as
the ORACLE and every assertion below compares fast-vs-oracle rather than fast-vs-a-number-I-typed.
A book of NOISE accounts is built around the account under test specifically so that the global
index is much longer than the per-account index -- if led_sums_fast were secretly still scanning
everything, or scanning the WRONG index, these would diverge.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_ledger_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 13 | const SC_NOISE: i64 = 12 // noise transfers surrounding the account under test (bisecting a measured ceiling) |
functions
| 15 | func sc_puts(s: *u8) -> i64 |
| 21 | func sc_putn(v: i64) -> i64 |
| 35 | func sc_ck(cnt: *i64, name: *u8, got: i64, want: i64) -> i64 |
| 46 | func sc_id(tag: *u8, nonce: i64, n: i64, out: *u8) -> i64 |
| 56 | func main(argc: i64, argv: *i64) -> i64 |