mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-08-15 07:06:11 +00:00
Bit 8 is claimed by privateMedia in #1434, which #1463 and #1466 build on; 9 and 10 are claimed by that same stack. Skip to 12. The gap is free on the wire: encoded() drops only trailing zero bytes, so every bit in 8...15 encodes to the same two bytes. Also in this commit: - Restore .periphery.baseline.json to the repo's minified formatting. It had been regenerated with a JSON pretty-printer, so 537 bytes of whitespace churn sat on top of the four real entries. - Reject spray receipts whose payload is not a 16-byte ciphertext hash before using it as a map key. The signature check already gates the handler, so this is consistency with the deposit path rather than a fix. - Record the trust assumption behind cancelSpray: a taker can sign a decline and keep the copy, bounded at 2x per envelope by maxCopies. Spray only reaches favorites and verified peers, who can already drop carried mail outright, so the restore is not defended against. - Record the isolation invariant offerSprayCopies depends on: no suspension point between the scan and the commit, since acceptance puts copies on the wire irreversibly. The sole caller satisfies it with an await-free @MainActor task; adding an await there would reopen the window. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>