linera-protocol icon indicating copy to clipboard operation
linera-protocol copied to clipboard

Implement a `QueueView` with buckets

Open MathieuDutSik opened this issue 1 year ago • 2 comments

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 avatar Jul 17 '24 12:07 MathieuDutSik

@MathieuDutSik Do we need a separate task for LogView?

ma2bd avatar Jul 17 '24 23:07 ma2bd

Yes, will create it.

MathieuDutSik avatar Jul 18 '24 07:07 MathieuDutSik