Commit Graph

353 Commits (daf556ca50790160c5cd048de698a851e8884757)

Author SHA1 Message Date
Dmitri Bogomolov daf556ca50
Added tests for knownnodes:
- import of pickled knownnodes;
  - default knownnodes if nothing imported;
  - knownnodes starvation (#1335), demanded changes in networkthread.
5 years ago
Dmitri Bogomolov a3300ba8f1
A test case for core (which will be ran in main thread) 5 years ago
Dmitri Bogomolov 51df0507e2
Fixed signal files creation 5 years ago
Dmitri Bogomolov 5b1d2e56a1
Changes into test mode:
run in background, stop after 30 sec since last API response
5 years ago
Dmitri Bogomolov 533df80ce9
Resolving pylint warnings 5 years ago
Dmitri Bogomolov bd5bdda009
Moved class singleAPI to api module and `import api` below config check 5 years ago
surbhi bb8d4c5a1f
Added Navigation Drawer UI with create feature 5 years ago
surbhi 13d41c7647
added imports for wrapper main file kivy running 5 years ago
surbhi 4770790597
Added kivy for making it run on Desktop and Mobile Clients 5 years ago
Dmitri Bogomolov 46f5ead960
Import email related stuff only if configured 6 years ago
Dmitri Bogomolov 953ea4e950
Slightly rewritten bitmessagemain to use depends properly 6 years ago
Dmitri Bogomolov f87ce4ad50
Moved reading knownnodes.dat into knownnodes module 6 years ago
Dmitri Bogomolov 4cf73675c2
flake8: bitmessagemain, class_singleCleaner, helper_generic, shutdown
and singleinstance
6 years ago
f97ada87 54651c7598
fix logic bug in enableGUI implementation 6 years ago
f97ada87 cb59b8abbd
component control switches 6 years ago
Dmitri Bogomolov 43a471a79b
Used state.testmode to indicate when operating in test mode 6 years ago
Dmitri Bogomolov 58c3dfb3d4
Testing mode for bitmessagemain 6 years ago
Peter Šurda 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
6 years ago
Dmitri Bogomolov 61ddc1208e
No more shared.daemon variable 6 years ago
Peter Šurda d9a4263083
Daemonising fixes
- change forking exit order as systemd expects (wait until child is
ready, then exit parent, then grandparent)
- fix signal handler if prctl not installed
- revert recent PID file changes
6 years ago
Peter Šurda 3cb9547389
Only write PID after last fork
- should fix systemd integration
6 years ago
Peter Šurda 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)
6 years ago
f97ada87 08748fa9ae
move config read inside main function 6 years ago
Peter Šurda 6ce86b1d0a
Dandelion++ implementation
- untested, some functionality may be missing, don't turn on
- also, it randomises upload of requested objects
- affects #1049
6 years ago
f97ada87 c89d86a779
use getopt parser for command-line arguments 6 years ago
Peter Šurda aaa5e9d309
Windows daemon mode workaround 6 years ago
Peter Šurda 0150a35dd4
Change main thread name to PyBitmessage 6 years ago
Peter Šurda 660997b8f4
Code Quality 6 years ago
Peter Šurda b886f935d4
Daemon Windows fix
- closing the filehandle isn't the correct approach, it causes more
bugs. Use os.devnull instead
6 years ago
Peter Šurda 314af0925f
Daemonize fix for Windows
- /dev/null isn't available on Windows so just close the console
sockets directly
6 years ago
Peter Šurda 58b47bc6de
Forking fixes 6 years ago
Peter Šurda 6c695c8ac7
Remove non-asyncore network code (partial) 6 years ago
Peter Šurda cc955cd69d
Try new ports of binding fails
- API and BM protocol will try random ports for binding if those
configured are occupied
6 years ago
Peter Šurda 7a4551e1e7
Fix signal handler in daemon mode
- signal handler requires the main thread to run
6 years ago
Peter Šurda 501f07dd34
Setsid is not available on Windows
- wrap an error handler around it
6 years ago
Peter Šurda 20cbac9752
Fix daemonize for Windows
Fixes #1034
6 years ago
Peter Šurda bdf61489ae
Allow multiple ReceiveQueue threads
- defaults to 3
6 years ago
Peter Šurda 4536e44b8c
Thread names propagate to system
- the thread names should now show up in the monitoring tools of
operating systems (tested on linux)
6 years ago
Peter Šurda fc19e4119a
Download thread updates
- now tracks downloads globally too, so it doesn't request the same
object from multiple peers at the same time
- retries at the earliest every minute
- stops trying to download an object after an hour
- minor fixes in retrying downloading invalid objects
7 years ago
Peter Šurda e00a02206b
- this thread is for spreading new/updated addresses in active
connections, analogous to the InvThread
- it doesn't do anything yet, this is just a dummy queue at the moment
7 years ago
Peter Šurda 2685fe29b1
Code quality improvements 7 years ago
Peter Šurda 618f3865c1
Main thread end
- instead of sleeping, it just ends
7 years ago
Peter Šurda 0cc8589b27
Asyncore updates
- should prevent the same object being re-requested indefinitely
- locking for object tracking
- move SSL-specific error handling to TLSDispatcher
- observe maximum connection limit when accepting a new connection
- stack depth test (for debugging purposes)
- separate download thread
- connection pool init moved to main thread
7 years ago
Peter Šurda a5c1b0c529
Asyncore fixes
- better handling of WSA* checks on non-windows systems
- handle EBADF on Windows/select
- better timeouts / loop lengths in main asyncore loop and
spawning new connections
- remove InvThread prints
7 years ago
Peter Šurda 02a07e5119
Asyncore update
- default to true (original attempt didn't work correctly)
7 years ago
Peter Šurda c85d52b8e8
Asyncore updates
- asyncore is now on by default
- inv announcements implemented
- bandwidth limit implemented / fixed
- stats on download / upload speed now work
- make prints into logger
- limit knownNodes to 20k as it was before
- green light fixed
- other minor fixes
7 years ago
Peter Šurda f8b4b427fc
Asyncore update
- bugfixes
- UDP socket for local peer discovery
- new function assembleAddr to unify creating address command
- open port checker functionality (inactive)
- sendBigInv is done in a thread separate from the network IO
7 years ago
Peter Šurda d699a28e49
Add variables to errno and socket
- to make sure they work cross platform without having to do
complicated tests
7 years ago
Peter Šurda e309a1edb3
Asyncore update
- separate queue for processing blocking stuff on reception
- rewrote write buffer as a queue
- some addr handling
- number of half open connections correct
7 years ago
Peter Šurda 51e52401fe
Windows plaform check pythonic
- moved to .startswith instead of 'in'
- thanks @Lvl4sword
7 years ago