code wiki / (root) / nx_spore_up_lifecycle_test.nx

nx_spore_up_lifecycle_test.nx

buildroot/runtime/nx_spore_up_lifecycle_test.nx

12917 B266 linesdepth 10pulls 25 transitivereach 0 importersview sourcekind gate/prooftopic spore
docsdependenciesstructsconstsfunctions

about

nx_spore_up_lifecycle_test.nx -- FULL 5-phase ecosystem evolution lifecycle in ONE main(). This is the closure-proof demo: every phase that's been shipped composes through a single program. The chain of demonstrations: v1 nx_spore_up_test.nx -- SA arc on real measurements v2 nx_spore_up_network_test.nx -- v1 + Phase 2 network ingest v3 (THIS FILE) -- v1 + v2 + Phase 5 reproduce Lifecycle in one main(): Phase 1 (Spore) -- synthetic upstream spore declares expected substrate hashes Phase 2 (Network) -- mock peer delivers blobs; manifest verifies + ingests; adversarial peer push attempt caught Phase 3 (Substrate) -- SA arc assembles on real on-device probe + calibration Phase 4 (Seed) -- install_hash + Ed25519-signed + journaled Phase 5 (Reproduce) -- emit new spore for downstream device; sign + verify; populate downstream NxSubstrateManifest from the emitted record; downstream ingests its first blob Honest scope: PROVEN: all 5 phases compose in code; chain runs end-to-end on real on-device probe/calibration; Ed25519 signing closes both the Phase 4 install attestation and the Phase 5 emit record; adversarial peer push attempts at Phase 2 are caught by nx_substrate_manifest dual-verification. NOT PROVEN: real network transport (HTTPS / serial / USB), Stage0 hex0 seed bootstrap (SA-9), AVR codegen for Arduino targets (EM-10), real-hardware demo (EM-12). These remain honest queued milestones per NISHI_ECOSYSTEM_EVOLUTION_ROADMAP.md.

dependencies 13 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_install_attest_signed.nx nx_blob_store.nx nx_spore_up_lifecycle_test.nx

diagram shows first 10 each side; +3 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_install_attest_signed.nxnx_blob_store.nxnx_journal_log.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 _upstream_priv _upstream_pub _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 ↻ nx_emitted_substrate_new sys_mmap ↻ sys_clock_gettime_mono nx_emitted_substrate_add_e nx_emitted_substrate_is_va nx_blob_hash_eq nx_blob_hash_new ↻ nx_emitted_substrate_sign nx_emitted_substrate_is_va ↻

structs

none

consts

53const SCHEMA_INSTALL_HASH: i64 = 1001

functions

58func _upstream_priv(buf: *u8) -> i64
called by 1: main
70func _upstream_pub(buf: *u8) -> i64
called by 1: main
82func _fill(buf: *u8, len: i64, seed: i64) -> i64
called by 1: main
91func _hash_of(bytes: *u8, len: i64) -> *NxBlobHash
98func _mk(variant_id: i64, cost: i64, in_lay: i64, out_lay: i64) -> *NxManifest
109func main() -> i64