cred402/ration-anchor/media/near-demo-2026-11-11.cast
caelum0x 07136e7b73 feat(near-hackathon): fold Ration's audit-anchor work into this repo as ONE combined NEAR submission
Owner directive (2026-11-11): submit a single project to the NEAR
Hackathon instead of two separate entries from the same person. Vendors
Ration's NEAR audit-anchor work (github.com/caelum0x/ration, commit
cff0ed3 + follow-ups) into ration-anchor/ as a first-class component:

- contracts-near/audit_anchor (NEAR Rust contract, 5/5 cargo tests
  green, target/ deleted)
- signer/ — a new, self-contained Go module (no dependency on Ration's
  other services or go.work) with the hand-rolled NEAR transaction
  signer + JSON-RPC client (cross-checked byte-for-byte against
  near-api-js) and the hash-chained audit ledger it anchors; 15/15 Go
  tests green (go test ./... -race)
- docs/ and media/ — Ration's original pitch deck, demo recordings, and
  submission checklist

Re-verified live via raw NEAR Testnet JSON-RPC this pass:
ration-anchor-286ca315f1.testnet still deployed and queryable, the
deliberate replay-rejection transaction still fails with nearcore's own
"sequence must strictly advance" panic — no redeploy needed.

Provenance notes added throughout (package doc comments, lib.rs header,
README) crediting the origin repo. README.md and HACKATHON.md rewritten
to tell one story: Cred402's SpendGuard enforces the protocol-level
spending limit, the vendored Audit Anchor proves the tamper-evident
spend history, both independently verifiable on NEAR Testnet. No mainnet
claims anywhere (see prior overclaim fix 524f2dd). cred402's own build
(npm run typecheck) and existing tests are untouched.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 15:32:24 +03:00

16 lines
2.6 KiB
Plaintext

{"version":3,"term":{"cols":104,"rows":26},"timestamp":1794347199,"command":"bash /tmp/ration-video-build/record_demo.sh","env":{"SHELL":"/bin/zsh"}}
[0.009, "o", "\u001b[3J\u001b[H\u001b[2J"]
[0.000, "o", "$ near-anchor demo\r\n"]
[1.529, "o", "[1/4] appending two real records to the audit-log chain at /tmp/ration-video-dryrun-data/audit.log ...\r\n"]
[0.005, "o", " appended AgentDecision: sequence=5 hash=a0878e47be6a6eafac15ec0c65e28e410baff24c01af33c32776dcd586d8f8a1\r\n"]
[0.003, "o", " appended LedgerEntry: sequence=6 hash=a7545efedefccc1b9882e36b9fe832d2c96e20d17dd533164d8ac6c113955389\r\n[2/4] local chain integrity: intact=true records_checked=6, tip is now sequence=6 hash=a7545efedefccc1b9882e36b9fe832d2c96e20d17dd533164d8ac6c113955389\r\n"]
[0.000, "o", "[3/4] anchoring sequence=6 hash=a7545efedefccc1b9882e36b9fe832d2c96e20d17dd533164d8ac6c113955389 on NEAR Testnet (contract ration-video-61849d567f.testnet) ...\r\n"]
[1.565, "o", " committed. tx=5YebAM2YRyoneabk8npkH3a8VnnevnLv9NLkBT5ome1t\r\n https://testnet.nearblocks.io/txns/5YebAM2YRyoneabk8npkH3a8VnnevnLv9NLkBT5ome1t\r\n[4/4] independently re-reading the local chain tip and the live on-chain anchor to confirm they match ...\r\n"]
[0.093, "o", " on-chain anchor matches the real local chain tip\r\n\r\nnear-anchor demo: PASSED — a real audit-log entry was written, the hash chain advanced, the anchor transaction was confirmed on NEAR Testnet, and the on-chain stored hash matches the real local chain tip.\r\n"]
[6.017, "o", "\r\n$ curl https://rpc.testnet.fastnear.com # raw NEAR RPC, independent of our own tool\r\n"]
[1.123, "o", " independent RPC response (not our tool):\r\n {\"tenant_id\":\"tenant-near-hackathon-demo\",\"chain_tip_hash\":\"a7545efedefccc1b9882e36b9fe832d2c96e20d17dd533164d8ac6c113955389\",\"sequence\":6,\"occurred_at_unix\":1794347200,\"anchored_at_block_timestamp\":1794347201577590715}\r\n"]
[8.520, "o", "\r\n$ near-anchor commit # replay the SAME anchor again -- no new records appended\r\n"]
[1.024, "o", "near-anchor: local chain tip is sequence=6 hash=a7545efedefccc1b9882e36b9fe832d2c96e20d17dd533164d8ac6c113955389 tenant=tenant-near-hackathon-demo\r\n"]
[1.588, "o", "near-anchor commit: nearanchor: broadcast commit_anchor: nearanchor: transaction 7v6m81jkbT2K5AjVBbDray9hXWVB2cHvTBWt3Uui469o failed on-chain: {\"ActionError\":{\"index\":0,\"kind\":{\"FunctionCallError\":{\"ExecutionError\":\"Smart contract panicked: audit_anchor: sequence must strictly advance past the last anchored sequence (stale or replayed anchor rejected)\"}}}}\r\n"]
[6.023, "x", "0"]