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

Restore removal of old addresses #2244

Merged
merged 3 commits into from
Nov 21, 2023
Merged

Conversation

nazar-pc
Copy link
Member

I was supposed to restore it before merging #2242.
Restored version has filtering condition flipped (that was a bug in the old version that had to be corrected).

Code contributor checklist:

jfrank-summit
jfrank-summit previously approved these changes Nov 18, 2023
Copy link
Member

@jfrank-summit jfrank-summit left a comment

Choose a reason for hiding this comment

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

LGTM

@nazar-pc nazar-pc added this pull request to the merge queue Nov 18, 2023
@nazar-pc nazar-pc removed this pull request from the merge queue due to a manual request Nov 18, 2023
@nazar-pc
Copy link
Member Author

nazar-pc commented Nov 18, 2023

This PR is actually problematic and will be fixed once we upgrade to libp2p/rust-libp2p#4596
Here is an example:

Old addresses: ["/dns/bootstrap-0.gemini-3g.subspace.network/udp/30533/quic-v1", "/dns/bootstrap-0.gemini-3g.subspace.network/tcp/30533", "/dns/bootstrap-0.gemini-3g.subspace.network/udp/30533/quic-v1/p2p/12D3KooWQkJUqsc27Vx8Hvc9nSQzv2DezPxFKtozNKz61mVrB7f8"]
Identify addresses: ["/ip4/52.207.215.137/tcp/30533", "/ip4/52.207.215.137/udp/30533/quic-v1", "/ip4/172.19.0.2/tcp/30533", "/ip4/127.0.0.1/udp/30533/quic-v1", "/ip4/127.0.0.1/tcp/30533", "/ip4/172.19.0.2/udp/30533/quic-v1"]
Old addresses: ["/dns/bootstrap-1.gemini-3g.subspace.network/udp/30533/quic-v1", "/dns/bootstrap-1.gemini-3g.subspace.network/tcp/30533", "/dns/bootstrap-1.gemini-3g.subspace.network/udp/30533/quic-v1/p2p/12D3KooWPTtJXa8Pfx9NfTxQdLoatVGyidybfg5t3ASmD1F1aMzF"]
Identify addresses: ["/ip4/44.202.126.148/tcp/30533", "/ip4/172.18.0.2/udp/30533/quic-v1", "/ip4/44.202.126.148/udp/30533/quic-v1", "/ip4/127.0.0.1/udp/30533/quic-v1", "/ip4/172.18.0.2/tcp/30533", "/ip4/127.0.0.1/tcp/30533"]

Example above is a complete mess, identify doesn't return external addresses for some reason, some of the Kademlia addresses are with and some without /p2p/ID.

@jfrank-summit jfrank-summit dismissed their stale review November 18, 2023 17:35

requires libp2p upgrade

@nazar-pc
Copy link
Member Author

Checking strings is not the most efficient solution, but it is the most compact and shouldn't be a huge bottleneck

@nazar-pc
Copy link
Member Author

multiformats/rust-multiaddr#105 once resolved will help to avoid dealing with strings

@nazar-pc nazar-pc added this pull request to the merge queue Nov 21, 2023
Merged via the queue into main with commit 85129f8 Nov 21, 2023
10 checks passed
@nazar-pc nazar-pc deleted the restore-removal-of-outdated-addresses branch November 21, 2023 10:52
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.

3 participants