Skip to content

refactor(p2p): refactor peer address handling [part 1/10] #1173

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

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Nov 6, 2024

Motivation

As part of the P2P Multiprocess project, this PR implements refactors to improve the way we handle peer addresses.

Acceptance Criteria

  • Remove unused WarningFlags.NO_PEER_ID_URL.
  • Improve FakeConnection and HathorStringTransport so they support real addresses.
  • Improve FakeConnection so it actually calls ConnectionsManager.connect_to to make a connection, instead of just manually creating a connection that was not properly started by that method.
  • Introduce new PeerAddress dataclass and rename Entrypoint dataclass to PeerEndpoint, which is now composed by the new PeerAddress and a PeerId.
  • Change PeerInfo.entrypoints to a list of PeerAddress instead of PeerEndpoint.

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 Nov 6, 2024
@glevco glevco self-assigned this Nov 6, 2024
@glevco glevco marked this pull request as ready for review November 6, 2024 14:53
Copy link

github-actions bot commented Nov 6, 2024

🐰 Bencher Report

Branchrefactor/p2p/peer-address-handling
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Lower Boundary
nanoseconds (ns)
(Limit %)
Upper Boundary
nanoseconds (ns)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚷 view threshold
101,436,141,142.24
(-0.36%)
91,619,769,898.77
(90.32%)
111,979,718,765.16
(90.58%)
🐰 View full continuous benchmarking report in Bencher

@glevco glevco changed the title refactor(p2p): refactor peer address handling refactor(p2p): refactor peer address handling [part 1/8] Nov 6, 2024
@glevco glevco changed the title refactor(p2p): refactor peer address handling [part 1/8] refactor(p2p): refactor peer address handling [part 1/10] Nov 6, 2024
@jansegre jansegre merged commit 487e731 into master Nov 7, 2024
9 checks passed
@jansegre jansegre deleted the refactor/p2p/peer-address-handling branch November 7, 2024 14:41
@glevco glevco restored the refactor/p2p/peer-address-handling branch November 7, 2024 14:48
@glevco glevco deleted the refactor/p2p/peer-address-handling branch November 7, 2024 14:48
@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