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

[LibP2P] Distinguish between slice peers vs full node peers when requesting #1709

Closed
Djadih opened this issue May 6, 2024 · 2 comments
Closed
Assignees
Labels
libp2p Issues related to the libp2p refactor

Comments

@Djadih
Copy link
Contributor

Djadih commented May 6, 2024

mechanikalk — Today at 2:32 PM
If something is broadcast when it is created it will propagate with libp2p. That being said, if we get a request for a headerview we need to be able to fulfill it regardless of processing state.
DJ_ADI — Today at 2:39 PM
There shouldn't be a mismatch between the data a node is serving and what people ask of it. For example slice nodes don't subscribe to the blocks topic of slices they aren't running, so they shouldn't end up in those peerdbs and won't be requested for that data
mechanikalk — Today at 2:49 PM
But a full node will be interested in headers and serving headers
DJ_ADI — Today at 2:50 PM
Yes a full node subscribes to both headers and blocks, and publishes to both. A slice subscribes only to headers
But actually there is a potential wrinkle, which might explain the response timeouts in slice tests. The peerdb doesn't distinguish between data types. Peers who serve just headers are in the same db as those who serve both headers and blocks
mechanikalk — Today at 2:52 PM
They are different dbs
Oh peer db
Yes we need to change that

@Djadih Djadih self-assigned this May 6, 2024
@Djadih Djadih added this to the GoldAge Testnet milestone May 6, 2024
@Djadih
Copy link
Contributor Author

Djadih commented May 7, 2024

For slices:

  • Persistent connection with header providers
  • Slices need peers distributed across the network. eg 10 peers per context
  • 10 block producers for my context

For full node:

  • 10 block producers per context
  • 10 header providing peers for every context

@Djadih
Copy link
Contributor Author

Djadih commented May 7, 2024

  1. Slices provide their CID in the DHT
  2. Swap out location for full topic cid in peerdb
  3. Filter by cid when requesting peers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libp2p Issues related to the libp2p refactor
Projects
None yet
3 participants