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 5 quotes from network (CLOSE_GROUP_SIZE)
  • Sort by price and select median (index 2)
  • Pay ONLY the median-priced node with 3x the quoted amount
  • Other 4 nodes get Amount::ZERO
  • All 5 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.

Constants§

REQUIRED_QUOTES
Required number of quotes for SingleNode payment (matches CLOSE_GROUP_SIZE)