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: Add extended peer store to store scores #5746

Merged
merged 4 commits into from
May 22, 2023

Conversation

ajsutton
Copy link
Contributor

Description

Starts building an extended peer store that supports persisting peer scores. Not currently hooked up and lacking pruning of old entries, but defines the interface and has a sensible implementation for persisting scores.

Tests

Unit tests for persistence functions.

Invariants

Metadata

@ajsutton ajsutton requested a review from a team as a code owner May 19, 2023 05:14
@ajsutton ajsutton requested a review from protolambda May 19, 2023 05:14
@changeset-bot
Copy link

changeset-bot bot commented May 19, 2023

⚠️ No Changeset found

Latest commit: 5a27405

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 19, 2023

Deploy Preview for opstack-docs canceled.

Name Link
🔨 Latest commit 5a27405
🔍 Latest deploy log https://app.netlify.com/sites/opstack-docs/deploys/646b8e6e4f7fba0008550f84

@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #5746 (5a27405) into develop (00cedf5) will increase coverage by 0.06%.
The diff coverage is 64.28%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5746      +/-   ##
===========================================
+ Coverage    42.01%   42.07%   +0.06%     
===========================================
  Files          448      451       +3     
  Lines        29147    29231      +84     
  Branches       877      877              
===========================================
+ Hits         12246    12300      +54     
- Misses       15956    15977      +21     
- Partials       945      954       +9     
Flag Coverage Δ
bedrock-go-tests 39.38% <64.28%> (+0.08%) ⬆️
common-ts-tests 26.82% <ø> (ø)
contracts-bedrock-tests 53.40% <ø> (ø)
contracts-tests 98.86% <ø> (ø)
core-utils-tests 60.41% <ø> (ø)
dtl-tests 47.15% <ø> (ø)
fault-detector-tests 29.33% <ø> (ø)
sdk-tests 39.54% <ø> (ø)

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

Impacted Files Coverage Δ
op-node/p2p/store/extended.go 57.14% <57.14%> (ø)
op-node/p2p/store/serialize.go 60.00% <60.00%> (ø)
op-node/p2p/store/scorebook.go 67.27% <67.27%> (ø)

... and 2 files with indirect coverage changes

op-node/p2p/store/scorebook.go Outdated Show resolved Hide resolved
op-node/p2p/store/serialize_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@protolambda protolambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to change it to bytes.Buffer so we can merge this PR without delay and without buffer-pool risk, and can maybe land more of the work that you stacked on top. We can always optimize it in a follow-up PR.

op-node/p2p/store/serialize.go Outdated Show resolved Hide resolved
@OptimismBot OptimismBot merged commit 7dea0cf into develop May 22, 2023
12 checks passed
@OptimismBot OptimismBot deleted the aj/ps-extend-peerstore branch May 22, 2023 16:22
@mergify
Copy link
Contributor

mergify bot commented May 22, 2023

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

@mergify
Copy link
Contributor

mergify bot commented May 22, 2023

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

@mergify mergify bot removed the on-merge-train label May 22, 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