linera-protocol
linera-protocol copied to clipboard
Implement a `QueueView` with buckets
There are several QueueView being used in the chain code of linera.
This is suboptimal since that gets use several loops with loops like
while let Some(h) = self.queue.front().await? {
if h > height {
break;
}
self.queue.delete_front();
updates.push(h);
}
The solution to that problem is to use a QueView with buckets. This works well, since the size of the data in the QueueView used in the protocol is constant, so we can make efficient used of a QueueView with buckets.
@MathieuDutSik Do we need a separate task for LogView?
Yes, will create it.