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

Proposing deal to self fails with "routing: not found" [bug] #1917

Closed
anorth opened this issue Feb 13, 2019 · 6 comments
Closed

Proposing deal to self fails with "routing: not found" [bug] #1917

anorth opened this issue Feb 13, 2019 · 6 comments
Assignees
Labels
C-bug Category: This is a bug P1 High - we should be working on this now or in the immediate future

Comments

@anorth
Copy link
Member

anorth commented Feb 13, 2019

Describe the bug
Following the instructions from the wiki without a friend to swap deals with, I attempted to propose a deal to my own node. While this might have failed for some logical reason, failing to find my own nodes address is unexpected.

To Reproduce

$ ./go-filecoin miner set-price --from=$MINER_OWNER_ADDR --miner=$MINER_ADDR --price=0 --limit=1000 2.5 5
Set price for miner fcqn3yr5lmh5tq5uccvp05rz5pkrthvu97q3e2akj to 2.5.
	Published ask, cid: zDPWYqFD6XoZnZDaFEJAPPJmjuwcAfgu1t9Rf1Sor5SqSa7XmLsV.
	Ask confirmed on chain in block: zDPWYqFCwFV18HmjWBJykJoeY3LVFDssSQ3R9DVu61FXKAc6vbT5.
$ ./go-filecoin client propose-storage-deal fcqn3yr5lmh5tq5uccvp05rz5pkrthvu97q3e2akj $CID 0 10
Error: error sending proposal: failed to establish connection with the peer: routing: not found

Expected behavior
I expect that proposing a deal to my own node should succeed, if well formed. It's an important path to exercise.

@anorth anorth added C-bug Category: This is a bug P1 High - we should be working on this now or in the immediate future labels Feb 13, 2019
@lkowalick lkowalick self-assigned this Feb 14, 2019
@lkowalick
Copy link
Contributor

Some learnings:

We currently use libp2p protocols for the creation and execution of storage deals between a storage miner and a storage client. libp2p does not currently allow a libp2p peer to dial oneself (libp2p/go-libp2p#328), so making a deal with oneself currently cannot work.

Some possible avenues that come to mind:

  1. Addressing the above libp2p issue.
  2. Having a deal with oneself short circuit and never call libp2p.
  3. Having a single node have more than one libp2p peer id for different roles (storage miner, storage client)

@lanzafame
Copy link
Contributor

For reference, go-libp2p-gorpc has the following workaround: https://github.com/libp2p/go-libp2p-gorpc/blob/86afdf6d22226a5f479f791d987fa92aa8652c48/server.go#L293-L297

@hsanjuan
Copy link
Contributor

You can comment here saying you also need this: ipfs/roadmap#18

@phritz phritz assigned ZenGround0 and unassigned lkowalick Feb 26, 2019
@phritz
Copy link
Contributor

phritz commented Feb 26, 2019

option 1 get it fixed in libp2p is preferable. 3 could work but will cause a lot of confusion as the idea that the node has exactly one peerid is baked in really deep to tools etc. assigning over to @ZenGround0 who is owning our networking. i think the action required here is just working with libp2p team to get this onto their list.

@ZenGround0
Copy link
Contributor

A better error message and a recommendation in the docs (wiki/discuss) to use a separate binary to make the deal is imo a good solution for a long time. I propose that we request libp2p do fix 1 but at a low priority. In the mean time we improve error message and docs. @phritz @anorth

@dayu26
Copy link
Contributor

dayu26 commented Apr 25, 2019

Some learnings:

We currently use libp2p protocols for the creation and execution of storage deals between a storage miner and a storage client. libp2p does not currently allow a libp2p peer to dial oneself (libp2p/go-libp2p#328), so making a deal with oneself currently cannot work.

Some possible avenues that come to mind:

  1. Addressing the above libp2p issue.
  2. Having a deal with oneself short circuit and never call libp2p.
  3. Having a single node have more than one libp2p peer id for different roles (storage miner, storage client)
  1. I make deal with other node in asks list, still got error message: failed to establish connection with the peer. How do I know whick ask can work? should I establish connection to miner node first?
  2. Having a single node have more than one libp2p peer id for different roles (storage miner, storage client) I want to know How? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug P1 High - we should be working on this now or in the immediate future
Projects
None yet
Development

No branches or pull requests

7 participants