Commit Graph

205 Commits

Author SHA1 Message Date
lakshyacis 6f35da4096
Imported packages sequencing and formatting 2020-01-30 12:14:40 +05:30
lakshyacis b6a81f1252
Formatting and fix License 2020-01-15 16:17:26 +05:30
Dmitri Bogomolov aa7e7dd658
Fixed some docstrings in shared and state 2019-11-18 13:34:00 +02:00
lakshyacis 6f91ba1b33
shared quality fixes 2019-10-31 14:52:43 +05:30
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
Dmitri Bogomolov b52cb9360f
Moved unused timeOffsetWrongCount from shared to BMProto 2019-02-04 22:23:28 +02:00
Dmitri Bogomolov 394c676ba2
Moved successfullyDecryptMessageTimings to class_objectProcessor 2019-02-04 22:23:28 +02:00
Dmitri Bogomolov c2a3b5faed
Removed unused varibles defined in shared:
alreadyAttemptedConnections*, needToWriteKnownNodesToDisk
2019-02-04 22:22:16 +02:00
Dmitri Bogomolov 3adadd398f
Removed from shared the functions duplicating protocol:
decryptAndCheckPubkeyPayload, isBitSetWithinBitfield
2019-02-04 22:19:39 +02:00
Dmitri Bogomolov 5b5ec2b63d
shared.connectedHostsList is obsolete 2019-01-04 16:17:01 +02:00
Dmitri Bogomolov 7c7d6781a2
Removed old code from protocol, shared, state
and class_objectProcessor modules (#1374), temporarily commented
  shared.checkAndShareObjectWithPeers() call
2018-10-27 17:55:01 +03:00
Dmitri Bogomolov 6562502416
Even more unused variables 2018-03-22 13:48:07 +02:00
Dmitri Bogomolov e43bd36618
More unused variables 2018-03-22 13:23:36 +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
Dmitri Bogomolov 61ddc1208e
No more shared.daemon variable 2018-01-25 12:58:29 +02:00
Peter Šurda 9f4a1fa0a4
Config file defaults and address unification
- bmconfigpaser.py 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 fe93473fc5
getpubkey length handling
- don't try to process getpubkey that is too long
2017-04-04 10:44:53 +02:00
Peter Šurda 1af49a0165
Download tracking refactoring
- replace PendingDownload singleton dict with a Queue
- total memory and CPU requirements should be reduced
- get rid of somObjectsOfWhichThisRemoteNodeIsAlearedyAware. It has very
little practicle effect and only uses memory
2017-03-19 22:08:00 +01:00
Peter Šurda 6062277d60
Rename configparser.py to bmconfigparser.py
- it was causing problems with py2app because the source of python's own
  CongigParser is also configparser.py
2017-02-22 09:34:54 +01:00
Peter Šurda 2cc4435cfc
Imports, typos, syntax errors
- remove obsolete imports
- add missing imports
- fix typos
- fix syntax errors
- thanks to landscape.io for report
2017-02-08 14:19:02 +01:00
Peter Šurda 59f3a2fbe7
Reduce cyclic dependencies
- rearranged code to reduce cyclic dependencies
- doCleanShutdown is separated in shutdown.py
- shared queues are separated in queues.py
- some default values were moved to defaults.py
- knownnodes partially moved to knownnodes.py
2017-02-08 13:41:56 +01:00
Peter Šurda 7da36eccbd
Signal sender threads to close on shutdown
- when shutdown is running, add a shutdown command to the queues of all
  sender threads
2017-02-07 20:47:28 +01:00
Peter Šurda e434825bb2
Pending download counter fix
- handles expired objects better
- counts objects that failed download more accurately
2017-02-06 11:02:03 +01:00
Peter Šurda 9ed59dd825
Shutdown procedure cleanup 2017-01-16 23:38:18 +01:00
Peter Šurda 94f0bdc731
Objects to be downloaded optimising
- treat requested but never arrived objects as expired. This is how it
  worked before the refactoring. Without this, the list won't go to
  zero.
2017-01-15 22:01:10 +01:00
Peter Šurda f079ff5b99
Refactor objects to be downloaded
- moved logic into a Missing singleton
- shouldn't try to download duplicates anymore, only requests a hash
  once every 5 minutes and not from the same host
- removed obsoleted variables
- the "Objects to be synced" in the Network tab should now be correct
- removed some checks which aren't necessary anymore in my opinion
- fix missing self in Throttle (thanks landscape.io)
2017-01-15 19:21:24 +01:00
Peter Šurda 9bf17b34d1
Remove obsolete imports and code
- landscape.io pointed out obsolete imports
- there is also an obsolete variable and lock in throttle.py
- add Exception type to BMConfigParser().save
2017-01-15 11:40:31 +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 689d697a40
Refactor bandwidth limit and speed calculator
- also fixes potential deadlocks
2017-01-14 23:21:00 +01:00
Peter Šurda ad75552b5c
Move shutdown from shared.py to state.py 2017-01-14 23:20:15 +01:00
Peter Šurda 59cf33c9a1
Remove obsolete import 2017-01-13 12:01:38 +01:00
Peter Šurda 65701e5997
neededPubkeys fix
- was still using shared.neededPubkeys
2017-01-13 09:30:23 +01:00
Peter Šurda 810e50a040
Fix minor issues
- landscape.io complained
- obsolete imports
- ciphers -> self.ciphers
2017-01-12 07:26:04 +01:00
Peter Šurda bd520a340f
Trustedpeer fix and more refactoring
- fixed trustedPeer (thanks to anonymous bug reporter)
- moved trustedPeer and Peer into state.py
2017-01-12 06:58:35 +01:00
Peter Šurda c738d93056
Assorted fixes
- landscape.io was complaining, this fixes most easily fixable errors
2017-01-11 18:13:00 +01:00
Peter Šurda fa0a3135e7
Fixes pointed out by landscape.io
- missing/wrong/obsolete imports
- logger formatting
2017-01-11 17:26:25 +01:00
Peter Šurda ac348e4e6b
Fixes and refactoring
- fixes errors introduced in the earlier refactoring
- more variables moved to state.py
- path finding functions moved to paths.py
- 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 shared.py
- 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 shared.py into version.py
- moved some global variables from shared.py into state.py
- moved some protocol-specific functions from shared.py into protocol.py
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 singleton.py to singleinstance.py (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 e647d70bbc
New config parser class
- workaround for % in labels
- can be extended in the future
2016-12-06 10:47:39 +01:00
Peter Šurda 40090a9a12
Notify in UI if time offset wrong
- if your time is off by more than an hour, you won't be able to
  establish a connection to the network. This patch adds a UI
  notification so that the user can understand why he can't connect.
2016-10-23 10:12:49 +02:00
Peter Šurda 32f1e0447a
Multiprocessing PoW fixes and improvements
- the multiprocessing PoW should now work correctly
- it also should be interruptible correctly and the GUI will ask about
  it during exit
2016-10-22 05:00:35 +02:00
Peter Šurda 47e2df86b9
Freezing message parser fix #2
- this has been tested on Windows as well, and has been cleaned up.
  There is now a permanent parser thread, and it restarts when the
  parsing takes more than 1 second
- Fixes #900
2016-10-22 01:45:32 +02: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
Peter Šurda 4213cb7d01
Version bump for 0.6.1 2016-08-21 11:54:34 +02:00
Peter Šurda 685ff6cecd
Startup fixes
- correctly test for "smtpdeliver" variable without crashing
- new method for safely getting values from config even if the option
  may be missing
2016-06-30 15:19:58 +02:00
Peter Šurda b0446f412a
Prevent leaking of tor relay IP
- when running a hidden service, the IP of the tor relay was a part of
  the verack message. In setups where it's not 127.0.0.1 it may leak
  info about network topology
- thanks for an anonymous bug report
2016-06-10 13:21:31 +02:00
Peter Šurda f242d409fd
Tor hidden service fixes
- will send the correct combination of hostname and port
- if proxyhostname is a hostname and an IP address, it will now allow
  multiple parallel connections for hidden service
2016-06-10 10:44:42 +02:00
Peter Šurda b194e4ca20
Bump version to 0.6.0 2016-05-02 21:51:46 +02:00