* 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']['security_level'] = 0
conf['general']['use_bootstrap_list'] = True conf['general']['use_bootstrap_list'] = True
conf['onboarding']['done'] = False conf['onboarding']['done'] = False
conf['general']['minimum_block_pow'] = 6 conf['general']['minimum_block_pow'] = 5
conf['general']['minimum_send_pow'] = 6 conf['general']['minimum_send_pow'] = 5
conf['log']['file']['remove_on_exit'] = True conf['log']['file']['remove_on_exit'] = True
conf['transports']['lan'] = True conf['transports']['lan'] = True
conf['transports']['tor'] = True conf['transports']['tor'] = True

View File

@ -23,7 +23,7 @@ import filepaths
DENIABLE_PEER_ADDRESS = "OVPCZLOXD6DC5JHX4EQ3PSOGAZ3T24F75HQLIUZSDSMYPEOXCPFA" DENIABLE_PEER_ADDRESS = "OVPCZLOXD6DC5JHX4EQ3PSOGAZ3T24F75HQLIUZSDSMYPEOXCPFA"
PASSWORD_LENGTH = 25 PASSWORD_LENGTH = 25
ONIONR_TAGLINE = 'Private P2P Communication - GPLv3 - https://Onionr.net' 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_CODENAME = 'Genesis'
ONIONR_VERSION_TUPLE = tuple(ONIONR_VERSION.split('.')) # (MAJOR, MINOR, VERSION) 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. 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): def _spawn_proc(self):
"""Create a child proof of work process """Create a child proof of work process
wait for data and send shutdown signal when its found""" wait for data and send shutdown signal when its found"""
parent_conn, child_conn = Pipe() # The importerror started happening in 3.9.x
p = Process(target=self.do_pow, args=(child_conn,), daemon=True) # not worth fixing because this POW will be replaced by VDF
p.start() try:
#p.join() parent_conn, child_conn = Pipe()
p = Process(target=self.do_pow, args=(child_conn,), 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
payload = None payload = None
try: try:
while True: while True:

View File

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

View File

@ -29,6 +29,8 @@ from multiprocessing import Process, Pipe, Queue
import re, time import re, time
import threading import threading
import logger
wordlist = niceware.WORD_LIST wordlist = niceware.WORD_LIST
def find_vanity_mnemonic(start_words: str, queue): 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): def _start(start_words, obj):
done = False done = False
q = Queue() try:
p = Process(target=find_vanity_mnemonic, args=[start_words, q], daemon=True) q = Queue()
p.daemon = True p = Process(target=find_vanity_mnemonic, args=[start_words, q], daemon=True)
p.start() 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 rec = None
while not done: while not done:
try: try:

View File

@ -72,7 +72,7 @@
"tor": true "tor": true
}, },
"ui": { "ui": {
"animated_background": false, "animated_background": true,
"public_remote_enabled": false, "public_remote_enabled": false,
"public_remote_hosts": [], "public_remote_hosts": [],
"theme": "dark" "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']['ephemeral_tunnels'], False)
self.assertEqual(conf['general']['hide_created_blocks'], True) self.assertEqual(conf['general']['hide_created_blocks'], True)
self.assertEqual(conf['general']['insert_deniable_blocks'], True) self.assertEqual(conf['general']['insert_deniable_blocks'], True)
self.assertEqual(conf['general']['minimum_block_pow'], 6) self.assertEqual(conf['general']['minimum_block_pow'], 5)
self.assertEqual(conf['general']['minimum_send_pow'], 6) self.assertEqual(conf['general']['minimum_send_pow'], 5)
self.assertEqual(conf['general']['public_key'], '') self.assertEqual(conf['general']['public_key'], '')
self.assertEqual(conf['general']['random_bind_ip'], True) self.assertEqual(conf['general']['random_bind_ip'], True)
self.assertEqual(conf['general']['security_level'], 0) self.assertEqual(conf['general']['security_level'], 0)