Skip to content

Make Sniffer unblocking and upgrade TP#1592

Merged
GitGab19 merged 11 commits into
stratum-mining:mainfrom
jbesraa:2025-03-20/itf-improvements
Apr 2, 2025
Merged

Make Sniffer unblocking and upgrade TP#1592
GitGab19 merged 11 commits into
stratum-mining:mainfrom
jbesraa:2025-03-20/itf-improvements

Conversation

@jbesraa

@jbesraa jbesraa commented Mar 20, 2025

Copy link
Copy Markdown
Contributor

resolves #1591 and #1602

@codecov

codecov Bot commented Mar 20, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 21.14%. Comparing base (67e63b6) to head (1548808).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1592      +/-   ##
==========================================
- Coverage   21.92%   21.14%   -0.79%     
==========================================
  Files         135      135              
  Lines        9573     9964     +391     
==========================================
+ Hits         2099     2107       +8     
- Misses       7474     7857     +383     
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <ø> (ø)
binary_sv2-coverage 10.13% <ø> (+<0.01%) ⬆️
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 37.68% <ø> (ø)
codec_sv2-coverage 0.03% <ø> (+<0.01%) ⬆️
common_messages_sv2-coverage 0.25% <ø> (+<0.01%) ⬆️
const_sv2-coverage 0.00% <ø> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.54% <ø> (+<0.01%) ⬆️
jd_client-coverage 0.39% <ø> (ø)
jd_server-coverage 12.42% <ø> (ø)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 3.61% <ø> (ø)
mining-coverage 5.02% <ø> (+<0.01%) ⬆️
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 1.18% <ø> (ø)
noise_sv2-coverage 8.64% <ø> (+<0.01%) ⬆️
pool_sv2-coverage 5.82% <ø> (-1.40%) ⬇️
protocols 30.60% <ø> (-0.02%) ⬇️
roles 11.44% <ø> (-0.76%) ⬇️
roles_logic_sv2-coverage 15.20% <ø> (-0.03%) ⬇️
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 9.11% <ø> (ø)
utils 36.39% <ø> (?)
v1-coverage 4.37% <ø> (+<0.01%) ⬆️

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.

Shourya742

This comment was marked as outdated.

Comment thread test/integration-tests/lib/template_provider.rs
@jbesraa

jbesraa commented Mar 27, 2025

Copy link
Copy Markdown
Contributor Author

This is ready for another review

@GitGab19 GitGab19 linked an issue Mar 27, 2025 that may be closed by this pull request
Comment on lines -106 to -112
);
});

let receiver_outgoing_cloned = receiver_outgoing.clone();
task::spawn(async move {
select!(
_ = tokio::signal::ctrl_c() => { },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

With this commit, the lifetimes of multiplexed streams are now tied together—if one stream drops, the select block drops the rest. Since network helpers are just a layer that adds encryption and multiplexing, this feels a bit counterintuitive. I think the previous commit would’ve worked fine too.

That said, even if it seems counterintuitive, it raises an interesting point. In SV2, we know that every entity will always use both the read and write streams, not just one. Streams will only drop when the app shuts down. Based on past experience with network helpers, one stream usually drops while the other blocks the executor. So if we go with this select setup, we might not even need ctrl_c signaling anymore.

Either way, we should be clear on what we want from network helpers before moving forward. I would like to hear other team members opinions on this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I dont get how the ctrl_c is related to this and what are you suggesting here?

@jbesraa

jbesraa commented Apr 2, 2025

Copy link
Copy Markdown
Contributor Author

Removed last commit. This should be good to go.

@GitGab19 GitGab19 merged commit 266ffa2 into stratum-mining:main Apr 2, 2025
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.

Remove sleep from testing and adapt changes accordingly ITF improvements

4 participants