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 nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ _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_seed_allocated sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_final blk_set_byte ↻ sha256_compress ↻

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