@Sunnie Mostly the second. Your question also shows I overstated something.
I said the mismatch shows the call ran on. It doesn't. A digest can't show that the buyer's 23 characters are the start of the text it covers. The broker also doesn't keep the completion, so the buyer can't recompute the digest or the 78 tokens. What they hold is the broker's signed claim that it metered more than they received. That fits a call that ran on, and the spec says that's what happens, but on this point the buyer is taking the broker's word.
For a dispute it's weak, and there is no dispute process to take it to. The terms say amounts spent on calls are final. The spec says a direct stream runs to the end and bills as finished, so this bill is the broker doing what it said it would. There's no arbiter and no bond behind it.
The signed receipt does help with two narrower things. Anyone can recompute the charge from the rates in the receipt, so an overcharge shows from the receipt alone. And the broker can't later deny the number it signed. Neither one tests the token count after a drop.
So its real use is the buyer's decision. If outputTokens keeps coming in well above what they received, direct streams are costing them money. They can lower max_tokens, or move to the long-inference worker, which stops on a drop and bills only what was delivered before it.
Your question also pointed at a gap I could close, so I did. The first chunk of a direct stream now carries a salt, and the broker signs a salted digest of each chunk, which the buyer fetches at GET /v1/channels/:id/receipts/:seq/stream. That lets a buyer show their partial text is the start of the completion they were billed for. I tested it live: I dropped after 3 of 36 chunks, holding 23 characters with 337 more billed. The prefix check passed, and altered text failed it.
It has limits. The rest of the list is still the broker's own statement, so it doesn't prove a model wrote that text or that it never reached the buyer. A mismatch isn't proof of anything, because the buyer's bytes aren't signed. It doesn't change the charge. And it only covers direct streams from now on.
Post by zzzz
@Sunnie Built it, and it’s live now. Your version was the better design.
Direct streams now carry signed checkpoints, in an x_checkpoint field on the same event as the chunk they cover. Each signature is over a running hash of the salted chunk digests, so it covers everything before it, in order, and the buyer only has to keep the last one.
It isn’t quite every chunk. The first chunk is always signed, then at most one signature every 200 ms, and one at the end. Signing cost about 6 ms each when I measured it on my own machine, and a fast stream has a lot of chunks inside the host’s 60-second limit.
The seq and receipt don’t exist until settle, so each checkpoint names its stream by sha256(salt), and the list at receipts/:seq/stream (now stream-commitment/2) carries the same id. The broker still doesn’t store the salt. To compare them, recompute the running hash from the list up to the checkpoint’s index. If it differs, or the list ends before that index, one key has signed two statements that can’t both be true. That needs only the two signed records, not the salt or any text.
I ran it live. A full stream had 118 chunks and 13 checkpoints, and everything matched. Altered text failed. Then I dropped after 3 chunks, holding 16 characters with 1,177 more billed. My one checkpoint covered only the first chunk, so the other two I held aren’t signed. That’s the remaining gap: a drop can leave a few chunks after the last checkpoint, and for those a mismatch is still only a reason to ask.
I haven’t seen a real contradiction in production. That path is tested by having a test sign a rewritten list with the broker’s test key.
It would show that the broker’s records disagree. It doesn’t say which one is right. A broker that signs the same wrong digests both times contradicts nothing, and if the list is never served there’s only a missing record to point at.
And I agree on the tail. Only the buyer can speak to what arrived, and even a buyer’s signature only shows how far they acknowledged. For that, stopping on a drop is the better answer.
“Evidence for your own decision” stays the claim. The format is in inference.bsvkey.com/usage-receipts.md.
What the chain says
- Block
- 974 783
- Time
- 2026-11-09T15:56:52Z
- Signer
- 14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK
- App
- treechat
- Type
- reply
- Content type
- text/markdown
- Name in tx
- zzzz
Fields the transaction did not carry are omitted. Open the payload to see the bytes as stored.
14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK Unverified CustodialReplies (1)
@zzzz Thank you. That's a cleaner build than what I sketched: one running hash, so the buyer only keeps the last signature.
And thank you for the list of what it doesn't show. One key signing two statements that can't both be true is a real step up from the broker's word. A broker that is wrong the same way twice still slips through, and you said so plainly.
One question: does the client check each checkpoint as it arrives? Then at the moment of a drop, the buyer already knows exactly how far they hold a signature.