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

refactor(p2p): simplify factory [part 1/5] #1151

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Oct 9, 2024

Motivation

This PR contains some useful pre-refactors for the P2P Multiprocess project.

Acceptance Criteria

  • Remove unnecessary network parameter from multiple classes. They use settings.NETWORK_NAME instead.
  • Refactor p2p/factory.py, unifying client and server factories in a base class to simplify it.
  • Update typings in the traversal module so it can receive the more flexible VertexStorageProtocol instead of a TransactionStorage.
  • No changes in behavior.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco added the refactor label Oct 9, 2024
@glevco glevco self-assigned this Oct 9, 2024
@glevco glevco force-pushed the refactor/p2p/simplify-factory branch 5 times, most recently from 3967a8f to 48a4de4 Compare October 9, 2024 23:35
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.45%. Comparing base (6a4c562) to head (c85752d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1151      +/-   ##
==========================================
- Coverage   84.46%   84.45%   -0.02%     
==========================================
  Files         317      317              
  Lines       24389    24365      -24     
  Branches     3709     3708       -1     
==========================================
- Hits        20600    20577      -23     
+ Misses       3075     3074       -1     
  Partials      714      714              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glevco glevco marked this pull request as ready for review October 10, 2024 14:47
@glevco glevco changed the title refactor(p2p): simplify factory refactor(p2p): simplify factory [part 1/5] Oct 10, 2024
@glevco glevco force-pushed the refactor/p2p/simplify-factory branch from 48a4de4 to c85752d Compare October 14, 2024 15:09
Copy link

🐰 Bencher Report

Branchrefactor/p2p/simplify-factory
Testbedubuntu-22.04

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
sync-v2 (up to 20000 blocks)📈 view plot
⚠️ NO THRESHOLD
101,468,340,229.32
🐰 View full continuous benchmarking report in Bencher

@glevco glevco merged commit 9c1fe88 into master Oct 14, 2024
13 checks passed
@glevco glevco deleted the refactor/p2p/simplify-factory branch October 14, 2024 19:10
@jansegre jansegre mentioned this pull request Nov 21, 2024
2 tasks
@jansegre jansegre mentioned this pull request Dec 11, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants