Skip to content

Integrate BRC-118: multipart BEEF transport for large payment payloads #1

@b0ase

Description

@b0ase

Context

BRC-118 (merged as bitcoin-sv/BRCs#122) solves BEEF transaction bloat when unconfirmed ancestors accumulate during rapid sequential payments.

Problem: BEEF payloads grow as transactions chain before confirmation. Real-world measurements show single-transaction BEEFs reaching 155.7KB in 5 minutes — exceeding Cloudflare's 128KB header limit.

Solution: Negotiated transport via x-bsv-payment-transports header. When payloads exceed header limits, client sends payment via multipart/form-data body instead. Fully backward compatible with BRC-103/105.

Why this matters for $402

  • Proof-of-Indexing payments chain rapidly — exactly the scenario where BEEF bloat hits
  • ClawMiner devices making sequential $402 payments accumulate unconfirmed ancestors fast
  • Content micropayments (pay-per-page, pay-per-stream) create long unconfirmed chains
  • Without BRC-118, high-frequency $402 payments will silently fail at CDN header limits

Implementation plan

  1. Add x-bsv-payment-transports header negotiation to path402 client SDK
  2. Implement multipart fallback in @path402/client when BEEF exceeds threshold (~100KB)
  3. Add server-side multipart parsing to path402 payment verification middleware
  4. Test with ClawMiner rapid-payment scenarios

References

  • BRC-118 spec
  • Extends BRC-105 (payment handling) and BRC-103 (authentication)
  • 3 production implementations exist (TypeScript, Go, Python)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions