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

NAT-traversal Tutorial for public access nodes #6

Open
HuYang719 opened this issue Jan 12, 2022 · 3 comments
Open

NAT-traversal Tutorial for public access nodes #6

HuYang719 opened this issue Jan 12, 2022 · 3 comments

Comments

@HuYang719
Copy link

Dear all,

When I follow up the NAT-traversal tutorial and use this script on both AWS instances (security group has been configured) and google colab:

from hivemind.p2p.p2p_daemon import P2P
import asyncio
import nest_asyncio
nest_asyncio.apply()
async def test():
    node = await P2P.create()
    print(await node._client.identify())

loop = asyncio.get_event_loop()
loop.run_until_complete(test())

I can only get information like this:

(<libp2p.peer.id.ID (QmcNoM62vZoExYZbwuQFBGrRuQkZnqQ8FWejBwNirZtt8p)>, (<Multiaddr /ip4/127.0.0.1/tcp/35651>,))

I am not sure why there does not have public information like udp/public-ip. Could you provide more details about public access node and how to get its printable information? Thanks!

@borzunov
Copy link
Member

Hi @HuYang719!

It seems that you're using the latest version of hivemind (1.0.0 or newer), while this tutorial was created for an old version (0.9.9.post1, the latest version at the time of releasing the paper). To make the tutorial work, please run pip install hivemind==0.9.9.post1

However, in general, using the latest version is a good idea, since we've significantly improved NAT traversal support there (but made some API changes). I'll create an updated version of the tutorial for your convenience soon :)

@HuYang719
Copy link
Author

Hi @borzunov, thanks! I reinstalled the old version and can get all information now! You save my whole day! Btw, looking forward to more updated tutorials and I love your project!

@borzunov
Copy link
Member

borzunov commented Jan 13, 2022

I've drafted the updated NAT traversal tutorial for the latest version of hivemind (1.0.0).

Later, I'll update the circuit relay tutorial too and integrate them into our main docs & tutorials page.

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

No branches or pull requests

2 participants