Skip to main content

MAX_COMMITMENT_RETRANSMISSIONS

Constant MAX_COMMITMENT_RETRANSMISSIONS 

Source
pub const MAX_COMMITMENT_RETRANSMISSIONS: u8 = 8;
Expand description

Retransmission requests the Entry answers for one SSA cycle.

A cycle’s commitment ships as hundreds of packets, and a single lost one strands the whole cycle (see SsaShareGenerator::recommit), so the Exit must be able to ask again for the pieces it never received. This bounds how often it may: one request can legally name every polynomial of the cycle, and an answer is the entire burst again, so an unbounded count is a packet amplification lever available to a peer that has already been served.

Eight, because the Exit re-asks on an idle timer rather than once. At the shipped Exit settings — a 3 s re-request interval inside a 20 s commitment deadline — a cycle can produce about six attempts, and a peer batching several SSAs per request produces proportionally more against a scaled deadline. The excess is simply refused: an unanswered request costs the Exit one packet and this node nothing, which is why the two sides are not required to agree on the figure.