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

Pool unblocking + shutdown #1551

Merged
merged 4 commits into from
Mar 20, 2025

Conversation

jbesraa
Copy link
Contributor

@jbesraa jbesraa commented Mar 10, 2025

Partially addresses #1320

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 20.32%. Comparing base (d12f081) to head (c8a721b).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1551      +/-   ##
==========================================
+ Coverage   19.31%   20.32%   +1.01%     
==========================================
  Files         131      122       -9     
  Lines        9298     8732     -566     
==========================================
- Hits         1796     1775      -21     
+ Misses       7502     6957     -545     
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <ø> (ø)
binary_sv2-coverage 8.59% <ø> (ø)
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 37.68% <ø> (ø)
codec_sv2-coverage 0.03% <ø> (ø)
common_messages_sv2-coverage 0.21% <ø> (ø)
const_sv2-coverage 0.00% <ø> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.45% <ø> (ø)
jd_client-coverage 0.44% <ø> (ø)
jd_server-coverage 14.50% <ø> (ø)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 3.61% <ø> (ø)
mining-coverage 3.89% <ø> (+0.02%) ⬆️
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 0.98% <ø> (ø)
noise_sv2-coverage 7.30% <ø> (ø)
pool_sv2-coverage ?
protocols 27.17% <ø> (+0.02%) ⬆️
roles 7.65% <ø> (+0.53%) ⬆️
roles_logic_sv2-coverage 13.57% <ø> (ø)
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 10.18% <ø> (ø)
utils 36.39% <ø> (ø)
v1-coverage 3.74% <ø> (ø)

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-10/pool-shutdown branch 5 times, most recently from adb54a6 to ac0f902 Compare March 11, 2025 11:25
@jbesraa jbesraa marked this pull request as ready for review March 11, 2025 11:31
@jbesraa jbesraa force-pushed the 2025-03-10/pool-shutdown branch 2 times, most recently from 6fc888e to 9ea1a68 Compare March 13, 2025 11:51
@jbesraa jbesraa force-pushed the 2025-03-10/pool-shutdown branch from 9ea1a68 to fef0cf3 Compare March 19, 2025 13:20
@jbesraa jbesraa force-pushed the 2025-03-10/pool-shutdown branch 4 times, most recently from e49d6d7 to d58772c Compare March 19, 2025 16:52
Copy link
Collaborator

@plebhash plebhash left a comment

Choose a reason for hiding this comment

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

LGTM but looks like fmt CI is broken?

jbesraa added 2 commits March 20, 2025 08:52
Currently the state loop at the end of `PoolSv2::start` is blocking,
it is wrapped with `tokio::task` so we can return from the `start`
function. This should give us more flexibelty in how we work with
`PoolSv2`. For example we can access the `PoolSv2` state directly
through the struct.
A simple shutdown function that exits the State loop and shutsdown the
Pool server.
@jbesraa jbesraa force-pushed the 2025-03-10/pool-shutdown branch from d58772c to 40f2e66 Compare March 20, 2025 06:53
@jbesraa jbesraa force-pushed the 2025-03-10/pool-shutdown branch from 40f2e66 to af6f3c5 Compare March 20, 2025 06:57
Comment on lines -276 to -279
info!(
"Listening for encrypted connection on: {}",
config.listen_address()
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

the fact that we're changing this log is prevenging MG sv1-test from asserting that pool_sv2 has properly launched, which is making the test get stuck

so I'm adding to this PR c8a721b to unblock CI and proceed with merging

@plebhash plebhash merged commit fcc747c into stratum-mining:main Mar 20, 2025
21 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.

3 participants