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

add POST /eth/v1/validator/sync_committee_subscriptions #136

Merged
merged 3 commits into from
Apr 29, 2021

Conversation

rolfyone
Copy link
Collaborator

@rolfyone rolfyone commented Apr 28, 2021

https://hackmd.io/@QYHAVYiHRg65pdI_CEm7Eg/syncommitteeapi#POST-ethv1validatorsync_committee_subscriptions

notable differences:

  • sync_committee_index became an array: sync_committee_indices, as multiple subnets per validator is possible.

  • is_aggregator is not really needed in this instance as far as we can tell, and potentially won't be known at the time of making the subscription.

  • added until_epoch so that the BN can unsubscribe based on this request.

https://hackmd.io/@QYHAVYiHRg65pdI_CEm7Eg/syncommitteeapi#POST-ethv1validatorsync_committee_subscriptions

notable differences:
 - using committee subnets to subscribe in the body, otherwise the VC needs to cache and recalculate more. also the subnets is an array so that multiple can be subscribed to per entry

 - is_aggregator is not really needed in this instance as far as we can tell, and potentially won't be known at the time of making the subscription.

 - added `until_epoch` so that the BN can unsubscribe based on this request.
@mpetrunic mpetrunic merged commit 06df9bf into ethereum:master Apr 29, 2021
@dapplion
Copy link
Collaborator

is_aggregator is not really needed in this instance as far as we can tell, and potentially won't be known at the time of making the subscription.

@rolfyone Could you explain in more detail why it's not needed?

@ajsutton
Copy link
Contributor

is_aggregator is not really needed in this instance as far as we can tell, and potentially won't be known at the time of making the subscription.

@rolfyone Could you explain in more detail why it's not needed?

The beacon node is required to subscribe to the subnet regardless of whether the validator is an aggregator or not, so there's no change in beacon node behaviour. That provides the stable backbone of peers on the subnet. Also given sync committee periods are 256 epochs long (might have even changed to 512?) a validator would have to sign 256*32 = 8192 slots to check if it was an aggregator and it almost always will be at some point during the sync committee period.

@dapplion
Copy link
Collaborator

@rolfyone until_epoch means until the start that epoch or the end of that epoch? Could you commit a clarification as a comment?

@rolfyone
Copy link
Collaborator Author

The intent was that you'd unsubscribe once that epoch was past, so if it's 'untilEpoch' 20, you unsubscribe at the first slot of 21.
#143
I'm not the biggest fan of that wording, but the PR is up.

@rolfyone rolfyone deleted the sync_committee_subscriptions branch May 13, 2021 05:36
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.

4 participants