-
Notifications
You must be signed in to change notification settings - Fork 792
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 missed blocks to monitored validators #4731
Add missed blocks to monitored validators #4731
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good! thanks for digging into this!
I've spammed a bunch of comments, hopefully they're helpful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the delayed review, again! There's lots of progress here, thank you.
I have some suggestions that I've implemented over at https://github.com/paulhauner/lighthouse/tree/4731-paul-2. They are:
- 86727: Add the
MissedBlock
struct which adds theparent_root
field which prevents us from ignoring a skipped slot in a forked-chain because we've already seen it in another chain (this is unlikely to be practically useful, but I added it for completeness). I also removed theepoch
field since we can determine that from theslot
. - 98400: a minor fix to comment formatting.
- 0f278: refactor the loops for detecting non-finalised skipped slots. I don't think the previous version was properly resetting the count for validators to 0 when they didn't have any skip slots detected.
- 5e216: fixes an off-by-one with pruning (use
>=
rather than>
). I also swapped the math fromX > Y - 1
toX + 1 > Y
because that works nicer with zero/zero-adjacentX
values. - 73924: Uses the existing
validator.id
string rather than allocating a new one. This isn't a big deal, just a nit. - c8ce8: removes the "non finalised" metrics. This might be a contentious change and I've kept it as a single commit so you can revert it if you like. I just couldn't think of a scenario where the count of non-finalised missed blocks would be useful when we're already tracking the combined count of finalised and non-finalised blocks in the other metric. I'm totally open to your feedback here.
If you agree to all the changes, feel free to just merge my branch in here.
Let me know what you think! I'm ready to merge if these changes are added 🚀
Hey Paul! The changes look 🚀 ! Thanks!
You are absolutely right, initially we were making the difference between non-finalized and finalized missed blocks which is not the case anymore so best removing it! |
I removed a couple of variables that were leftovers from the validator monitor refactor. I just ran the linter locally, should be all good CI side :) |
I forgot one variable in the tests, fixing it and re running the beacon_test locally as I am writing 🙏🏼 EDIT: fixed, all beacon_test tests green. |
Thanks for fixing the merge conflicts! We have a failing test now:
|
After debugging this issue this evening, I figured that the different fork names were making the test fail. We were having a vec of proposers_per_epoch in
that was different depending on the fork name. I was expecting the validator to miss the block to always be at the index 0 with the same value (i=7) where the validator index would be equal to As I was wondering why the value at the index 0 is different depending on the fork name - eg. 7 (pre-altair) and 2 (post-altair). I forgot to take into account that the I just ran fmt, lint and the whole test suite for the BN (including all fork names this time around) Again, thank you for your patience! 🙏🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Thank you for your patience too!
Let's get this merged! 🚀
bors r+ |
Hmm.. Bors doesn't seem to have detected that r+. I'll try again 🤞 bors r+ |
It seems that bors is down. Trying again to see if it's back yet. bors r+ |
Solving #3414
Will add Prom metrics + tests tomorrow