-
Notifications
You must be signed in to change notification settings - Fork 169
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
update validator subnet subscriptions and validator flow doc #68
Conversation
cc: @AgeManning for feedback |
cc @rolfyone for feedback if you are still implementing api 🙂 |
I think this is generally in line with what lighthouse currently does except that use a bool Pros: simple, especially when multiple vals in same committee |
Regarding |
Just to confirm you are also in favour of sending slot_signature and letting BN decide if it should verify ir or not? |
Sorry, yes (too early in the morning to string a coherent sentence together), those "steps" would be verify the signature, then do the math itself to see if the validator is an aggregator. It would still be beholden on the validator client to send the "best" signature for a given |
Hey guys, sorry a bit late to this, have not been across the new APIs. Just wanted to add some thoughts we had when implementing our first version of this API. When getting the attester duties, we send the modulo used in the The reason we went with
I'm not sure I understand this point. For us, all validators send subscriptions whether aggregators or not. They are of equal importance. Firstly, they give us a measure of how many active validators we have connected to the BN, so we know how many random subnets we should subscribe to (and add to our ENR) to form the backbone structure of the subnets. Secondly, non-aggregators still need to publish to a subnet, so the BN needs to know in advance to find peers for that subnet or ensure it has enough peers on that subnet to publish. |
Since new api has spec endpoint, it's probably best for VC to query spec when initializing to ensure they are on the same page as BN. |
Do vals from the VC that are in the same exact committee (slot/index) send multiple subscriptions for that same slot? |
In a non-trust relationship BN + many-VCs, I suspect (1) that there will be access control in a layer right outside of the API and (2) I suspect that such a BN is a super-full node and is going to be following all subnets and performing aggregation opportunistically anyway. In such a case, the |
For us yes. They could be in the same slot/index but one could be an aggregator and one not. |
This sounds like a proxy for sending an actual count of validators. At worst you'd end up receiving a list something like:
which is not only a waste of resources (especially if there is signature verification for each) but is counter-intuitive that this would have a different effect than sending a single I'm also curious as to how this would act if you had two separate validator clients attached to the same beacon node. Would the beacon node assume the sum of the number of subscriptions? And if so, how does it handle a re-org where each validator client would send a new list? If knowing the number of validators attached to a beacon node is important we should look at codifying this directly, rather than it being a side-effect of another call.
An aggregator is a superset of the functionality of a non-aggregator, is it not? If the beacon node receives |
Yep I agree with most of the points here. Our initial implementation was trying to use what was currently available in eth2-api's repo so that we wouldn't have too much trouble migrating to the proper standard. For this reason we didn't go off and implement new endpoints (such as a validator count) which would be handy, as you've pointed out. Also we have not considered multiple validator clients per beacon node (in great detail) or multiple beacon nodes per validator. I was hoping these cases would be thought out more thoroughly in the next iteration of the APIs. But as it stands, we would use the summation of the subscriptions.
Yes I think this is true. I may have to double check the implementation for any subtleties here, but I agree in principle we could just have a count for validators and then only send a subscription which favours aggregators over non-aggregators. EDIT: After looking over the implementation We track the validator index for each subscription. So we know which validators are connected/active. As a side note, doing this decouples the validator subscriptions from the long-lived gossipsub subscriptions. In our current implementation, as a validator if you want your attestations counted you need to |
Great stuff. So we should consider what such an endpoint would look like. It sounds like some sort of "validator check-in" endpoint, which would be run on startup of the validator client and on epoch change, would be what we're looking for. A count of the number of validators in each state would probably be useful, do we need anything beyond that? Does sending the index of each validator in a relevant state buy us anything? Should we identify the validator client sending the request somehow? |
updated to use |
Sorry, I was late to reply to this. Seems like its sorted. :) |
subscribeToBeaconCommitteeSubnet
toprepareBeaconCommitteeSubnet
. This is called regardless ofis_aggregator
to ensure that the BN has a signal to find peers of that particular subnet