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

Support circuit relay v2, add tests #537

Merged
merged 13 commits into from
Dec 29, 2022
Merged

Support circuit relay v2, add tests #537

merged 13 commits into from
Dec 29, 2022

Conversation

Vahe1994
Copy link
Collaborator

@Vahe1994 Vahe1994 commented Dec 22, 2022

  • switched to p2pd version 0.3.16
  • added support for Circuit Relay V2 in all hivemind protocols
  • added an option no_listen=False for testing purposes (hivemind.p2p.p2p_daemon)
  • added a test that checks if a peer can connect to another peer through circuit relay

@justheuristic justheuristic changed the title Chaned to test version of checksum [WIP] support circuit relay v2, add tests Dec 22, 2022
@justheuristic
Copy link
Member

related: #536

@codecov
Copy link

codecov bot commented Dec 22, 2022

Codecov Report

Merging #537 (630b4e8) into master (e584bb5) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master     #537      +/-   ##
==========================================
- Coverage   76.00%   75.99%   -0.01%     
==========================================
  Files          81       81              
  Lines        7964     7966       +2     
==========================================
+ Hits         6053     6054       +1     
- Misses       1911     1912       +1     
Impacted Files Coverage Δ
hivemind/p2p/p2p_daemon.py 94.45% <50.00%> (-0.25%) ⬇️
hivemind/dht/node.py 90.99% <0.00%> (-1.19%) ⬇️
hivemind/dht/protocol.py 92.23% <0.00%> (-0.92%) ⬇️
hivemind/moe/server/server.py 44.26% <0.00%> (+0.54%) ⬆️
hivemind/dht/routing.py 94.11% <0.00%> (+0.58%) ⬆️
hivemind/moe/server/connection_handler.py 47.91% <0.00%> (+1.04%) ⬆️
hivemind/dht/dht.py 62.87% <0.00%> (+1.19%) ⬆️
hivemind/moe/server/runtime.py 70.00% <0.00%> (+1.66%) ⬆️

@justheuristic
Copy link
Member

note: failed docker push is not an urgent issue and can be resolved when we finalize this PR

tests/test_relays.py Outdated Show resolved Hide resolved
tests/test_relays.py Outdated Show resolved Hide resolved
tests/test_relays.py Outdated Show resolved Hide resolved
Copy link
Member

@justheuristic justheuristic left a comment

Choose a reason for hiding this comment

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

since we're testing, we might as well listen to localhost

@justheuristic justheuristic changed the title [WIP] support circuit relay v2, add tests support circuit relay v2, add tests Dec 29, 2022

dht_third_peer = hivemind.DHT(
initial_peers=initial_peers,
host_maddrs=["/ip4/0.0.0.0/tcp/0"],
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
host_maddrs=["/ip4/0.0.0.0/tcp/0"],
host_maddrs=[],

no_listen means no host_maddrs

Vahe1994 and others added 4 commits December 29, 2022 20:04
2. Added loop for relays
3. Changed relays parameters
2. Fixed autorelay test  sleep and correct order of dht peers and added more sleep time beetween peers
@Vahe1994 Vahe1994 marked this pull request as ready for review December 29, 2022 18:52
@Vahe1994 Vahe1994 changed the title support circuit relay v2, add tests Support circuit relay v2, add tests Dec 29, 2022
@Vahe1994 Vahe1994 merged commit 9d89a7b into master Dec 29, 2022
@Vahe1994 Vahe1994 deleted the relay_auto branch December 29, 2022 19:29
mryab pushed a commit that referenced this pull request Jan 7, 2023
- switched to p2pd version 0.3.16
- added support for Circuit Relay V2 in all hivemind protocols
- added an option no_listen=False for testing purposes (hivemind.p2p.p2p_daemon)
- added a test that checks if a peer can connect to another peer through circuit relay

Co-authored-by: justheuristic <[email protected]>
(cherry picked from commit 9d89a7b)
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.

2 participants