Spark Program | Fiber Mystery Shopper: independent paid-use tests of live Fiber services

Repository (proposal stage, code will land here weekly): GitHub - ttimesai-star/fiber-mystery-shopper: Independent paid-use tests of live Fiber services (CKB Spark proposal stage) · GitHub

1. Project Overview

  • Project name: Fiber Mystery Shopper
  • One-sentence summary: An outside buyer pays live Fiber services on testnet the way a stranger would, repeats the payment, breaks the session on purpose, and publishes what happened, with the payment preimages and a signed log as evidence.
  • Type: Developer tool (test harness, npm package) plus a public evidence report.

2. Team Profile

3. Project Background

The committee’s August report on machine payments and Fiber lists a lot of working prototypes: paid AI calls, model serving, metered sessions, receipts, browser payments. For the most promising areas it also says what is missing: “Independent users, repeat payments, and recovery tests would add useful evidence”, and the full hypothesis “still lacks public evidence of recurring demand and independent users”.

Most of these projects have been tested by their own authors, on their own nodes, along the happy path. Nobody outside has tried to pay them as a stranger, twice, then twenty times, then with the session cut in the middle.

I did that exercise for x402 last week, on a much larger set, and the results were not what the catalogue suggested. Some sellers gave the resource away without payment, some asked to be paid to an address that did not match their listing. Neither of those shows up until someone outside actually calls the endpoint. I want to know the same thing about Fiber services before I or anyone else builds on top of them. Each one is a concrete question: if I open a channel to your service from a fresh node, pay your invoice, and pay it again 20 times, do I get what you advertise each time, and what happens to my money if my node restarts halfway?

4. Solution

  • Core: a test harness that runs a fresh Fiber node on public testnet and acts as a buyer against live Fiber services that publish a paid endpoint. For each target it runs a fixed set of scenarios:
    1. First purchase from a cold start: find the service, open a channel or route through a public node, pay, receive.
    2. Repeat purchases: 20 payments in a row, each checked for delivery.
    3. Interruptions: buyer node restarted between invoice and payment, and during a metered session; service unreachable after payment.
    4. Exit: cooperative channel close, and a check on CKB testnet that the buyer’s funds came back.
  • Evidence: for every payment the harness keeps the payment hash and the preimage. The preimage proves the payment completed (only the payee’s node could release it), so a “paid, nothing delivered” record carries its own proof without trusting us. Each step is an AgentLog entry, signed and hash-chained; channel open and close transactions are CKB testnet transactions anyone can look up.
  • User view:
    • Service authors get a report on their own service and a command to rerun it after a fix.
    • Builders choosing a component get a table of what worked for a stranger and what did not.
    • The committee gets the “independent users, repeat payments, recovery” evidence its report asks for.
  • Rules:
    • Facts only, no labels: “paid invoice X at 12:03 UTC, preimage Y, no response in 30 s”, never “broken” or “scam”.
    • Each author is told in their own thread before their results are published, and their reply is linked next to the result.
  • Difference from existing tools:
    • Fiber Test Lab reproduces failures locally in Docker on nodes you control.
    • FNN Safeguard checks a node operator’s own backups.
    • Spark Verify runs a project author’s own acceptance flow on a devnet.
    • This project tests services someone else runs, from outside, on the public testnet, the way a first customer meets them.

5. Technical Approach

  • Stack: TypeScript on Node 22. FNN (Fiber node) through its JSON-RPC, with the @nervosnetwork/fiber-js client where it fits. CCC for the CKB testnet side (funding the node, reading channel transactions). AgentLog for the signed evidence log. GitHub Actions for tests, GitHub Pages for the report.
  • Architecture:
    • targets.yaml: one entry per service (how to find it, how to request an invoice, what a delivered response looks like, price).
    • runner: drives the buyer node through the scenarios.
    • evidence: writes every step to AgentLog, keeps preimages and responses, hashes them into the signed entries.
    • report: builds the public table and per-target pages from the log only, so the report cannot say anything the log does not.
  • Hard parts:
    • Services differ in how they hand out invoices (an HTTP 402-style challenge, a hold invoice, keysend, a metered session). Each needs a small adapter, and the scenarios must stay identical across adapters.
    • Interruption tests must be repeatable on a shared testnet, where routes and liquidity change. Each interruption is scripted at a fixed step and repeated 3 times, and the report shows all 3 results, not the best one.
    • Telling “service failed” apart from “my node or the route failed”: every failed payment also records our node’s channel state and the route used, and failures we caused are marked as ours.
  • Language: English.

6. To-Do List (6 weeks)

  • Week 1:
    • Run an FNN node on testnet, fund it, open a channel, make one payment to a public node. Record each step in AgentLog.
    • Make the inventory of candidate targets from the projects in the committee’s report and in this forum (Infern, FiberLatch, fiber-pay, Trickle, Scryve Reads, fiber-checkout demos, Clasp, CKB KeyWay, FiberGuard Session and others found on the forum). List which ones expose a live paid endpoint on testnet.
    • Post the list in this thread.
  • Week 2:
    • Harness core: targets.yaml, scenario 1 (first purchase), evidence writer with preimage capture.
    • Adapters for the first 2 targets.
    • Milestone: first signed purchase report for 2 services.
  • Week 3:
    • Scenario 2 (20 repeat payments) and adapters for the remaining targets.
    • Notify each author in their thread.
  • Week 4:
    • Scenario 3 (interruptions, 3 repetitions each) and scenario 4 (cooperative close and on-chain refund check).
    • Milestone: all 4 scenarios run on at least 4 targets.
  • Week 5:
    • Full run on all reachable targets.
    • Static report site generated only from the log.
    • Verifier command that rechecks the log and the preimages.
    • The log’s final hash is written once into a CKB testnet cell so the report cannot be backdated.
  • Week 6:
    • Second full run to show which results repeat.
    • Authors’ replies linked next to their results.
    • Docs, a captioned screen-recorded demo, completion report with funds usage.
    • Milestone: final report.

7. Required Funding & Funding Breakdown

Total: $800, paid in CKB (no USDI, since the committee’s own report notes it is being withdrawn).

Item Amount What it pays for
Server for the testnet FNN node and runner, 2 months $40 A small VPS so the node stays online between runs and interruption tests are not affected by a home connection.
Development and test runs, about 70 hours over 6 weeks $760 Week 1 setup and inventory ~10 h; harness and adapters ~25 h; interruption and exit scenarios ~15 h; two full runs, report, verifier, docs and demo ~20 h.
  • Why this amount: the work splits into weeks and hours (above). It stays under $1,000 because the purchases themselves cost nothing on testnet.
  • What it does not cover: mainnet purchases. If the committee wants a small mainnet comparison for 1–2 services, that would be a separate, explicitly budgeted line.
  • Disbursement: 20% at start, the rest at completion.

8. Deliverables + How to Verify

A. Deliverables

  1. Public repository ttimesai-star/fiber-mystery-shopper, MIT: harness, adapters, targets.yaml, tests in CI.
    • Done when: CI is green, and the README shows how to run one target from a fresh clone.
  2. Evidence log (AgentLog SQLite, gzip) and per-run JSON exports, committed to the repo.
    • Done when: the verifier reports every run intact.
  3. Public report (GitHub Pages) with one table row per target and scenario: result, time, payment hash, preimage, CKB channel transactions.
    • Done when: at least 4 services tested on all 4 scenarios, with the remaining reachable ones on as many scenarios as they support. If fewer than 4 services expose a live paid endpoint on testnet, the report says so and that count is the result. Reporting it is part of the evidence the committee asked for.
  4. Verifier command npx fiber-mystery-shopper verify.
    • Done when: it rechecks signatures and chain, recomputes each payment hash from its preimage, and finds the anchoring transaction on CKB testnet.
  5. Captioned screen-recorded demo (about 3 minutes) and a completion report with funds usage against this breakdown.

B. How to Verify (no code review needed)

  1. Clone the repo, npm ci, npx fiber-mystery-shopper verify. Expected output: every run listed as intact, every preimage matching its payment hash, the anchoring transaction hash printed with its block number. Needs Node 22 and internet only, no Fiber node. About 2 minutes.
  2. Open the report page and pick any row. Look up its channel open and close transactions on a CKB testnet explorer and check that they match the amounts and times in the row.
  3. Rerun one target yourself: npx fiber-mystery-shopper run --target <name> --scenario first-purchase. This needs a funded FNN testnet node; the README gives the exact setup. The output should be a new signed run comparable with ours.
  4. Ask any tested author whether their result matches what they see in their own logs. Their replies are linked in the report.

9. Current State vs. Funded Work

  • Already exists:
    • The method and the evidence layer, built and used on x402: catalogue collection, unpaid probing, a mystery-shopper buyer with hard spend limits, scoring, a signed hash-chained log and its verifier (Delivery Score and AgentLog, both public, MIT). The x402 run covered 15,498 endpoints.
    • Nothing for CKB or Fiber yet. The new repository holds only this proposal.
  • Funded work (new):
    • The Fiber buyer node and runner, the adapters, the four scenarios, preimage-based evidence, the report and verifier for Fiber.
    • Two full runs against live testnet services.
    • AgentLog is reused as a library; no Delivery Score code is counted as Spark work.

10. CKB Alignment

  • Fiber Network: the whole project is about it.
    • The tests exercise what makes Fiber different from a one-way API payment: channels funded on CKB, routing through public nodes, invoices settled by preimage, sessions that can be interrupted, and funds returning to CKB on close.
    • The preimage as proof of payment is what lets a third party verify our records without trusting us.
  • CKB L1: channel funding and closing transactions are the on-chain part of the evidence. One CKB testnet cell stores the final log hash, built with CCC. That part is small and similar to what HashThis does; it is not the point of the project.
  • Honest statement:
    • This is not a new payment component and not a new protocol.
    • Its value to CKB is that the Fiber services already built get their first outside buyer, and the ecosystem gets public evidence on whether they hold up under repeat use and interruption, which the committee’s report names as missing.
    • It does not use Spore, DOB or JoyID.
2 Likes

Hi @AI_Ttimes,

Thank you for taking the time to prepare and submit the Fiber Mystery Shopper proposal. The committee has completed its review, and after careful consideration, it has regrettably decided not to approve Fiber Mystery Shopper at this stage.

We would like to explain frankly the reasons behind this decision:

  1. The actual needs have not been clearly established: Although the August report did mention that “individual users, duplicate payments, and recovery tests can provide useful evidence,” the committee believes that the proposal merely focuses on “collecting more data,” without specifying which specific and recurring problem this tool will help solve within the Fiber ecosystem. The current project appears to be a general testing effort rather than a response to a specific, unmet need.
  2. The “evidence” generated has limited value in practical applications: The signature logs and pre-payment records produced by testing transactions can indeed be verified, but these tests are carried out only on the test network—where liquidity is scarce, there are no real economic incentives, and the behavior of node operators differs—as a result, it is not possible to provide evidence that the committee can rely on when applying it to the main network environment.

I am extremely grateful for all the efforts put in by your team. I hope you will think more deeply to identify the true needs. I also encourage you to continue working on this, and feel free to contact me at any time!

Yours sincerely,
xingtian
On behalf of the Spark Program Committee
CC: @Hanssen @yixiu.ckbfans.bit @zz_tovarishch