After #1619
The finality tracker keeps track of what N recent block authors think the highest finalized block height was ("opinions"). If the median slips too far in the past, a callback to other modules is made.
Currently, all the recent opinions are kept in two Vec<Number> of length N in storage. One is sorted by recency, and the other is sorted by block number. This is very inefficient and doesn't scale to large N -- where we would probably want N to be 1,000 to 10,000 or even higher.
One approach for this optimization is to select a smaller number K (~100?) and split up the recent opinions into a doubly-linked list of Vec<Number> with length 0..2K. When a sub-list reaches length 2K, it is split into two smaller lists of length K. A combination of binary and linear search can be used to find the correct place to insert into the block number set.