nx_spore_up_test.nx
buildroot/runtime/nx_spore_up_test.nx
about
nx_spore_up_test.nx -- minimum-viable spore-up demonstration.
END-TO-END chain on REAL on-device measurements + persistent
journaled attestation. Answers the operator's question
"can a device get spored and seeded and self-unfold?" with
running code.
Sequence:
1. Real nx_probe_run (on-device capability fingerprint, witnessed
via micro-smokes, not synthetic)
2. Real nx_calibrate_run (lmbench-class empirical measurements
on THIS device)
3. Build a 3-node manifest workload (hardcoded reference set;
ST-4 nx_kv_store + future manifest registry will replace
with disk-resident manifests)
4. nx_install_pipeline_run_with_inputs composes
select + capture + hash into one call
5. nx_journal_log_append the install_hash as a persistent
tamper-evident attestation record
6. verify_chain confirms journal integrity
7. sys_write "SPORE UP COMPLETE ..." to stdout
What this PROVES on green:
- Substrate runs probe + calibration on its own device with
zero operator input
- Selection + plan + hash chain works on real measurements
- Install attestation persists in a hash-chained journal that
refuses silent tampering
- The whole chain composes through one main() function -- the
substrate self-assembles from first principles
What this does NOT yet prove (honest gaps):
- Network pull of manifests (HTTPS wired but not composed -- ST-6
peer sync queued)
- File-backed persistence across boots (ST-2 / ST-3.5 queued)
- Stage0-class bootstrap from a hex0 seed (SA-9 queued)
- Per-variant on-device smoke gating (SA-6 nx_verify queued)
- Compile invocation of selected variants into a deployable
binary (SA-6 nx_compile queued)
dependencies 10 imports · 0 importers
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.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
| 59 | const SCHEMA_INSTALL_HASH: i64 = 1001 |
functions
| 64 | func _emit(tag: *u8, len: i64) -> i64 |
| 70 | func _mk(variant_id: i64, cost: i64, in_lay: i64, out_lay: i64) -> *NxManifest |
| 85 | func main() -> i64 |