BUILD-REPORT.md
6.75 Kb · 123 lines
1# Agent Deeds Registry — Build Report
2
3**Hackathon:** Gnome Tavern (DoraHacks × Gno.land), 23 Nov – 18 Dec 2026.
4**Deadline:** Fri 19 Dec 2026, 00:00 WIB.
5**Entry:** Agent Deeds Registry — a reputation board for AI agents on Gno.land.
6**Repo:** https://github.com/sadiomonro-boop/agent-deeds-registry
7**Commit:** `97708f96992c2d9941f5f6d04b24361430628393` (main)
8**Status (28 Nov 2026 ~14:00 WIB): realm BUILT + TESTED + pushed. Testnet deploy
9BLOCKED on funding (see §4) — everything else is ready.**
10
11## 1. What was built
12
13`deeds.gno` (~300 lines) — a realm where AI agents register, log completed
14tasks ("deeds") with a content hash as proof, and collect attestations from
15other registered agents. Readable by any agent via gnomcp.
16
17| Function | Rule |
18|---|---|
19| `RegisterAgent(name, description)` | One registration per address; name ≤ 64 chars. |
20| `LogDeed(title, proofHash)` | Registered agents only; returns deed ID. |
21| `Attest(deedID, note)` | Registered agent, not own deed, once per deed. |
22| `AgentInfo / DeedInfo / Stats / TopAgents / RecentDeeds` | Read helpers; TopAgents ranks by attestations, then deeds. |
23| `Render(path)` | Markdown board for gnoweb (stats, top agents, recent deeds, how-to). |
24
25Caller identity: `unsafe.PreviousRealm().Address()` (documented v1.8.0 idiom).
26Validation failures panic (tx aborts) — standard Gno convention.
27Crossing functions are thin wrappers over internal helpers, so the logic is
28directly unit-testable.
29
30## 2. Verification (local, 28 Nov)
31
32| Check | Result |
33|---|---|
34| `gno fmt ./...` | clean (rc 0) |
35| `gno lint ./...` | clean (rc 0) |
36| `gno test ./...` | **7/7 pass** (`ok . 2.26s`) — register/log/attest, duplicate/invalid/unregistered panics, ranking order, crossing caller wiring |
37| gnodev end-to-end (devnet) | **4/4 calls OK**: RegisterAgent (deploy key), LogDeed, RegisterAgent (2nd key), Attest. Negative test (duplicate register) correctly failed with `agent already registered`. |
38| Render after calls | `agents: 2, deeds: 1, attestations: 1`; SadioResearch 1 deed / 1 attestation; deed #1 "Wrote market brief: tokenized stocks" with proof `sha256:9f2c41ab77d0` |
39
40Notes learned:
41- `gno test` shares realm state across tests in one run — tests assert deltas, not absolute totals.
42- The test suite has **zero external dependencies**: the `testAddress` helper is
43 inlined (same construction as `gno.land/p/nt/testutils/v0.TestAddress`),
44 because the toolchain cannot fetch gno.land packages from this VM (see §5).
45- A realm's first call needs ~3.6M gas (cold load). Use
46 `-gas-fee 10000ugnot -gas-wanted 10000000` for calls; deploy uses
47 `-gas-fee 20000ugnot -gas-wanted 10000000` (storage deposit dominates).
48- `gnokey maketx call -args` takes **one value per flag** — repeat `-args` per argument.
49
50## 3. Keys
51
52- **Deploy key (fresh, for this entry):** `gnome-deeds-deploy`,
53 `g1fe2mh7k7g92mmtp9tkxdzveea9rkt3ksw9ca9c`. Mnemonic + password stored
54 mode-600 in `~/workspace/gnome-tavern/deeds-deploy-key-backup.txt` and
55 `deeds-deploy-key-password.txt`. **Never printed or sent anywhere.**
56 Testnet balance: **0** (unfunded — see §4).
57- **Demo key (local devnet only):** `gnome-deeds-demo`,
58 `g1t49my25mrxggdpnt2y98tx2zh45vuag69hnlv4`, password `test`.
59 Never fund on testnet/mainnet.
60- **Learning key:** `gnome-throwaway`, `g16hydljxln3pashneeypm6ydzw8y2qd6v5g9n9c`
61 — holds the faucet funds but is **unusable** (see §4).
62
63## 4. ⛔ BLOCKER — testnet funding (deploy cannot proceed yet)
64
65- **Faucet claimed 28 Nov 13:17 WIB** by the user from his phone:
66 "Faucet request successful" for the throwaway address. **Verified on-chain**
67 via `abci_query`: balance `"100000000ugnot"` = **10 GNOT**,
68 account 3019, sequence 0.
69- **The 10 GNOT is LOCKED in the throwaway key.** Its password was set by
70 the learning session and never recorded: no password file, no shell
71 history, `muse.db` holds no record of the key-creation command, and
72 36 common-password guesses (via `gnokey export` oracle) all failed.
73 The planned throwaway → fresh-key send fails at signing:
74 `unable to sign transaction: invalid account password`.
75- **What is needed (ONE of these):**
76 1. **User claims the faucet once more for the FRESH address** (~1 min on
77 his phone — same as before, but paste the deploy address):
78 `g1fe2mh7k7g92mmtp9tkxdzveea9rkt3ksw9ca9c` at https://faucet.gno.land
79 (10 GNOT is more than enough: deploy ≈ 0.32 GNOT + gas).
80 2. A browser task at faucet.gno.land with a captcha solved via takeover.
81- Do NOT ask the user for the throwaway password (nobody has it) and do NOT
82 retry the faucet drip API (declined before, must never be retried).
83
84## 5. RPC workaround (solved, reusable)
85
86`gnokey`'s HTTP client dials TCP directly and ignores the VM's egress proxy
87env vars, so direct calls to `https://rpc.latest.testnets.gno.land:443` fail
88with `tls: first record does not look like a TLS handshake` (curl/Python work).
89**Fix:** local reverse proxy `~/workspace/gnome-tavern/gno-rpc-proxy.py`
90(listens `127.0.0.1:26657`, forwards via proxy-aware urllib to the Onyx RPC).
91Verified: `gnokey query bank/balances/... -remote 127.0.0.1:26657` returns in
920.78s; `maketx` account query works through it (send reached the signing step).
93Restart after a VM reboot with:
94`setsid nohup python3 ~/workspace/gnome-tavern/gno-rpc-proxy.py > /tmp/gno-rpc-proxy.log 2>&1 < /dev/null &`
95
96## 6. Deploy commands (ready — run once the fresh key is funded)
97
98```bash
99export PATH="$PATH:$HOME/.gno/bin" GNOROOT="$HOME/workspace/gnome-tavern/gno-src"
100# 0. ensure the RPC proxy is running (see §5)
101# 1. confirm funds:
102gnokey query bank/balances/g1fe2mh7k7g92mmtp9tkxdzveea9rkt3ksw9ca9c -remote 127.0.0.1:26657
103# 2. deploy:
104printf '%s\n' "$(cat ~/workspace/gnome-tavern/deeds-deploy-key-password.txt)" | \
105gnokey maketx addpkg -insecure-password-stdin \
106 -pkgpath "gno.land/r/g1fe2mh7k7g92mmtp9tkxdzveea9rkt3ksw9ca9c/deeds" \
107 -pkgdir ~/workspace/gnome-tavern/agent-deeds-registry \
108 -gas-fee 20000ugnot -gas-wanted 10000000 \
109 -chainid onyx-1 -remote 127.0.0.1:26657 gnome-deeds-deploy
110# 3. verify: https://latest.testnets.gno.land/r/g1fe2mh7k7g92mmtp9tkxdzveea9rkt3ksw9ca9c/deeds
111# 4. seed demo data: RegisterAgent + LogDeed as deploy key, then a second
112# fresh key registers + Attests (create it with backup at deploy time).
113```
114
115## 7. Submission readiness
116
117- DoraHacks event page (`dorahacks.io/hackathon/gnome-tavern/detail`) still
118 returns **HTTP 405** (rechecked 28 Nov) — exact submission fields and
119 judging criteria are **unverified**. Standard BUIDL materials are prepared
120 in `SUBMISSION.md`; confirm the fields on DoraHacks at submit time.
121- Remaining before submit: (a) fund fresh key (§4), (b) deploy + verify live
122 realm + seed demo data, (c) record a short demo video (gnoweb board + a
123 live register/log/attest), (d) submit on DoraHacks. Submit by 17–18 Dec 2026.