* revert pow to 5

* is is_alive in sneakernet observer
* catch subprocess err in 3.9.x (dirty hack) in vanityonionr and block gen
* bump version
This commit is contained in:
Kevin Froman 2020-12-22 01:03:04 +00:00
parent e36f44f9a1
commit 9d55c62d68
8 changed files with 33 additions and 18 deletions

View File

@ -18,8 +18,8 @@ conf['general']['display_header'] = True
conf['general']['security_level'] = 0
conf['general']['use_bootstrap_list'] = True
conf['onboarding']['done'] = False
conf['general']['minimum_block_pow'] = 6
conf['general']['minimum_send_pow'] = 6
conf['general']['minimum_block_pow'] = 5
conf['general']['minimum_send_pow'] = 5
conf['log']['file']['remove_on_exit'] = True
conf['transports']['lan'] = True
conf['transports']['tor'] = True

View File

@ -23,7 +23,7 @@ import filepaths
DENIABLE_PEER_ADDRESS = "OVPCZLOXD6DC5JHX4EQ3PSOGAZ3T24F75HQLIUZSDSMYPEOXCPFA"
PASSWORD_LENGTH = 25
ONIONR_TAGLINE = 'Private P2P Communication - GPLv3 - https://Onionr.net'
ONIONR_VERSION = '8.0.0'
ONIONR_VERSION = '8.0.1'
ONIONR_VERSION_CODENAME = 'Genesis'
ONIONR_VERSION_TUPLE = tuple(ONIONR_VERSION.split('.')) # (MAJOR, MINOR, VERSION)
API_VERSION = '2' # increments of 1; only change when something fundamental about how the API works changes. This way other nodes know how to communicate without learning too much information about you.

View File

@ -91,10 +91,17 @@ class SubprocessPOW:
def _spawn_proc(self):
"""Create a child proof of work process
wait for data and send shutdown signal when its found"""
# The importerror started happening in 3.9.x
# not worth fixing because this POW will be replaced by VDF
try:
parent_conn, child_conn = Pipe()
p = Process(target=self.do_pow, args=(child_conn,), daemon=True)
p.start()
#p.join()
except ImportError:
logger.error(
"Error in subprocess module when getting new POW " +
"pipe.\nThis is related to a problem in 3.9.x", terminal=True)
return
payload = None
try:
while True:

View File

@ -63,6 +63,6 @@ def sneakernet_import_thread():
for path in watch_paths:
observer.schedule(_Importer(), path, recursive=True)
observer.start()
while observer.isAlive():
while observer.is_alive():
# call import func with timeout
observer.join(60)

View File

@ -29,6 +29,8 @@ from multiprocessing import Process, Pipe, Queue
import re, time
import threading
import logger
wordlist = niceware.WORD_LIST
def find_vanity_mnemonic(start_words: str, queue):
@ -47,10 +49,16 @@ def find_vanity_mnemonic(start_words: str, queue):
def _start(start_words, obj):
done = False
try:
q = Queue()
p = Process(target=find_vanity_mnemonic, args=[start_words, q], daemon=True)
p.daemon = True
p.start()
except ImportError:
logger.error(
"Error in subprocess module when getting new POW " +
"pipe.\nThis is related to a problem in 3.9.x", terminal=True)
return
rec = None
while not done:
try:

View File

@ -72,7 +72,7 @@
"tor": true
},
"ui": {
"animated_background": false,
"animated_background": true,
"public_remote_enabled": false,
"public_remote_hosts": [],
"theme": "dark"

View File

@ -1 +1 @@
1606975647
1608601319

View File

@ -30,8 +30,8 @@ class OnionrConfig(unittest.TestCase):
self.assertEqual(conf['general']['ephemeral_tunnels'], False)
self.assertEqual(conf['general']['hide_created_blocks'], True)
self.assertEqual(conf['general']['insert_deniable_blocks'], True)
self.assertEqual(conf['general']['minimum_block_pow'], 6)
self.assertEqual(conf['general']['minimum_send_pow'], 6)
self.assertEqual(conf['general']['minimum_block_pow'], 5)
self.assertEqual(conf['general']['minimum_send_pow'], 5)
self.assertEqual(conf['general']['public_key'], '')
self.assertEqual(conf['general']['random_bind_ip'], True)
self.assertEqual(conf['general']['security_level'], 0)