nx_cdc_gate.nx
buildroot/runtime/nx_cdc_gate.nx
about
nx_cdc_gate.nx -- IN-PROCESS gate over nx_cdc_lib (/compare/dataio DI5 cp_cdc_gear): content-defined chunking must
(1) partition the input within its declared bounds, (2) be deterministic, (3) survive an INSERTION with almost every
chunk digest intact while the fixed-size CONTROL loses almost every chunk after the edit -- that pair is the whole
claim, and neither half alone proves it -- and (4) refuse parameters that are not a chunking. The corpus is a
pseudo-random 1 MiB buffer from a seeded xorshift generator (no file, no clock), the parameters are the ones
nx_content_put derives from its wire chunk (48,402 -> max 48402, avg 24201, min 6050).
exit: 0 GREEN / 1 RED (gv_verdict law).
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_sha256.nxnx_cdc_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 CG_N: i64 = 1048576 |
| 14 | const CG_SEED: i64 = 88172645463325252 |
| 15 | const CG_MAX: i64 = 48402 |
| 16 | const CG_AVG: i64 = 24201 |
| 17 | const CG_MIN: i64 = 6050 |
| 18 | const CG_CAP: i64 = 4096 // plan table slots: 1 MiB / min 6050 = 174 chunks at most; 4096 is headroom, and the refusal on overflow is tested |
| 19 | const CG_INS_AT: i64 = 100000 |
| 20 | const CG_INS_LEN: i64 = 37 |
| 21 | const CG_TOL: i64 = 3 // chunks that may legitimately re-key around one insertion: the one cut and its two neighbours |
| 27 | const CG_KAT_CHUNKS: i64 = 43 |
functions
| 30 | func cg_fill(buf: *u8, n: i64, seed: i64) -> i64 called by 1: main |
| 44 | func cg_digests(buf: *u8, offs: *i64, count: i64, out: *u8) -> i64 |
| 50 | func main() -> i64 |