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): remove HathorManager and P2PManager dependencies [part 7/11] #1142

Open
wants to merge 1 commit into
base: refactor/p2p/dependencies
Choose a base branch
from

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Oct 3, 2024

Depends on #1152

Motivation

Continuing with the multiprocess P2P refactors, this PR introduces the P2PManagerProtocol to abstract the existing ConnectionsManager. This will make it easier to perform IPC calls from individual connections (HathorProtocol instances) to the connections manager. It also removes the HathorManager dependency from HathorProtocol.

Acceptance Criteria

  • Implement P2PManagerProtocol.
  • Remove origin parameter from on_receive_peer (it's not used).
  • Remove ConnectionsManager from NetfilterContext and NetfilterFactory (it's not used).
  • Remove HathorManager from HathorProtocol.
  • Change HathorProtocol to receive a P2PManagerProtocol instead of a ConnectionsManager.
  • 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 3, 2024
@glevco glevco self-assigned this Oct 3, 2024
@glevco glevco force-pushed the refactor/p2p/remove-manager branch 3 times, most recently from ef30b40 to 4f6d4a7 Compare October 9, 2024 18:39
@glevco glevco force-pushed the refactor/p2p/remove-manager branch from 49b6c56 to 4f5686d Compare October 10, 2024 21:06
@glevco glevco changed the base branch from master to refactor/p2p/dependencies October 10, 2024 21:07
@glevco glevco force-pushed the refactor/p2p/remove-manager branch 2 times, most recently from f3497d2 to 2914d58 Compare October 10, 2024 21:21
@glevco glevco changed the title Refactor/p2p/remove manager refactor(p2p): remove HathorManager dependency Oct 10, 2024
@glevco glevco force-pushed the refactor/p2p/remove-manager branch 2 times, most recently from ea8619c to 1c7546d Compare October 10, 2024 22:10
@glevco glevco marked this pull request as ready for review October 10, 2024 22:21
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 65.30612% with 17 lines in your changes missing coverage. Please review.

Project coverage is 84.72%. Comparing base (1fff2ad) to head (bf1e568).

Files with missing lines Patch % Lines
hathor/p2p/dependencies/protocols.py 27.77% 0 Missing and 13 partials ⚠️
hathor/p2p/states/peer_id.py 25.00% 2 Missing and 1 partial ⚠️
hathor/p2p/states/ready.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           refactor/p2p/dependencies    #1142      +/-   ##
=============================================================
- Coverage                      84.85%   84.72%   -0.13%     
=============================================================
  Files                            320      320              
  Lines                          24462    24457       -5     
  Branches                        3709     3718       +9     
=============================================================
- Hits                           20757    20721      -36     
- Misses                          2990     3004      +14     
- Partials                         715      732      +17     

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

@glevco glevco changed the title refactor(p2p): remove HathorManager dependency refactor(p2p): remove HathorManager dependency [part 5/5] Oct 10, 2024
@glevco glevco force-pushed the refactor/p2p/dependencies branch from e5478b7 to d972adf Compare October 11, 2024 22:00
@glevco glevco force-pushed the refactor/p2p/remove-manager branch from 1c7546d to a484984 Compare October 14, 2024 04:03
@glevco glevco force-pushed the refactor/p2p/dependencies branch from d972adf to 747ae1c Compare October 15, 2024 14:58
@glevco glevco force-pushed the refactor/p2p/remove-manager branch from a484984 to 229d017 Compare October 15, 2024 14:58
@glevco glevco force-pushed the refactor/p2p/dependencies branch from 747ae1c to 729cdd4 Compare October 15, 2024 15:15
@glevco glevco force-pushed the refactor/p2p/remove-manager branch from 229d017 to 1d77698 Compare October 15, 2024 15:16
@glevco glevco changed the title refactor(p2p): remove HathorManager dependency [part 5/5] refactor(p2p): remove HathorManager dependency [part 5/7] Oct 15, 2024
@glevco glevco force-pushed the refactor/p2p/dependencies branch from 729cdd4 to 3aa3acd Compare October 15, 2024 20:16
@glevco glevco force-pushed the refactor/p2p/remove-manager branch 2 times, most recently from b204c2c to 2af3b11 Compare October 15, 2024 20:31
@glevco glevco changed the title refactor(p2p): remove HathorManager dependency [part 5/7] refactor(p2p): remove HathorManager dependency [part 5/8] Oct 15, 2024
@glevco glevco force-pushed the refactor/p2p/dependencies branch from 3aa3acd to 58f7e16 Compare October 22, 2024 21:40
@glevco glevco force-pushed the refactor/p2p/remove-manager branch from 854175c to a48a6ae Compare October 22, 2024 23:59
@glevco glevco changed the title refactor(p2p): remove HathorManager dependency [part 6/8] refactor(p2p): remove HathorManager dependency [part 7/8] Oct 23, 2024
@glevco glevco force-pushed the refactor/p2p/dependencies branch from 6e13bb7 to 0b86412 Compare October 23, 2024 00:44
@glevco glevco force-pushed the refactor/p2p/remove-manager branch from a48a6ae to dfec58a Compare October 23, 2024 00:49
@glevco glevco changed the title refactor(p2p): remove HathorManager dependency [part 7/8] refactor(p2p): remove HathorManager and P2PManager dependencies [part 7/8] Oct 23, 2024
@glevco glevco force-pushed the refactor/p2p/dependencies branch from 0b86412 to 81565b1 Compare October 23, 2024 04:00
@glevco glevco force-pushed the refactor/p2p/remove-manager branch 3 times, most recently from a2e3a0a to ef65374 Compare October 23, 2024 05:39
@glevco glevco changed the title refactor(p2p): remove HathorManager and P2PManager dependencies [part 7/8] refactor(p2p): remove HathorManager and P2PManager dependencies [part 8/8] Oct 23, 2024
@glevco glevco force-pushed the refactor/p2p/dependencies branch from 81565b1 to e7a4cf1 Compare October 23, 2024 16:30
@glevco glevco changed the title refactor(p2p): remove HathorManager and P2PManager dependencies [part 8/8] refactor(p2p): remove HathorManager and P2PManager dependencies [part 6/8] Oct 23, 2024
@glevco glevco force-pushed the refactor/p2p/dependencies branch 3 times, most recently from afffb92 to e0fb633 Compare October 23, 2024 17:22
@glevco glevco force-pushed the refactor/p2p/remove-manager branch 2 times, most recently from 10c2ec4 to b6b19b2 Compare October 23, 2024 17:47
@glevco glevco force-pushed the refactor/p2p/dependencies branch from e0fb633 to d12e8b0 Compare November 5, 2024 18:39
@glevco glevco force-pushed the refactor/p2p/remove-manager branch from b6b19b2 to 58633dc Compare November 5, 2024 18:51
@glevco glevco changed the title refactor(p2p): remove HathorManager and P2PManager dependencies [part 6/8] refactor(p2p): remove HathorManager and P2PManager dependencies [part 7/10] Nov 6, 2024
@glevco glevco force-pushed the refactor/p2p/dependencies branch from d12e8b0 to 8e22ef6 Compare November 6, 2024 15:28
@glevco glevco force-pushed the refactor/p2p/remove-manager branch from 58633dc to e9616e9 Compare November 6, 2024 15:29
@glevco glevco force-pushed the refactor/p2p/dependencies branch from 8e22ef6 to 56993b9 Compare November 7, 2024 01:58
@glevco glevco force-pushed the refactor/p2p/remove-manager branch from e9616e9 to 45ede7d Compare November 7, 2024 01:59
@glevco glevco changed the title refactor(p2p): remove HathorManager and P2PManager dependencies [part 7/10] refactor(p2p): remove HathorManager and P2PManager dependencies [part 7/11] Nov 7, 2024
@glevco glevco force-pushed the refactor/p2p/dependencies branch from 56993b9 to 1fff2ad Compare November 8, 2024 15:45
@glevco glevco force-pushed the refactor/p2p/remove-manager branch from 45ede7d to bf1e568 Compare November 8, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant