Brian Tiger Chow
f54e0c74ab
move generic packages to thirdparty (see thirdparty/README.md)
10 years ago
Jeromy
9c45696a4b
rewrite as single line defer logs
10 years ago
Jeromy
ffb41231ab
starting to move important events over to EventBegin/Done
10 years ago
Brian Tiger Chow
b9011990f4
fix(mux) expose method to SetDefaultHandler
10 years ago
Brian Tiger Chow
8bbcc9992a
fix: privatize Mux fields
10 years ago
Juan Batiz-Benet
83e6bbf5de
testing/ci: all env var checks now use new pkgs
Good thing, i checked one wrong, too!
10 years ago
Juan Batiz-Benet
9f8999a8cf
p2p/net/swarm: fix travis env flag val
the travis docs say the env flag TRAVIS=true but, i want
to make absolutely sure. explicitness leaves less room for
error.
10 years ago
Juan Batiz-Benet
126c2b39f4
p2p/net/swarm: fix racey test
10 years ago
Juan Batiz-Benet
ebb51b28a9
Merge pull request #551 from jbenet/fix-swarm-more-connect
p2p/net/swarm: more connection bugs
10 years ago
Juan Batiz-Benet
0789599c8a
p2p/net/swarm: nicer test timeouts for travis
10 years ago
Juan Batiz-Benet
0f910195a0
p2p/net/swarm: parallelize tests. poor travis.
10 years ago
Juan Batiz-Benet
70002a38f7
p2p/net/swarm: extensive dial tests
10 years ago
Juan Batiz-Benet
d49b6fedf5
p2p/net/swarm: sync diagram explain
10 years ago
Juan Batiz-Benet
207156fab4
p2p/net/swarm: async grabbing of best conn
this is actually pretty important in case some peers end
up changing addrs, so others dont fail dialing simply for
picking the wrong addr to start with.
10 years ago
Juan Batiz-Benet
9d9e2a3ba9
p2p/net/swarm: configurable timeout for tests
10 years ago
Juan Batiz-Benet
3d3ffc45a6
p2p/net/swrm: InterfaceListenAddrs now method
10 years ago
Juan Batiz-Benet
5de997f0b7
p2p/net/swarm: dial backoff
This commit introduces a backoff when failing to dial
peers. It makes everything much faster.
10 years ago
Juan Batiz-Benet
cbe80237ee
p2p/net/swarm: dial timeout to 10s + dialer
10 years ago
Juan Batiz-Benet
9982e25151
p2p/net/swarm: more connection bugs
* filtering InterfaceListenAddresses(s) instead
* return error if for loops skip
* large dial timeout
10 years ago
Brian Tiger Chow
aadb0bb3de
refactor(repo/config) move config under repo
10 years ago
Juan Batiz-Benet
0a68f258f5
p2p/net/swarm: fixed bugs in swarm err closes
10 years ago
Juan Batiz-Benet
81dbc35025
p2p/net/swarm: dial adding conn note
10 years ago
Juan Batiz-Benet
65768db04b
p2p/net/swarm: const dial attempts
10 years ago
Juan Batiz-Benet
51f1fc34dd
p2p/net/swarm cleaned up dial sync
10 years ago
Juan Batiz-Benet
be2e7abfdc
p2p/net/swarm: dial once at a time
10 years ago
Juan Batiz-Benet
23cf9d6fa5
p2p/net/swarm: dial - filter out own addrs
10 years ago
Juan Batiz-Benet
5c3adb60cf
addr: proper filter + subtract
10 years ago
Juan Batiz-Benet
4d877044b7
p2p/net/swarm: fix connect self problems
This adds two checks after a successful conn.Dial
* if the remote peer is not who we wanted, close conn
* if the remove peer is outselves, close conn
(the second is redundant, but the codebase may evolve to
end up disabling the first check, so keeping the second
in place helps)
note:
Loopback addresses are actually sent out (they _have to be_,
in cases where there are >1 node in the same machine), so
many times when trying connections, nodes end up dialing
themselves.
10 years ago
Juan Batiz-Benet
63145110b6
p2p/net/swarm: do not usre link local addrs
10 years ago
Juan Batiz-Benet
bb1d3d7d53
peers: was not setting the map...
cc @whyrusleeping
10 years ago
Juan Batiz-Benet
d1c577e323
p2p/net/swarm/listener: consume peerstream listeners
10 years ago
Juan Batiz-Benet
a1aec82c42
p2p/net/conn/Listener: ignore conns failed to secure
Instead of erroring out, which would break the listener,
we instead log a message and continue. This is not an error,
the internet is a place with lots of probing + connection
failures.
10 years ago
Juan Batiz-Benet
aa7458b889
p2p/net/conn/listener: ignore certain errors
This should handle early breakages, where a failing connection
would take out the listener entirely.
There are probably other errors we should be handling here,
like secure connection failures.
10 years ago
Juan Batiz-Benet
0e4276e40a
p2p/net/conn/dialer: added Dialer field
10 years ago
Brian Tiger Chow
2f19d9fb1e
test: benchmark Sign and Verify operations
BenchmarkSign1B 1000 2406924 ns/op
BenchmarkSign10B 1000 2360527 ns/op
BenchmarkSign100B 1000 2354136 ns/op
BenchmarkSign1000B 500 2361775 ns/op
BenchmarkSign10000B 500 2415993 ns/op
BenchmarkSign100000B 500 2718051 ns/op
BenchmarkVerify1B 30000 52117 ns/op
BenchmarkVerify10B 30000 50968 ns/op
BenchmarkVerify100B 30000 51037 ns/op
BenchmarkVerify1000B 30000 56768 ns/op
BenchmarkVerify10000B 10000 105744 ns/op
BenchmarkVerify100000B 2000 628530 ns/op
10 years ago
Juan Batiz-Benet
f3f1f058f9
swarm addr checks
10 years ago
Juan Batiz-Benet
0c78255ffb
updated multiaddr
10 years ago
Juan Batiz-Benet
4681172907
reconnect p2p/ tests
10 years ago
Juan Batiz-Benet
00849f983c
conn: close fixes
10 years ago
Juan Batiz-Benet
59bb732c01
p2p/test: bogus key pair for faster tests
10 years ago
Juan Batiz-Benet
3b0da8a33f
peer/queue: close fix, and logging
10 years ago
Juan Batiz-Benet
d03fad69b8
testutil: obvious names for seeded key pairs
10 years ago
Juan Batiz-Benet
f3c490a4e3
peer+mocknet: sorting for determinism.
10 years ago
Juan Batiz-Benet
e4f1221ba0
vendor identify pb
not sure how it wasnt an error
10 years ago
Juan Batiz-Benet
f645cb8c04
use ZeroLocalTCPAddress for network tests
This commit makes all network tests use ZeroLocalTCPAddress
as the initial peer address, and then relies on
net.ListenAddresses()
This should get rid of the tcp addr clash problems.
10 years ago
Juan Batiz-Benet
21580ccdab
swap net2 -> net
10 years ago
Juan Batiz-Benet
08b8250c67
mocknet: use host
10 years ago
Juan Batiz-Benet
7c3202b11a
host interface + services
The separation of work in the p2p pkg is as follows:
- net implements the Swarm and connectivity
- protocol has muxer and header protocols
- host implements protocol muxing + services
- identify took over handshake completely! yay.
- p2p package works as a whole
10 years ago
Juan Batiz-Benet
b54517ee61
net2: separate protocols/services out.
using a placeholder net2 package so tests continue to pass.
Will be swapped atomically into main code.
10 years ago
Juan Batiz-Benet
2c6c64b2f6
mux: close stream on error
remove comment about spdystream. this is now
superceded by go-peerstream interface.
10 years ago