Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make tor startup async #6058

Conversation

stringhandler
Copy link
Collaborator

Description

Move tor connection to be lazy

Motivation and Context

Previously, the wallet_create method would wait for tor to connect before it would return. This makes for a very slow experience, especially if you just want to read values from the database.

How Has This Been Tested?

This is still in progress, but I'm testing with some adhoc timing methods in the wallet_create method.

What process can a PR reviewer use to test or verify this change?

Kind of difficult, it can be seen mostly in the ios and android apps

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

Copy link

Test Results (Integration tests)

0 tests  ±0   0 ✔️ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ±0 

Results for commit 7268fbd. ± Comparison against base commit 3396168.

@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Dec 19, 2023
Copy link

Test Results (CI)

0 tests   0 ✔️  0s ⏱️
0 suites  0 💤
0 files    0

Results for commit 7268fbd.

let transport = hidden_service_ctl.initialize_transport().await?;
let instant = Instant::now();
let transport = HiddenServiceTransport::new(hidden_service_ctl);
error!(target: LOG_TARGET, "TOR transport initialized in {:.0?}", instant.elapsed());
Copy link
Contributor

@hansieodendaal hansieodendaal Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would this be an error log and not an info or debug log?

@SWvheerden
Copy link
Collaborator

replaced by : #6092

@SWvheerden SWvheerden closed this Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants