nx_substrate_manifest_test.nx
buildroot/runtime/nx_substrate_manifest_test.nx
about
nx_substrate_manifest_test.nx -- smoke for nx_substrate_manifest
EM-3 partial.
Exercises:
1. Allocation + canary + initial state
2. Add expected hashes; n_expected increments
3. Idempotent re-add
4. is_complete + n_missing reflect state correctly
5. INGEST happy path: bytes hash to claimed AND claimed is in manifest -> stored, received_flag set, n_received++
6. NOT_IN_MANIFEST: ingest with claimed-hash NOT in expected set -> rejected; counter incremented
7. HASH_MISMATCH: ingest with bytes that DON'T hash to claimed -> rejected; tamper counter
8. ALREADY_RECEIVED: re-ingest same blob -> idempotent
9. Multiple distinct ingests -> n_received tracks correctly; eventually is_complete
10. Bad-input gates + canary tamper
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_blob_store.nxnx_substrate_manifest.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
| none |
functions
| 20 | func _fill_pattern(buf: *u8, len: i64, seed: i64) -> i64 called by 1: main |
| 32 | func _compute_hash(bytes: *u8, len: i64) -> *NxBlobHash |
| 39 | func main() -> i64 |