Commit Graph

88 Commits

Author SHA1 Message Date
Dmitri Bogomolov e43bd36618
More unused variables 2018-03-22 13:23:36 +02:00
Dmitri Bogomolov d91c3a6b0c
Removed unnecessary comment and percent formatting in logger.error 2018-03-22 12:13:47 +02:00
Dmitri Bogomolov d447db907c
Address operations: simplified the code a bit 2018-03-22 12:13:47 +02:00
Dmitri Bogomolov 006b98389b
Address operations: flake8 2018-03-22 12:13:47 +02:00
Mahendra 1ad321b08a
replace with calls to the helper_random function 2018-03-21 17:22:23 +05:30
Peter Šurda 1e4400a207
Remove obsolete code
- PendingDownload and PendingUpload in are obsolete
- the replacement functions only provide lengths and are in
2018-03-13 07:32:23 +01:00
f97ada87 be0e724b23
implement stealth ack objects 2017-09-30 19:45:40 +10:00
Peter Šurda a48dff3bee
PoW init reordering
- inited by the worker thread on its own init, instead of when the
imports are being evaluated
- also got rid of windows-style newlines in OpenCL PoW
2017-08-15 12:24:43 +02:00
Peter Šurda 6c695c8ac7
Remove non-asyncore network code (partial) 2017-08-09 17:36:52 +02:00
Peter Šurda 02a07e5119
Asyncore update
- default to true (original attempt didn't work correctly)
2017-05-29 03:16:14 +02:00
Peter Šurda 73c41bff9d
-BMConfigParser. instead of BMConfigParser().
2017-05-29 02:30:18 +02:00
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
2017-05-29 00:24:07 +02:00
Peter Šurda 9f4a1fa0a4
Config file defaults and address unification
- now allows to put default values for a specific
option in the file
- addresses as sections are now detected by "BM-" rather than
just ignoring bitmessagesettings. There can now be other sections
with a cleaner config file
2017-05-15 12:18:07 +02:00
Peter Šurda 8d829b587e
Reset OpenCL when settings change
- previously, changing the OpenCL vendor (or turning it on/off) required
  a restart and this wasn't clear
2017-02-28 22:59:44 +01:00
Peter Šurda 511b89ebbe
PoW Worker should wait for sql thread to init
- I think this was causing freezing queue on launch if not empty
- I can't reproduce the bug anymore
2017-02-26 20:44:56 +01:00
Peter Šurda 74c85b4a9e
Retransmit timing changes
- makes it behave more like in the description
- partial for #847
2017-02-25 23:40:37 +01:00
Peter Šurda 6062277d60
Rename to
- it was causing problems with py2app because the source of python's own
  CongigParser is also
2017-02-22 09:34:54 +01:00
Peter Šurda 157881bc63
Cyclic import fix
- networkDefaultProofOfWorkNonceTrialsPerByte and
  networkDefaultPayloadLengthExtraBytes cyclic import fix
- PyBitmessage should launch now when there's no keys.dat
2017-02-08 20:37:42 +01:00
Peter Šurda 59f3a2fbe7
Reduce cyclic dependencies
- rearranged code to reduce cyclic dependencies
- doCleanShutdown is separated in
- shared queues are separated in
- some default values were moved to
- knownnodes partially moved to
2017-02-08 13:41:56 +01:00
Peter Šurda 5ae1327edc
Download/upload shutdown fixes
- Missing renamed to PendingDownload
- PendingDownload now only retries 3 times rather than 6 to dowload an
- Added PendingUpload, replacing invQueueSize
- PendingUpload has both the "len" method (number of objects not
  uploaded) as well as "progress" method, which is a float from 0
  (nothing done) to 1 (all uploaded) which considers not only objects
  but also how many nodes they are uploaded to
- PendingUpload tracks when the object is successfully uploaded to the
  remote node instead of just adding an arbitrary time after they have
  been send the corresponding "inv"
- Network status tab's "Objects to be synced" shows the sum of
  PendingUpload and PendingDownload sizes
2017-01-19 19:48:12 +01:00
Peter Šurda 8cb0953401
Moved writeKeysFile into configparser
- shared.writeKeysFile -> BMConfigParser().save
- makes it easier to get rid of circular imports
2017-01-15 10:50:02 +01:00
Peter Šurda ad75552b5c
Move shutdown from to 2017-01-14 23:20:15 +01:00
Peter Šurda 2cf2188bc3
Object sending fix
- forgot to move broadcastToSendDataQueues in
2017-01-12 07:22:34 +01:00
Peter Šurda e7470a4757
Remove leftover from debugging 2017-01-12 06:57:17 +01:00
Peter Šurda ac348e4e6b
Fixes and refactoring
- fixes errors introduced in the earlier refactoring
- more variables moved to
- path finding functions moved to
- remembers IPv6 network unreachable (in the future can be used to skip
  IPv6 for a while)
2017-01-11 17:00:00 +01:00
Peter Šurda 8bcfe80ad0
Refactoring of config parser and
- got rid of shared config parser and made it into a singleton
- refactored safeConfigGetBoolean as a method of the config singleton
- refactored safeConfigGet as a method of the config singleton
- moved softwareVersion from into
- moved some global variables from into
- moved some protocol-specific functions from into
2017-01-11 14:27:19 +01:00
Peter Šurda e84b19613e
Inventory refactoring
- minor refactoring, made it into singleton instead of a shared global
  variable. This makes it a little bit cleaner and moves the class into
a separate file
- removed duplicate inventory locking
- renamed to (this is the code that
  ensures only one instance of PyBitmessage runs at the same time)
2017-01-10 21:15:35 +01:00
Peter Šurda c6d45dd394
Encoding when sending to self
- when sending to self, it always used encoding 2 when saving into the
  inbox. Now uses the one that's currently selected
2016-11-15 17:07:53 +01:00
Peter Šurda 612333a267
Enable support for extended encoding
- receiving extended encoding now works
- sending works from the GUI by pressing "Shift" while clicking on
- requires
2016-11-14 20:23:58 +01:00
Peter Šurda e6ce73f4bd
Multiple PoW updates
- fixes "fast python" (multiprocessing) PoW
- python PoW (both slow and fast) interruptible on *NIX
- signal handler should handle multiple processes and threads correctly
(only tested on Linux)
- popul window asking whether to interrupt PoW when quitting QT GUI
- PoW status in "sent" folder fixes and now also displays broadcast
status which didn't exist before
- Fixes #894
2016-10-05 20:06:47 +02:00
mailchuck 9edde110a2 Translation update
Some function calls were not being identified as text that should be
2016-05-02 15:00:26 +02:00
mailchuck 3dbb4d5ce9 GUI shutdown improvements
- it shows that it needs to wait for PoW to finish
- it waits a bit for new objects to be distributed
- it displays a better progress indicator in the status bar

Previously, people who don't understand how PyBitmessage works sometimes
shut it down immediately after they wrote a message. This would have
caused the message to be stuck in the queue locally and not sent. Now,
it will indicate that the PoW still needs to work, and it will wait a
bit longer so that the message can spread. It's not a completely correct
approach, because it does not know whether the message was really
retrieved after the "inv" notification was sent.
2016-05-02 15:00:25 +02:00
Peter Šurda 2f27d43e7e PoW can sometimes be shutdown-able
Python and OpenCL PoW now stop when PyBitmessage shutdowns. C PoW needs
additional support in C so it doesn't work there yet.
2016-05-02 15:00:25 +02:00
mirrorwish a7ec4c0555 Some preparations for python 3 2016-05-02 15:00:25 +02:00
mirrorwish 554627dd92 Refactor Inventory 2016-05-02 15:00:25 +02:00
Peter Šurda d63ecfc566 Translation update
- typos
- updated German translation
- Fixes Bitmessage#844
2016-05-02 15:00:24 +02:00
Peter Šurda ab974abce0 Sent message status on ACK
Fixes #176
2016-05-02 15:00:24 +02:00
mailchuck 32b0d24be2 singleWorker shutdown fix
if singleWorker crashed, the thread couldn't be joined. This both makes
it so that it doesn't crash, as well as reorders the shutdown sequence
so that it is less likely to be triggered.
Fixes Bitmessage#549
2016-05-02 15:00:23 +02:00
mailchuck 4dbd444053 Logging fix 2016-05-02 15:00:22 +02:00
mailchuck a727847e55 Addresses can be configured not to send acks
Manually by specifying "dontsendack" = true in the address section
2016-05-02 15:00:22 +02:00
mailchuck 399100e6d8 PoW support code cleanup
Is now nicer and reports if OpenCL fails
2016-05-02 15:00:21 +02:00
mailchuck d69c2e097f Cleaner shutdown
Addresses Bitmessage#549
2016-05-02 15:00:21 +02:00
mailchuck 231219a193 Improved logging
Fixes #118

- changed almost all "print" into logger
- threads have nicer names
- logger can have configuration in "logger.dat" in the same directory as
"keys.dat", and the logger will pick the one named "default" to replace
the "console" and "file" that are in PyBitmessage otherwise

Example file for logging to syslog:

keys = root,syslog



keys = syslog

class = handlers.SysLogHandler
formatter = syslog
level = DEBUG
args=(('localhost', handlers.SYSLOG_UDP_PORT),

keys = syslog

format=%(asctime)s %(threadName)s %(filename)s@%(lineno)d %(message)s
datefmt=%b %d %H:%M:%S
2016-05-02 15:00:21 +02:00
Henrik Olsson 57575d0a39 Fix some typos
Author:    Henrik Olsson <>
2016-05-02 15:00:20 +02:00
Jonathan Warren cc712cb8ff finished work on specifyTTL 2015-03-09 02:35:32 -04:00
Jonathan Warren 95c939a2a0 Fix #748 - Check hash of sig instead of message contents 2015-02-20 21:03:20 -05:00
Jonathan Warren 5b87bc26ec Fix #758 2015-01-21 12:38:25 -05:00
Jonathan Warren 50c392c197 resolve merge conflict 2014-12-25 20:37:04 -05:00
Jonathan Warren e898b40203 Removed obsolete Protocol v2 code 2014-12-25 04:06:57 -05:00
Jonathan Warren 38b861033d acknowledgement EOL time: 2.5 days 2014-11-13 16:32:31 -05:00