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

watchtower: automatically create tor hidden service if enabled #4087

Merged
merged 3 commits into from
Mar 30, 2020

Conversation

Crypt-iQ
Copy link
Collaborator

@Crypt-iQ Crypt-iQ commented Mar 17, 2020

Picks up where #3613 left off. I think I gave credit correctly to @orbitalturtle by adding them as a Co-author in the first commit message. The old PR created two TorContollers, one in the server, one in the watchtower server. Now, a TorController is instead created in lnd.go and passed to both subsystems to avoid creating multiple connections to Tor's ControlPort.

Closes #3302

lnd.go Outdated Show resolved Hide resolved
lnd.go Outdated Show resolved Hide resolved
server.go Outdated Show resolved Hide resolved
tor/controller.go Outdated Show resolved Hide resolved
watchtower/standalone.go Show resolved Hide resolved
watchtower/standalone.go Show resolved Hide resolved
watchtower/standalone.go Show resolved Hide resolved
@Crypt-iQ
Copy link
Collaborator Author

Crypt-iQ commented Mar 24, 2020

Updated the PR to address the comments, and also included a blurb in docs/watchtower.md about setting up watchtowers with hidden services automatically.

Copy link
Contributor

@wpaulino wpaulino left a comment

Choose a reason for hiding this comment

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

Looks good to me, just some final minor comments.

server.go Outdated Show resolved Hide resolved
lnd.go Show resolved Hide resolved
watchtower/standalone.go Show resolved Hide resolved
@Crypt-iQ Crypt-iQ added this to the 0.10.0 milestone Mar 25, 2020
@Crypt-iQ Crypt-iQ requested a review from wpaulino March 26, 2020 12:49
Copy link
Contributor

@wpaulino wpaulino left a comment

Choose a reason for hiding this comment

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

Linter is complaining, but LGTM otherwise.

lnd.go:488:21: ST1005: error strings should not be capitalized (stylecheck)
			err := fmt.Errorf("Unable to initialize tor controller: %v", err)

config.go Show resolved Hide resolved
Crypt-iQ and others added 2 commits March 29, 2020 11:54
Co-authored-by: Turtle <orbitalturtle@protonmail.com>
This commit lets the watchtower automatically create hidden services
by giving it a pointer to a TorController. The server was also slightly
refactored so that it was not the sole owner of the TorController.
Copy link
Contributor

@cfromknecht cfromknecht left a comment

Choose a reason for hiding this comment

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

LGTM

docs/watchtower.md Show resolved Hide resolved
watchtower/standalone.go Show resolved Hide resolved
@Roasbeef Roasbeef merged commit 90dfb97 into lightningnetwork:master Mar 30, 2020
@Crypt-iQ Crypt-iQ deleted the wt_hs_0310 branch March 31, 2020 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

watchtower: use tor controller to configure hidden service automatically
4 participants