Commit Graph

261 Commits

Author SHA1 Message Date
Juan Batiz-Benet
462870ac04 net/conns better printing of connections 2014-12-23 01:40:57 -08:00
Juan Batiz-Benet
eac203b829 net: Connectedness bugfix
Connectedness was totally incorrect. added a test case.
2014-12-23 01:40:57 -08:00
Juan Batiz-Benet
3aa078af47 added bootstrap logging 2014-12-23 01:40:19 -08:00
Juan Batiz-Benet
26f3f69bb3 net/mocknet: fixed listenaddrs (misrepresenting)
some dht tests signaled "sending peer empty addresses"
which would then cause a failure. this was a misrepresentation
on the part of mocknet. it has been corrected.
2014-12-22 21:07:26 -08:00
Juan Batiz-Benet
928fee3e81 net: have an explicit IdentifyConn on dial
- Make sure we call IdentifyConn on dialed out conns
- we wait until the identify is **done** before return
- on listening case, we can also wait.
- tests now make sure dial does wait.
- tests now make sure we can wait on listening case.
2014-12-22 20:41:17 -08:00
Juan Batiz-Benet
d3dc78fbfb net/id_test: refactor tests into own func 2014-12-22 20:09:34 -08:00
Juan Batiz-Benet
5e0c02c099 bugfixes in core + mocktest 2014-12-21 13:44:48 -08:00
Juan Batiz-Benet
e6fc31bbc4 Network: added notion of versions (h1) to h3 2014-12-21 05:45:31 -08:00
Juan Batiz-Benet
eb67edfa97 mocknet: now with keys and addrs
To _really_ simulate the network, mocknet needs
to provide proper addrs and keys. Otherwise
services that depend on some of the network's
functionality (like exchanging keys) will fail oddly.

cc @maybebtc
2014-12-21 05:45:31 -08:00
Juan Batiz-Benet
334557f9d5 IDService (replaces handshake3) 2014-12-21 05:45:30 -08:00
Juan Batiz-Benet
992898d1eb net: Network has Protocols() and Conn stream chg 2014-12-21 05:45:30 -08:00
Juan Batiz-Benet
17da5ca74a handshake3: ressurect the message 2014-12-21 05:45:30 -08:00
Juan Batiz-Benet
da734fa4c8 swarm: learned to use a ConnHandler 2014-12-21 05:45:30 -08:00
Juan Batiz-Benet
cb2e560c32 swarm: add remote pubkey to peerstore 2014-12-21 05:45:29 -08:00
Juan Batiz-Benet
01f7792a4a net: expose local/remote keys on conn 2014-12-21 05:45:29 -08:00
Juan Batiz-Benet
523a576dc2 net/ dialer interface exposes peerstore 2014-12-20 20:06:17 -08:00
Juan Batiz-Benet
a6491df052 backpressure bugfix: w.o.w.
i dont even know how that was passing
2014-12-19 21:56:57 -08:00
Juan Batiz-Benet
b8a3c3d770 backpressure now uses peer.ID 2014-12-19 21:56:30 -08:00
Juan Batiz-Benet
fc56ffee00 mocknet now uses peer.ID 2014-12-19 21:29:12 -08:00
Juan Batiz-Benet
b70f40113d network now uses peer.ID 2014-12-19 21:29:05 -08:00
Juan Batiz-Benet
e535b0e520 swarm now uses peer.ID 2014-12-19 21:05:18 -08:00
Juan Batiz-Benet
618794cbed Moved PeerNetParams + shortened tests 2014-12-19 19:58:17 -08:00
Juan Batiz-Benet
57c7ffab44 conn: with new peer.ID 2014-12-19 19:44:59 -08:00
Juan Batiz-Benet
32e03413c6 removed handshake3. 2014-12-19 12:20:31 -08:00
Juan Batiz-Benet
c4a935c3e3 go complains about lack of buildable file 2014-12-17 23:44:39 -08:00
Juan Batiz-Benet
4da261001f mocknet printer for printing 2014-12-17 23:25:41 -08:00
Juan Batiz-Benet
6acc152f0c backpressure: explanation + more rounds 2014-12-17 23:25:41 -08:00
Juan Batiz-Benet
db7d7ae891 net: sending backpressure test 2014-12-17 23:25:41 -08:00
Juan Batiz-Benet
ccc17d2740 net: cool test for new stream backpressure
Sadly, as cool as this test is, it doesn't work
Because spdystream doesnt handle stream open backpressure
well. I'll see about rewriting that part when it becomes
a problem. More backpressure tests comming.
2014-12-17 23:25:41 -08:00
Juan Batiz-Benet
358b8a9984 net: testing protocol 2014-12-17 23:25:41 -08:00
Juan Batiz-Benet
b573d66208 mocknet: internals test
Found bugs with it :)
2014-12-17 23:25:40 -08:00
Juan Batiz-Benet
f354fa849e mocknet: FullMesh connects to self too.
@maybebtc thoughts on this? dialing self should be
**possible**, so we should in general test that we do
consider that case, but not sure if this is good to expose
to clients. thoughts?

Btw, on why dialing self should be possible, we may create
little protocols which we may have a node connect to self,
say across its interfaces to test connectivity, etc...
think of it like:

> server localhost:1234 &
> curl localhost:1234
2014-12-17 23:25:40 -08:00
Juan Batiz-Benet
b0a36aabcb mocknet: bugfix on opening conns + printer 2014-12-17 23:25:40 -08:00
Juan Batiz-Benet
f1fc09ccee mocknet: printing internal mocknet state 2014-12-17 23:25:40 -08:00
Juan Batiz-Benet
2ae9b27859 moved net/swarm2 -> swarm 2014-12-17 23:25:40 -08:00
Juan Batiz-Benet
5d019ad300 mocknet add test 2014-12-17 23:25:40 -08:00
Juan Batiz-Benet
de6eef9178 mv net/mock2 -> net/mock 2014-12-17 23:25:40 -08:00
Juan Batiz-Benet
58510640fa rm old mock 2014-12-17 23:25:40 -08:00
Juan Batiz-Benet
e6a7179a8a mock2: removed list to fix bugs
container/lists suck
2014-12-17 23:25:39 -08:00
Juan Batiz-Benet
444f47d7f5 mock2: link map fixes 2014-12-17 23:25:39 -08:00
Juan Batiz-Benet
59d1426cf5 mock2/ missing ctxgroup 2014-12-17 23:25:39 -08:00
Juan Batiz-Benet
2f9d398d66 mock2/ connections 2014-12-17 23:25:39 -08:00
Juan Batiz-Benet
3c9be87704 mock2: ConnectAll 2014-12-17 23:25:39 -08:00
Juan Batiz-Benet
5a2a8c62f3 unlinkPeers fix 2014-12-17 23:25:39 -08:00
Juan Batiz-Benet
ac42cbe9f9 mock2 2014-12-17 23:25:39 -08:00
Brian Tiger Chow
6884c9ddd2 trivial change to trigger build 2014-12-17 23:25:38 -08:00
Juan Batiz-Benet
78c0802f97 connect swarm context to network 2014-12-17 23:25:38 -08:00
Juan Batiz-Benet
ba323c3e48 make vendor 2014-12-17 23:25:38 -08:00
Juan Batiz-Benet
7648a8b55c swarm tests: dont send to self 2014-12-17 23:25:38 -08:00
Juan Batiz-Benet
bc2d35fd4d Lots of fixes. DHT tests pass 2014-12-17 23:25:38 -08:00