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

PeerID in IPNS key workflow #3807

Closed
ghost opened this issue Mar 21, 2017 · 9 comments
Closed

PeerID in IPNS key workflow #3807

ghost opened this issue Mar 21, 2017 · 9 comments
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue topic/commands Topic commands topic/ipns Topic ipns

Comments

@ghost
Copy link

ghost commented Mar 21, 2017

Version information: 0.4.7

Type: enhancement

Priority: P3

Description:

  • ipfs name publish --key should accept a PeerID in addition to the key name.
  • ipfs key list should list the PeerID alongside the key name (-l arg should be default true).
@ghost ghost added topic/commands Topic commands help wanted Seeking public contribution on this issue topic/ipns Topic ipns exp/novice Someone with a little familiarity can pick up labels Mar 21, 2017
@keremgocen
Copy link
Contributor

Hey @lgierth, could you please give a bit more detail for the expected behavior of these 2 items?

  • It seems straightforward to change the default value of ipfs key list like this but do you want to preserve the previous behavior by providing another option?

  • ipfs name publish --key for this one, as I understand currently it's publishing to/as self using the node's own PeerID, this would enable the node to publish to other nodes instead of self bypassing the private key lookup here? This part is a bit ambiguous to me, i'd appreciate any details

@Kubuxu
Copy link
Member

Kubuxu commented Apr 26, 2017

@lgierth @keremgocen I think the current behaviour of ipfs key list should stay. It is already established API so we shouldn't change it. We might want to create list of API changes we want to do when we are able to provider two versions of API or we decide to make a non-compatible change to the API.

@keremgocen about the ipfs name publish --key currently you are able to use it with key name. Like:

ipfs key gen --type=rsa --size=2048 mykey
ipfs name publish --key=mykey QmSomeHash

@lgierth calls for being able to use peerID instead of keyname (mykey in this case). PeerID can be obtained using ipfs key list -l` but I am not sure if keystore (code responsible for storing keys) provides good method to lookup PeerID -> keyname or PeerID -> private key.

@keremgocen
Copy link
Contributor

keremgocen commented Apr 26, 2017

Then I shall skip the "-l arg should be default true" part.

@Kubuxu what would be a good way to lookup peerIDs? I see some potential ways of doing so like node.Routing.FindPeers here but not sure which one would be the best option with my current exposure level to the codebase.

@Kubuxu
Copy link
Member

Kubuxu commented Apr 26, 2017

It should use keystore, as the --key parameters currently uses keyname (from keystore) as parameter. You can't use routing as you need private key. For now the simplest way would be to list all keys (in keystore), get them, check for matching peerID. If found use that key.

I would go with that solution for now. We might want to do something smarter latter (will come out in CR process).

@Kubuxu
Copy link
Member

Kubuxu commented Apr 26, 2017

So the actions here would be:

  • Enable ipfs name --key=Qm...AAA Qm...BBB to work
  • Write sharness tests for it

@keremgocen keremgocen mentioned this issue Apr 27, 2017
2 tasks
@ghost
Copy link
Author

ghost commented May 1, 2017

So the actions here would be:

  • Enable ipfs name --key=Qm...AAA Qm...BBB to work
  • Write sharness tests for it

SGTM 👍

@keremgocen
Copy link
Contributor

fca98ae should conclude #3882, might need to rebase though

@tomatopeel
Copy link

@lgierth Can you close this if it's all completed :D (I'm just going through "help wanted" issues trying to find things to work on)

@ghost
Copy link
Author

ghost commented Jun 27, 2017

Certainly :)

Thanks @keremgocen!

@ghost ghost closed this as completed Jun 27, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue topic/commands Topic commands topic/ipns Topic ipns
Projects
None yet
Development

No branches or pull requests

3 participants