Skip to main content

Module single_node

Module single_node 

Source
Expand description

SingleNode payment mode implementation for ant-node.

This module implements the SingleNode payment strategy from autonomi:

  • Client gets CLOSE_GROUP_SIZE quotes 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.

Structsยง

QuotePaymentInfo
Information about a single quote payment
SingleNodePayment
Single node payment structure for a chunk.