Commit Graph

374 Commits

Author SHA1 Message Date
lakshyacis 6f35da4096
Imported packages sequencing and formatting 2020-01-30 12:14:40 +05:30
lakshyacis 3211fca953
formatting and shorten line length 2020-01-22 15:55:26 +05:30
lakshyacis b6a81f1252
Formatting and fix License 2020-01-15 16:17:26 +05:30
Dmitri Bogomolov 5160a68c28
Moved start_proxyconfig to helper_startup;
no more prints in helper_startup
2020-01-04 14:28:45 +02:00
sandakersmann 9119507b03
Changed copyright year to 2020 2019-12-27 18:23:02 +01:00
lakshyacis af52d95503
bitmessagemain quality fixes 2019-11-25 10:41:55 +05:30
Dmitri Bogomolov 388de96495
Alphabetical internal import order in bitmessagemain 2019-11-11 12:03:04 +02:00
Dmitri Bogomolov 341651973a
Reduced imports:
- exported from network package all objects used outside;
  - made all threads available in threads module.

Wrote some module docstrings.
2019-11-11 12:03:03 +02:00
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
2019-10-18 09:35:24 +03:00
Dmitri Bogomolov a7cfe5ba32
Try to test with tor 2019-09-25 18:55:01 +03:00
lakshyacis cc869d0426
bitmessagemain flake8 Fixes 2019-08-29 16:13:27 +05:30
Dmitri Bogomolov ec11632297
Introduce pluggable proxy configurators 2019-08-08 11:46:50 +03:00
Dmitri Bogomolov 2bd75b87bd
Use config = BMConfigParser() in bitmessagemain.Main 2019-08-06 18:59:13 +03:00
Dmitri Bogomolov 4b72a433c6
New config setting - `extralowdifficulty` to use for testing:
replaces shared.useVeryEasyProofOfWorkForTesting and automatically
applies to test-mode.
2019-04-22 11:32:29 +03:00
Marius Kjærstad e0efb7fd2f
Merge branch 'v0.6' into v0.6 2019-03-23 15:14:56 +01:00
Dmitri Bogomolov c38d250389
Resolved pylint warnings and removed allThreadTraceback() entirely 2019-03-11 16:08:41 +02:00
Dmitri Bogomolov 3ec798bcfb
helper_generic is obsolete 2019-03-11 16:08:41 +02:00
sandakersmann 8924d4be5c
Changed copyright year to 2019 2019-02-05 15:16:30 +01:00
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
2018-12-20 20:34:01 +01:00
Dmitri Bogomolov 0e63392ee3
Fix #1385: not check for pyqt if daemon = true set in config 2018-11-04 15:16:56 +02:00
Dmitri Bogomolov 5572e6b3a1
Suppress pylint warning about 'relative import' 2018-10-22 17:18:24 +03:00
Dmitri Bogomolov daf556ca50
Added tests for knownnodes:
- import of pickled knownnodes;
  - default knownnodes if nothing imported;
  - knownnodes starvation (#1335), demanded changes in networkthread.
2018-10-22 17:18:24 +03:00
Dmitri Bogomolov a3300ba8f1
A test case for core (which will be ran in main thread) 2018-10-22 17:18:23 +03:00
Dmitri Bogomolov 51df0507e2
Fixed signal files creation 2018-10-22 17:18:23 +03:00
Dmitri Bogomolov 5b1d2e56a1
Changes into test mode:
run in background, stop after 30 sec since last API response
2018-10-22 17:18:22 +03:00
Dmitri Bogomolov 533df80ce9
Resolving pylint warnings 2018-10-12 11:58:02 +03:00
Dmitri Bogomolov bd5bdda009
Moved class singleAPI to api module and `import api` below config check 2018-10-12 11:58:02 +03:00
surbhi bb8d4c5a1f
Added Navigation Drawer UI with create feature 2018-07-24 15:40:35 +05:30
surbhi 13d41c7647
added imports for wrapper main file kivy running 2018-07-09 17:36:28 +05:30
surbhi 4770790597
Added kivy for making it run on Desktop and Mobile Clients 2018-07-09 17:22:08 +05:30
Dmitri Bogomolov 46f5ead960
Import email related stuff only if configured 2018-06-27 12:27:46 +03:00
Dmitri Bogomolov 953ea4e950
Slightly rewritten bitmessagemain to use depends properly 2018-06-27 01:27:37 +03:00
Dmitri Bogomolov f87ce4ad50
Moved reading knownnodes.dat into knownnodes module 2018-05-21 18:49:38 +03:00
Dmitri Bogomolov 4cf73675c2
flake8: bitmessagemain, class_singleCleaner, helper_generic, shutdown
and singleinstance
2018-05-21 13:37:23 +03:00
f97ada87 54651c7598
fix logic bug in enableGUI implementation 2018-04-13 20:16:00 +10:00
f97ada87 cb59b8abbd
component control switches 2018-04-09 15:03:02 +10:00
Dmitri Bogomolov 43a471a79b
Used state.testmode to indicate when operating in test mode 2018-04-05 13:48:13 +03:00
Dmitri Bogomolov 58c3dfb3d4
Testing mode for bitmessagemain 2018-03-29 15:55:28 +03:00
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
2018-02-03 11:46:39 +01:00
Dmitri Bogomolov 61ddc1208e
No more shared.daemon variable 2018-01-25 12:58:29 +02:00
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
2018-01-01 13:08:12 +01:00
Peter Šurda 3cb9547389
Only write PID after last fork
- should fix systemd integration
2017-12-21 14:26:51 +01:00
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)
2017-10-20 01:21:49 +02:00
f97ada87 08748fa9ae
move config read inside main function 2017-09-27 00:36:43 +10:00
Peter Šurda 6ce86b1d0a
Dandelion++ implementation
- untested, some functionality may be missing, don't turn on
- also, it randomises upload of requested objects
- affects #1049
2017-09-25 01:17:04 +02:00
f97ada87 c89d86a779
use getopt parser for command-line arguments 2017-09-24 07:42:37 +10:00
Peter Šurda aaa5e9d309
Windows daemon mode workaround 2017-09-23 18:25:41 +02:00
Peter Šurda 0150a35dd4
Change main thread name to PyBitmessage 2017-09-21 17:51:34 +02:00
Peter Šurda 660997b8f4
Code Quality 2017-08-22 13:49:27 +02:00
Peter Šurda b886f935d4
Daemon Windows fix
- closing the filehandle isn't the correct approach, it causes more
bugs. Use os.devnull instead
2017-08-20 12:05:53 +02:00