Repository navigation
ZCon portable demo: Raspberry Pi agent computer paid with Zcash - #79
Merged
Merged
Conversation
…only networking, encrypted vault, attested NEAR inference and Zcash funding Imported as one commit from the private development branch (work/zcon-agent-ux at c590366) after a publication review. Device and wallet identifiers in tests and code were replaced with synthetic values; activation.py takes its payer from the custody record.
…(account 1000+n), login over per-name Tor circuits, token in the vault
…ed exit (Free2Z refuses Tor exits); pseudonym exit NAME picks a new one
…ex 0, not the displayed one)
Zcash pseudonyms on Free2Z over Nym
…ough the agent wallet's approved sends; wallet address returns the Orchard-only UA
…ls on slow Tor circuits)
…TMR2 as teep does
personalize.py wrote country=US into wpa_supplicant for every stick. The Wi-Fi JSON now requires a country field (ISO 3166 alpha-2, upper case) and refuses input without it.
The agent wallet copies the seed of one named account from the desktop Zkool database. The name was the demo's account label; use a generic default. The operator creates an account with this name in Zkool, and agent-wallet.mjs still refuses to start unless exactly one account with that name and a seed exists. BUILD.md documents the step.
dsmack-wallet wrote disclaimer_accepted into Zkool's first-run preferences, so whoever opened the wallet never saw the disclaimer. Zkool now shows it on first open and the user accepts it. Nothing else reads the flag: the transport and Tor proxy presets are unchanged and the Super+W flow only gains the one screen on first use.
Both root-only namespace fixtures copied node from the rehearsal VM's home directory. They now copy the binary named by NODE and fail with KeyError when it is unset.
pi-ssh, pi-deploy, pi-view, demo-record and vkbd.py, taken from the operator's own scripts and parameterized: the key, known_hosts, MAC, capture device and stick serial come from PI_* variables, and the vault passphrase for demo-record comes from stdin. pi-deploy persist resolves the stick from PI_STICK_SERIAL on the Pi and refuses unless exactly one disk matches and the running boot partition is on it.
fetch-zkool.sh downloads the Zkool 6.34.0 aarch64 deb and the trixie libraries it needs, each checked against a pinned sha256 (libraries through Debian's signed indexes), and lays out /opt/zkool. build-teep.sh builds teep at the pinned commit with Go 1.27.3 and refuses unless the binary matches the shipped hash. zkool_graphql has no upstream binary for this target, so build-zkool-graphql.sh builds it from the pinned tag and commit; the README records that a rebuild has not been compared with the stick's binary.
BUILD.md gives the hardware, the pinned Raspberry Pi OS image, the steps in order with the public script for each, costs and limits. It states that no stick has been built end to end from these scripts and that the demo stick's install layout differs from what stage-runtime.py writes. The README gains a paragraph on ZECpublish, notes that pseudonyms are code only, and links BUILD.md and the laptop tools.
The QEMU rehearsal and kiosk recipe, with rehearse.sh, provision-guest.sh and verify-workspace.py that only it used, and the workflow for the old portable-pi branch move to docs/history with a one-line header. portable/raspberry-pi/README.md becomes a short index pointing to BUILD.md and the subdirectory READMEs. Kept in place because they are still referenced: the direct-zai profile (stage-runtime.py, and direct-near-entry.mjs imports direct-zai-broker), funding/ppq-* (credit-lease-entry.mjs, stage-runtime.py), browser-ram-launcher.py (sway.config Super+B, stage-runtime.py) and agent-terminal.py (console-status.py, home-command.py, its tests). Drop wording that the demo made outdated: portable components are no longer called experimental, and the funding CLI README no longer says it has not run on the Pi.
The payload is a tar of DIR's ./, and plain tar -xp applies the archived mode and mtime of ./ and of every existing directory (/opt, ...) to the target. A 0700 DIR made / 0700, and persist wrote that to the stick. Both extractions now use --no-overwrite-dir. test-pi-deploy.sh shows the old extraction changing a 0755 root to 0700 and pi-deploy try, with a fake pi-ssh, leaving it 0755.
pi-ssh matched PI_MAC anywhere in an ip neigh line; it now matches the lladdr field as a prefix. demo-record's screen reader swallowed ssh errors with || true; a failed read now stops the recording. It also drops the grep that failed on a blank screen and the bc dependency for log timestamps. The README says pi-deploy and demo-record need PI_MAC.
The label quoted info.os_image_hash, which the operator supplies and the quote does not bind, and threw a TypeError when it was missing. It now quotes the RTMR1 and RTMR2 prefixes from the verified quote. A new test admits reviewed firmware with an unknown kernel and no os_image_hash.
… forms Pseudonyms need a Nym client and Free2Z setup that no stick built from these docs has, so the operator help no longer lists ~/pseudonym; the command and its wrapper stay. home-command.py accepted ~/pseudonym with no arguments and passed any one or two words through; it now accepts only 'pseudonym list' and 'pseudonym new|exit|login|whoami NAME', and a test covers both the accepted and refused forms.
The ZCon README now says exactly what the broker enforces: UpToDate TDX and pinned firmware (MRTD, RTMR0); kernel and initrd (RTMR1, RTMR2) reported only; local GPU verification without revocation; and compose admission through the instance's DstackApp contract on Base, so NEAR's contract owner decides which code runs. It states what NEAR can see. BUILD.md lists the four keys of transit-private.json and what the Base ETH pays for, and tells upgraders to rename the Zkool account to "agent" and add country to existing Wi-Fi JSON. The agent guide describes the repository install layout and the same admission scope.
Owner
Author
|
Offline gate (
|
amiller
marked this pull request as ready for review
October 30, 2026 12:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the Raspberry Pi USB demo shown at ZCon as one commit on top of main, with a write-up at
portable/zcon-demo/README.md.The stick boots a Pi 4 from USB into RAM. Every connection goes through Tor, and anything kept lives in an encrypted vault. The agent runs GLM on NEAR AI's TEE hosts after checking attestation, and
~/fundturns ZEC into inference credit: 1Click swap to USDC on Base, then a NEAR AI invoice paid with it. Operator, agent, inference broker, funding and desktop each run as their own Unix user.What's here:
portable/(Pi platform, inference broker, funding, workspace), the sharedlib/changes it needs (NEAR bridge with retry, coupon-near status reporting), their tests and fixtures, and README links (ZCon demo, teep, awesome-private-inference). The Zcash paragraph in the README is updated to match.Publication review. Two independent reviewers read all 379 files for device identifiers, credentials, wallet and account IDs, and private-infrastructure references. Fixed before this commit:
activation.pyhardcoded the demo's Base wallet; it now takes the payer from the custody record, asincoming.pyalready did.local-data/convention were removed.No private keys, API keys or tokens were found. The NEAR/NVIDIA attestation fixtures hold only provider evidence and random nonces.
Open question:
tests/fixtures/chutes/local-rim.json(and the RIM responses insidetests/fixtures/near/nvidia-local-attestation.json) are NVIDIA RIM files fetched from NVIDIA's public service.tests/fixtures/chutes/README.mdnotes no redistribution licence was established. Decide whether to keep them before merging.Tests. Apart from the docs and the sanitized values, the code is identical to the private branch, where the bridge, broker and transport suites pass along with a new retry test. One coupon-near test fails identically on its base. In this tree, the funding
test-*.pysuites, the edited enrollment, console-status, fund-view and incoming tests pass. Doc link and whitespace checks pass. The offline integration gate has not been run; it's required before main moves.Not an installable release: building a stick from this tree is not a documented recipe yet.