-
Notifications
You must be signed in to change notification settings - Fork 2
PyBitmessage networking specificities
Kagami Hiiragi edited this page Feb 28, 2015
·
8 revisions
- 8 outgoing connections for normal mode outgoingSynSender.py#L43
- 1 outgoing connection for trusted peer mode outgoingSynSender.py#L43
- Listen for incoming connections if not trusted peer mode singleListener.py#L44
- Listen on both IPv4 and IPv6 singleListener.py#L64
- Max number of all connections = 220/200 singleListener.py#L84, receiveDataThread.py#L280
- Sending version if we initiated the connection outgoingSynSender.py#L166, send in response if it's incoming connection receiveDataThread.py#L780
- Timeout starts with 20 seconds outgoingSynSender.py#L95, singleListener.py#L114, raising to 600 (10 min) after connection was established receiveDataThread.py#L265
- Sending pong every 5 mins of no activity to all sockets singleCleaner.py#L62, sendDataThread.py#L160
- Also respond to ping command with pong (not used) receiveDataThread.py#L181, receiveDataThread.py#L241
- Send error message and close connection on version message if protocol version ≠ 3 or time not within ± 3 hours receiveDataThread.py#L724
- Just logs incoming error messages receiveDataThread.py#L341
- Hardcoded nodes for first ran (should have timestamp 0 actually) botstrap.py#L26, defaultKnownNodes.py#L15
- DNS nodes for every run if not trusted peer mode and if not SOCKS proxy mode (should have timestamp 0 actually) singleListener.py#L49, bootstrap.py#L32
- Connecting to 8 random known nodes at startup (if not trusted peer mode) bitmessagemain.py#L68, outgoingSynSender.py#L25
- Don't connect/don't accept connections to already connected IPs outgoingSynSender.py#L51, singleListener.py#L105
- Don't try to connect to the same peer within 30 mins outgoingSynSender.py#L57
- Don't accept new known nodes from addr message if already >20000 or net_addr time not within ± 3 hours receiveDataThread.py#L594
- Update time for known nodes we are connected to (initiated by us) receiveDataThread.py#L155
- Send net_addr of connected node to others node after establishment receiveDataThread.py#L275
- Send 1000 random non-private younger than 3 hours net_addrs to connected node after establishment receiveDataThread.py#L627
- Add trusted peer to known nodes outgoingSynSender.py#L32
- Delete node to which we failed to connected if we have >1000 nodes and node time older than 48 hours outgoingSynSender.py#L221
- Add node to known nodes after version message receiveDataThread.py#L775
- Validate local ranges in recaddr receiveDataThread.py#L576
- Only accept stream*2/stream*2+1 net_addrs receiveDataThread.py#L552
- Dumps new nodes to disk every 5 mins receiveDataThread.py#L602, receiveDataThread.py#L776, singleCleaner.py#L112
- Skip inv if we already have >200000 unprocessed invs or >1000 from this peer receiveDataThread.py#L408
- Don't check whether we asked for received object with getdata receiveDataThread.py#L373
- Request single inv object not in our inventory right away from the peer receiveDataThread.py#L407
- Randomly send getdata requests one by one for multiple inv objects not in our inventory on next tick receiveDataThread.py#L438, receiveDataThread.py#L196
- Return requested objects right away from memory of from SQL receiveDataThread.py#L453
- Do timing attack migitaion by sleeping near constant amount of time receiveDataThread.py#L386, shared.py#L617, receiveDataThread.py#L332
- Send all known objects in inv message after establishment receiveDataThread.py#L288
- Dumps all inventory hashes in memory to disk every 5 mins singleCleaner.py#L49
- Don't show messages with the duplicated signature hash to prevent replay attacks objectProcessor.py#L507, PyBitmessage#783, PyBitmessage#748