-
Notifications
You must be signed in to change notification settings - Fork 1
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
add reference id for idempotent refence counter operations #100
base: master
Are you sure you want to change the base?
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
Codecov Report
@@ Coverage Diff @@
## master #100 +/- ##
==========================================
- Coverage 72.60% 70.12% -2.47%
==========================================
Files 9 9
Lines 405 338 -67
==========================================
- Hits 294 237 -57
+ Misses 84 74 -10
Partials 27 27
Continue to review full report at Codecov.
|
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.
Looks good to me, although I noticed that dag removal doesn't return a count like file removal does
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.
looks good
I have read the CLA Document and I hereby sign the CLA |
WIP (not stable until one stable server-side and client-side implementation)
The basic design for the protocol, server and client sides to be implemented.
When operating on a reference-counted block store, exact once operation is required to keep the count correct. Although exact once operation is trivial when down locally, it is impossible to guaranty over an unreliable network.
This is worked around by adding a nonce (reference id) to each add operation that can only be removed by calling remove on the same nonce. Not only does this make the operations idempotent (we can safely retry the same operation), it can also prevent users from removing other's user's adds.
For example, the s3x client can implement this nonce by
hash(client private key | server public key | bucket name | object name)
. The use of the private key prevents attackers from guessing the hash (and server key prevents cross-server attacks), while bucket and object names allow repeated counts on the same content. Everything is also generated statically so nothing extra needs to be saved for deletion.Problems