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

Add SnifferSV1 to ITF #1580

Merged
merged 6 commits into from
Mar 26, 2025
Merged

Conversation

jbesraa
Copy link
Contributor

@jbesraa jbesraa commented Mar 18, 2025

resolves #1564

Copy link

codecov bot commented Mar 18, 2025

Codecov Report

Attention: Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.

Project coverage is 21.90%. Comparing base (c4f145f) to head (c731c9c).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
.../roles-utils/network-helpers/src/sv1_connection.rs 86.20% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1580      +/-   ##
==========================================
+ Coverage   21.71%   21.90%   +0.19%     
==========================================
  Files         134      135       +1     
  Lines        9548     9578      +30     
==========================================
+ Hits         2073     2098      +25     
- Misses       7475     7480       +5     
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <ø> (ø)
binary_sv2-coverage 10.12% <ø> (ø)
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 37.68% <ø> (ø)
codec_sv2-coverage 0.03% <ø> (ø)
common_messages_sv2-coverage 0.25% <ø> (ø)
const_sv2-coverage 0.00% <ø> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.54% <ø> (ø)
jd_client-coverage 0.39% <ø> (ø)
jd_server-coverage 12.43% <ø> (ø)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 3.61% <ø> (ø)
mining-coverage 5.02% <ø> (ø)
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 1.18% <ø> (ø)
noise_sv2-coverage 8.63% <ø> (ø)
pool_sv2-coverage 7.00% <ø> (ø)
protocols 30.61% <ø> (ø)
roles 12.16% <86.20%> (+0.45%) ⬆️
roles_logic_sv2-coverage 15.22% <ø> (ø)
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 9.11% <ø> (ø)
utils 36.39% <ø> (ø)
v1-coverage 4.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jbesraa jbesraa force-pushed the 2025-03-13/sv1-sniffer branch 3 times, most recently from bd91e82 to 86049b4 Compare March 19, 2025 12:34
@jbesraa jbesraa marked this pull request as ready for review March 19, 2025 12:35
@jbesraa jbesraa force-pushed the 2025-03-13/sv1-sniffer branch 2 times, most recently from b5b0b08 to e4ee253 Compare March 20, 2025 11:04
@plebhash
Copy link
Collaborator

oops, looks like adding c8a721b to #1551 introduced a conflict here

perhaps it would have been better to have merged this first, sorry about that

@plebhash
Copy link
Collaborator

I added some tracing logs, please cherry-pick in case you agree

ea02800

58feb8a

@jbesraa jbesraa force-pushed the 2025-03-13/sv1-sniffer branch 3 times, most recently from c882058 to 3ad8b9c Compare March 24, 2025 12:47
@jbesraa
Copy link
Contributor Author

jbesraa commented Mar 24, 2025

I added some tracing logs, please cherry-pick in case you agree

ea02800

58feb8a

Squashed the SV1 related one to SV1 commit and picked SV2 commit in

@jbesraa jbesraa force-pushed the 2025-03-13/sv1-sniffer branch 4 times, most recently from 3a9cf61 to 24ae655 Compare March 24, 2025 13:22
Copy link
Contributor

@Shourya742 Shourya742 left a comment

Choose a reason for hiding this comment

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

Code looks pretty clean.

@jbesraa jbesraa force-pushed the 2025-03-13/sv1-sniffer branch 2 times, most recently from 4c194fd to 22c6e20 Compare March 25, 2025 16:54
@GitGab19 GitGab19 linked an issue Mar 25, 2025 that may be closed by this pull request
@jbesraa jbesraa force-pushed the 2025-03-13/sv1-sniffer branch 2 times, most recently from e1e20bf to 24ce51f Compare March 26, 2025 17:22
jbesraa and others added 6 commits March 26, 2025 19:23
..Currently if we exit a test while it is running the miner wont stop
due to its background(async) jobs not getting the signal.
This module can be utilized in order to setup a connection either on the
upstream or downstream side in a Stratum V1 enviornment.
`SnifferSV1` acts as a middleman between two SV1 roles. It forwards
messages from one role to the other and vice versa. It also provides
methods to wait for specific messages to be received from the downstream
or upstream role.

Add tracing to Sv1 Sniffer
.. In order to not conflict them with SV1 sniffer logs
@jbesraa jbesraa force-pushed the 2025-03-13/sv1-sniffer branch from 24ce51f to c731c9c Compare March 26, 2025 17:23
@plebhash plebhash merged commit cdf5cfc into stratum-mining:main Mar 26, 2025
19 checks passed
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.

CI migration: sv1-test MG to Integration test Integration Tests Framework needs a Sv1 Sniffer
5 participants