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
8841ff97f9
mv net/mock2 -> net/mock
2014-12-17 23:25:40 -08:00
Juan Batiz-Benet
74bffeb30b
transition dht to mock2
2014-12-17 23:25:40 -08:00
Juan Batiz-Benet
1044b96811
make vendor
2014-12-17 23:25:38 -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
e1b5933641
dht/pb: changed PeersToPBPeers to set ConnectionType
...
Uses an inet.Dialer
2014-12-08 20:52:45 -08:00
Juan Batiz-Benet
1b96fd5f6a
net: add Connectedness var.
2014-12-08 20:52:45 -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
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
Brian Tiger Chow
b9d2b7628a
log(dht) add eventlog.Update event
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-25 06:16:39 -08:00
Jeromy
1e7e59f0c4
fix validators and key prefix
2014-11-16 02:45:19 -08:00
Jeromy
cac56033a9
switch DHT entries over to be records, test currently fail
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
Brian Tiger Chow
077a34c247
fix(net) pass contexts to dial peer
2014-11-05 10:04:20 -08:00
Juan Batiz-Benet
a45511bb19
fixed dht race #270
2014-11-05 09:26:17 -08:00
Brian Tiger Chow
a211f1ecdb
fix(all) log.Debug -> log.Debugf
2014-10-30 06:35:29 -07:00
Brian Tiger Chow
e3d7d2b50c
refactor(routing) use routing.ErrNotFound
2014-10-28 02:17:46 -07:00
Brian Tiger Chow
1024504a6f
refactor(dht/pb) move proto to pb package
2014-10-25 04:13:28 -07:00
Juan Batiz-Benet
3b15457cf0
renamed datastore.go -> go-datastore
2014-10-21 15:10:58 -07:00
Juan Batiz-Benet
36e6c8c564
peerstore Put -> Add
...
Changed lots of peer use, and changed the peerstore to ensure
there is only ever one peer in use.
Fixed #174
2014-10-20 06:37:12 -07:00
Juan Batiz-Benet
28e083b902
peer.Peer is now an interface
...

2014-10-20 03:26:46 -07:00
Juan Batiz-Benet
702efec2c6
dht tests with context
2014-10-18 04:28:26 -07:00
Jeromy
dd8e9e97f3
Add test to test conncurrent connects between two peers
2014-10-18 04:28:25 -07:00
Jeromy
532bc1d160
update dht tests to new network interface
2014-10-10 14:52:59 -07:00
Juan Batiz-Benet
9b0f481c76
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
Juan Batiz-Benet
e21c73a531
updated multiaddr use across codebase
2014-10-06 04:13:43 -07:00
Brian Tiger Chow
0094145c29
feat(net:service, routing) remove error return value
2014-09-24 23:35:36 -04: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
b5f0a42bd6
better query processing (runner)
2014-09-22 04:05:22 -07:00
Juan Batiz-Benet
be2a8df715
tests compile
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
9f04d5e839
godeps multiaddr + swarm move.
2014-09-22 04:05:12 -07:00
Brian Tiger Chow
531769861d
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
Jeromy
bd5c670606
clean up merge of bren2010's crypto branch and merge into master
2014-09-08 18:17:57 +00:00
Jeromy
46057597bb
bitswap first working commit!
2014-08-26 14:24:51 -07:00
Jeromy
1f31afdb46
refactor to allow use of mes_listener outside of dht
2014-08-23 22:25:50 -07:00
Jeromy
2f6d94a86b
fix swarm message type code, i beleive it works well now
2014-08-20 18:42:40 -07:00
Jeromy
d574d518b1
add in message type routing to the swarm object. tired, needs cleanup.
2014-08-20 18:42:31 -07:00
Jeromy
f03d3626ed
removed failure call i forgot to remove
2014-08-20 18:42:26 -07:00
Jeromy
fd754c778e
add some more tests in
2014-08-20 18:42:26 -07:00
Chas Leichner
320f527284
Made routing code pass golint.
2014-08-20 18:36:32 -07:00
Jeromy
986088887d
get implementation according to kademlia spec.
2014-08-15 09:39:38 -07:00
Jeromy
891400d240
more tests and add in table filtering by peer latency
2014-08-11 20:11:23 -07:00
Jeromy
653841f2d7
add fauxNet to stand in for Swarm in tests to reproduce various network conditions
2014-08-11 09:06:20 -07:00
Jeromy
10ef87b692
starting a new testing framework
2014-08-10 21:40:17 -07:00