cred402/ration-anchor/docs/RATION-SUBMISSION-CHECKLIST.md
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

151 lines
8.3 KiB
Markdown

# NEAR Hackathon submission checklist (dev deadline Nov 14 2026 23:59 UTC, results by Nov 18 2026 23:59 UTC)
Code, contract, tests, and docs are done and verified live on NEAR
Testnet. What's left is short and owner-only (identity + a social post +
the form submission) — exactly the same shape as cred402's own
checklist for the same hackathon.
## Done (no action needed)
- [x] `contracts-near/audit_anchor` built, tested (5/5 unit tests
green), and deployed to a real NEAR Testnet account
(`ration-anchor-286ca315f1.testnet`) — deploy tx
`FuU26BxiaeiH8jgWmcUrDcCBSu88uGRNLzvsuPhfjcB2`, deployed
`code_hash` independently confirmed equal to the build's own
checksum (`9t3f9kFSvR7bv5JZcouWwWfgMhNxGiswAT36ZTVYy2Bk`).
- [x] `services/audit-log/internal/nearanchor` (Go NEAR transaction
signer + RPC client + high-level anchor flow) and
`services/audit-log/cmd/near-anchor` (the CLI) built, with its own
hand-rolled Borsh encoding cross-checked byte-for-byte against the
real `near-api-js` SDK (see `transaction_test.go`, `keys_test.go`).
- [x] `services/audit-log/internal/store/tip.go` (`ReadTip`) added
without touching `store.go` (the pre-existing, already-tested
hash-chain implementation) — confirmed via `git diff`.
- [x] Real end-to-end NEAR Testnet verification (2026-11-09):
- Two real audit-log records appended; `VerifyChain` confirmed
intact before anchoring either.
- Two successful on-chain anchors: commit tx
`6Ksmo3LNpdEtKg2JwoVWmrFbnhjY4DJPRnXnQGFfdTNB` (sequence 2) and
commit tx `EC6Puujw4qSURT1a1WX44PSGvnUiT2nnemis1tY2ZbtK`
(sequence 4) — both independently re-confirmed via raw `curl`
against NEAR's own public RPC, not just this repo's own tooling.
- The contract's replay guard rejected a real re-submission of
the already-anchored sequence 2 — tx
`3sWNYB5ddbqT5BaUqQfRJXJi8EfHUSJA7k8vgwDvAzPr`, nearcore's own
`ActionError`/`Smart contract panicked` — proving the guard is
enforced by the live network, not just a local unit test.
- A real Go integration test
(`TestCommitAndVerifyAgainstRealTestnet`) run against the same
live account — commit tx
`7pM5LsiBa6tbQXS3rEZUm9B3n5Wihinb2K8V7BBnecw8` (sequence 5).
- Final on-chain state: `get_anchor_count()` → `3`.
- Full detail, every tx hash, and exactly what's still local-only:
`HACKATHON.md` in this same directory.
- [x] Zero regressions in Ration's pre-existing suites: `cargo test
--release` in `services/ledger-core` (15/15 across
idempotency/recovery/reserve-floor test files, all green) and
`go test ./...` across every Go service module (all build; the
5 `services/audit-log` packages — `cmd/verify-chain`,
`internal/grpcserver`, `internal/nearanchor`, `internal/store`,
plus `cmd/audit-log`/`cmd/near-anchor` with no test files —
all pass, including with `-race`).
- [x] `HACKATHON.md` written (track, what/why, honest scope, real tx
hashes, how to run it for a judge).
- [x] Repo `caelum0x/ration` confirmed **public** (`gh repo view` →
`visibility: PUBLIC`, re-checked 2026-11-09) — already satisfies
the hackathon's public-repo requirement, no change needed.
- [x] Changes committed and pushed to `origin/main`.
- [x] `plans/ration-near-hackathon.md` written with the real
account/contract id and every transaction hash above, and
`plans/INDEX.md` updated to point at it.
## Done (demo video + pitch deck, added 2026-11-11)
- [x] **Primary submission demo video, narrated** — 69.8s, 1920x1080,
Deepgram Aura-2 narration with burned-in captions
(-14.5 LUFS / -1.9 dBTP), built entirely from real captures: a
real `near-anchor demo` run plus a raw-RPC re-read plus a
deliberate replay attempt shown being rejected live on-chain
(not just append+anchor). Committed:
[`media/ration-near-demo-2026-11-11.mp4`](media/ration-near-demo-2026-11-11.mp4)
(+ `.cast`). Anchor tx `5YebAM2YRyoneabk8npkH3a8VnnevnLv9NLkBT5ome1t`;
replay-rejection tx `7v6m81jkbT2K5AjVBbDray9hXWVB2cHvTBWt3Uui469o`.
Full detail in `HACKATHON.md`'s "🎬 Demo video" line.
- [x] **Pitch deck** — `PITCH-DECK.md` (Marp), exported to
`PITCH-DECK.pdf` and `PITCH-DECK.pptx`, 11 slides covering
problem/market/solution/architecture/live proof/track fit +
judging-criteria mapping/honest traction/roadmap/team/links.
## Done (earlier demo video, added 2026-11-10 — kept, not deleted)
- [x] **Demo video recorded** — a real, unedited `near-anchor demo` run
(`asciinema` + `agg` + `ffmpeg`, same tooling cred402 used for its
own submission) against a dedicated, freshly-deployed NEAR Testnet
account (`ration-demo-23bd92e5.testnet`) so the recording starts
from a clean sequence instead of replaying the primary account's
already-advanced history. Shows two real audit-log records
appended and anchored on-chain, independently re-confirmed via a
raw `EXPERIMENTAL_tx_status` RPC call outside the tool itself.
Committed: [`media/near-demo-2026-11-10.mp4`](media/near-demo-2026-11-10.mp4)
(+ `.gif`/`.cast`), commit `da8f906`. Anchor tx:
`z8GWsRVxDykJ55rTKgb4dbN9WTH1UGMzk4NhQfogFrt`. Superseded as the
primary attachment by the narrated video above, but kept as a
shorter alternate.
## Owner-only (fill in before submitting)
1. **Team info** — the hackathon form asks for a team lead name/email
and team size. This agent does not have and must not guess your
identity:
- Team lead name: `[OWNER: fill in]`
- Team lead email: `[OWNER: fill in]` (likely
`subasiarhan3@gmail.com`, but confirm — this is your call)
- Team size: `[OWNER: fill in]` (solo founder → `1`, unless entering
with others)
2. **NEAR payout account** — if the hackathon asks for a NEAR account to
receive prize funds, it must be a real wallet you control:
- Payout NEAR account id: `[OWNER: fill in]`
- The disposable `ration-anchor-286ca315f1.testnet` account this
submission created and deployed to is **not** a payout wallet —
it was created by this agent for demo/testing purposes only and
holds no real value. Create or use your own NEAR Wallet
([wallet.near.org](https://wallet.near.org) for mainnet,
[near-faucet.io](https://near-faucet.io) for a fresh testnet one)
for the actual payout account.
3. **Demo post on X (required)** — must state you built this at NEAR
HACKATHON, tag `@NEARProtocol`, use `#NEARHackathon`, and attach the
real demo video recorded above
(`media/near-demo-2026-11-10.mp4`). Draft caption ready at
[`X-POST-DRAFT-2026-11-10.md`](X-POST-DRAFT-2026-11-10.md) in this
same directory — owner just needs to copy/attach/post.
- X/Twitter post URL (must tag @NEARProtocol + #NEARHackathon):
`[OWNER: fill in once posted]`
4. **Submit the form** at [nearhackathon.com](https://nearhackathon.com)
before **Nov 14, 2026 23:59 UTC** (results by Nov 18, 2026 23:59
UTC). Confirmed fields on the real form (per the hackathon site,
cross-checked with cred402's own submission notes for the same
event): project name, team lead name + email, team size, track (pick
**AI Security & Defense**), NEAR wallet address for prize
distribution, repository link (required), demo post link on X
(required), a project description (the "What this submission
honestly is" section of `HACKATHON.md` adapts directly), and an
optional website URL.
- Repo URL: `https://github.com/caelum0x/ration` (public, confirmed).
- The team info, payout account, and demo link from steps 1-3 above.
- Submission form confirmation: `[OWNER: fill in once submitted]`
## Not done, and intentionally so
- No real NEAR Mainnet transaction was made or claimed — Testnet only.
- `services/agent`/`services/ledger-core` are not wired to call
`near-anchor commit` automatically — it is a standalone tool today
(see "What is still local-only" in `HACKATHON.md`). Scoped out
deliberately to keep this submission honest about what was actually
built and verified under the deadline.
- Nothing was posted to X/Twitter and the hackathon form was not
submitted — both require your logged-in accounts and are listed
above as the remaining steps.