-
Notifications
You must be signed in to change notification settings - Fork 492
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
Implemented New REST interfaces #3099
Implemented New REST interfaces #3099
Conversation
Codecov Report
@@ Coverage Diff @@
## feature/partkey #3099 +/- ##
===================================================
- Coverage 44.01% 43.95% -0.06%
===================================================
Files 394 394
Lines 87341 87463 +122
===================================================
+ Hits 38443 38445 +2
- Misses 42812 42930 +118
- Partials 6086 6088 +2
Continue to review full report at Codecov.
|
Resolves #2656 Implemented Handlers and e2e test for Participation ID REST: GET (Both specific and list of all installed) POST (Aka install) DELETE
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, left some initial feedback
// TODO add this | ||
"VoteID": crypto.OneTimeSignatureVerifier{}, | ||
// TODO add this | ||
"SelectionID": crypto.VRFVerifier{}, |
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.
@@ -0,0 +1,49 @@ | |||
#!/usr/bin/env bash |
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.
Other than a few nits, this test looks really nice. This is going to be a nice template for when the storage changes and we get new error cases to check for.
@@ -894,6 +920,11 @@ func (node *AlgorandFullNode) InstallParticipationKey(partKeyBinary *[]byte) (ac | |||
// Tell the AccountManager about the Participation (dupes don't matter) so we ignore the return value | |||
_ = node.accountManager.AddParticipation(partkey) |
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.
On closer inspection, AddParticipation
returns a bool not an error.:
// The return value indicates if the key has been added (true) or
// if this is a duplicate key (false).
The code would currently overwrite the duplicate key, I think that's probably fine. In the future when we stop writing the file to begin with, it would just be a no-op.
# $5 - expected HTTP status code to check | ||
# $6 - match result | ||
# $7... - substring(s) that should be in the response | ||
function verify { |
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.
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.
Looks great, thanks for the changes
Resolves #2656
Implemented Handlers and e2e test for Participation ID REST:
GET (Both specific and list of all installed)
POST (Aka install)
DELETE
Summary
Test Plan