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

Exp/libp2p #3996

Draft
wants to merge 28 commits into
base: 5.3-maintenance
Choose a base branch
from
Draft

Conversation

greymistcube
Copy link
Contributor

@greymistcube greymistcube commented Nov 25, 2024

Leaving it as a draft for future reference.
While working on this, I have run into several problems:

  • Related to dotnet-libp2p:
    • IRemotePeer.DialAsync<T>() is not properly cancellable. It is impossible to timeout with a CancellationToken.
    • The implementation of IServiceProvider uses several static variables to track services provided. Most notably, the instance of IProtocol is stored in a static HashSet<T>. A service of type T is retrieved only by its type, hence it is impossible to have several IServiceProviders for multiple ITransports for unit testing.
  • Related to libplanet:
    • The whole dotnet-libp2p stack is designed to have persistent connection between separate peers. That is, to continuously have a channel open with IRemotePeer obtained via ILocalPeer.DialAsync(). The issue may be with the underlying implementation of IServiceProvider on the dotnet-libp2p side, but regardless, parallel or subsequent calls to a same peer seem very unreliable.

@greymistcube greymistcube marked this pull request as draft November 28, 2024 03:59
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.

1 participant