code wiki / (root) / nx_spore_up_network_test.nx

nx_spore_up_network_test.nx

buildroot/runtime/nx_spore_up_network_test.nx

11363 B263 linesdepth 8pulls 15 transitivereach 0 importersview sourcekind gate/prooftopic spore
docsdependenciesstructsconstsfunctions

about

nx_spore_up_network_test.nx -- full ecosystem evolution flow on SYNTHETIC PEER. Extends the v1 spore-up demo (nx_spore_up_test.nx) to ADD the NETWORK phase: spore declares a manifest of expected substrate chunks; a mock peer "delivers" those chunks; manifest verifies each; completion gates SA-arc assembly; install_hash journaled. This is the second of the spore-up demonstration pair: v1 -- nx_spore_up_test.nx -- SA arc on real measurements v2 -- THIS file -- v1 + network ingest via manifest Lifecycle modeled (per NISHI_ECOSYSTEM_EVOLUTION_ROADMAP.md): Phase 1 (Spore) -- synthetic: spore-author declared 3 expected hashes Phase 2 (Network) -- mock peer delivers blobs; manifest verifies + ingests each; defenses (NOT_IN_MANIFEST + HASH_MISMATCH) exercised Phase 3 (Substrate)-- SA arc assembly on real measurements Phase 4 (Seed) -- journal append of install_hash + verify_chain Phase 5 (Reproduce)-- (queued; this demo does not yet emit a new spore) What this PROVES: - Spore-declared expected manifest is enforced (peer cannot push arbitrary content) - Hash-verification on every received blob (corrupted transit refused) - Completion gate halts assembly until ALL expected blobs received - SA arc still composes on top of the verified-substrate phase - Full chain end-to-end: probe -> calibrate -> manifest-complete -> selection -> plan -> hash -> journaled attestation What this does NOT yet prove (queued): - REAL network transport (HTTPS / serial / USB) -- mock peer here is in-memory - Spore signing (Ed25519) -- composes at EM-9 - Stage0 hex0 bootstrap -- composes at SA-9 - AVR codegen / Arduino real hardware -- EM-10 / EM-12

dependencies 11 imports · 0 importers

nx_syscalls.nx nx_probe.nx nx_calibrate.nx nx_select.nx nx_select_joint.nx nx_install_plan.nx nx_install_hash.nx nx_install_pipeline.nx nx_blob_store.nx nx_journal_log.nx nx_spore_up_network_test.nx

diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_probe.nxnx_calibrate.nxnx_select.nxnx_select_joint.nxnx_install_plan.nxnx_install_hash.nxnx_install_pipeline.nxnx_blob_store.nxnx_journal_log.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

main sys_mmap _fill _compute_hash 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 ↻ nx_blob_store_new ↻ nx_substrate_manifest_new sys_mmap ↻ nx_substrate_manifest_is_v nx_substrate_manifest_add_ nx_substrate_manifest_is_v ↻ nx_blob_hash_eq nx_blob_hash_new ↻ nx_substrate_manifest_is_c nx_substrate_manifest_is_v ↻ nx_substrate_manifest_n_mi

structs

none

consts

51const SCHEMA_INSTALL_HASH: i64 = 1001

functions

56func _compute_hash(bytes: *u8, len: i64) -> *NxBlobHash
64func _fill(buf: *u8, len: i64, seed: i64) -> i64
called by 1: main
73func _mk_manifest_variant(variant_id: i64, cost: i64, in_lay: i64, out_lay: i64) -> *NxManifest
84func main() -> i64