1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-09 23:42:20 +08:00

66 Commits

Author SHA1 Message Date
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
bc2d35fd4d Lots of fixes. DHT tests pass 2014-12-17 23:25:38 -08:00
41751b4938 Integrated new network into ipfs 2014-12-16 14:47:29 -08:00
e0f11dff24 dht: FindPeersConnectedToPeer 2014-12-08 20:52:46 -08:00
26e7656164 dht tests: dont introduce nil multiaddr
this is the type of assumption we shouldn't violate.
2014-12-08 20:52:45 -08:00
b799ddef58 refactor(dht) remove extraneous return value
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 16:28:22 -08:00
74eb03231d fix(core, peer) helpers to testutil, err handling
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 14:32:52 -08:00
d77c4bb5e0 refactor(peer): create peer through peerstore
for safety!

use mockpeer.WithID methods to create peers in tests

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 02:10:42 -08:00
cb23d5b2ae fix validators and key prefix 2014-11-16 02:45:19 -08:00
ed4a8eb782 chore(tests) add Short() -> SkipNow() to slowest tests
vanilla:
    21.57 real        45.14 user         8.51 sys

short:
    14.40 real        31.13 user         5.56 sys

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-15 02:10:53 -08:00
70f796afd6 fixed dht race #270 2014-11-05 09:26:17 -08:00
0135e3ebbe swarm + net: add explicit listen addresses 2014-11-05 04:00:49 -08:00
d79ebe68d2 dht ctxcloserify 2014-10-25 21:33:59 -07:00
f2b8803a57 net/service now uses ctxcloser 2014-10-25 21:33:10 -07:00
762faa7421 rewrite findpeer and other dht tweaks 2014-10-24 18:53:36 -07:00
a8adf2ff2c dht test fix (net) 2014-10-22 05:31:49 -07:00
f7c1ed39e0 renamed datastore.go -> go-datastore 2014-10-21 15:10:58 -07:00
9ca87fbb93 peer.Peer is now an interface
![](http://m.memegen.com/77n7dk.jpg)
2014-10-20 03:26:46 -07:00
d17292a4c2 differentiate ports cause timing. 2014-10-19 06:29:18 -07:00
4783332b11 fixed tests 2014-10-19 02:05:29 -07:00
e989d6febe move IDFromPubKey to peer pkg 2014-10-18 04:28:26 -07:00
18cfe02d38 dht tests with context 2014-10-18 04:28:26 -07:00
1a7fac4551 make test fail instead of hang 2014-10-18 04:28:25 -07:00
00516299dd Add test to test conncurrent connects between two peers 2014-10-18 04:28:25 -07:00
c77ed6d2aa fix up FindProvidersAsync 2014-10-18 04:28:25 -07:00
26c4e5004c handler fixes for tests 2014-10-10 20:48:20 -07:00
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
910a76e220 updated multiaddr use across codebase 2014-10-06 04:13:43 -07:00
53f0b117f5 update net with peerstore 2014-09-26 02:41:46 -07:00
7228786981 make a few tests perform operations in two directions instead of one 2014-09-22 22:34:30 -07:00
197046c9d2 fix(routing:dht) add ctx args 2014-09-22 04:06:19 -07:00
52cefb16cd Routing uses context now
@perfmode boom
2014-09-22 04:06:18 -07:00
aa29603923 dht tests pass again 2014-09-22 04:06:16 -07:00
afb1d01048 provider testing 2014-09-22 04:06:15 -07:00
043c09e14b fixed get/put 2014-09-22 04:06:12 -07:00
9dd39de491 Fixed connections all over. 2014-09-22 04:06:12 -07:00
9ea715cb10 comment out dht_test for now. 2014-09-22 04:06:10 -07:00
700b6ab99f remove start 2014-09-22 04:05:23 -07:00
29322a24da tests compile 2014-09-22 04:05:21 -07:00
c14123397a starting to integrate new net 2014-09-22 04:05:13 -07:00
67e76c0acc godeps multiaddr + swarm move. 2014-09-22 04:05:12 -07:00
d326fc61e4 fix typo that caused test failure in dht_test.go 2014-09-18 18:32:58 +00:00
b5a1b1c658 improve cleaning up in dht tests. 2014-09-15 20:45:36 +00:00
0b5447a60a checking returned value 2014-09-14 21:44:19 -07:00
e6bc0772ed Test for getLocal method in DHT 2014-09-14 20:59:09 -07:00
b88ee2870a golint cleanup 2014-09-11 12:25:52 -07:00
7968b45e58 vendor dependencies with godep
dependencies are vendored into Godeps/_workspace and commit versions are
recorded in Godeps.json

update datastore to e89f0511
update go.crypto
2014-09-09 22:39:42 -07:00
1fa7c07dc7 clean up merge of bren2010's crypto branch and merge into master 2014-09-08 18:17:57 +00:00
4b97f1f270 create new crypto package and make rest of repo use it 2014-09-03 20:15:10 +00:00
a5d54ea29e fix up tests that started failing after changing identify code 2014-09-01 21:55:59 -07:00