-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix partition location issue and refactoring #1977
Conversation
make it easy to use
It's not the challenge generation SC's responsibility to do this job, if it does, it should remove itself from all blobbers instead of just the selected one.
Rather than bind them on committing_connection SC, and unbind them when there's no data stored in the allocation, we connect them immediately when creating the allocation, and only unbind them when removing blobber from the allocation, or finalize/cancel the allocation. In this way, we can avoid the potential inconsistent state and avoid unnecessary add/remove operations.
## When new allocation - assert blobber allocation added - assert blobber total offer is initialized ## When update allocation - assert add blobber will add new blobber allocation - assert remove blobber will remove the blobber allocation - assert remove blobber and it's the last bound allocation, the blobber will be removed from challenge ready partition ## When receive commit connection SC - assert blobber is added to challenge ready partition ## When finalize allocation - assert the allocation is removed from all bound blobbers - assert blobber is removed from challenge ready if no allocation is bound to it
* staging: (134 commits) added docs added docs added docs Add authorizers total rewards Add validator's total rewards Add blobber total rewards Add sharders total rewards Add miners total rewards added docs fixed ambiguous field error returned struct{} skipped tests worked out comments worked out comments worked out comments Add default value to bucket_id Add bucket_id to upsert worked out comments updated dependency versions updated dependency versions upgraded lru cache ...
Codecov Report
@@ Coverage Diff @@
## staging #1977 +/- ##
===========================================
+ Coverage 26.26% 26.42% +0.15%
===========================================
Files 370 370
Lines 61353 61252 -101
===========================================
+ Hits 16117 16186 +69
+ Misses 43322 43142 -180
- Partials 1914 1924 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
lgtm
# Conflicts: # code/go/0chain.net/smartcontract/storagesc/challenge_test.go
Fixes
Changes
Need to be mentioned in CHANGELOG.md?
Tests
Tasks to complete before merging PR:
Associated PRs (Link as appropriate):