Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-sovereign-core-mv/tree/main/evidence/aienet0-tur-ledger-20261027 # aien-sovereign-core-mv AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-sovereign-core-mv / evidence / aienet0-tur-ledger-20261027` `b65e00b` fix(tur-ledger): require pinned issuer and verifier signatures (#794) aien-spark committed 2026-10-28 ``` .. README.md 15159 SHA256SUMS 247 audit-v2-SHA256SUMS 810 audit-v2-after.out 1777 audit-v2-before-final.out 4374 audit-v2-before.om.at-run 26458 audit-v2-before.out 4600 audit-v2-check.out 9267 audit-v2-full-capacity.out 179 audit-v2-full-capacity.results.tsv 373 audit-v2-notes.txt 7720 audit-v2-omega-tools.txt 1709 auth-v2-SHA256SUMS 715 auth-v2-after.out 563 auth-v2-before.out 778 auth-v2-check.out 5347 capacity-v2-SHA256SUMS 732 capacity-v2-before.out 3038 capacity-v2-check.out 7141 capacity-v2-full-audit.out 179 capacity-v2-full.authority 620 capacity-v2-full.commands 1240 capacity-v2-full.journal.gz 8306185 capacity-v2-full.results.tsv 489 capacity-v2-notes.txt 7940 check.out 3372 fsync-and-journal.out 2255 tur_r0_check.out 360 ``` README.md # Aienet-0 TUR escrow ledger: host evidence (2026-10-27) Label: HOST_TESTED. One machine (DGX Spark, Linux 7.0.0-1019-nvidia aarch64), no GPU, no network. Not EXERCISED across two machines; that is the job-path lane's evidence. Source commit: `5bd01b6` on `feat/tur-ledger-r1` (the files below are byte-identical at the PR head). Input sha256 seeded omc (omega-mv `seed/out/omc`, pin `e5b32567`) `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f` `om/vendor/sha256.om` `323a71e762c0809f07f53c0e6438023e9111ce2acdeda5cb31eef92f2946f000` `om/tur-ledger/tur-ledger.om` `ad3b61ac7859250e51a9709a7c6d1751f512db7e3606a0ef962b5677634f09e4` `om/tur-ledger/check.sh` `8632b0c33379bc92c27ad9b5dbd0281df9c433f8f96cde4bc2ba5743fb0fd4db` `tests/turing-network/tur_r0_oracle.om` (#791) `92b790d4f63ac01c55ca8e8dd0aab5fbebbef5babbe06e30d24c225cf8c23b6f` built binary (`/tmp/an0/bin/tur-ledger`, 37996 bytes) `6ea978c7f0ae080c6bb0d0254f9fa56b78da2e74d577c092a98cd50bd945be4a` Tools: strace 6.8, util-linux flock 2.39.3, GNU coreutils sha256sum/timeout. ## Files File Command Result `check.out` `OMC= TUR_LEDGER_OUT=/tmp/an0/bin/tur-ledger bash om/tur-ledger/check.sh` exit 0, `SUITE PASS` (50 checks), 7 of 7 mutants killed, `TUR_LEDGER gate: PASS` `tur_r0_check.out` `OMC= sh tests/turing-network/check.sh` exit 0, `TUR_R0 gate: PASS` (the oracle this ledger follows) `fsync-and-journal.out` oracle settle under `strace -e trace=pwrite64,fsync,write`, the replayed settle, `audit`, the journal, and each line's HASH recomputed with `sha256sum` `pwrite64(3, ...)` then `fsync(3) = 0` then `write(1, "settled ...")`; 4 of 4 lines verify `SHA256SUMS` covers the three output files. ## What each guard's mutant proves Each mutant is the source with one guard removed by `sed`; the same suite must then fail. Mutant Guard removed Failing checks in `check.out` no-fsync `fsync` of the journal before the reply fsync.before-ack no-lock `flock(LOCK_EX)` for the whole command concurrent.reserve-20, lock.blocks-while-held no-exactly-once the settled-JOB branch of settle oracle.zero-replay, once., concurrent.settle-, crash.kill9 no-hash-chain HASH and PREV checks during replay torn.bad-hash-last-line, corrupt.amount-edited no-conservation the conservation check after replay conserve.payout-over-escrow, conserve.refused-for-every-command no-escrow-rule `PAYP + PAYV + BACK = AMOUNT` on live settle oracle.change-mismatch and the oracle balances no-torn-recovery torn-tail truncation of the last line torn.bad-hash-last-line ## Limits - The kill -9 run (200 commands, 95 killed, 80 of them after the record was durable) shows that a process kill at any point leaves a journal that audits clean and settles nothing twice. A kill cannot tear a single `pwrite`, so torn tails are tested by injecting them (three shapes), not by power loss. Power-loss durability rests on `fsync` before the reply (strace order), not on a test. - Arithmetic values come from the #791 oracle (requester 70, provider 27, verifier 3, observer 0, escrow 0 of 100) and from differential runs (crash journal byte-identical to the control journal). ## Authentication v2 addendum (2026-10-28, Core #793) The sections above and their three receipts describe unsigned v1. They are preserved byte for byte and do not qualify admission or authorization. This addendum fixes the findings in the full #792 review forward from main `1604a72b248aba8b0e41e5379814372d8fd59304`. HOST_TESTED, same Linux ARM64 host, no GPU, production key, live model, network service, wallet or cryptocurrency. Source: `om/tur-ledger/tur-ledger.om`; native signature verification: `om/vendor/ec.om`, copied unchanged from omega-mv `6999fa9e6dae4847c155ef4eacaece74f491d3ca:om/tls/ec.om`, sha256 `909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060`. Seeded compiler sha256: `d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84`. OpenSSL 3.0.13 (30 Jan 2024) only creates test signatures; it is not linked into, invoked by or needed to run the ledger. Disposable test private keys were generated in private tmpfs and removed by the gate. No signer or key-management implementation is shipped here. The journal genesis and trusted `authority` config pin the issuer, a distinct verifier, ledger identity, policy and exact requester/provider/verifier owner-account map. Every external mutation has a canonical-record issuer signature. Settle additionally requires the verifier to sign the same complete authorization, including reservation commitment, published quote, exact payout split and signed-job/result/AN0V digests. This follows the design review's decisive point: "The verifier must sign the complete settlement authorization, including reservation commitment and payout split, not just result digests." Distinct keys alone are not operational independence. Complete unauthorized records refuse replay rather than becoming recoverable tails. Version-1 journals refuse unchanged; reconciliation requires an explicitly provisioned new ledger identity, never silent migration. ### New receipts `auth-v2-SHA256SUMS` covers only the new receipts and current source inputs. The original `SHA256SUMS`, `check.out`, `tur_r0_check.out` and `fsync-and-journal.out` are unchanged. Receipt / command Observed `auth-v2-before.out`: `OMC=/tmp/ledger-auth-omega/seed/out/omc TUR_LEDGER_AUTH_ONLY=/tmp/ledger-auth-before bash om/tur-ledger/check.sh` Exit 1: FAIL auth.unsigned-prefund, actual ledger exit 0, expected 2; journal changed. Before binary `6ea978c7f0ae080c6bb0d0254f9fa56b78da2e74d577c092a98cd50bd945be4a`, built from main's v1 source and original SHA unit using the same compiler. `auth-v2-after.out`: same command with `TUR_LEDGER_AUTH_ONLY=/tmp/ledger-auth-bin-final` Exit 0: PASS auth.unsigned-prefund, ledger exit 2, unchanged journal. Exactly the same assertion. `auth-v2-check.out`: `OMC=/tmp/ledger-auth-omega/seed/out/omc CRASH_N=200 MUTANT_CRASH_N=0 TUR_LEDGER_OUT=/tmp/ledger-auth-bin bash om/tur-ledger/check.sh` Exit 0: SUITE PASS, 10/10 mutants killed, TUR_LEDGER gate: PASS. Mutant crash trials omitted explicitly; honest-binary crash trials executed. The suite exercised unsigned prefund/reserve/settle/refund refusal; wrong issuer and verifier keys; altered amount, job, quote, result, signed-job and AN0V digest refusal; account spoofing; issuer-key substitution for verifier; validly re-signed changed evidence conflicting with an already-settled job; complete unsigned/wrong-key journal tails; v1 refusal and changed policy. Each rejection asserts the journal hash is unchanged. The concurrent double-debit control accepted exactly one reserve with only one unit funded. Honest settle paid provider 27 once; the same signed semantics replayed as `already-settled`. A deterministic strace SIGKILL at stdout-write entry occurred after fsync, before acknowledgement; the gate observed exit 137, successful fsync, an already-settled retry and provider balance 27. The additional random-delay kill run killed all 200 attempted processes before a new durable write (durable-before-kill 0). Each was audited and retried, final balances matched the control. Journal bytes did not match the independently signed control because ECDSA signatures differ. Do not read this run as 200 post-fsync kills: that boundary is the separate deterministic control. Injected torn tails test framing recovery, not hardware power loss. The full gate compiled source hash `960f4bb581e3c63cb193ef164736cf5394441ff580515be563b60cc42a53f4af`. Only its build-instruction and exit-code comments were corrected afterwards: final source `b188d4c8324eb1d99f9d5e0d08549c54358afca369171974433b456f59ae4ca6`. Recompilation and `cmp /tmp/ledger-auth-bin /tmp/ledger-auth-bin-final` exited 0; both binaries hash `d12d05cda56604410b8716602a7e3988a0e90901d28294f04f6ea7d8081f435c`. The unsigned-after receipt uses that final binary. The shared SHA unit changed only its private `hs` state name to `hstate` and its explanatory header, avoiding a name collision with the vendored EC parameter. Compiling `om/effects/world.om` with original versus renamed SHA produced byte-identical binaries: `08e1a63d722250d93dbec0574f902458262eb5e64b0b5e63b2f0eb70f9e3af0d`. Both executions on `abc`, authorization 2, intent 3, returned 0, state DONE and record digest `6281e53eed299bdb5467ccbfa7f87ae78c547a08660b9971df362c1680f048d1`. This is a consumer smoke/parity check, not a claim that its separately pinned full Rust suite ran. ### Scope boundary There is no `scripts/aienet0/settle-run.sh` or Core ledger RPC in this Core revision. The external signer must verify the actual signed-job/MJR1/AN0V artifacts and quote/policy before issuing these typed authorizations. The ledger verifies canonical bytes and signatures, not those artifact parsers. Mutated-AN0V-digest refusal is not an external AN0V parser test; lost CLI acknowledgement is not interrupted-RPC qualification. The application contract is documented in `om/tur-ledger/README.md`; no compiler or shared guide language feature changed. No deployment, malicious-filesystem-write/rollback resistance or public economic authority is claimed. ## Capacity-discharge addendum (2026-10-28, Core #794) An additional review finding was reproduced: the old shared append guard required four unused key slots even for settlement/refund, which allocate no keys. With a full production-size signed journal, both commands returned exit 14 and left existing escrow open. This affects the authenticated source at Core `6a0bfc0` too, not only the original unsigned implementation. Capacity admission now belongs to the two allocating operations. Prefund counts its new PID and a missing requester; reserve counts its new job and missing provider/verifier accounts. Both refuse before append if those slots cannot fit. Existing settlement/refund and authorized identical retries need no new slot. The native source exercised for this correction is `f47d8c6374f5e8a49068cc5372e97582e3eb81e87c5e53a661ea62ebb4279713`; the production binary is `afd2fbe7b68a9f5fe44ff67b28830ab2499a482b1a922b237bc1877716a3ef93`. `capacity-v2-before.out` shows the small-table regression failing before the fix. `capacity-v2-check.out` records the complete fixed gate: SUITE PASS, twelve mutants killed, clean capacity refusals, settlement and refund at capacity, last-slot admission, unchanged duplicate retries, and the existing 200 kill/retry trials. As in the earlier run, all random-delay kills preceded a new durable write; the deterministic post-fsync/pre-ack kill remains a separate control. `capacity-v2-full.*` preserves a replayable production-size fixture: 65,536 occupied key slots, valid issuer signatures on all prefunds/reservations and two open reservations. The old binary returned 14 for both discharge commands; the fixed binary refused new prefund/reserve with unchanged journal and then successfully settled one job and refunded the other. These are synthetic capacity-test authorizations, not receipts for real work or economic credits. The compressed public journal and signed command vectors contain no private keys. `capacity-v2-notes.txt` records provisioning, exact replay commands, hashes, outputs and evidence limits; `capacity-v2-SHA256SUMS` seals these new receipts. Original receipts and earlier authentication receipts remain unchanged. The companion actual-artifact caller migration is protocols #67 , stacked on #65. It exercises genuine MJR1 forgery and AN0V countersignature refusal before the test signers authorize a payout. It does not add a Core RPC or independent operator qualification. ## Independent audit corrections (2026-10-28, Core #794) The later audit found additional ledger defects in the authenticated implementation. `audit-v2-before-final.out` exercises the frozen pre-audit source and exits 1; `audit-v2-after.out` exercises the corrected source and exits 0. The frozen source is retained as `audit-v2-before.om.at-run` for reproducible negative controls. Finding Before After A1, failed fsync then unsynced duplicate Failed append left a record; retry and all four duplicate kinds could acknowledge without journal fsync Repeated injected failures return 3 without acknowledgement and restore the original file; every duplicate must sync the actual journal fd and directory before success A2, full key table Existing settlement and refund returned 14 New allocations refuse 14 unchanged; existing discharge succeeds even with all 65,536 production slots occupied A3, missing authorities Original unsigned prefund accepted; settlement lacked issuer/verifier authorization Native canonical-record issuer/verifier signatures, pinned config/genesis and explicit v1 refusal; the authorization controls still pass A10, complete corrupt final record Audit could discard an acknowledged settlement as torn and permit refund Newline-terminated corrupt records refuse 5 unchanged, including a validly signed body with only a bad final hash; only unterminated tails recover A11, fused argv fields Whitespace inside an argument was silently re-split into accepted fields Each actual argument is checked before joining; all three fused-field controls refuse 2 unchanged A12, terminal reserve retry Returned `already-reserved` after settlement or refund Open retry still succeeds; terminal retries refuse 10 unchanged Final native source: `8e16f25dd7be21d9dea94252b4ad0ab3b30ac107e4445ed81224d29982e1aadd`. Final native binary: `0338edb18a1fba9ecd7fa8ae294045184bfeb2e72530340017ce719acc682768`. `audit-v2-check.out` records the complete final gate: SUITE PASS, seventeen guard mutants killed and TUR_LEDGER gate: PASS. It retains 200 random-delay kill/audit/retry trials (all before a new durable write) and the separate deterministic post-fsync/pre-stdout kill; these are not RPC or power-loss tests. `audit-v2-full-capacity.results.tsv` replays the preserved public production-size fixture using that final binary: prefund/reserve refuse 14 unchanged, settle and refund return 0, and `audit-v2-full-capacity.out` reports open 0, settled 1, refunded 1, balances equal prefunded and escrow 0. No fixture signatures were reissued and no private keys are included. `audit-v2-notes.txt` records commands, individual controls, mutants, pins and limitations; `audit-v2-SHA256SUMS` seals these later receipts separately. `audit-v2-omega-tools.txt` records mounted Omega lookups and a sandboxed guard negative control, explicitly distinguishing that older server pin from the newer compiler used for the actual ledger gate. The existing application README was updated; no shared language/compiler/harness contract changed.