code wiki / (root) / nx_emitted_substrate_test.nx

nx_emitted_substrate_test.nx

buildroot/runtime/nx_emitted_substrate_test.nx

9026 B217 linesdepth 10pulls 22 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_emitted_substrate_test.nx -- smoke for Phase 5 substrate emission. Exercises: 1. Allocation + canary + initial state 2. Add 3 expected hashes 3. Duplicate add rejected 4. Sign + verify roundtrip 5. Frozen-after-sign: add_expected refused after signing 6. Tamper detection: mutate target_tier / n_expected / a stored hash field -> verify returns BAD_SIG 7. Wrong pub key -> BAD_SIG 8. populate downstream manifest from emitted record 9. Bad-input gates + canary tamper

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_blob_store.nx nx_substrate_manifest.nx nx_emitted_substrate.nx nx_emitted_substrate_test.nx

imports: nx_syscalls.nxnx_blob_store.nxnx_substrate_manifest.nxnx_emitted_substrate.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap _rfc_priv _rfc_pub _make_emitter_hash nx_emitted_substrate_new sys_mmap ↻ sys_clock_gettime_mono nx_emitted_substrate_is_va nx_emitted_substrate_n_exp nx_emitted_substrate_is_va ↻ nx_emitted_substrate_is_si nx_emitted_substrate_is_va ↻ _fill _hash_of nx_blob_store_new sys_mmap ↻ nx_blob_hash_new sys_mmap ↻ nx_blob_store_put nx_blob_store_is_valid _hash_bytes_to_struct sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_final blk_set_byte ↻ sha256_compress ↻ _load_i64_le _find_entry_idx _entry_hash_eq _alloc_entry sys_mmap ↻

structs

none

consts

none

functions

22func _rfc_priv(buf: *u8) -> i64
called by 1: main
42func _rfc_pub(buf: *u8) -> i64
called by 1: main
64func _make_emitter_hash(buf: *u8) -> i64
called by 1: main
73func _fill(buf: *u8, len: i64, seed: i64) -> i64
called by 1: main
82func _hash_of(bytes: *u8, len: i64) -> *NxBlobHash
89func main() -> i64