Commit Graph

30 Commits

Author SHA1 Message Date
Juan Batiz-Benet
45e4352c9c dropped down log.Errors 2015-01-26 19:13:44 -08:00
Juan Batiz-Benet
6c6dcfce2b Merge pull request #640 from jbenet/races
more races 2015-01-24
2015-01-24 10:49:42 -08:00
Juan Batiz-Benet
0bd63633d5 dht/kbucket: race condition fix 2015-01-24 10:22:56 -08:00
Juan Batiz-Benet
00d7b498ef routing/dht: adjust routing table on peer conn/disc 2015-01-24 09:13:44 -08:00
Juan Batiz-Benet
cc0d7c9b57 crypto -> p2p/crypto
The crypto package moves into p2p. Nothing in it so far is ipfs
specific; everything is p2p-general.
2015-01-02 08:46:45 -08:00
Juan Batiz-Benet
89f5cd4c94 introducing p2p pkg
I think it's time to move a lot of the peer-to-peer networking
but-not-ipfs-specific things into its own package: p2p.
This could in the future be split off into its own library.
The first thing to go is the peer.
2015-01-02 08:46:45 -08:00
Jeromy
07b064010e rewrite of provides to better select peers to send RPCs to
refactor test peer creation to be deterministic and reliable

a bit of cleanup trying to figure out TestGetFailure

add test to verify deterministic peer creation

switch put RPC over to use getClosestPeers

rm 0xDEADC0DE

fix queries not searching peer if its not actually closer
2015-01-02 07:42:07 +00:00
Juan Batiz-Benet
596602f37f routing table: better printing (see bkts) 2014-12-24 02:09:06 -08:00
Juan Batiz-Benet
ea2706c698 dht bugfix: unlock on print 2014-12-24 01:50:00 -08:00
Juan Batiz-Benet
c84a714b16 peer change: peer.Peer -> peer.ID
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
2014-12-23 08:33:32 -08:00
Jeromy
4f083d54d6 write a few package doc strings to improve look of godoc 2014-11-08 21:42:36 -08:00
Jeromy
317ca2f865 benchmark secure channel 2014-11-01 16:07:56 -07:00
Juan Batiz-Benet
184c25430b go-vet friendly codebase
- distinguish log.Error and log.Errorf functions
- Initialize structs with field names
- A bit of unreachable code (defers)
2014-10-25 03:46:39 -07:00
Jeromy
762faa7421 rewrite findpeer and other dht tweaks 2014-10-24 18:53:36 -07:00
Jeromy
b7744b2a11 fix for #141, routing table segmentation 2014-10-22 15:08:32 -07:00
Juan Batiz-Benet
9ca87fbb93 peer.Peer is now an interface
![](http://m.memegen.com/77n7dk.jpg)
2014-10-20 03:26:46 -07:00
Juan Batiz-Benet
331e43328e keyspace XOR naming 2014-10-18 20:01:28 -07:00
Juan Batiz-Benet
972c0f7b4b u.DOut -> log.Debug
and other logging switches. I kept the u.PErr and u.POut in cli
commands, as those do need to write raw output directly.
2014-10-09 04:50:22 -07:00
Jeromy
1aafd285b5 add in some extra debug logging, and increase routing table latencies 2014-10-08 21:55:50 +00:00
Juan Batiz-Benet
66839fa1de changed logging, in dht and elsewhere
- use log.* instead of u.*
- use automatic type conversions to .String()
  (Peer.String() prints nicely, and avoids calling b58 encoding
  until needed)
2014-10-07 21:33:59 -07:00
Juan Batiz-Benet
e62b822277 refactored keyspace Adjusted -> Bytes 2014-09-22 04:05:20 -07:00
Juan Batiz-Benet
6c00938e78 kbucket use new keyspace 2014-09-22 04:05:20 -07:00
Jeromy
af2f04ae89 fixing up some bitswap stuff after the PR 2014-08-28 12:01:03 -07:00
Chas Leichner
a6851fa55b Made routing code pass golint. 2014-08-20 18:36:32 -07:00
Chas Leichner
87bfdbc599 Made the DHT module pass golint 2014-08-20 18:36:21 -07:00
Juan Batiz-Benet
0fdc571554 POut should not have a newline 2014-08-20 18:29:31 -07:00
Jeromy
f09dba772c more tests and add in table filtering by peer latency 2014-08-11 20:11:23 -07:00
Jeromy
a43886245e more work implementing coral type lookups 2014-08-10 21:02:05 -07:00
Jeromy
67ddab1e4e tiered put/get implemented 2014-08-09 22:28:46 -07:00
Jeromy
9f7604378c moved routing table code into its own package 2014-08-08 19:58:42 -07:00