Commit Graph

371 Commits (21ae6cb9b00a17eb084ab994e5e6d4bed462f980)

Author SHA1 Message Date
Dmitri Bogomolov 5160a68c28
Moved start_proxyconfig to helper_startup;
no more prints in helper_startup
3 years ago
sandakersmann 9119507b03
Changed copyright year to 2020 3 years ago
lakshyacis af52d95503
bitmessagemain quality fixes 4 years ago
Dmitri Bogomolov 388de96495
Alphabetical internal import order in bitmessagemain 4 years ago
Dmitri Bogomolov 341651973a
Reduced imports:
- exported from network package all objects used outside;
  - made all threads available in threads module.

Wrote some module docstrings.
4 years ago
Dmitri Bogomolov 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
4 years ago
Dmitri Bogomolov a7cfe5ba32
Try to test with tor 4 years ago
lakshyacis cc869d0426
bitmessagemain flake8 Fixes 4 years ago
Dmitri Bogomolov ec11632297
Introduce pluggable proxy configurators 4 years ago
Dmitri Bogomolov 2bd75b87bd
Use config = BMConfigParser() in bitmessagemain.Main 4 years ago
Dmitri Bogomolov 4b72a433c6
New config setting - `extralowdifficulty` to use for testing:
replaces shared.useVeryEasyProofOfWorkForTesting and automatically
applies to test-mode.
4 years ago
Marius Kjærstad e0efb7fd2f
Merge branch 'v0.6' into v0.6 4 years ago
Dmitri Bogomolov c38d250389
Resolved pylint warnings and removed allThreadTraceback() entirely 4 years ago
Dmitri Bogomolov 3ec798bcfb
helper_generic is obsolete 4 years ago
sandakersmann 8924d4be5c
Changed copyright year to 2019 4 years ago
Peter Šurda ca567acab3
Put uploads into a separate thread
- instead of being processed in the ReceiveQueue thread, uploads are now done
  in a dedicated thread. Only the parsing is done in ReceiveQueue thread.
- the UploadThread is modelled based on the DownloadThred, but simpler.
- it checks for intersection attack, eliminates duplicates and restricts the
  write buffer size to 2MB (may still grow slightly higher if too many big
  objects are requested, but the absolute limit appears to be about 4.5MB in the
  worst case scenario).
- the restriction of the write buffer may cause some upload throttling (to
  about 2MB per second per connection), but can be optimised later
- fixes #1414
4 years ago
Dmitri Bogomolov 0e63392ee3
Fix #1385: not check for pyqt if daemon = true set in config 5 years ago
Dmitri Bogomolov 5572e6b3a1
Suppress pylint warning about 'relative import' 5 years ago
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 5 years ago
Dmitri Bogomolov 953ea4e950
Slightly rewritten bitmessagemain to use depends properly 5 years ago
Dmitri Bogomolov f87ce4ad50
Moved reading knownnodes.dat into knownnodes module 5 years ago
Dmitri Bogomolov 4cf73675c2
flake8: bitmessagemain, class_singleCleaner, helper_generic, shutdown
and singleinstance
5 years ago
f97ada87 54651c7598
fix logic bug in enableGUI implementation 5 years ago
f97ada87 cb59b8abbd
component control switches 5 years ago
Dmitri Bogomolov 43a471a79b
Used state.testmode to indicate when operating in test mode 5 years ago
Dmitri Bogomolov 58c3dfb3d4
Testing mode for bitmessagemain 5 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
5 years ago
Dmitri Bogomolov 61ddc1208e
No more shared.daemon variable 5 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
5 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