-
Notifications
You must be signed in to change notification settings - Fork 219
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: faster tor startup #6092
Merged
SWvheerden
merged 7 commits into
tari-project:development
from
SWvheerden:st-faster-tor-startup
Jan 29, 2024
Merged
fix: faster tor startup #6092
SWvheerden
merged 7 commits into
tari-project:development
from
SWvheerden:st-faster-tor-startup
Jan 29, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test Results (CI)1 264 tests 1 264 ✅ 16m 19s ⏱️ Results for commit 04a5ed6. ♻️ This comment has been updated with latest results. |
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
Jan 22, 2024
SWvheerden
force-pushed
the
st-faster-tor-startup
branch
from
January 22, 2024 15:56
ffc987c
to
497732e
Compare
SWvheerden
force-pushed
the
st-faster-tor-startup
branch
from
January 25, 2024 14:15
276e316
to
17e754b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK after comments are resolved
4 tasks
4 tasks
SWvheerden
pushed a commit
that referenced
this pull request
Feb 6, 2024
Description --- Correctly sets up a tor hidden service in the HiddenServiceTransport Tor control client will not error if a value in a key-value query is empty, as this can be valid Disables signal handlers for libtor Motivation and Context --- This PR correctly initializes a tor hidden service in the HiddenServiceTransport. A task is spawned by `create_hidden_service` that monitors the tor control port connection and automatically tries to reestablish it if it disconnects. I also fix the incorrect setting of the proxied address to be the listening port of the Tari node rather than tor's SOCKS port. The minor change to the control port client is minor and allows for an empty value to be returned, which is valid when querying key-value pairs. In practice, this never happens in our current usage but I encountered it when debugging and it prevented the real problem from coming through. Ref PR #6092 There is an additional existing problem where libtor handles interrupt signals and exits e.g. when pressing ctrl+c in the base node to type a command. I fixed this by [disabling signal handlers](https://github.com/torproject/torspec/blob/8961bb4d83fccb2b987f9899ca83aa430f84ab0c/control-spec.txt#L3946) in libtor. How Has This Been Tested? --- Manually What process can a PR reviewer use to test or verify this change? --- <!-- Checklist --> <!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. --> Nodes should receive inbound and outbound tor connections. Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify <!-- Does this include a breaking change? If so, include this line as a footer --> <!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain -->
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This makes so that the nodes/wallets don't have to wait for tor to startup
Motivation and Context
Mobile wallets can take very long to wait for tor on startup effectivity blocking the wallet from even doing background tasks. This allows the wallets to start without an active connection
How Has This Been Tested?
manual, unit tests