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

Feature Request: Contract file removal #9

Open
grigzy28 opened this issue Jul 27, 2019 · 4 comments
Open

Feature Request: Contract file removal #9

grigzy28 opened this issue Jul 27, 2019 · 4 comments
Assignees

Comments

@grigzy28
Copy link

Removal of the expired contracts files/links from the ~/.config/user/contracts-available(and enabled) directories that the user program determines has expired either when uploading or downloading.

@lukechampine
Copy link
Owner

Sounds good to me. We could rename like we do now with a _old suffix.

@lukechampine lukechampine self-assigned this Jul 28, 2019
@grigzy28
Copy link
Author

grigzy28 commented Aug 5, 2019

I have an idea of how this could be implemented. Using the contracts menu, along with the list/enabled/disabled commands, include an expired command so that it goes thru each non _old contract in the contracts-available folder and checks if it is still active by querying the siad for current block height and then renames/disables (if still linked in the enabled folder) thus removing it from the user contracts list. This would be an on-demand type of action requiring user control, possibly a precursor to an automated process of when doing it when uploading/downloading and you hadn't renewed the contract.

@lukechampine
Copy link
Owner

user contracts prune sounds good to me. Or maybe tidy, like go mod tidy.

This should be pretty easy to implement, and the code could be reused later if we want to do it automatically.

@vargrant
Copy link

I think that contract can be deleted in the case if 2 conditions is done:

  1. We have contracts more then we need. Some hosts was offile and we created new contracts. Offcose we need t have some user settings like how much data we want to store per month and how much data we need to upload/download
  2. Contract don't have a stored data at all or this contract have data which was already updated on other hosts and have minimal redunancy for this data was reached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants