optimism icon indicating copy to clipboard operation
optimism copied to clipboard

feat: op-node peer scoring

Open refcell opened this issue 2 years ago • 7 comments

Description

Fixes ENG-3245

  • Adds peer scoring to the op-node.
  • Adds metrics for op-node peer scoring.

For future prs:

  • Peer scoring flags
  • Peer scoring persistence

refcell avatar Jan 19 '23 22:01 refcell

⚠️ No Changeset found

Latest commit: 831f9f6298ab98f734d4e7a208f8464a565f13b6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jan 19 '23 22:01 changeset-bot[bot]

Not opposed to the comments being broken out into their own PR

tynes avatar Jan 19 '23 23:01 tynes

Not opposed to the comments being broken out into their own PR

Will do going forward - keeping for now as i'm still learning.

refcell avatar Jan 20 '23 01:01 refcell

Going to defer most review here to @protolambda and @trianglesphere as I'm not super familiar with the internals of libp2p and have other things that I need to prioritize

Good job with the documented code @refcell

tynes avatar Jan 23 '23 18:01 tynes

Hey @refcell! This PR has merge conflicts. Please fix them before continuing review.

mergify[bot] avatar Jan 23 '23 19:01 mergify[bot]

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Feb 10 '23 02:02 github-actions[bot]

Hey @refcell! This PR has merge conflicts. Please fix them before continuing review.

mergify[bot] avatar Feb 20 '23 20:02 mergify[bot]

Semgrep found 9 todos_require_linear findings:

Please create a Linear ticket for this TODO.

Created by todos_require_linear.

semgrep-app[bot] avatar Mar 07 '23 19:03 semgrep-app[bot]

Codecov Report

Merging #4743 (831f9f6) into develop (962ac1d) will decrease coverage by 4.30%. The diff coverage is 26.40%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4743      +/-   ##
===========================================
- Coverage    40.51%   36.22%   -4.30%     
===========================================
  Files          288      207      -81     
  Lines        20119    17224    -2895     
  Branches       602        0     -602     
===========================================
- Hits          8152     6240    -1912     
+ Misses       11346    10355     -991     
- Partials       621      629       +8     
Flag Coverage Δ
bedrock-go-tests 36.22% <26.40%> (-0.28%) :arrow_down:
contracts-tests ?
core-utils-tests ?
dtl-tests ?
fault-detector-tests ?
sdk-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
op-node/flags/p2p_flags.go 100.00% <ø> (ø)
op-node/metrics/metrics.go 1.33% <0.00%> (-0.05%) :arrow_down:
op-node/p2p/cli/load_config.go 0.00% <0.00%> (ø)
op-node/p2p/mocks/Peerstore.go 0.00% <0.00%> (ø)
op-node/p2p/prepared.go 0.00% <0.00%> (ø)
op-node/p2p/topic_params.go 0.00% <0.00%> (ø)
op-node/service.go 0.00% <0.00%> (ø)
op-node/sources/batching.go 85.56% <ø> (+2.91%) :arrow_up:
op-node/p2p/mocks/ConnectionGater.go 5.16% <5.16%> (ø)
op-node/p2p/rpc_server.go 71.42% <8.33%> (ø)
... and 9 more

... and 91 files with indirect coverage changes

codecov[bot] avatar Mar 10 '23 00:03 codecov[bot]

This PR has been added to the merge queue, and will be merged soon.

mergify[bot] avatar Mar 11 '23 01:03 mergify[bot]

This PR is next in line to be merged, and will be merged as soon as checks pass.

mergify[bot] avatar Mar 11 '23 01:03 mergify[bot]