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

Sometimes only peerId is passed to libp2p dialer #2027

Closed
EmiM opened this issue Nov 2, 2023 · 7 comments
Closed

Sometimes only peerId is passed to libp2p dialer #2027

EmiM opened this issue Nov 2, 2023 · 7 comments
Assignees
Labels
bug Something isn't working libp2p

Comments

@EmiM
Copy link
Contributor

EmiM commented Nov 2, 2023

I did not investigate it further but I noticed that when joining or reopening the app I can see that dialer receives only peerId instead of whole peer address:

connections-manager.service, payload peers: QmUUJEBNZaPb2xvfciWRKB421qdmTY7cg7xNVGNLEXcUUt
      at Socket.<anonymous> (src/utils.ts:149:15)
  console.log
    stdout:
    connections-manager.service before createLibp2pInstance [ 'QmUUJEBNZaPb2xvfciWRKB421qdmTY7cg7xNVGNLEXcUUt' ]
      at Socket.<anonymous> (src/utils.ts:149:15)
  console.log
    [e2e_534h3hm7rbk0]: 2023-11-02T12:07:46.777Z backend:Libp2pService Initializing libp2p for QmeXtiFNBQMyZ6KXnyiKHtF6HevBSQZu12Dbo2jfrcZ4nr, bootstrapping with 1 peers
      at Socket.<anonymous> (src/utils.ts:159:15)
  console.log
    [e2e_534h3hm7rbk0]: 2023-11-02T12:07:46.777Z backend:ProcessInChunks Processing 1 items
    2023-11-02T12:07:46.778Z backend:ProcessInChunks Processing QmUUJEBNZaPb2xvfciWRKB421qdmTY7cg7xNVGNLEXcUUt failed, message: multiaddr "QmUUJEBNZaPb2xvfciWRKB421qdmTY7cg7xNVGNLEXcUUt" must start with a "/"

It doesn't seem like a serious issue because libp2p eventually connects (maybe uses its internal addressBook, I don't know).

@EmiM EmiM added this to Quiet Nov 2, 2023
@EmiM EmiM converted this from a draft issue Nov 2, 2023
@EmiM EmiM moved this from Backlog - Desktop & Backend to Next Sprint in Quiet Nov 2, 2023
@EmiM EmiM added the bug Something isn't working label Nov 2, 2023
@holmesworcester
Copy link
Contributor

How much of a delay do we think this causes?

@holmesworcester
Copy link
Contributor

holmesworcester commented Nov 14, 2023

Note: we think this is already fixed in the branch with libp2p fixes for #2055

@holmesworcester holmesworcester moved this from Next Sprint to Blocked in Quiet Nov 14, 2023
@EmiM
Copy link
Contributor Author

EmiM commented Nov 17, 2023

How much of a delay do we think this causes?

I don't think it causes a delay because before dialing peer we convert peer address string to multiaddr and it immediately screams that the address is incorrect.
Although as I think about it more it could cause a delay - if we dial peers in chunks and part of the chunk is invalid then we really just dial a few peers at once (less then we could).

  • Why we have only peers in the list of addresses? (error explanation)

During nest(?) refactoring saving peer stats format to leveldb changed -> before key in saved object was a full peer address, after refactoring it became a peerID. This led to the bugs in other parts of the code.

@EmiM EmiM mentioned this issue Nov 17, 2023
4 tasks
@holmesworcester
Copy link
Contributor

holmesworcester commented Nov 17, 2023

Okay. Why is this in "blocked"?

Although as I think about it more it could cause a delay - if we dial peers in chunks and part of the chunk is invalid then we really just dial a few peers at once (less then we could).

If this is the case, it seems like we should fix it, since initial connection when joining or returning is a place where we're really sensitive to problems.

@EmiM
Copy link
Contributor Author

EmiM commented Nov 20, 2023

I don't know why you put it to blocked.
It will be fixed as a part of #1982

@EmiM EmiM moved this from Blocked to Waiting for review in Quiet Nov 20, 2023
@holmesworcester
Copy link
Contributor

Ha, woops. I don't either! Thanks for clarifying!

@EmiM EmiM moved this from Waiting for review to Merged (develop) in Quiet Nov 21, 2023
@Kacper-RF Kacper-RF moved this from Merged (develop) to Ready for QA in Quiet Nov 21, 2023
@kingalg
Copy link
Collaborator

kingalg commented Nov 29, 2023

Version: 2.0.3-alpha.10

Fixed as a part of #1982

@kingalg kingalg closed this as completed Nov 29, 2023
@kingalg kingalg moved this from Ready for QA to Done in Quiet Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working libp2p
Projects
Archived in project
Development

No branches or pull requests

3 participants