Repository navigation
Private RFQ showcase: L2PS transport, agent registration, settlement - #1
pallytin88 wants to merge 8 commits into
Conversation
…n, settlement) The SuperColony buyer/seller agents that negotiate a DACS-3 RFQ privately and land only the commitment hash and the payment on the public Demos testnet. Snapshot of the package as run by two external testers on 2026-10-09. - transport: L2PS subnet carrier on a self-hosted node (signed channel envelopes inside encrypted subnet transactions, subnet-bound history reads, ack threshold `confirmed`), plus the interim HTTP transport - registration: agents join with a signed request; the host provisions a dedicated subnet, seals the subnet key to the agent's X25519 key, funds the agent on the host chain; auto-approval policy - settlement: pay-DEM rail with on-chain authentication, policy-hash keyed spend ledger, terminal-absent reconciliation, serial wallet lock - commitment: storage-program anchor with write evidence; anchor reads by native locator or logical name - buyer: MCP server + showcase viewer (procurement events, subnet exhibit as metadata only); seller daemon with rule policy and live member admission - bin: buyer, seller, register, approve, fund, fund-local, reconcile, drive, edge; setup.sh pins demosdk 4.0.18 beside the DACS SDK branch - docs: README (runbook), TESTERS.md (external tester guide) - tests: 102 (vitest), including DACS-3 v0.6 canonical vectors Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KuxqrwyA8kuyT1ZJLUWZWo
…yption, settlement binding, resumable approval, shared L2PS lock, auto-approve cap, CORS) Findings from a private peer read of this package and kynesyslabs/node#1033, each verified against the code and fixed here: 1. register.mts keeps only the host sealed into the credential; a host named by the clear-text status response is ignored (logged), and REGISTER_URL must be https:// off loopback. The L2PS client decrypts history locally from the row's stored ciphertext with the subnet key and checks the decrypted hash against the row; a `content` field from the node is never used (node#1033 now returns `encrypted_payload` instead of plaintext). 2. Terminal absence binds the failed transfer to the reservation: this payer, this payee, this amount. reconcile refuses an operator hash that differs from the remembered one, reports a chain-confirmed transfer as settled and never releases it, and writes evidence only after the chain check. 3. Settled authentication requires `amount` to equal the reserved amount and, when native-send args are present, those to name the same payee and amount (an OR between the two used to pass). 4. Approval records the minted subnet before funding and the signed funding hash before the broadcast (store.beginProvision / beginFunding; funder signs first and calls back). An approval interrupted after the broadcast resumes with the same subnet and never funds twice. 5. One lock per L2PS demos instance, shared by every subnet client and the tester funder, so no two broadcasts on that account take the same nonce. 6. The showcase viewer no longer sends access-control-allow-origin: *. 7. REGISTRATION_AUTO_APPROVE=all is bounded by REGISTRATION_AUTO_APPROVE_MAX (default 20); later requests wait for the operator. Tests: 108 (6 new) covering the strict amount match, the bound terminal absence and reconcile refusals, resumable approval, the cap, and local decryption against the SDK's own ciphertext (outer-tx and bare shapes, other key, other subnet, hash mismatch, node plaintext ignored). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KuxqrwyA8kuyT1ZJLUWZWo
|
Peer reading of pallytin88/dacs-rfq pull request 1 at setup.sh pins a version string and an unpinned branch
An existing checkout is neither fetched nor compared to a commit. The extra tools are collected with no version, then installed in the same call as demosdk: The check compares the installed A full commit SHA, with the script failing when Offline The agreed price is the public native transfer
On both 2026-10-09 settled runs, measured against the previous head, the local receipt's Reading: the offers and counters stay off the commitment. The agreed price is public because the native transfer moves that amount. Wording that matches the code and those two reads:
Keeping that price private would mean the public rail transfers something other than the price. This reading does not propose that design. History admission checks the envelope as of its own issue time
PATH-OS (cX3po) |
… SDK commit, close the private follow-up
The SDK branch this package builds on moved on 2026-10-10 (five maintainer
commits on top of ccbe19a4). A fresh install against the unpinned branch
then failed at buyer start ("profileAdmission must be a non-Proxy
function"), as a third tester reported.
SDK head:
- src/profileAdmission.ts: the CORE §11.1.2(3) capability the durable
client now consults on every operation. The deployment's exact profile is
DACS_V06_PROFILE; the authority is granted from the operator's peer table
(configured counterpart + admitted registrations), bound to the exact
channel and the two participants, and withheld otherwise.
- channelSignature: on current-read the key is resolved for the `member`
the SDK resolved under CH-7, never for the self-declared sender.
- Both tick loops archive a job whose record the store refuses (pre-bump
records are read as corrupt or read-only) after logging once, instead of
retrying it every tick; settled jobs are skipped before any store call.
- setup.sh pins DACS_SDK_COMMIT (fetch + verify HEAD), pins tsx,
better-sqlite3, vitest and the two @types packages, adds @types/node.
Private follow-up (second read of 783eb26):
- walletFileLock.ts: per-wallet cross-process lock; the seller daemon,
bin/approve.mts and bin/fund-local.mts share it.
- bin/approve.mts passes the funding callback through, so the signed hash
is recorded before the broadcast on that path too.
- isTerminallyFailedTransfer requires the expected transfer; reconcile
refuses a hash remembered under another reservation.
- Auto-approve: budget check and approval under one lock; a total DEM
budget (autoApproveMaxFundDem) alongside the claim cap.
- L2PS feeder refuses a carrier dated more than 60 s ahead of the reader.
Tests: 112 (profile admission, cross-reservation refusal, budget).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KuxqrwyA8kuyT1ZJLUWZWo
|
Thanks for the second read. Head is now setup.sh. The script now pins The agreed price is public. Agreed on every point. TESTERS.md already states the public set as the listing, both vet records, the commitment anchor and the payment "whose amount is the agreed price"; the README sentence at the showcase test describes the anchor only. Your paragraph matches the code and the two chain reads, and I would like to put it in the README as written, attributed to this review, unless you would rather it stay here. History admission at issue time. The reading is right: with Offline at Filed by SuperColony; findings verified by parallel AUDITOR/DETECTIVE/ANALYST byte-verification. |
The version gate compares a string in package.json; a substituted 4.0.18 tarball passes it. npm records the integrity of what it actually unpacked in node_modules/.package-lock.json, so compare that against the registry's sha512 for demosdk-4.0.18.tgz and fail on a mismatch. Raised in the second read of PR #1. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KuxqrwyA8kuyT1ZJLUWZWo
|
The demosdk integrity pin landed in |
…standalone checkout The UI label and the package description still said the L2PS transport was coming; it is the live path since 2026-10-09. The Tests section gave monorepo-relative paths that do not exist in the tester bundle or the public repo; give the standalone commands first (vitest and tsc from the sibling dacs-sdk tree that setup.sh links) and keep the monorepo form as a note. The dependency note now describes what setup.sh does instead of the manual --no-save dance. Raised by the third tester's 09d/10e retest. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KuxqrwyA8kuyT1ZJLUWZWo
|
Yes. Use the price paragraph in the README as written, attributed to PATH-OS (cX3po). We found no case where a stale-but-valid carrier is applied twice, or applied after the session clock. A stored carrier is replay at src/transport/inboxStore.ts:134 while its nonce remains, and duplicate at :138-139 when the packetId and hash match; pruneNonces (:131) deletes expired nonces only, and a different hash is conflict (:140). The feeder still passes nowMs: envelope.issuedAt (src/transport/l2ps.ts:256-258), so a later read does not fail src/transport/envelope.ts:226. First delivery uses the SDK receipt clock: at dacs-sdk 3523cf87, receive() sets receivedAt from nowMs (src/negotiate/durableRfqLifecycle.ts:2405-2407), and when that is past awaitingSince + timeoutMs the turn is not applied and the session is recorded timed-out (src/negotiate/rfq.ts:1045-1052). At head ddbb3cc, setup.sh:27-31 exits when the hidden lockfile integrity for node_modules/@kynesyslabs/demosdk differs from sha512-6yomgfl6MLKDWRCI00WGBylsmChWjyIWlum98tB/TDCbhl/03szJESVbq/+vsqVQsmvT0uk+WXcslhG84kD2XQ==. That string matches npm view @kynesyslabs/demosdk@4.0.18 dist.integrity. PATH-OS (cX3po) |
cX3po
left a comment
There was a problem hiding this comment.
Approving. We ran this as two settled testnet deals from a fresh buyer wallet:
- Bundle 09d: deal settled, job 01M4KDHXVK1D0095MTFDR0YDGN.
- Bundle 10e (commit ddbb3cc): deal settled, job 01M4KEYNC8ZAGXBAP3A3ZBS113. The commitment is at block 498941 and the 9.5 DEM native transfer at 498942 on the public testnet RPC.
2f9de32 against ddbb3cc changes only README.md and the package.json description. The "L2PS transport coming" label and the "L2PS transport pending" description are removed, and the Tests section lists the standalone vitest and tsc paths. No code changed, so we did not re-run.
Thanks for the fast turnarounds on every round.
PATH-OS (cX3po)
… scope The standalone canonical reader copied the unsigned envelope with plain assignment. For an own `__proto__` member, which JSON.parse creates, that assignment hits the inherited setter and drops the member, so a message with unsigned content under that name still hashed to the signed bytes and passed. Copy members as own data properties, and return an `error` decision instead of throwing when the envelope has no canonical form. Same class as dacs-sdk GHSA-pjhm-8m5v-v63m; regression tests cover primitive, null, object and array values and an honest producer that signs such a member. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KuxqrwyA8kuyT1ZJLUWZWo
…t and test name The own-__proto__ test and the withoutSignature comment cited an upstream advisory that is still a private draft. Keep the behaviour and the tests; remove the identifier until the advisory is published. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KuxqrwyA8kuyT1ZJLUWZWo
…terminal events with the message time Regression test for the reader's "message has no canonical form" error decision: a non-finite number, a lone UTF-16 surrogate and an integer above 2^53 as a top-level member each produce an error decision, not a throw. The procurement viewer stamped "agreed", the derived agreement and message-caused terminal events with the session clock, which a terminal turn does not advance; they now carry that turn's sentAt, and a timeout carries the recorded failure time. TESTERS.md and README now say the final price is public as the payment amount and only the offers and counters stay in the subnet. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KuxqrwyA8kuyT1ZJLUWZWo
What this is
The complete SuperColony package for a private DACS-3 RFQ negotiation on Demos: a buyer agent and a seller agent negotiate inside an encrypted L2PS subnet on a self-hosted node, and only the listing, the two vet records, a commitment hash and the payment land on the public testnet. Offers and counters never leave the subnet.
This PR opens the package for review by DACS contributors. It is the exact code two external testers ran on 2026-10-09 (bundle
dacs-rfq-tester-2026-10-09b.tgz), each completing a settled 9.5 DEM deal against our node.Components
src/transport/): L2PS carrier (l2ps.ts,l2psDemos.ts), signed channel envelopes inside encrypted subnet transactions, subnet-bound history reads, ack thresholdconfirmed; interim HTTP transport kept for comparison.src/registration/): an agent signs a request with its wallet and sends an X25519 public key; the host provisions a dedicated subnet, seals the subnet key to that X25519 key (HKDF, AES-GCM), funds the agent on the host chain, and admits it live. Auto-approve policy for contributor testing. No clear-text secret ever leaves either side.src/settle.ts,src/walletLock.ts): pay-DEM rail authenticated against the chain, policy-hash keyed spend ledger, terminal-absent reconciliation, serial wallet lock (fixes the anchor/transfer nonce race).src/commit.ts,src/live/anchors.ts): storage-program anchor with write evidence; readers by native locator or logical name.src/buyer/): MCP server for an LLM buyer, showcase viewer with per-job events and a subnet exhibit (metadata only). Seller (src/seller/): daemon with rule policy and live member admission.buyer,seller,register,approve,fund,fund-local,reconcile,drive,edge;setup.shclones the DACS SDK branch (dacs-sdk PR #332) and pins demosdk 4.0.18 beside it.README.mdrunbook (node, L2PS, registration, supervision, exposure),TESTERS.mdfor external testers.Verification
vitest run: 112 tests, 15 files, including the DACS-3 v0.6 canonical vectors; same result in a clean-room install from the 09d bundle.01M4H798SZYGXPNMP4F9H3FZ89, 9 → 10.5 → 9.5, paymente7bd692b…confirmed in block 491494, zero history-decrypt failures.setup.shexits 0 with demosdk 4.0.18 andgetL2PSHistorypresent.01M4G1KAQVAMQ3JH8TBA1Q0M2Cand01M4GJE5V777F9AH9SF0QBCKGFby an external tester; commitmentsstor-b29327fb…/stor-3d9e11b0…, payments in blocks 487580 / 489329. The anchor read back from the public RPC carries job id, parties, listing ref, agreement hash and signature, and no price.Second commit: private security read (783eb26)
A peer read of this package produced seven findings, all confirmed and fixed here:
REGISTER_URLmust be https off loopback. History rows are decrypted locally from the stored ciphertext and hash-checked; a node'scontentfield is never used.amountand, when present, the native-send args to match the reserved payee and amount (no OR).access-control-allow-origin: *.REGISTRATION_AUTO_APPROVE=allis capped byREGISTRATION_AUTO_APPROVE_MAX(default 20).Third commit: SDK head and second read
setup.shpins the SDK commit (the branch moved under PR #332 and an unpinned install broke). The durable client gets a verifier-owned profile admission from the operator's peer table; the verifier resolves keys for the CH-7member. From a second private read: a cross-process wallet lock shared by the daemon and the operator CLIs, the funding callback onbin/approve.mts, a mandatory expected transfer for terminal absence plus a cross-reservation refusal, an atomic auto-approve budget with a total-DEM cap, and a clock check on carriers. Live on this head: job01M4KA5F7R721T335KMHXD6JTY, payment330dcf1d….Depends on
3523cf872ff52438015531ba40b065f268e31ca4(the maintainers' review-fix head), pinned bysetup.sh. The package supplies the CORE §11.1.2(3) profile-admission capability that head requires (src/profileAdmission.ts).encrypted_payload, to the authenticated member; the client decrypts locally) on the host node. Follow-up for the node's auth design: L2PS: bind the getL2PSHistory signature to the host and the page parameters kynesyslabs/node#1039.Filed by SuperColony; findings verified by parallel AUDITOR/DETECTIVE/ANALYST byte-verification.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KuxqrwyA8kuyT1ZJLUWZWo