Skip to content

v0.2.0

Choose a tag to compare

@v1rtl v1rtl released this 06 Sep 12:53
· 249 commits to main since this release
dcc3244

Metered pusher relays

A relay can now charge for the bandwidth it spends on you, and a client can
decide — per lane — whether to pay. Design and threat model:
docs/pusher-incentives.md.

Relay side. hoverfly pusher --meter bills for bytes admitted and settles
in off-chain SWAP cheques, priced per KiB. It needs --origin (the admission
challenge binds the host the client dialled, never the Host header),
--beneficiary, and a durable --state-dir — without a persistent ledger a
client re-presents its last cumulative cheque after every restart and is
credited it again. Default is soft mode: meter, report, serve anyway, so the
overshoot rate can be measured against live traffic before anyone is refused.
--meter-hard turns on 402 enforcement. Credit lines are derived from the
batch's remaining on-chain value rather than asserted, which is what bounds
Sybil exposure.

Client side. Paying is opt-in and per lane. Without --chequebook nothing
signs and nothing spends: open and soft-metered lanes serve you exactly as
before, and hard-enforcing lanes are retired before the first dispatch instead
of burning a retry per chunk on a 401. With a chequebook configured, POSTs are
sized to live headroom in the credit line, debt carried across sessions is
settled, and dedup hits are billed at zero. --lane-pin URL,NODE,BENEFICIARY
pins a metered lane's identity; without a pin the first-seen quote is trusted
for the run (TOFU) with a warning.

New commands.

  • hoverfly chequebook deploy | fund | status — deploy a SWAP chequebook
    through bee's canonical SimpleSwapFactory, top it up, and read its
    on-chain state. Deliberately explicit: an upload will never deploy a
    contract for you because a lane quoted a price.
  • hoverfly cashout — redeem the cheques a metered relay accepted. Run it
    away from the relay box: cashChequeBeneficiary must be sent by the
    beneficiary, and that is the one key a relay is designed never to hold.

pusher.browserbzz.link is the first metered production lane. The three Render
lanes stay open.

Also in this release

  • fix(daemon): uploads hung forever when the client wanted no progress
    stream (#31).
  • ci(bench): stop re-discovering a peerlist the run just seeded (#32).

Compatibility

Open relays and unpaying clients are unchanged — metering is off unless
--meter is passed. The bump to 0.2.0 marks the size of the new surface;
this project does not promise semver before 1.0.

What's Changed

  • fix(daemon): upload hung forever whenever the client wanted no progress stream by @v1rtl in #31
  • ci(bench): stop re-discovering a peerlist we just seeded by @v1rtl in #32
  • Metered relay mode: pay a pusher for the bandwidth it spends on you by @v1rtl in #33

Full Changelog: v0.1.11...v0.2.0