this is a major refactor of the entire codebase
it changes the monolithic peer.Peer into using
a peer.ID and a peer.Peerstore.
Other changes:
- removed handshake3.
- testutil vastly simplified peer
- secio bugfix + debugging logs
- testutil: RandKeyPair
- backpressure bugfix: w.o.w.
- peer: added hex enc/dec
- peer: added a PeerInfo struct
PeerInfo is a small struct used to pass around a peer with
a set of addresses and keys. This is not meant to be a
complete view of the system, but rather to model updates to
the peerstore. It is used by things like the routing system.
- updated peer/queue + peerset
- latency metrics
- testutil: use crand for PeerID gen
RandPeerID generates random "valid" peer IDs. it does not
NEED to generate keys because it is as if we lost the key
right away. fine to read some randomness and hash it. to
generate proper keys and an ID, use:
sk, pk, _ := testutil.RandKeyPair()
id, _ := peer.IDFromPublicKey(pk)
Also added RandPeerIDFatal helper
- removed old spipe
- updated seccat
- core: cleanup initIdentity
- removed old getFromPeerList
Mistake: Saturn referred to the NY node and vice versa.
Correction: Fittingly, Uranus is in NY and _S_aturn is _S_ingapore.
I'll have to reboot the testnet to rectify the changes.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
This commit applies the logging settings to the logging system upon
initialization `ipfs init` and `ipfs daemon --init`.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
It looks like files are not ignored when they are listed
starting with ./ in a .gitignore file.
At least this is true for me on Linux for the "ipfs"
binary in "cmd/ipfs/.gitignore".
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
I broke out multiaddr/net to its own package so
that multiaddr parsing could remain lean. multiaddr-net
will vendor special implementations of protocols (like utp)
use case:
Just configured and installed a node.
benefits:
1) reduces friction when setting up a new node
2) reveals useful details about the workings of the system. It's the
user's first encounter with her node's identity. The tour can build on
the user's knowledge.
```
ipfs (maybebtc-november) λ. ipfs init -f
initializing ipfs node at /Users/btc/.go-ipfs
generating key pair
peer identity: QmcRbn41Vc2CvbpLYfN36mAWusErKWvAAHbq92LPra2gFT
```