Skip to main content

Module refusal_budget

Module refusal_budget 

Source
Expand description

Bound on chain writes caused by unauthenticated requests. Bound on chain writes caused by unauthenticated requests.

A request that fails verification (bad signature, unknown controller, replayed nonce, expired) comes from someone this node has not authenticated. Chaining every one would let any peer that can reach the listener grow the node’s chain without limit, so at most per_window such refusals are chained per window. The rest are counted, and the count rides on the next refusal that is chained (suppressed). Refusals of authenticated requests are always chained.

Structs§

RefusalBudget
Fixed-window budget.

Constants§

DEFAULT_PER_WINDOW
Default: chained verify refusals per window.
DEFAULT_WINDOW
Default window.