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

base node libtor does not timeout for test-peer-liveness #6741

Closed
leet4tari opened this issue Jan 14, 2025 · 1 comment
Closed

base node libtor does not timeout for test-peer-liveness #6741

leet4tari opened this issue Jan 14, 2025 · 1 comment
Assignees

Comments

@leet4tari
Copy link
Contributor

After having a test with a single test-peer-liveness via libtor, has not exited after 12hour run.

./esmeralda/osx/bins/minotari_node -b tbn/b7ed45c971da86409939de9397-torlib --network esmeralda --disable-splash-screen -p esmeralda.p2p.seeds.dns_seeds= -p esmeralda.p2p.seeds.peer_seeds= --watch test-peer-liveness 8a24a7fb8ff2f1183c02ac52d488a13cc1104f970cc9a6fb3dd5f17ea1d85212 8a24a7fb8ff2f1183c02ac52d488a13cc1104f970cc9a6fb3dd5f17ea1d85212::/onion3/4a5vimdolvhhn6v55vjvoxgvfehqh7zwpdhi6touut3cvxtkg6a5jqqd:18141 true true false --non-interactive-mode

Check the logs and the node is still running or at least the logs for base_layer.log and network.log are still growing.

Expected behavior
the command to return with success or failure with in the timeout period of 90sec, as is seen by similar command for IPv4, IPv6 and tor via proxy service.

Desktop (please complete the following information):

  • OS & Version: OSX 15.2 and Ubuntu 24.04
  • Tari suite Version: tari_suite-1.9.2-pre.0-98a76e5-linux-arm64 and minotari_node 1.9.1-pre.0 for OSX arm64
@hansieodendaal
Copy link
Contributor

See #6782

SWvheerden pushed a commit that referenced this issue Feb 5, 2025
Description
---
The base node and console wallet have various immediate exit paths
through 'process::exit', as well as controlled exit via user/shutdown
command.

- This implementation ~~uses a unique but predictable handshake file
containing the libtor temporary directory for each base node or console
wallet running instance to cover all exit paths. When the main thread
exits, via user command or 'process::exit', the libtor temporary files
and the handshake file are removed.~~ does away with the temporary
libtor data folder and log file and instead uses a fixed or
user-controllable location via the `--libtor-data-dir` command line
option.

- ~~Added libtor exiting logic to:~~
  - ~~log any shutdown errors;~~
  - ~~remove temporary files.~~
- Added a failsafe timeout for test-liveness.

Closes #6739 and #6741

Motivation and Context
---
See #6739 and #6741

How Has This Been Tested?
---
System-level testing:
- Base node (Ubuntu), executing test liveness from the command line,
with and without using libtor
```
./minotari_node --base-path $(realpath .) --log-config $(realpath ./config)/log4rs_node.yml --network esmeralda --disable-splash-screen -p esmeralda.p2p.seeds.dns_seeds= -p esmeralda.p2p.seeds.peer_seeds= --watch "test-peer-liveness f6186e6f15af070d01d5aec8c5a53d81088c34b777cd0b25292d1cd522532462 /onion3/5uqpxi6ando6jrtcpj3aok4z7ab2nm36knfv2pzdf2hefdpkdcjnazid:18141 true true false" --non-interactive-mode -p base_node.use_libtor=true
```
- Base node (Ubuntu), with console, using libtor
- Console wallet (Ubuntu), with console, using libtor
- Console wallet (Ubuntu), recovery into console, using libtor

What process can a PR reviewer use to test or verify this change?
---
System-level testing
Code review

<!-- 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. -->


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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants