diff --git a/draft_code/secp256k1.py b/draft_code/secp256k1_tests.py similarity index 100% rename from draft_code/secp256k1.py rename to draft_code/secp256k1_tests.py diff --git a/internal_filesystem/lib/websocket_nostr_receive.py b/draft_code/websocket_nostr_receive.py similarity index 96% rename from internal_filesystem/lib/websocket_nostr_receive.py rename to draft_code/websocket_nostr_receive.py index 342df3f6..849981f4 100644 --- a/internal_filesystem/lib/websocket_nostr_receive.py +++ b/draft_code/websocket_nostr_receive.py @@ -40,15 +40,12 @@ def printevents(): print(f"at the start, thread stack used: {micropython.stack_use()}") print("relaymanager") relay_manager = RelayManager() - time.sleep(3) #relay_manager.add_relay("wss://nostr-pub.wellorder.net") print("relaymanager adding") - #relay_manager.add_relay("wss://relay.damus.io") + relay_manager.add_relay("wss://relay.damus.io") relay_manager.add_relay("wss://relay.primal.net") - time.sleep(3) print("relaymanager subscribing") relay_manager.add_subscription(subscription_id, filters) - time.sleep(3) # allow the connections to open print("opening connections") # after this, CPU usage goes high and stays there relay_manager.open_connections({"cert_reqs": ssl.CERT_NONE}) # NOTE: This disables ssl certificate verification time.sleep(2) # allow the connections to open diff --git a/internal_filesystem/lib/websocket_nostr_test.py b/draft_code/websocket_nostr_test.py similarity index 100% rename from internal_filesystem/lib/websocket_nostr_test.py rename to draft_code/websocket_nostr_test.py diff --git a/internal_filesystem/lib/websocket_raw_nostr_test.py b/draft_code/websocket_raw_nostr_test.py similarity index 100% rename from internal_filesystem/lib/websocket_raw_nostr_test.py rename to draft_code/websocket_raw_nostr_test.py diff --git a/internal_filesystem/lib/websocket_raw_nostr_test.py_worked_without_ping_payload b/draft_code/websocket_raw_nostr_test.py_worked_without_ping_payload similarity index 100% rename from internal_filesystem/lib/websocket_raw_nostr_test.py_worked_without_ping_payload rename to draft_code/websocket_raw_nostr_test.py_worked_without_ping_payload diff --git a/internal_filesystem/lib/websocket_raw_nostr_test.py_worked_without_ping_payload_still_works b/draft_code/websocket_raw_nostr_test.py_worked_without_ping_payload_still_works similarity index 100% rename from internal_filesystem/lib/websocket_raw_nostr_test.py_worked_without_ping_payload_still_works rename to draft_code/websocket_raw_nostr_test.py_worked_without_ping_payload_still_works diff --git a/internal_filesystem/lib/threading.py b/internal_filesystem/lib/threading.py index 51aa5254..5458a274 100644 --- a/internal_filesystem/lib/threading.py +++ b/internal_filesystem/lib/threading.py @@ -17,7 +17,7 @@ class Thread: #_thread.stack_size(10*1024) # might not be enough #stacksize = 12*1024 # small stack sizes 8KB gives segfault directly - stacksize = 12*1024 + stacksize = 24*1024 print(f"starting thread with stacksize {stacksize}") _thread.stack_size(stacksize) _thread.start_new_thread(self.run, ()) diff --git a/internal_filesystem/main.py b/internal_filesystem/main.py index 54878e8b..b5be6148 100644 --- a/internal_filesystem/main.py +++ b/internal_filesystem/main.py @@ -23,9 +23,10 @@ if sys.platform == "esp32": apps.auto_connect() else: # On unix/desktop, at least 24KB of stack size is needed in the REPL to make nostr work there - import _thread - _thread.stack_size(24*1024) # on unix/desktop, at least 24KB is needed for doing nostr connections from the REPL - _thread.start_new_thread(dummy, ()) # not just setting the stack_size but actually starting a thread to apply this globally + #import _thread + #_thread.stack_size(24*1024) # on unix/desktop, at least 24KB is needed for doing nostr connections from the REPL + #_thread.start_new_thread(dummy, ()) # not just setting the stack_size but actually starting a thread to apply this globally + pass apps.restart_launcher()