-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
HTTP validator API: beacon and account endpoints #13191
Conversation
…ts on validator client
a15298c
to
34c6f62
Compare
|
||
forward_RemoteSigner_Sign_0 = runtime.ForwardResponseMessage | ||
) | ||
package ignore |
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.
Can this file be deleted?
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.
hmm i'm not totally sure, we have a few other ones that are like this as well.
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.
🔥 delete it 🔥
Where did it come from? If running the pb update script put it here, then leave it, I guess. We don't want to manually undo things that the scripts are doing. If anything, we would want to understand why this is getting put here then fix it at the root of the 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.
This is an excellent piece of work! Very comprehensive PR and the diff was very easy to read. Nice job on getting this one completed
httputil.HandleError(w, "Prysm Wallet not initialized. Please create a new wallet.", http.StatusServiceUnavailable) | ||
return | ||
} | ||
pageSize := r.URL.Query().Get("page_size") |
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.
No need to do this in this PR, but one easier way to make this function more testable is to have the beginning parse out all the stuff from the URL queries and request into some pure Go struct and then have an inner function that takes in all that validated data. This way, you can write your tests using more pure business logic instead of having to mock requests and urls, and separate test out the validation of inputs
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
|
||
// Handler serves web requests from the bundled site data. | ||
// DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork. |
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.
Probably want to leave this deprecation?
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 can add it back
// List of 48 byte, BLS12-381 validating public keys. | ||
repeated bytes validating_public_keys = 2; | ||
} | ||
|
||
// SignRequest is a message type used by a keymanager | ||
// as part of Prysm's accounts v2 implementation. | ||
message SignRequest { |
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 looks like you can also delete SignRequest
and SignResponse
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 still used in the code right now even though the remote is not. you can do a search on the type
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 -- Tested the web UI locally on this branch. Checked that the UI loads, displays some information about my test validators. I did not check many functions of the UI
What type of PR is this?
Other
What does this PR do? Why is it needed?
migrates web endpoints from gRPC to REST validator.
auth endpoint
/v2/validator/initialize
GETvalidator endpoints
/v2/validator/accounts
GET/v2/validator/accounts/backup
POST/v2/validator/accounts/voluntary-exit
POSTbeacon endpoints
/v2/validator/beacon/status
GETGET removed/v2/validator/beacon/participation
/v2/validator/beacon/summary
GET/v2/validator/beacon/validators
GET/v2/validator/beacon/balances
GETGET removed/v2/validator/beacon/queue
/v2/validator/beacon/peers
GETUpdates webui site_data to v2.0.5
Cleanup
Tested with updated web ui
Which issues(s) does this PR fix?
part of #13041
BLOCKED BY WEBUI RELEASE AND PR prysmaticlabs/prysm-web-ui#249Other notes for review