mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Get duties v2 ( gRPC) (#15273)
* adding in proto for getdutiesv2 * adding in GetDutiesV2 * updating changelog and mock * fixing tests * breaking up function into smaller functions for gocognit * reverting some changes so we can break it into a separate PR for validator client only * reverted too much adding mock change back in * removing reserved based on preston's feedback * adding duties tests back in * Update beacon-chain/rpc/prysm/v1alpha1/validator/duties.go Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com> * updating based on preston's feedback * updating build for new files * maybe there's some flake with how the state is used, trying with it moved * reverting config override * reverting all changes to get duties v1 based on preston's feedback * Update proto/prysm/v1alpha1/validator.proto Co-authored-by: Radosław Kapka <rkapka@wp.pl> * addressing partial feedback * adding small comment * reorganizing function based on feedback * removing unused field * adding some more unit tests * adding attribute for pubkeys to span * preston's feedback * fixing current to next * probably safer to register current period now * Update beacon-chain/core/helpers/beacon_committee.go Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com> * adding in preston's comment --------- Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com> Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
@@ -33,6 +33,11 @@ func (c *grpcValidatorClient) Duties(ctx context.Context, in *ethpb.DutiesReques
|
||||
return toValidatorDutiesContainer(dutiesResponse)
|
||||
}
|
||||
|
||||
func (c *grpcValidatorClient) DutiesV2(ctx context.Context, in *ethpb.DutiesRequest) (*ethpb.ValidatorDutiesContainer, error) {
|
||||
// TODO: update to v2 get duties in separate PR, used to satisfy interface
|
||||
return nil, errors.New("not implemented")
|
||||
}
|
||||
|
||||
func toValidatorDutiesContainer(dutiesResponse *ethpb.DutiesResponse) (*ethpb.ValidatorDutiesContainer, error) {
|
||||
currentDuties := make([]*ethpb.ValidatorDuty, len(dutiesResponse.CurrentEpochDuties))
|
||||
for i, cd := range dutiesResponse.CurrentEpochDuties {
|
||||
|
||||
Reference in New Issue
Block a user