-
Notifications
You must be signed in to change notification settings - Fork 25
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
Used Contracts #603
Used Contracts #603
Conversation
Was going to add a commit that improves edit: added it anyway, was almost done and took diff. approach |
6a716ef
to
6c1070e
Compare
worker/worker.go
Outdated
} | ||
used[ss.Host] = fcid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait why is that? Can't you directly pass used
to UpdateSlab
instead of looping over slab.Shards
again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no you can't because it'll only contain the used contracts for the migrated shards, I updated the code though so migrateSlab
takes care of that for you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok in that case can we rename Migrate
to UploadShards
? It was quite confusing to me that in one place we call Migrate
and are able to return used
without modification and in another we call migrateSlabs
and we still have to merge the maps.
Only to realise that Migrate
isn't actually migrating but only uploading.
This PR updates the upload manager to return a set of used contracts. This avoids looping the sectors after calling upload/migrate and build it manually, but it also makes sure the contracts contain potential renewals.