From @aronayne on Thu Aug 25 2016 21:28:36 GMT+0000 (UTC)
Following doc https://ipfs.io/docs/getting-started/ what is the ‘peer identity’ hash key , this is required to store files on ipfs ?
From ‘getting started’ doc
peer identity: Qmcpo2iLBikrdf1d6QU6vXuNb6P7hwrbNPW9kLAH8eG67z
to get started, enter:
ipfs cat /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme
Should each of these keys contain same value ?
Once I ‘ipfs init’ and close terminal is the hash key stored on system so can re-access or is it required by user to securely store ?
Copied from original issue: https://github.com/ipfs/faq/issues/166
From @Ghoughpteighbteau on Thu Aug 25 2016 23:28:03 GMT+0000 (UTC)
ipfs init generated the files in
config, which contains your private key. You’ll notice that in
config your peer identity is listed above that private key.
ipfs cat /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme is just a nice example command you can run to prove that things are working, but before you run that, make sure the
ipfs daemon is running.
~ $ ipfs daemon&
~ $ Initializing daemon...
Swarm listening on /ip4/10.10.100.12/tcp/4001
Swarm listening on /ip4/10.10.100.155/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/184.108.40.206/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8079
Daemon is ready
~ $ ipfs cat /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme
Hello and Welcome to IPFS!
So, the peer identity is the thing that identifies you on the network, and it gets used as your address in IPNS.
~ $ ipfs swarm peers
here’s a list of peers I’m currently connected to.
QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6 is the peer identity of the first one in the list. In fact, I can resolve it!
~ $ ipfs name resolve QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6
it’s a blog!
From @aronayne on Fri Aug 26 2016 10:18:20 GMT+0000 (UTC)
thanks @Ghoughpteighbteau what is being resolved as part of ipfs name resolve QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6
/ipfs/QmbtNuavtRJs9BijJo7uMrRSp926F92DKMQHAjQDajMuw1 ? QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6 is the peer identity . Are all hash values created as part of ‘ipfs add’ for the given peer identity returned ?
From @Ghoughpteighbteau on Fri Aug 26 2016 16:27:27 GMT+0000 (UTC)
the IPNS system is taking the peer identity
QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6 and resolving it. It resolved to
this peer identity
QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6. I left something off of it because
ipfs name resolve is OK with it. but that’s actually
/ipns/QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6 and the address
/ipfs/QmbtNuavtRJs9BijJo7uMrRSp926F92DKMQHAjQDajMuw1 are part of different systems in IPFS. Sort of like
ftp://baz.bop different protocols. The addresses look the same though.
Are all hash values created as part of ‘ipfs add’ for the given peer identity returned ?
Could you clarify this question for me? I’m not sure I’m answering it correctly.
ipfs add is typically how you add files to the network, but there are methods to access ipfs’s plumbing more directly, so not all the files on the network will be done through
ipfs add. Also, your peer identity doesn’t have an effect on the addresses of the files. If you and I both have the same file, and we both run
ipfs add theFileYouAndIHave.jpg, the address will be the same for that file.
edit: OH wait. Sorry I misunderstood you. The formatting in your post suggested a different question than I expected.
From @aronayne on Fri Aug 26 2016 22:37:19 GMT+0000 (UTC)
@Ghoughpteighbteau Invoking : ‘ipfs name resolve QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6’ a single value is returned :
Is one hash value returned as there is one entry for the peer QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6 and so if ‘ipfs add’ is executed n times for peer id QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6 then 'ipfs name resolve QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6 ’ returns n entries ?
From @jbenet on Sat Aug 27 2016 01:44:11 GMT+0000 (UTC)
No. You need to publish:
ipfs name publish
On Fri, Aug 26, 2016 at 18:37 adrian-git-hub-user email@example.com
@Ghoughpteighbteau https://github.com/Ghoughpteighbteau when invoke :
‘ipfs name resolve QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6’ a single
value is returned :
Is one hash value returned as there is one entry for the peer
QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6 and so if ‘ipfs add’ is
executed n times for peer id QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6
then 'ipfs name resolve QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6 ’
returns n entries ?
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ipfs/faq/issues/166#issuecomment-242868415, or mute
From @Ghoughpteighbteau on Sat Aug 27 2016 02:20:30 GMT+0000 (UTC)
@adrian-git-hub-user Ahh. I see what you’re asking.
ipfs name resolve will only ever return one address, what’s important is that it can change.
Confused about why it’s important that it changes and why it doesn’t show you all of a persons files? I do not blame you, if you’re just learning about IPFS, IPNS is the worst place to start!
IPNS is a subcomponent of IPFS that lets you make dynamic content. If you want to make a decentralized version of Reddit on IPFS, you need IPNS to do it. But if you want to disseminate files or webpages in a totally decentralized fashion, IPNS doesn’t even get involved!