Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove contract sets #1592

Open
ChrisSchinnerl opened this issue Sep 29, 2024 · 1 comment
Open

Remove contract sets #1592

ChrisSchinnerl opened this issue Sep 29, 2024 · 1 comment
Assignees
Milestone

Comments

@ChrisSchinnerl
Copy link
Member

ChrisSchinnerl commented Sep 29, 2024

One thing that we have had for a while without ever being particularly useful, is contract sets. We always thought about what they could be used for without having any need for them. Leading to over-engineered code, extra table joins and a more complicated API.
They are also very inconsistently used. e.g. downloads always use all contracts which makes sense too.

What we should do is add a column to the contracts table to indicate whether a contract is good for renewal. A contract that is good for renewal contributes positively to the health of a file and one that isn't causes the health to degrade.

If a contract becomes not good for renewal due to e.g. gouging and becomes good again afterwards it is fine to have more contracts than specified in the config. That will make sure temporary churn aborts unnecessary migration.

NOTE: this also means we should rename the Contracts setting to MinContracts to make it more clear that we no longer limit the number of contracts.

@ChrisSchinnerl ChrisSchinnerl converted this from a draft issue Sep 29, 2024
@ChrisSchinnerl ChrisSchinnerl moved this from Triage to Todo in Sia Sep 29, 2024
@ChrisSchinnerl ChrisSchinnerl added this to the v2.0.0 milestone Sep 29, 2024
@lukechampine
Copy link
Member

Yeah, the original vision was that you could have different sets tuned for different parameters (cost, latency, throughput, location) and seamlessly switch between them. In practice no one does this because it would be a pain. I agree we should simplify things by assuming a single contract set.

@peterjan peterjan self-assigned this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

3 participants