ipfs / notes

IPFS Collaborative Notebook for Research
MIT License
401 stars 30 forks source link

Adding nym as option for `ipfs daemon` #377

Open ChristopherA opened 9 years ago

ChristopherA commented 9 years ago

I recommend that you add an optional pseudonym (aka nym) to the ipsf daemon that adds an non-unique identifier to the ipfs peers output.

Initially this aids debugging the swarm discovery process when demoing ipfs. Longer term it can bootstrap some experiments with SDSI-like local names i.e. ChristopherA's JuanBenet

> ipfs daemon nym "christophera"
Initializing daemon...
Setting nym to 'christophera'
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway server listening on /ip4/127.0.0.1/tcp/8080
> ipfs swarm peers
/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ juan
/ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx christophera
/ip4/134.121.64.93/tcp/1035/ipfs/QmWHyrPWQnsz1wxHR219ooJDYTvxJPyZuDUPSDpdsAovN5 masternode
/ip4/178.62.8.190/tcp/4002/ipfs/QmdXzZ25cyzSF99csCQmmPZ1NTbWTe8qtKFaZKpZQPdTFB

For the initial prototype, you may want to limit displaying the nym to only the first 20 characters so that 120 character wide terminal displays do not wrap. You may want to limit the possible characters to ASCII upper/lower and a few limited characters (to allow @ChristopherA, ChristopherA@gmail.com, etc.), or even to not allow special characters and keep it to twitter name restrictions (15 characters upper lower plus _).

jbenet commented 9 years ago

thanks @ChristopherA !

there's a ton to say on this.

the nym idea is solid! nyms would be particularly useful for ad-hoc ephemeral discovery, in the etcd style.

nyms aren't globally unique (they're not meant to be). it may be easy to extend to using other naming systems (like DNS, keybase, etc) for global identity.

I'll also add in the SFS ideas. Relevant papers here: http://gateway.ipfs.io/ipfs/QmR9yzggUjRQRWBuDgwwjrTWH1Vhd37U8PxNNLYoCN5xYv -- Section 3.4 in the phd thesis one (beware, the pdf is large...).

Relevant also to think git style "remotes" -- which is a way of binding a remote node to a local name. We could have keys though, which is safer :). this would work kind of like a local IPNS symlink. This is functionally the converse of a nym, where it is assigned by a local entity. but this is more in line with SFS certification paths.

/ipns/remotes/whyrusleeping/...

(lots of half-formed thoughts. figured i'd drop a few here for now and come back later)

ChristopherA commented 9 years ago

I was also thinking about SDSI style naming:

> ipfs localname QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ as juan

> ipfs swarm
/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
    jbenet (christophera's juan)

or

> ipfs localname jbenet's tom as thomas_smith
jbenet commented 9 years ago

@ChristopherA have you sunk into the sfs certification paths? e.g.

/<me>/ca/juan/why

would give me my ca's juan's why. what's nice about paths is that they play nice with common users' patterns.

find /<me>/ca | grep why
/<me>/ca/*/why

and so on.


also -- for the local name assignment -- in the git remote ordering:

ipfs remote add juan QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
ipfs friend add juan QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
ChristopherA commented 9 years ago

@jbenet Can you give me a URL to sfs certification paths?

jbenet commented 9 years ago

@ChristopherA i think dm's thesis has it: http://www.scs.stanford.edu/~dm/home/papers/mazieres:thesis.ps.gz

ChristopherA commented 9 years ago

Some references in regards to nym's:

Petname's: http://www.skyhunter.com/marcs/petnames/IntroPetNames.html http://www.erights.org/elib/capability/pnml.html

SDSI Local Name https://people.csail.mit.edu/rivest/sdsi11.html#secnames https://www.cs.purdue.edu/homes/ninghui/papers/names_csfw00.pdf http://www.cs.cornell.edu/home/halpern/papers/sdsi.ps http://apotheca.hpl.hp.com/ftp/pub/DEC/SRC/publications/ma/naming-csfw.pdf