Conversation
Contributor
|
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.
|
bonedaddy
approved these changes
Jun 17, 2020
bonedaddy
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me, although I noticed that dag removal doesn't return a count like file removal does
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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