Commit Graph

63 Commits (b6a81f1252531ff6ebe5b6563e6f17778f905eba)

Author SHA1 Message Date
lakshyacis 4a369f70c1
formatting and docstring 4 years ago
lakshyacis 059e82e2a2
class_objectProcessor quality fixes 4 years ago
Dmitri Bogomolov d6c1845b71
Moved Peer from state to network.node
and trustedPeer to network.connectionpool.BMConnectionPool attribute
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 d2a896697d
Used logger.isEnabledFor() to prevent unneeded calculations 4 years ago
Dmitri Bogomolov ad2a2b3fb4
Inherit helper_threading.StoppableThread from threading.Thread
and do random.seed() in its __init__
4 years ago
Dmitri Bogomolov 4a097e99b3
Fixes for @omkar1117 4 years ago
Dmitri Bogomolov 01d4fbe60b
Resolved pylint warnings 4 years ago
Dmitri Bogomolov 453e045ae5
Minimal implementation of onionpeer object 4 years ago
Dmitri Bogomolov e163137893
Added pycrypto fallback for RIPEMD160 hash function 5 years ago
Dmitri Bogomolov 394c676ba2
Moved successfullyDecryptMessageTimings to class_objectProcessor 5 years ago
Dmitri Bogomolov 3adadd398f
Removed from shared the functions duplicating protocol:
decryptAndCheckPubkeyPayload, isBitSetWithinBitfield
5 years ago
Dmitri Bogomolov 625e83f4b4
Corrected style a bit 5 years ago
Dmitri Bogomolov 49985a435f
Special class BMStringParser for sending ACK (resolves #1374) 5 years ago
Dmitri Bogomolov 7c7d6781a2
Removed old code from protocol, shared, state
and class_objectProcessor modules (#1374), temporarily commented
  shared.checkAndShareObjectWithPeers() call
5 years ago
Dmitri Bogomolov 40dc7d330d
flake8: class_objectProcessor 5 years ago
coffeedogs ed4a092c51
Removed: # nosec directives until further security review. 5 years ago
coffeedogs c99c3fc782
Fixed: Codacy issues in src/class_*.py 5 years ago
Peter Šurda f9a648d720
Message decoding exception handler fix
- was unfinished and caused the object processor thread to crash
6 years ago
Peter Šurda 066b419e16
Bugfixes
- typo in dandelion
- stealth ackdata fix for broadcasts and mailing lists
6 years ago
Peter Šurda 08ac8a077b
Merge branch '1062' into v0.6 6 years ago
Peter Šurda 4ee9d05446
Randomise key order during decryption
- may help against timing/radio attacks
6 years ago
Peter Šurda a013814c6b
Network tab updates
- handle add/remove entry instead of recreating the whole connection
list
- update processed object counts after each object
6 years ago
f97ada87 be0e724b23
implement stealth ack objects 6 years ago
f97ada87 dbd12ab8b4
fix truncation of received ackdata in objectProcessor 6 years ago
Peter Šurda 773d91bbe2
Unknown object log entry less severe
- unnecessarily classified as critical
- fixes #1023
6 years ago
Peter Šurda 2555f692eb
Network status update part 2
- only update processed items every 2 seconds
6 years ago
Peter Šurda 183f509f09
Decompression limit
- there is now a configurable decompression limit, default at
1MB. Oversize messages are trated as if they never arrived,
just a log entry
6 years ago
Peter Šurda fe93473fc5
getpubkey length handling
- don't try to process getpubkey that is too long
7 years ago
Peter Šurda c1bdcc2aba
ACKdata handling changes
- any type of object can now serve as ACKdata
7 years ago
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
7 years ago
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
7 years ago
Peter Šurda ad75552b5c
Move shutdown from shared.py to state.py 7 years ago
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)
7 years ago
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
7 years ago
Peter Šurda 612333a267
Enable support for extended encoding
- receiving extended encoding now works
- sending works from the GUI by pressing "Shift" while clicking on
  "Send"
- requires https://pypi.python.org/pypi/msgpack-python
7 years ago
mailchuck 9edde110a2 Translation update
Some function calls were not being identified as text that should be
translated.
8 years ago
mirrorwish a7ec4c0555 Some preparations for python 3 8 years ago
Peter Šurda d63ecfc566 Translation update
- typos
- updated German translation
- Fixes Bitmessage#844
8 years ago
Peter Šurda 3fcaa47232 Ack received translation typo
Fixes Bitmessage#644
8 years ago
Peter Šurda 9239813ebb Constant time decryption
Always try to decrypt with all keys.
8 years ago
Peter Šurda f43e01ed0e Don't send ACK on subscribed chans
If somehow you manage to send a message that includes an ACK part into a
chan, the subscribers would send the ACK back. This shouldn't happen.
8 years ago
Peter Šurda 0bd89103a7 Don't send unnecessary ACKs
In some situations, it's not necessary to send an ACK. For example, when
the sender is blacklisted, when the message has no content, or when the
address has ACK sending disabled.

Also it's not necessary to rebroadcast empty messages into a mailing
list.
8 years ago
mailchuck ec4a16b388 objectProcessorQueue fixes
- it didn't shutdown correctly
- it didn't handle exception correctly (however, if I understand
correctly, this will never be triggered if using blocking get, so it
doesn't affect PyBitmessage)
- flushing size check changed from 1 to 0 (I don't know why it was 1)
8 years ago
Peter Šurda e4f31d25fc Flood mitigation optimisation
Flood mitigation was done both in the ObjectProcessorQueue as well as
receiveData threads. This patch removes the mitigation in receiveData
threads and cleans up the one in the ObjectProcessorQueue
8 years ago
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:

[loggers]
keys = root,syslog

[logger_root]
level=NOTSET
handlers=syslog

[logger_syslog]
level=DEBUG
handlers=syslog
qualname=default

[handlers]
keys = syslog

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

[formatters]
keys = syslog

[formatter_syslog]
format=%(asctime)s %(threadName)s %(filename)s@%(lineno)d %(message)s
datefmt=%b %d %H:%M:%S
8 years ago
Jonathan Warren cc712cb8ff finished work on specifyTTL 9 years ago
Jonathan Warren 95c939a2a0 Fix #748 - Check hash of sig instead of message contents 9 years ago
Jonathan Warren 3ef83c2f95 Leftover change from clearing ProtoV2 code: increment settings version from 7 to 8 9 years ago
Jonathan Warren e898b40203 Removed obsolete Protocol v2 code 9 years ago