pub const CURRENT_SETTLEMENT_VERSION: u32 = 1;Expand description
Settlement rules this build pays and verifies under.
Separate from PROTOCOL_VERSION on purpose. That one tracks the wire:
what a peer can parse. This one tracks the money: how a client turns a
signed quote into an on-chain payment. The two move independently, and
conflating them is what made this constant necessary.
Version 1 is the ADR-0008 rule set: a merkle batch settles at
3 x median16(price) x 2^depth, matching the single-node path.
Bump this whenever a change makes an older client pay an amount storers will refuse. The multiplier moving, the median rule changing, the payable field being redefined: all of those. A change that only alters how much a node quotes does not qualify, because the client pays whatever it is quoted; a change to the arithmetic applied to that quote does.
ยงWhy this exists
ADR-0008 raised the merkle multiplier to 3x in client code and enforced it in node code, but changed no wire type. Nothing gated the two together, so clients built before the change kept collecting quotes, kept paying 1x, and had their uploads refused by every storer after the on-chain payment had already settled. The money was unrecoverable and the client had no idea why.
Carrying the version in the quote request lets a storer refuse to quote a client it knows cannot pay correctly, before that client spends anything.