nucypher / nucypher-porter

Gateway to TACo nodes of the threshold network
GNU Affero General Public License v3.0
2 stars 8 forks source link

Bucket sampling on Porter #61

Closed cygnusv closed 9 months ago

cygnusv commented 9 months ago

Type of PR:

Required reviews:

What this does: Adds a /bucket_sampling endpoint, similar to /get_ursulas, but satisfying the staking provider caps defined in https://github.com/nucypher/nucypher/issues/3269. Additionally, allows the requester to pass their own random_seed in case they want to make the process reproducible (although there's a small potential variation since current uptime also affects node selection).

Issues fixed/closed: Related to https://github.com/nucypher/nucypher/issues/3269

Why it's needed: This PR ensures adopters have a mechanism available that disallows DKG cohorts are impacted by potential centralization forces when sampling.

Notes for reviewers: Code is very similar to /get_ursulas, but with the appropriate changes to satisfy buckets caps.