-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(comms): correctly initialize hidden service (#6124)
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 -->
- Loading branch information
Showing
6 changed files
with
72 additions
and
54 deletions.
There are no files selected for viewing
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
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
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
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
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
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