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

Remove protocol deps from pool crate #1483

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jbesraa
Copy link
Contributor

@jbesraa jbesraa commented Feb 13, 2025

Partially addresses #1458
Blocked by #1483

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 18.76%. Comparing base (f94af52) to head (ef80814).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
roles/pool/src/lib/error.rs 0.00% 4 Missing ⚠️
roles/pool/src/lib/mining_pool/mod.rs 0.00% 1 Missing ⚠️
roles/pool/src/lib/template_receiver/mod.rs 0.00% 1 Missing ⚠️
...pool/src/lib/template_receiver/setup_connection.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1483      +/-   ##
==========================================
- Coverage   28.50%   18.76%   -9.75%     
==========================================
  Files          74      135      +61     
  Lines        5297     9578    +4281     
==========================================
+ Hits         1510     1797     +287     
- Misses       3787     7781    +3994     
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.45% <ø> (?)
jd_server-coverage 14.80% <ø> (?)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 3.61% <ø> (ø)
mining-coverage 3.86% <ø> (ø)
mining_device-coverage 0.00% <ø> (?)
mining_proxy_sv2-coverage 0.98% <ø> (?)
noise_sv2-coverage 7.30% <ø> (ø)
pool_sv2-coverage 2.81% <0.00%> (?)
protocols 26.97% <ø> (-0.17%) ⬇️
roles 6.74% <0.00%> (?)
roles_logic_sv2-coverage 13.05% <ø> (-0.50%) ⬇️
sv2_ffi-coverage 0.00% <ø> (?)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 10.07% <ø> (?)
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.

Comment on lines 35 to 53

pub use binary_sv2::Error as BinaryError;
pub use binary_sv2::U256;
pub use binary_sv2::B064K;
pub use binary_sv2::B0255;

pub use codec_sv2::Error as CodecError;
pub use codec_sv2::framing_sv2::Error as FramingError;

pub use codec_sv2::Initiator;
pub use codec_sv2::Responder;
pub use codec_sv2::HandshakeRole;
pub use codec_sv2::noise_sv2::Error as NoiseError;

pub use codec_sv2::StandardEitherFrame;
pub use codec_sv2::StandardSv2Frame;

pub use const_sv2::MESSAGE_TYPE_CHANNEL_ENDPOINT_CHANGED;

Copy link
Contributor

Choose a reason for hiding this comment

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

I have a slightly different opinion on this—let me know what you think. Although roles-logic-sv2 is part of the protocol, it should have been placed in roles, considering that it primarily contains application-layer logic. The codec crate is the protocol crate, encapsulating lower-level foundational crates like binary, framing, noise, and const. To me, it makes sense to expose these from codec and then use them in roles-logic-sv2. That way, the hierarchy remains structured correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea I agree with you. But roles logic is not part of the scope for this pr..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

referenced #1268 (comment)

@jbesraa jbesraa force-pushed the 2025-02-13/organise-deps-list branch from 59e0e20 to 3fc68a9 Compare February 18, 2025 07:13
@plebhash plebhash marked this pull request as draft February 18, 2025 17:33
@jbesraa jbesraa force-pushed the 2025-02-13/organise-deps-list branch from aa0446d to b582577 Compare March 6, 2025 08:41
@jbesraa jbesraa marked this pull request as ready for review March 6, 2025 08:58
@jbesraa
Copy link
Contributor Author

jbesraa commented Mar 6, 2025

This is ready for review

@jbesraa jbesraa force-pushed the 2025-02-13/organise-deps-list branch from 3866fbe to cb925ea Compare March 6, 2025 14:37
@jbesraa jbesraa force-pushed the 2025-02-13/organise-deps-list branch from cb925ea to ef80814 Compare March 7, 2025 11:09
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