Skip to content

op-node: Remove peer scores once the retain period is reached#5792

Merged
OptimismBot merged 3 commits intodevelopfrom
aj/expire-scores
May 27, 2023
Merged

op-node: Remove peer scores once the retain period is reached#5792
OptimismBot merged 3 commits intodevelopfrom
aj/expire-scores

Conversation

@ajsutton
Copy link
Contributor

Description

Remove peer scores once the retain period is reached. This ensures that peers disconnected because their score dropped too low are able to connect again once the ban period expires. This also matches the score retention policy used by the gossip component where scores do not decay while the peer is connected, but are dropped entirely after the retention period expires.

Changes the base recordScore to act as if records have been pruned as soon as they are eligible rather than only if the GC has run.

Tests

Updated tests to cover this behaviour.

Metadata

Changes the base recordScore to act as if records have been pruned as soon as they are eligible rather than only if the GC has run.
@ajsutton ajsutton requested a review from a team as a code owner May 26, 2023 03:42
@ajsutton ajsutton requested a review from tynes May 26, 2023 03:42
@changeset-bot
Copy link

changeset-bot bot commented May 26, 2023

⚠️ No Changeset found

Latest commit: 3f808b4

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

@netlify
Copy link

netlify bot commented May 26, 2023

Deploy Preview for opstack-docs canceled.

Name Link
🔨 Latest commit 3f808b4
🔍 Latest deploy log https://app.netlify.com/sites/opstack-docs/deploys/647145ac0fa7710008aa566a

@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Merging #5792 (3f808b4) into develop (9b3cfbe) will decrease coverage by 2.54%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5792      +/-   ##
===========================================
- Coverage    42.28%   39.74%   -2.54%     
===========================================
  Files          464      306     -158     
  Lines        30078    25425    -4653     
  Branches       876        0     -876     
===========================================
- Hits         12717    10104    -2613     
+ Misses       16361    14368    -1993     
+ Partials      1000      953      -47     
Flag Coverage Δ
bedrock-go-tests 39.74% <100.00%> (+0.03%) ⬆️
common-ts-tests ?
contracts-bedrock-tests ?
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/p2p/host.go 60.46% <100.00%> (+0.23%) ⬆️
op-node/p2p/store/extended.go 60.00% <100.00%> (ø)
op-node/p2p/store/records_book.go 57.60% <100.00%> (+5.05%) ⬆️
op-node/p2p/store/scorebook.go 76.31% <100.00%> (ø)

... and 162 files with indirect coverage changes

@mergify
Copy link
Contributor

mergify bot commented May 26, 2023

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

@mergify
Copy link
Contributor

mergify bot commented May 26, 2023

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

1 similar comment
@mergify
Copy link
Contributor

mergify bot commented May 26, 2023

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

@OptimismBot OptimismBot merged commit 0624526 into develop May 27, 2023
@OptimismBot OptimismBot deleted the aj/expire-scores branch May 27, 2023 00:04
@mergify mergify bot removed the on-merge-train label May 27, 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.

3 participants