-
Notifications
You must be signed in to change notification settings - Fork 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
Add REST implementation for Validator's GetDuties
#11893
Add REST implementation for Validator's GetDuties
#11893
Conversation
…vignol/add-subscribe-committee-subnets-2
…vignol/add-subscribe-committee-subnets-2
…:prysmaticlabs/prysm into develop
…hub.com:PatriceVignola/prysm into develop
…vignol/add-get-duties
func (c beaconApiDutiesProvider) GetCommittees(ctx context.Context, epoch types.Epoch) ([]*apimiddleware.CommitteeJson, error) { | ||
committeeParams := url.Values{} | ||
committeeParams.Add("epoch", strconv.FormatUint(uint64(epoch), 10)) | ||
committeesRequest := buildURL("/eth/v1/beacon/states/head/committees", committeeParams) |
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 want to double check if using the head in this case is correct, the grpc one read a little differently.
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 way I understand it from the spec, the epoch
query parameter decides which epoch to query the committees for. The head
committees will only be fetches if epoch
isn't specified.
epoch | Fetch committees for the given epoch. If not present then the committees for the epoch of the state will be obtained. |
---|
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.
got it this makes sense.
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.
will wait for radek for a second approval.
What type of PR is this?
Feature
What does this PR do? Why is it needed?
It adds the
GetDuties
REST API endpoint for the validator.