gevulotnetwork / gevulot

Gevulot is an internet scale compute network for zero-knowledge proof generation and verification.
https://gevulot.com
Apache License 2.0
154 stars 48 forks source link

Use `BTreeSet` for CID allocations (instead of Vec) #159

Closed tuommaki closed 7 months ago

tuommaki commented 7 months ago

Using set for CID allocations provides better API.

There's also some slow behavior in releasing of existing CID, which can cause conflicts with random allocation. Therefore the CID allocation here uses sequential approach, jumping over already-reserved ones, so that probability of hitting a recently released CID is as low as possible.