codex-storage / codex-research

Codex durability engine research

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate priority queue for slots

markspanbroek opened this issue · comments

The sales module is responsible for selling storage by trying to fill slots in storage requests. The sales module now reacts to any storage request that matches availability and profit requirements. We should probably design for the sales module to have a priority queue of slots. When a new request comes in, then all its slots are added to the priority queue. And when a slot is in need of repair, it should also be added to the queue. This queue can then be sorted based on the profitability and risk associated with it. This can be calculated from slot properties such as timeout, dataset size, reward, collateral etc.

This was implemented at codex-storage/nim-codex#455