Expand description
SingleNodePayment construction, on-chain payment, and verification.
SingleNode payment strategy.
- Client gets
CLOSE_GROUP_SIZEquotes from network - Sort by price and select median (index
CLOSE_GROUP_SIZE / 2) - Pay ONLY the median-priced node with 3x the quoted amount
- Other nodes get
Amount::ZERO - All are submitted for payment and verification
Total cost is the same as Standard mode (3x), but with one actual payment. This saves gas fees while maintaining the same total payment amount.
pay and verify are co-located on purpose: the same crate must
own both sides of the protocol so the client and node cannot drift.
Structsยง
- Quote
Payment Info - Information about a single quote payment
- Single
Node Payment - Single node payment structure for a chunk.