-
Notifications
You must be signed in to change notification settings - Fork 922
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
Various code inspection resolutions #7438
Conversation
Tests failing... fixing |
Flaky test, passed on second run. |
Codecov Report
@@ Coverage Diff @@
## master #7438 +/- ##
==========================================
+ Coverage 60.43% 60.52% +0.09%
==========================================
Files 427 427
Lines 30654 30351 -303
==========================================
- Hits 18526 18371 -155
+ Misses 9100 8983 -117
+ Partials 3028 2997 -31 |
This is great stuff. My two cents:
GoLand complains that this might change semantics (example). Just making sure that you're aware of this. Please also take a look at comments from @nisdas in #6864 - some code was purposefully not removed even though it was unused. We better verify whether we still want to keep it. |
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.
I glanced through most and it looked good. Will be good to get another 👀 on this
@prestonvanloon this is collecting conflicts. |
Yeah, this is going to get nasty real fast with conflicts. If there is no concern over deleting unused code by EOD, then we should move forward on this PR |
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.
The PR looks good, although this is technically 'dead' code, capturing block propagation times is pretty useful from a metrics point of view. We just need to hook it up through our gossip validators.
@prestonvanloon
@@ -100,13 +96,6 @@ var ( | |||
Name: "beacon_reorg_total", | |||
Help: "Count the number of times beacon chain has a reorg", | |||
}) | |||
sentBlockPropagationHistogram = promauto.NewHistogram( |
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.
This is a pretty useful metric, can we continue using it ?
We just need to hook captureSentTimeMetric
for blocks received through gossip
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.
What you are looking for is block_arrival_latency_milliseconds
It's hooked up and used today (captureArrivalTimeMetric): https://github.com/prysmaticlabs/prysm/blob/master/beacon-chain/sync/validate_beacon_blocks.go#L100
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.
This PR will rot quickly. So, approving to have these changes merged.
The only important code that might be useful (as pointed out by Nishant) is block propagation metric, which can be restored at a later stage, should we need it.
NB: there were couple of minor issues reported by DS blocking the merging, so pushed an update to them too.
What type of PR is this?
Other
What does this PR do? Why is it needed?
In the spirit of improving code health, this PR resolves the following:
var s []stuff
overs := []stuff{}
)Which issues(s) does this PR fix?
N/A
Other notes for review
Normally I would break these up into smaller PRs, but there are so many that it would bog down our CI pipeline and review process.