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

Market LibP2P improvements #280

Merged
merged 6 commits into from
Oct 16, 2024
Merged

Market LibP2P improvements #280

merged 6 commits into from
Oct 16, 2024

Conversation

magik6k
Copy link
Collaborator

@magik6k magik6k commented Oct 15, 2024

  • Single libp2p per cluster, runs on one leader
  • Curio HTTP servers redirect / websocket connections to the leader libp2p endpoint
  • IPNI now uses a separate table to manage per-SP PeerIDs, never used in libp2p instances
    • Doesn't matter because Graphsync is not a thing anymore

Also moved around things in the config a little to have them more grouped (makes navigating the config UI much nicer)

@magik6k magik6k changed the title Feat/libp2p fixes Market LibP2P improvements Oct 15, 2024
@magik6k magik6k requested a review from LexLuthr October 16, 2024 09:09
Copy link
Contributor

@LexLuthr LexLuthr left a comment

Choose a reason for hiding this comment

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

Looks good!
I just have a couple of question:

  1. I am assuming that libp2p will not try to punch through the firewall in this case. Correct?
  2. Flow would be as below:
  • Listen on a random port for all IPs
  • Announce that you are running on HTTP announce address with wss
  • Update the same on chain
  • When a client tries to connect, they actually get connected to our HTTP server which redirect it to libp2p listen address. This libp2p tells clients that it is HTTP announce address and proceeds with the deal.

@magik6k
Copy link
Collaborator Author

magik6k commented Oct 16, 2024

  1. We basically never try to connect outside, and we assume that the http server is already accessible on the outside
  2. Yes, there is one libp2p node in the internal network that only really can accept connections from other internal nodes, then the HTTP server acts as a reverse proxy. The announce address we pass into libp2p is only used by the dht (which we don't use anyways) and maybe for autonat checks (which don't even matter and I'm not entirely sure if those are even enabled)

@magik6k magik6k merged commit d97e21d into feat/market Oct 16, 2024
14 checks passed
@magik6k magik6k deleted the feat/libp2p-fixes branch October 16, 2024 12:35
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