ed65023021
only include established connections in route calculation except for reachability analysis in gc
Matthias Radestock2015-02-01 19:13:51 +00:00
f25696c245
prevent premature gc of peers from topology Topology gossip can be received on a connection before that connection has been marked as 'established'. If we do not include unestablished connections in topology gossip, then parts of the topology can be removed by gc, since they are deemed unreachable, which can cause subsequent incremental topology gossips to be rejected due to them containing references to peers that have been removed by the gc.
Matthias Radestock2015-02-01 16:52:39 +00:00
2d135f3da0
prevent premature peer gc Caused by a race between adding the connection to our map and receiving a topology gossip on it.
Matthias Radestock2015-01-31 22:29:07 +00:00
5892cae5d0
set the hostname on the test VMs which makes it easier to see where you are when ssh'ed in
Matthias Radestock2015-01-31 17:12:20 +00:00
c1dd2e3a09
tear down connections that have no (initial) udp connectivity Prior to the introduction of gossip, a tcp connection would not see regular communication until it had been marked as 'established', because the topology communication scheme would periodically send 'FetchAll' only after that. So in the absence of udp connectivity we'd time out. The timeout could of course occur for other reasons, namely disrupted tcp connectivity, but the combination of a timeout and 'not established' pointed to a lack of udp connectivity as a likely cause. So that's what we checked for.
Matthias Radestock2015-01-29 12:41:52 +00:00
17f6653cae
cosmetic: var name consistency with Routes.calculateBroadcast
Matthias Radestock2015-01-27 20:53:56 +00:00
d88c12caa7
improve peer gc efficiency Instead of separately calculating routes to every individual peer, carry out one calculation for routes to all peers. Same as unicast routes except taking into account asymmetric connections.
Matthias Radestock2015-01-27 20:33:13 +00:00
6c934f1cd3
cosmetic: reorder some LocalPeer methods to match typical lifecycle
Matthias Radestock2015-01-27 18:11:42 +00:00
824286d382
shrink "improved" topology update When an update contains an older version of a peer we know about, there is no point in including our better version in the "improved" update, since we will have told our neighbours about that already and any race conditions are taken care off by the periodic sending of the complete topology.
Matthias Radestock2015-01-25 12:27:45 +00:00
af6e5c3438
move more of the topology docs into their own section and some cosmetics
Matthias Radestock2015-01-25 12:21:02 +00:00
fc85e12556
push more of the topology docs into the topology section plus some cosmetics
Matthias Radestock2015-01-25 12:17:50 +00:00
55f55a59bc
refactor: promote connection lifecycle methods from LocalPeer to Peer They are sufficiently generic, and having them on Peer is useful for testing.
Matthias Radestock2015-01-23 20:04:09 +00:00
3baa3c09a4
revamp error handling on tcp connection receive loop - treat crypto decoding errors as errors instead of warnings - introduce helper for handling protocol messages - put conn.Shutdown in one place
Matthias Radestock2015-01-22 16:21:48 +00:00
8af2a1c25d
refactor: make tie breaking part of the Connection interface and thus eliminate all knowledge of LocalConnection from the LocalPeer.handle* methods
Matthias Radestock2015-01-21 21:44:22 +00:00
99525ebf85
refactor: LocalConnection.CheckFatal be gone! use Shutdown instead, which is in the Connection interface, thus further reducing dependency on LocalConnection.
Matthias Radestock2015-01-21 21:23:59 +00:00
fe07a41dc3
refactor: make LocalConnection uid 'private' which makes sense now that we've abstracted tie breaking
Matthias Radestock2015-01-21 20:46:45 +00:00
9302105a2e
refactor: abstract away connection tie breaking So we don't need to carry that logic in LocalPeer
Matthias Radestock2015-01-21 20:42:27 +00:00
6efa794ab4
some testing improvements - show complete call stack of failures (this does include some of the testing machinery, but a) is simple, and b) is guaranteed to not miss important stack frames) - add helper to run test with a timeout - add AssertEqualuint64
Matthias Radestock2015-01-21 18:45:37 +00:00
04f9fab78b
don't ignore EOF when decoding peer connections Even when there are no connections, we still expect the decoding to succeed.
Matthias Radestock2015-01-21 17:44:54 +00:00
f5a9f07026
forgive all protocol decoding errors log an error and close the connection, instead of blowing up
Matthias Radestock2015-01-21 15:01:43 +00:00
8eed483c6e
set permissons on 110_encryption_test.sh same as everything else
Matthias Radestock2015-01-21 14:18:17 +00:00
1181a0cb33
better APIs for sending protocol messages no longer tagging requiring the caller to construct them
Matthias Radestock2015-01-20 22:31:16 +00:00