Skip to content

Commit a0b230a

Browse files
committed
address comments
1 parent 7e990b1 commit a0b230a

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

.changeset/add_rhp4_pool_rpc_handlers_and_renter_helpers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ default: major
66

77
Hosts can now back accounts with shared balance pools so renters don't need to pre-fund and continually rebalance every account. A renter funds a pool once and attaches as many accounts as they want; debits drain the account's own balance first and fall through to attached pools, which keeps per-account allowances small and reduces the total capital sitting idle in account balances. This is the host-side companion to the new RHP4 pool RPCs.
88

9-
Extends the RHP4 `Contractor` interface with `PoolBalances`, `CreditPoolsWithContract`, `AttachPools`, and `DetachPools` (existing implementations must be updated). Adds host-side handlers for the new pool RPCs and renter-side helpers `RPCFundPools`, `RPCReplenishPools`, `RPCAttachPools`, and `RPCDetachPools`. `DebitAccount` semantics are extended to drain the account's own balance first, then attached pools in attachment order.
9+
Extends the RHP4 `Contractor` interface with `PoolBalances`, `CreditPoolsWithContract`, `AttachPools`, and `DetachPools` (existing implementations must be updated). Adds host-side handlers for the new pool RPCs and renter-side helpers `RPCReplenishPools`, `RPCAttachPools`, and `RPCDetachPools`. `DebitAccount` semantics are extended to drain the account's own balance first, then attached pools in attachment order.

rhp/v4/rpc.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ var (
3636
// ProtocolVersion502 fixed hosts performing invalid MaxCollateral
3737
// validation on partial rollover refreshes.
3838
ProtocolVersion502 = rhp4.ProtocolVersion{5, 0, 2}
39+
40+
// ProtocolVersion510 added RHP account pools.
41+
ProtocolVersion510 = rhp4.ProtocolVersion{5, 1, 0}
3942
)
4043

4144
var (

rhp/v4/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"lukechampine.com/frand"
2020
)
2121

22-
var protocolVersion = ProtocolVersion502
22+
var protocolVersion = ProtocolVersion510
2323

2424
type (
2525
// A TransportMux is a generic multiplexer for incoming streams.

0 commit comments

Comments
 (0)