Skip to content
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

Address Review of v0.12 #6179

Merged
merged 20 commits into from
Jun 9, 2020
Merged

Address Review of v0.12 #6179

merged 20 commits into from
Jun 9, 2020

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Jun 9, 2020

What type of PR is this?

Review Cleanup

What does this PR do? Why is it needed?

Fixes some issues from review of #5614

  • Refactor broadcaster to use the same method for message broadcasting.
  • Properly annotate errors for attester rpc methods
  • Clean up comments.

Which issues(s) does this PR fix?

N.A

Other notes for review

N.A

@nisdas nisdas requested a review from a team as a code owner June 9, 2020 07:35
@nisdas nisdas requested review from farazdagi, shayzluf and prestonvanloon and removed request for a team June 9, 2020 07:35
@@ -211,19 +217,22 @@ func (vs *Server) SubscribeCommitteeSubnets(ctx context.Context, req *ethpb.Comm
return uint64(len(vals)), nil
}

// run first request
// request the head validator indices of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the comments formatted like this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok changed

beacon-chain/rpc/validator/attester.go Outdated Show resolved Hide resolved
beacon-chain/rpc/validator/attester.go Outdated Show resolved Hide resolved
beacon-chain/rpc/validator/attester.go Outdated Show resolved Hide resolved
beacon-chain/rpc/validator/attester.go Outdated Show resolved Hide resolved
@@ -195,11 +198,14 @@ func (vs *Server) ProposeAttestation(ctx context.Context, att *ethpb.Attestation

// SubscribeCommitteeSubnets subscribes to the committee ID subnet given subscribe request.
func (vs *Server) SubscribeCommitteeSubnets(ctx context.Context, req *ethpb.CommitteeSubnetsSubscribeRequest) (*ptypes.Empty, error) {
ctx, span := trace.StartSpan(ctx, "AttesterServer.SubscribeCommitteeSubnets")
defer span.End()

if len(req.Slots) != len(req.CommitteeIds) && len(req.CommitteeIds) != len(req.IsAggregator) {
return nil, status.Error(codes.InvalidArgument, "request fields are not the same length")
}
if len(req.Slots) == 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happen during genesis when attesters request for slot 0?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

req.Slots will still have len 1 in this case

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes, i was thinking the actual slot number. my b!

@prestonvanloon prestonvanloon merged commit a75480d into v0.12 Jun 9, 2020
@delete-merged-branch delete-merged-branch bot deleted the v0.12Review branch June 9, 2020 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants