Repository navigation
Description
1 - openChannel(address provider, uint256 deposit, address voucherSigner)
Adds voucherSigner — the address the four settlement paths (withdraw, closeChannel, disputeChannel, cooperativeClose) verify vouchers against, instead of ch.client. ch.client stays the funder and refund destination.
- publishers can open channels on behalf of users to fund their downloads
- clients can create voucher-signing keys without moving money to smaller wallets, allowing parallel downloads without managing vouchers between multiple "in-use" channels
- drops thousands of remote signatures /
eth_calls when using a Safe as custody — voucher generation and validation stay fast (localecrecover), Safe stays cold as the funder
Details:
voucherSigner == address(0)defaults tomsg.sender(unchanged self-signing behaviour)- No
setVoucherSigner. Pinned at open, never mutable — immutability is the security property (repudiation-proofing: a mutable signer could retroactively void a voucher a node already earned). State the "no setter" explicitly, don't leave it implied by "immutable." ChannelOpenedmust emitvoucherSigner(indexed). The node builds channel state directly from this event — without the field it needs an extragetChannelRPC per channel. Structural, not cosmetic.channelIdderivation unchanged — stayskeccak256(client, provider, nonce), not keyed onvoucherSigner, so the funder still controls the nonce sequence and can predict IDs.cooperativeClosebecomes signable by the hotvoucherSigner. A compromised hot key can force-settle at the watermark — bounded, no funds redirect (refund still goes toch.client), but it's not zero authority, so say so.InterfaceFreeze.t.sol: this breaks the frozenopenChannelselector → deliberate re-freeze.
2 - closeChannel: drop the ch.claimedNonce == 0 guard on the existing voucher-less path
Lets a party close at the recorded watermark without presenting a voucher.
- today a publisher must request and store a user voucher to close a used channel; if lost or withheld, the channel is stuck until expiry — up to 90 days of capital lock-in
- safe: the watermark was already validated when set (
withdrawruns the same checks), and the counterparty keeps itsdisputeChannelratchet-up right during the dispute window. A voucher is still required only to raise the watermark.
3 - closeChannelWithoutVoucher(bytes32 channelId)
Convenience entrypoint / explicit signature to close at the recorded watermark without requiring or storing a voucher. Thin alias over the same shared close logic as (2); callable by client or provider.
InterfaceFreeze.t.sol: adds a new selector → additive baseline update.
4 - Node-side keying (Rust) — splits the payer/signer roles currently fused under state.client
ChannelStategainsvoucher_signer, hydrated from theChannelOpenedevent; verify vouchers against it inchannel.rs- move the signer checks to
voucher_signer: binding gate (dispatch.rs), anti-leech / pull gate (fill.rs) - keep the funder checks on
state.client— the trap: the three ADR-011 blacklist gates (dispatch.rs,window.rs,delivery.rs) refuse to serve any channel funded by a blacklisted address. A blanketstate.client → voucher_signerrename silently moves takedown enforcement onto the throwaway signing key and breaks compliance with no compiler/test error. - existing records hydrate
voucher_signer = client
(file references approximate — confirm against HEAD.)
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity