Commit Graph

79 Commits

Author SHA1 Message Date
487eab6f78
fix conflicts after merging 2020-06-10 15:46:16 +05:30
d09782e53d
Obsolete bitmessagemain.connectToStream(), use BMConnectionPool method 2020-05-05 17:30:31 +03:00
lakshyacis
c613c6d439
pylint fixes 2 2020-01-21 17:43:09 +05:30
lakshyacis
fe3a98c2b6
unidiomatic-typecheck and logging-format-interpolation issue suprressed 2020-01-21 16:15:17 +05:30
lakshyacis
4d385a9c79
Code quality issues fixes 2020-01-20 18:59:51 +05:30
lakshyacis
8e6c2f3cfd
Kivy database and safegetint issues 2020-01-18 17:13:06 +05:30
lakshyacis
882aa9d970
remove useless code 2020-01-10 20:10:47 +05:30
lakshyacis
eb98abbabf
Code Formatting 2020-01-10 19:46:15 +05:30
jai.s
5ff6c26efc
Solved python3 database issue and now network connection created via using the python3 db 2020-01-10 19:06:21 +05:30
lakshyacis
69eedf7bc2
network files fixes python3 2020-01-02 16:25:52 +05:30
jai.s
9b1088b2e2
updated origin with upstream changes 2019-12-23 16:48:37 +05:30
jai.s
ded1defb1f
Worked on network issue and stopped the udp connection aand required the select's epoll condition and instead used select pollar method 2019-11-30 13:18:15 +05:30
2a165380bb
Restrict outbound connections on network groups
Logic borrowed from bitcoin, see CNetAddr::GetGroup() in src/netaddress.cpp
Simplified, so may not work fully identically but for our purposes it's good
enough. Won't connect to more than one host from a /16 subnet on IPv4 and a /32
subnet on IPv6.
2019-11-18 12:20:29 +01:00
jai.s
fdbf7ad0f2
Worked on the network issues 2019-11-14 20:39:26 +05:30
d6c1845b71
Moved Peer from state to network.node
and trustedPeer to network.connectionpool.BMConnectionPool attribute
2019-11-11 17:13:12 +02:00
7a1f803c92
network.BMConnectionPool: added shortcuts connections()
and establishedConnections(), some formatting fixes
2019-11-11 12:03:04 +02:00
7a89109fc9
New logging approach in order to reduce imports from submodules
and use logging without risk of circular import. Only subpackage
that imports from debug is bitmessageqt - because it also uses
debug.resetLogging().
Instead of from debug import logger is now recommended to use:

import logging

logger = logging.getLogger('default')

All subclasses of StoppableThread now have a logger attribute.
All threading related stuff except for set_thread_name()
was moved from helper_threading to network.threads.

Fixed two my mistakes from previous edit of debug in a1a8d3a:

 - logger.handlers is not dict but iterable
 - sys.excepthook should be set unconditionally
2019-10-18 09:35:24 +03:00
jai.s
95990d8def
Solved new address creations issues 2019-10-09 18:21:29 +05:30
jai.s
c813f679ae
Solved bmconfigparser python3 incompatibility issue and removed unrequired comment and line of code which are added during python3 plotting 2019-10-09 17:57:13 +05:30
jai.s
42ee9d910b
launch py3 convert app for first phase(need to do more checks) 2019-10-09 17:57:13 +05:30
jai.s
afb368e770
initial commit for python forward porting 2019-10-09 17:57:13 +05:30
88f2c51595
quzwelsuziwqgpt2.onion:8444 is also a bootstrap server 2019-09-25 18:55:02 +03:00
4825c5a136
Universal bootstrap procedure for any connection type 2019-09-25 18:55:01 +03:00
0a06567071
Connect to bootstrap nodes by name 2019-09-25 18:55:01 +03:00
lakshyacis
f1b6b16940
connectionpool.py pylint fixes 2019-09-02 13:52:56 +05:30
391b5ded87
Docstrings in network from #1368 2019-07-26 12:08:32 +03:00
19ab56a979
network.connectionpool: get any setting with .safeGet.. 2019-07-26 12:08:18 +03:00
996e71ae6f
flake8 in network package 2019-07-26 12:07:57 +03:00
e1d5604674
Fix #1408 (duplicate connections to some hosts), got from chan 2018-12-18 19:36:46 +02:00
ef54bcaf82
The changes in #1325 are buggy. Implementing it properly. 2018-10-12 11:28:13 +03:00
342e2a209c
Use DNS seed only if knownnodes are empty 2018-07-30 17:39:12 +03:00
Mahendra
1a36361ef9
replace all random.xxx with helper random function 2018-03-21 19:26:27 +05:30
03f08b3cfd
Typo 2018-02-04 21:16:30 +01:00
a646ec4902
Allow separate proxy for onions
- new options in network section: onionsocksproxytype,
onionsockshostname and onionsocksport. These allow to separate
connectivity types for onion and non-onion addresses, e.g. connect to
clear nodes over clearnet and onions over tor
- also remove some obsolete imports
2018-02-04 21:03:54 +01:00
fd1a6c1fa1
Dandelion update
- dandelion fixes
- try to wait as long as possible before expiration if there are no
outbound connections
- expire in invThread rather than singleCleaner thread
- deduplication of code in inv and dinv command methods
- turn on by default, seems to work correctly now
- turn off dandelion if outbound connections are disabled
- start tracking downloads earlier, and faster download loop
- remove some obsolete lines
- minor PEP8 updates
2018-02-03 11:46:39 +01:00
68b58ce0c5
Download optimisation
- new data structure to handle download tracking, uses less CPU
2018-02-01 12:19:39 +01:00
9e79386595
Set state to "close" and call handle_close() for all connections 2018-01-30 14:04:03 +02:00
c9851b9f41
Connection lookups invalid data handling
- shouldn't throw an exception if argument is a string rather than Peer
2018-01-02 22:23:03 +01:00
1864762a0a
Apply bandwidth limits without restart
- also minor style fixes
2018-01-01 12:49:08 +01:00
fdfbb77ed2
Close filehandles on connection reaping
- I thought this is done automatically through garbage collection, but I
think as the channel is still assigned in the asyncore map, it needs
to be done manually. Basically filehandle limit exceeded and it
crashed
2017-11-19 00:05:55 +01:00
5e042b76e7
Typo
- missing brackets
2017-11-18 10:05:41 +01:00
3aa6f386db
Dandelion fixes
- dandelion would always think there is a cycle and trigger fluff
- cycle fluff trigger didn't correctly re-download and re-announce the
object. Now it remembers between (d)inv and object commands that it's
in a fluff trigger phase.
2017-11-18 09:47:17 +01:00
3c3d69e5de
Reap closed connection fix 2017-11-17 19:50:39 +01:00
5a787f41d2
Socket closing changes
- explicit close only through asyncore error handler
- implicit close through garbage collector
- avoid duplicate closing
2017-11-17 13:37:51 +01:00
1792289e00
close handling fix
- don't close a connection twice
2017-11-14 23:43:05 +01:00
2d34e73648
Dandelion updates
- fixes and feedback from @gfanti and @amiller
- addresses #1049
- minor refactoring
- two global child stems with fixed mapping between parent and
child stem
- allow child stems which don't support dandelion
- only allow outbound connections to be stems
- adjust stems if opening/closing outbound connections (should
allow partial dandelion functionality when not enough outbound
connections are available instead of breaking)
2017-10-20 01:21:49 +02:00
391d40d78b
Socket closing changes
- closing reason moved to a variable
- actual closing now done in asyncore thread instead of
receivedata thread
2017-10-19 09:08:05 +02:00
333170b172
Dandelion fixes
- more exception handling
- only use outbound connections for stems
(thanks to @amillter for info)
- don't create stems if config disabled
- addresses #1049
2017-10-06 16:33:44 +02:00
9923d288e0
Dandelion fixes
- in route selector, some connections may not have the services
attribute (yet)
- Addresses #1049
2017-09-25 09:17:15 +02:00
d574b167d8
Dandelion updates & fixes
- Addresses #1049
- Add dandelion routes for locally generated objects
- Minor bugfixes
- Send dinv commands on stem objects (instead of always sending inv
command)
2017-09-25 08:49:21 +02:00