Skip to content
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

op-node: Use single option for peer scoring level #6001

Merged
merged 4 commits into from
Jun 15, 2023

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Jun 13, 2023

Description

Simplify the peer scoring configuration.

  • Use a single CLI option to set the strictness level rather than separate options for peer vs topics
  • Topic scores are now set as part of the top level peer score params rather than being replaced when joining the topic (also allows us to customise topic score params for different topics if we have multiple in the future)
  • Adds a ScoreParams wrapper object that can be nil in p2p.Config. This turned out to not be needed now since topic params have been folded into peer params, but will be useful again when application specific params are added for p2p sync. Aim here is that either all the params are set or none rather than having application specific score params set but scoring disabled.

Metadata

…p.scoring

We don't need the complexity of supporting independent scoring setups for general peer behaviour and per-topic behaviour.
Simplify loading code with a switch instead of needing to build a map.
@ajsutton ajsutton requested a review from a team as a code owner June 13, 2023 01:17
@ajsutton ajsutton requested review from tynes and removed request for a team June 13, 2023 01:17
@changeset-bot
Copy link

changeset-bot bot commented Jun 13, 2023

⚠️ No Changeset found

Latest commit: 7fff8f4

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.

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

@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Merging #6001 (b03d22e) into aj/optional-score-config (c24a96e) will increase coverage by 0.68%.
The diff coverage is 72.72%.

Additional details and impacted files

Impacted file tree graph

@@                     Coverage Diff                      @@
##           aj/optional-score-config    #6001      +/-   ##
============================================================
+ Coverage                     40.66%   41.35%   +0.68%     
============================================================
  Files                           319      434     +115     
  Lines                         26110    29552    +3442     
  Branches                          0      713     +713     
============================================================
+ Hits                          10617    12220    +1603     
- Misses                        14515    16309    +1794     
- Partials                        978     1023      +45     
Flag Coverage Δ
bedrock-go-tests 40.82% <72.72%> (+0.15%) ⬆️
common-ts-tests 26.82% <ø> (?)
contracts-bedrock-tests 54.22% <ø> (?)
contracts-tests 42.14% <ø> (?)
core-utils-tests 60.41% <ø> (?)
fault-detector-tests 29.51% <ø> (?)
sdk-tests 39.75% <ø> (?)

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/p2p/cli/load_config.go 0.00% <0.00%> (ø)
op-node/p2p/prepared.go 0.00% <ø> (ø)
op-node/service.go 9.92% <0.00%> (ø)
op-node/p2p/peer_params.go 91.52% <94.44%> (+2.84%) ⬆️
op-node/p2p/config.go 31.37% <100.00%> (+1.37%) ⬆️
op-node/p2p/gossip.go 38.10% <100.00%> (+0.45%) ⬆️
op-node/p2p/node.go 39.54% <100.00%> (ø)

... and 117 files with indirect coverage changes

Base automatically changed from aj/optional-score-config to develop June 13, 2023 13:42
@OptimismBot OptimismBot merged commit 95e31d3 into develop Jun 15, 2023
@OptimismBot OptimismBot deleted the aj/peer-scores-single-option branch June 15, 2023 10:50
@mergify
Copy link
Contributor

mergify bot commented Jun 15, 2023

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

@mergify
Copy link
Contributor

mergify bot commented Jun 15, 2023

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

@netlify
Copy link

netlify bot commented Jun 15, 2023

Deploy Preview for opstack-docs canceled.

Name Link
🔨 Latest commit 7fff8f4
🔍 Latest deploy log https://app.netlify.com/sites/opstack-docs/deploys/648aecf8a82231000819c4d0

@mergify mergify bot removed the on-merge-train label Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants