Jeromy
0547622e00
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
4afa4ad348
dht/test skip bootstrap test when short
2014-12-24 05:39:48 -08:00
Juan Batiz-Benet
00b9db458c
dht/test: providers test id compare
2014-12-24 04:23:15 -08:00
Juan Batiz-Benet
3edab37033
dht: cleaned up dht_test.
...
TestProversMany still fails
2014-12-24 03:48:02 -08:00
Juan Batiz-Benet
d562a9bdee
dht/dht_test: bootstrap synchronously. fares better.
2014-12-24 03:46:45 -08:00
Juan Batiz-Benet
e9b5f37b8b
dht_test: better bootstrapping logging
2014-12-24 03:41:13 -08:00
Juan Batiz-Benet
2b40651f29
dht bootstrap test: rounds. do nothing
...
odd behavior: only one dht (the last one) is seeing
changes to its routing table.
2014-12-24 03:24:52 -08:00
Juan Batiz-Benet
b3a6834b6b
respect don contexteone
2014-12-24 03:24:28 -08:00
Juan Batiz-Benet
e5502938c2
bootstrap test
2014-12-24 02:20:11 -08:00
Juan Batiz-Benet
f9b7a65024
dht_test large providers test
2014-12-24 01:49:55 -08:00
Juan Batiz-Benet
3b37c43171
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
Juan Batiz-Benet
cc3c277479
Lots of fixes. DHT tests pass
2014-12-17 23:25:38 -08:00
Juan Batiz-Benet
fac6fe1e73
Integrated new network into ipfs
2014-12-16 14:47:29 -08:00
Juan Batiz-Benet
a718944be1
dht: FindPeersConnectedToPeer
2014-12-08 20:52:46 -08:00
Juan Batiz-Benet
58f4c4c16d
dht tests: dont introduce nil multiaddr
...
this is the type of assumption we shouldn't violate.
2014-12-08 20:52:45 -08:00
Brian Tiger Chow
2c1700b45d
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
Brian Tiger Chow
d65bc1951d
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
Brian Tiger Chow
adba0baa89
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
Jeromy
1e7e59f0c4
fix validators and key prefix
2014-11-16 02:45:19 -08:00
Brian Tiger Chow
e1f81b780c
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
Juan Batiz-Benet
a45511bb19
fixed dht race #270
2014-11-05 09:26:17 -08:00
Juan Batiz-Benet
03f48e90a6
swarm + net: add explicit listen addresses
2014-11-05 04:00:49 -08:00
Juan Batiz-Benet
be52e35ed7
dht ctxcloserify
2014-10-25 21:33:59 -07:00
Juan Batiz-Benet
6998a8448e
net/service now uses ctxcloser
2014-10-25 21:33:10 -07:00
Jeromy
d817b84a64
rewrite findpeer and other dht tweaks
2014-10-24 18:53:36 -07:00
Juan Batiz-Benet
15533c8fa3
dht test fix (net)
2014-10-22 05:31:49 -07:00
Juan Batiz-Benet
3b15457cf0
renamed datastore.go -> go-datastore
2014-10-21 15:10:58 -07:00
Juan Batiz-Benet
28e083b902
peer.Peer is now an interface
...

2014-10-20 03:26:46 -07:00
Juan Batiz-Benet
ac18a83a68
differentiate ports cause timing.
2014-10-19 06:29:18 -07:00
Juan Batiz-Benet
6e5fb41cc6
fixed tests
2014-10-19 02:05:29 -07:00
Juan Batiz-Benet
b3f19c8b72
move IDFromPubKey to peer pkg
2014-10-18 04:28:26 -07:00
Juan Batiz-Benet
702efec2c6
dht tests with context
2014-10-18 04:28:26 -07:00
Jeromy
7b99fde6a0
make test fail instead of hang
2014-10-18 04:28:25 -07:00
Jeromy
dd8e9e97f3
Add test to test conncurrent connects between two peers
2014-10-18 04:28:25 -07:00
Jeromy
c4d9c231dd
fix up FindProvidersAsync
2014-10-18 04:28:25 -07:00
Juan Batiz-Benet
315bd4705b
handler fixes for tests
2014-10-10 20:48:20 -07:00
Juan Batiz-Benet
740b381804
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
e21c73a531
updated multiaddr use across codebase
2014-10-06 04:13:43 -07:00
Juan Batiz-Benet
be6003d75f
update net with peerstore
2014-09-26 02:41:46 -07:00
Jeromy
8d38164677
make a few tests perform operations in two directions instead of one
2014-09-22 22:34:30 -07:00
Brian Tiger Chow
f20eef9455
fix(routing:dht) add ctx args
2014-09-22 04:06:19 -07:00
Juan Batiz-Benet
a62411035e
Routing uses context now
...
@perfmode boom
2014-09-22 04:06:18 -07:00
Juan Batiz-Benet
0a9810a150
dht tests pass again
2014-09-22 04:06:16 -07:00
Juan Batiz-Benet
b0fbaeeef4
provider testing
2014-09-22 04:06:15 -07:00
Juan Batiz-Benet
34e171e2b3
fixed get/put
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
709f932e6e
Fixed connections all over.
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
900756124e
comment out dht_test for now.
2014-09-22 04:06:10 -07:00
Juan Batiz-Benet
45796e5fdf
remove start
2014-09-22 04:05:23 -07:00
Juan Batiz-Benet
be2a8df715
tests compile
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
caeecd0f43
starting to integrate new net
2014-09-22 04:05:13 -07:00