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.
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
Implement feedback from integrating tDec flow #227
Implement feedback from integrating tDec flow #227
Changes from 3 commits
87e237f
4cb467a
c2acc61
f682eb2
1b2ae4e
e076f1d
78b3303
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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.
This data is currently relayed from porter?
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.
It's fetched from
Coordinator
contractThere 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.
👍🏻
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.
This can be hardcoded as
shares // 2 + 1
to match nucypher/nucypher (can be in another PR)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.
So we don't want to support tunable threshold any time soon? Taking notes for API design.
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.
Is this limiting the number of Ursulas that we send the decryption request to, to be only a threshold number?If so, we need a
threshold
to respond, but we should still send requests to more than the threshold, or else we are expecting no non-responsive Ursulas. Porter already takes care of ensuring a threshold number of responses.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.
Agreed - let's call that a robustness enhancement and track it in an issue.
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.
I see, I think I was thrown off by how Porter handles this. I can remove this reduction of participants in this PR.
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.
Porter can return both successes and errors in the response from
/cbd_decrypt
, soThere 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.
I only need to check for presence of any
errors
thenThere 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. Errors can be reported even if the overall operation was successful i.e. some Ursula's may fail while waiting for sufficient responses.
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.
So we'd only want to
throw
here if we didn't receive enough responses: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.
👍 - Correct.
With a message something like...
"Threshold of responses not met; CBD decryption failed with errors..."
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.
Would this fail if any ursula did not return an encrypted response...? i.e.assuming a threshold number of responses have been returned, we only care about the ursulas that responded.
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.
Yes. I agree that we only need
threshold
responses and then we can call it a day, but I wanted to throw this error here to highlight some possible but difficult-to-debug edge-case. It's possible thatencryptedResponses[ursula]
isundefined
and may result in some weirdness.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.
The issue here is that Porter only waits for a threshold number of responses, so some Ursulas may not have responded by the time Porter returns because the threhold was already met. So you likely will have Ursulas without responses, but that not be a problem.
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.
very nice
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.
(in another PR)
CbdTDecDecrypter
->ThresholdDecrypter
||Bob
|| something else?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.
Yes, suggestions for naming are welcome
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.
Agree! This is a major differentiating factor between the PRE-adapted-Tdec and the real one.
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.
@derekpierre - (wrt porter) what's the reason behind the nesting here? What other data can be inside
results
other than the values ofdecryption_results
?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.
To provide some consistency for Porter responses. All Porter requests PRE / CBD return as follows:
Where
result
could be anything. For example:We can definitely rethink it if it feels too redundant.