-
Notifications
You must be signed in to change notification settings - Fork 1.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
Suspicious looking enr["attnets"] bitfields in Topaz #5696
Comments
Thanks for opening the issue, we'll take a look! ❤️ |
@jrhea Thanks for opening this up, I will take a look at this today/tomorrow and hope to have a fix for this. I had some incorrect assumptions on how persistent or temporary assignments were supposed to be represented in our bitfield, which is why you see all the weird values in our subnet subscriptions. We were limiting ourselves to basically the max committtees per slot for that particular validator set. Although while I am fixing this, I know you opened an issue here: Should I still continue getting validators to subscribe from [5,63] ? Those subnets will be empty with 0 activity. It makes sense to make persistent subscriptions dynamic |
@nisdas ya good question about It's just a proposal at this point, but I think it would be good to weigh in with an opinion on that issue. I agree that it'd make sense persistent committees membership dynamic...of u have any tweaks or suggestions to the calc or logic definitely comment too. |
@jrhea This should be resolved now, however the change will take a while to propagate across the network as users will have to update their nodes. But you should start seeing the expected ENR bitfield. |
🐞 Bug Report
Description
I am noticing anomalies when inspecting subnet subscriptions stored in enr["attnets"].
The column labeled
enr_attnets
represent the bits in the attnets bitfield that == TRUE. I have yet to see a bit > 4 == TRUE for a peer with a fork-digest off071c66c
.We could potentially explain why many of them are in the range of 0 to 4 bc:
enr["attnets"]
field is including regular committee assignments + persistent committee assignment. (I requested spec clarification for this: Spec clarification: attnet ENR field updates ethereum/consensus-specs#1774)That being said, I would expect that random persistent committees would show up in the bitfield and we would see some values in the [5,63] range. Since I didn't see any...I looked at the code and (might) have an explanation.
Starting at SubscribeCommitteeSubnets():
prysm/beacon-chain/rpc/validator/attester.go
Line 183 in 5636cd3
-> cache.CommitteeIDs.AddAttesterCommiteeID(req.Slots[i], req.CommitteeIds[i])
prysm/beacon-chain/cache/committee_ids.go
Line 37 in 37cba66
If I call:
AddAttesterCommiteeID(0, 10)
, then I (think) thatAddAttesterCommiteeID(slot,committeeIds)
sets:0101
instead of0000 0000 0010
I might have an explanation for why the tests pass. In subnet_tests.go:
prysm/beacon-chain/p2p/subnets_test.go
Line 130 in f880fb4
we have
I believe this test passes bc earlier bit 1,2,3 were set here:
prysm/beacon-chain/p2p/subnets_test.go
Line 42 in f880fb4
and tested here:
prysm/beacon-chain/p2p/subnets_test.go
Line 109 in f880fb4
Disclaimer:
The text was updated successfully, but these errors were encountered: