## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

- Auto
- Light
- Dark

# Algorand Specifications

An adaptive algorithm computes the _dynamic filter timeout_ (i.e., the timeout to
trigger a call to SoftVoteSoftVote).

In regular conditions, the _filtering timeout_ TSoftVoteTSoftVote tends to the minimum
λ0minλ0min.

Whenever network conditions force the round advancement to stall, TSoftVoteTSoftVote
will diverge towards the maximum of λ0maxλ0max.

> See the formal definition of the filtering timeout parameters in the [ABFT normative section](https://specs.algorand.co/abft/abft-parameters).

Let CC be a circular array of size |C|,
whose elements are rounds’ _minimum credential arrival time_, defined as the time
(elapsed since the start of r) at which the highest priority _proposal vote_
was observed for that round.

> See the formal definition of the lowest credential priority function in the
> [ABFT normative section](https://specs.algorand.co/abft/abft-player-state#special-values).

We now define the _credential round lag_, as:

δlag=min{⌊2λλ0min⌋,8} to be the rounds’ lookback[1](https://specs.algorand.co/abft/non-normative/abft-nn-dynamic-filter-timeout#footnote-1) for CC.

The node tracks in CC the minimum credential arrival time
for a certain number of rounds before r−δlag.

Every time a round r is “successfully” completed[2](https://specs.algorand.co/abft/non-normative/abft-nn-dynamic-filter-timeout#footnote-2), the node looks up
the arrival time of the relevant credential for the round r−δlag, and
pushes it into CC. If the circular array is full, the oldest
entry is deleted).

It is worth noting that only rounds completed in the first attempt (p=0)
are considered and relevant for CC. If the round is completed
in later periods (p>0), that round is skipped and CC
remains unchanged.

> Important
>
> **IMPLEMENTATION:**
>
> Update credential arrival history [reference implementation](https://github.com/algorand/go-algorand/blob/df0613a04432494d0f437433dd1efd02481db838/agreement/player.go#L293).

When computing the dynamic filter timeout, if a sufficient history of credentials
is available (i.e., the node stored |C| past credential
arrival times), the array holding this history is _sorted_ in ascending order.

Then i∗-th element is selected as the _filtering timeout_ value[3](https://specs.algorand.co/abft/non-normative/abft-nn-dynamic-filter-timeout#footnote-3).

Finally, a Tϵ extra time is added to the selected entry,
for the final filter timeout to be returned as

TSoftVote=C[i∗]+Tϵ

Note that the filter timeout λ0min≤TSoftVote≤λ0max is
clamped on the minimum and maximum bounds defined in the [ABFT normative section](https://specs.algorand.co/abft/abft-parameters).

| NAME | VALUE (seconds) | DESCRIPTION |
| --- | --- | --- |
| |C| | 4040 | Size of the credential arrival time history circular array CC. |
| i∗ | 3737 | Entry of the (sorted) array CC. Set to represent the 95th percentile (according to |C|). |
| Tϵ | 0.05 | Filter extra time, atop the one calculated from CC. |

1. With current values for λ and λ0min, δlag=2. [↩](https://specs.algorand.co/abft/non-normative/abft-nn-dynamic-filter-timeout#fr-1-1)

2. A round is “successfully” completed if a _certification bundle_ is observed
and the proposal is already available, or if the proposal for an already present
_certification bundle_ is received. [↩](https://specs.algorand.co/abft/non-normative/abft-nn-dynamic-filter-timeout#fr-2-1)

3. With the current parametrization, this corresponds to the 95th percentile of
the accumulated arrival times history. [↩](https://specs.algorand.co/abft/non-normative/abft-nn-dynamic-filter-timeout#fr-3-1)
