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

feat: make libtor on by default for nix builds #6060

Merged

Conversation

brianp
Copy link
Contributor

@brianp brianp commented Dec 20, 2023

Description

This changes the defaults to include libtor for the MinoTari Node and Console wallet by default. Removing the need to run tor independently.

Closes #6050

Motivation and Context

Make setup a smidge easier

How Has This Been Tested?

Locally: Ran the node and wallet without having a tor session started on the machine. Node and wallet used the built in libtor no problem.

Changed use_libtor to false in the config. Started the node and received a ExitError { exit_code: TorOffline error as expected.
Turned on local tor session, and restarted node with no issue. Node is now running on provided tor, and not built in.

Windows built without error in CI: https://github.com/brianp/tari/actions/runs/7274136545

@Cifko did the windows testing for me. He could compile natively as usual without any libtor related problems.
He also ran the installed package from the test builds with no issue.

This confirms that us setting a libtor default for *nix systems is not currently interfering with windows compilation or builds.

Breaking Changes

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

@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 20, 2023
@brianp brianp force-pushed the build-feat-libtor-default branch from 1c2f0e4 to e98cf7a Compare December 20, 2023 09:40
Copy link

github-actions bot commented Dec 20, 2023

Test Results (CI)

1 264 tests   1 264 ✔️  10m 16s ⏱️
     39 suites         0 💤
       1 files           0

Results for commit 15741ca.

♻️ This comment has been updated with latest results.

@@ -52,7 +52,7 @@ tonic = { version = "0.6.2", features = ["tls", "tls-roots" ] }
tari_metrics = { path = "../../infrastructure/metrics", optional = true, features = ["server"] }

[features]
default = ["metrics"]
default = ["metrics", "libtor"]
Copy link
Contributor

Choose a reason for hiding this comment

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

this will break windows builds

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what we're testing.
Including tari_libtor shouldn't cause any kind of error, and then inside tari_libtor, libtor is actually compiled out on windows. So in theory it shouldn't break because it never really gets included. We also specify not to include tari_libtor for our windows builds. So let's see what happens!

Don't worry we're not merging until we validate.

Copy link
Contributor

Choose a reason for hiding this comment

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

nice, I don't actually care about windows - but I sweated a lot trying to get it to work on there 😩

(the tor project itself doesn't even compile natively on windows, they cross compile from linux with msys2/mingw)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

they cross compile from linux with msys2/mingw)

That's an interesting note. Not that I'm going to dive into it, but that our pre-compiled windows bin could actually contain libtor possibly, as long as we cross compile.

Compiling natively would never have it, but it's an interesting option.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh that's definitely interesting, good point.

Copy link

github-actions bot commented Dec 20, 2023

Test Results (Integration tests)

  2 files  +  2  11 suites  +11   12m 27s ⏱️ + 12m 27s
29 tests +29  28 ✔️ +28  0 💤 ±0  1 +1 
30 runs  +30  29 ✔️ +29  0 💤 ±0  1 +1 

For more details on these failures, see this check.

Results for commit 15741ca. ± Comparison against base commit 3396168.

♻️ This comment has been updated with latest results.

@brianp brianp marked this pull request as ready for review December 20, 2023 12:15
Copy link
Contributor

@leet4tari leet4tari left a comment

Choose a reason for hiding this comment

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

LGTM

@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Dec 21, 2023
@stringhandler stringhandler merged commit b5e0d06 into tari-project:development Dec 22, 2023
15 of 17 checks passed
@brianp brianp deleted the build-feat-libtor-default branch December 22, 2023 07:30
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

console wallet for all unix systems should have libtor compiled in
5 participants