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: update peer liveness #6723

Conversation

hansieodendaal
Copy link
Contributor

@hansieodendaal hansieodendaal commented Dec 11, 2024

Description

  • Updated peer liveness to print test results to the console, one item per row.
  • Added a command-line arg option to disable the splash screen; this is useful for screen scraping in an automated test environment.

Motivation and Context

These changes will simplify automated monitoring.

How Has This Been Tested?

System-level testing

.\minotari_node.exe --non-interactive-mode --watch "test-peer-liveness 8a24a7fb8ff2f1183c02ac52d488a13cc1104f970cc9a6fb3dd5f17ea1d85212 /ip4/3.248.103.200/tcp/18189 true true false" -p esmeralda.p2p.seeds.dns_seeds="" -p esmeralda.p2p.seeds.peer_seeds="" --network esmeralda --disable-splash-screen
Initializing logging according to "C:\\Users\\hansie\\.tari\\esmeralda\\config\\base_node\\log4rs.yml"
Node started in non-interactive mode (pid = 17156)

Testing peer liveness...

🏓 Peer (b7ed45c971da86409939de9397, 8a24a7fb8ff2f1183c02ac52d488a13cc1104f970cc9a6fb3dd5f17ea1d85212) dialed successfully
☎️  Dialing peer...
🏓 Pinging peer (b7ed45c971da86409939de9397, 8a24a7fb8ff2f1183c02ac52d488a13cc1104f970cc9a6fb3dd5f17ea1d85212) with nonce 3324112300086574482 ...
⚡️ Peer connected in 1537ms!
Connection: Id: 0, Node ID: b7ed45c971da8640, Direction: Outbound, Peer Address: /ip4/3.248.103.200/tcp/18189, Age: 276µs, #Substreams: 2, #Refs: 5
🏓️ Pong: peer (b7ed45c971da86409939de9397, 8a24a7fb8ff2f1183c02ac52d488a13cc1104f970cc9a6fb3dd5f17ea1d85212) responded with nonce 3324112300086574482, round-trip-time is 2.19s!

✅ Peer is responsive
  Date Time:     2024-12-11 18:20:40
  Public Key:    8a24a7fb8ff2f1183c02ac52d488a13cc1104f970cc9a6fb3dd5f17ea1d85212
  Node ID:       b7ed45c971da86409939de9397
  Address:       /ip4/3.248.103.200/tcp/18189
  Result:        Success
  Test Duration: 2.19s

📝 Test result written to file: peer_liveness_test.csv
The liveness test is complete and base node will now exit

What process can a PR reviewer use to test or verify this change?

Code review
System-level testing

Breaking Changes

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

- Updated peer liveness to print test results to the console, one item per row.
- Added a command-line arg option to disable the splash screen; this is useful
  for screen scraping in an automated test environment.
Copy link

Test Results (Integration tests)

36 tests  +36   36 ✅ +36   14m 51s ⏱️ + 14m 51s
11 suites +11    0 💤 ± 0 
 2 files   + 2    0 ❌ ± 0 

Results for commit 99c8eae. ± Comparison against base commit b127883.

Copy link

Test Results (CI)

    3 files    129 suites   35m 26s ⏱️
1 344 tests 1 344 ✅ 0 💤 0 ❌
4 030 runs  4 030 ✅ 0 💤 0 ❌

Results for commit 99c8eae.

@SWvheerden SWvheerden merged commit 4154c32 into tari-project:development Dec 12, 2024
18 checks passed
@hansieodendaal hansieodendaal deleted the ho_test_peer_liveness_update branch December 12, 2024 08:00
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

Successfully merging this pull request may close these issues.

2 participants