Dmitri Bogomolov
d56191ebba
Move knownnodes module into network package
2020-07-21 16:21:43 +03:00
Dmitri Bogomolov
0dd49761d0
Populate knownnodes from inventory when singleWorker starts
2020-07-21 16:21:42 +03:00
Dmitri Bogomolov
185ad66ea5
Moved most of variables from shared elsewhere (mostly to state)
2020-05-05 17:27:38 +03:00
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
4a369f70c1
formatting and docstring
2020-01-07 12:13:51 +05:30
lakshyacis
059e82e2a2
class_objectProcessor quality fixes
2019-11-25 10:41:57 +05:30
Dmitri Bogomolov
d6c1845b71
Moved Peer from state to network.node
...
and trustedPeer to network.connectionpool.BMConnectionPool attribute
2019-11-11 17:13:12 +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
d2a896697d
Used logger.isEnabledFor() to prevent unneeded calculations
2019-10-18 09:35:31 +03:00
Dmitri Bogomolov
ad2a2b3fb4
Inherit helper_threading.StoppableThread from threading.Thread
...
and do random.seed() in its __init__
2019-08-06 18:07:19 +03:00
Dmitri Bogomolov
4a097e99b3
Fixes for @omkar1117
2019-05-10 12:24:47 +03:00
Dmitri Bogomolov
01d4fbe60b
Resolved pylint warnings
2019-05-10 12:24:46 +03:00
Dmitri Bogomolov
453e045ae5
Minimal implementation of onionpeer object
2019-05-10 12:24:41 +03:00
Dmitri Bogomolov
e163137893
Added pycrypto fallback for RIPEMD160 hash function
2019-04-22 12:53:59 +03:00
Dmitri Bogomolov
394c676ba2
Moved successfullyDecryptMessageTimings to class_objectProcessor
2019-02-04 22:23:28 +02:00
Dmitri Bogomolov
3adadd398f
Removed from shared the functions duplicating protocol:
...
decryptAndCheckPubkeyPayload, isBitSetWithinBitfield
2019-02-04 22:19:39 +02:00
Dmitri Bogomolov
625e83f4b4
Corrected style a bit
2018-10-27 17:55:02 +03:00
Dmitri Bogomolov
49985a435f
Special class BMStringParser for sending ACK ( resolves #1374 )
2018-10-27 17:55:02 +03: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
40dc7d330d
flake8: class_objectProcessor
2018-05-18 13:55:55 +03:00
coffeedogs
ed4a092c51
Removed: # nosec directives until further security review.
2018-05-08 12:13:49 +01:00
coffeedogs
c99c3fc782
Fixed: Codacy issues in src/class_*.py
2018-05-03 19:05:39 +01:00
Peter Šurda
f9a648d720
Message decoding exception handler fix
...
- was unfinished and caused the object processor thread to crash
2018-02-13 13:24:37 +01:00
Peter Šurda
066b419e16
Bugfixes
...
- typo in dandelion
- stealth ackdata fix for broadcasts and mailing lists
2018-02-09 00:49:08 +01:00
Peter Šurda
08ac8a077b
Merge branch '1062' into v0.6
2018-01-28 10:41:09 +01:00
Peter Šurda
4ee9d05446
Randomise key order during decryption
...
- may help against timing/radio attacks
2017-11-30 20:08:14 +01:00
Peter Šurda
a013814c6b
Network tab updates
...
- handle add/remove entry instead of recreating the whole connection
list
- update processed object counts after each object
2017-10-19 08:39:09 +02:00
f97ada87
be0e724b23
implement stealth ack objects
2017-09-30 19:45:40 +10:00
f97ada87
dbd12ab8b4
fix truncation of received ackdata in objectProcessor
2017-09-25 20:14:03 +10:00
Peter Šurda
773d91bbe2
Unknown object log entry less severe
...
- unnecessarily classified as critical
- fixes #1023
2017-07-05 09:01:40 +02:00
Peter Šurda
2555f692eb
Network status update part 2
...
- only update processed items every 2 seconds
2017-05-31 10:16:30 +02:00
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
2017-05-15 12:23:16 +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
c1bdcc2aba
ACKdata handling changes
...
- any type of object can now serve as ACKdata
2017-04-04 10:43:29 +02: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
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
ad75552b5c
Move shutdown from shared.py to state.py
2017-01-14 23:20:15 +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
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
2016-11-14 20:23:58 +01:00
mailchuck
9edde110a2
Translation update
...
Some function calls were not being identified as text that should be
translated.
2016-05-02 15:00:26 +02:00
mirrorwish
a7ec4c0555
Some preparations for python 3
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
3fcaa47232
Ack received translation typo
...
Fixes Bitmessage#644
2016-05-02 15:00:24 +02:00
Peter Šurda
9239813ebb
Constant time decryption
...
Always try to decrypt with all keys.
2016-05-02 15:00:24 +02:00
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.
2016-05-02 15:00:23 +02:00
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.
2016-05-02 15:00:23 +02:00
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)
2016-05-02 15:00:23 +02:00
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
2016-05-02 15:00:23 +02:00