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 binary sv2 serde #1459

Merged

Conversation

Shourya742
Copy link
Contributor

part of: #1387

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 18.06%. Comparing base (f7b068a) to head (49c78e3).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1459      +/-   ##
==========================================
- Coverage   19.34%   18.06%   -1.29%     
==========================================
  Files         144      127      -17     
  Lines       10963     9555    -1408     
==========================================
- Hits         2121     1726     -395     
+ Misses       8842     7829    -1013     
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <0.00%> (ø)
binary_serde_sv2-coverage ?
binary_sv2-coverage 6.95% <0.00%> (+1.58%) ⬆️
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 25.02% <ø> (ø)
codec_sv2-coverage 0.02% <0.00%> (+<0.01%) ⬆️
common_messages_sv2-coverage 0.17% <0.00%> (+0.03%) ⬆️
const_sv2-coverage 0.00% <0.00%> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.37% <0.00%> (+0.08%) ⬆️
jd_client-coverage 0.42% <ø> (ø)
jd_server-coverage 9.02% <ø> (ø)
job_declaration_sv2-coverage 0.00% <0.00%> (ø)
key-utils-coverage 2.39% <ø> (ø)
mining-coverage 3.17% <0.00%> (+0.73%) ⬆️
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 0.82% <ø> (ø)
noise_sv2-coverage 5.78% <0.00%> (+1.32%) ⬆️
protocols 23.92% <100.00%> (-0.89%) ⬇️
roles 6.43% <ø> (ø)
roles_logic_sv2-coverage 11.64% <100.00%> (+2.55%) ⬆️
sv2_ffi-coverage 0.00% <0.00%> (ø)
template_distribution_sv2-coverage 0.00% <0.00%> (ø)
translator_sv2-coverage 9.53% <ø> (ø)
utils 25.13% <ø> (ø)
v1-coverage 3.11% <0.00%> (+0.69%) ⬆️

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.

@Shourya742 Shourya742 force-pushed the 2025-02-06-remove-binary_sv2_serde branch 2 times, most recently from 94bf09f to 934abff Compare February 6, 2025 07:19
@Shourya742 Shourya742 force-pushed the 2025-02-06-remove-binary_sv2_serde branch from 934abff to e175bd3 Compare February 7, 2025 05:12
@plebhash plebhash force-pushed the 2025-02-06-remove-binary_sv2_serde branch from e175bd3 to 93bef4a Compare February 7, 2025 12:19
@plebhash
Copy link
Collaborator

plebhash commented Feb 7, 2025

rebasing due to #1455 (comment)

there's no point in having two directories named binary_sv2 anymore
@plebhash plebhash force-pushed the 2025-02-06-remove-binary_sv2_serde branch from 9419e27 to 9511a53 Compare February 7, 2025 13:16
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.

there's still things to be done here

@Shourya742 please finish 67e8e51, there's some details on the commit message

also, the code is still full of references to serde (comments, README)

@plebhash
Copy link
Collaborator

plebhash commented Feb 7, 2025

there's still things to be done here

@Shourya742 please finish 67e8e51, there's some details on the commit message

also, the code is still full of references to serde (comments, README)

as discussed in a call with @Shourya742 , we are going to proceed the following way:

  • take the work of deprecating binary_codec_sv2 crate into a follow-up PR, effectively dropping 67e8e51 from this PR
  • finish cleaning up all references to serde (in Rust Docs, README, etc) on this PR

no point in keeping this anymore

remove core from docs.yaml
@Shourya742 Shourya742 force-pushed the 2025-02-06-remove-binary_sv2_serde branch from 390561e to b0aee13 Compare February 8, 2025 05:13
@Shourya742 Shourya742 mentioned this pull request Feb 8, 2025
@@ -163,8 +156,7 @@ impl<'a, T: GetSize> GetSize for Seq0255<'a, T> {
}

/// [`Seq064K`] represents a sequence with a maximum length of 65535 elements.
/// This structure uses a generic type `T` and a lifetime parameter `'a`
/// to ensure compatibility with `serde-sv2`.
/// This structure uses a generic type `T` and a lifetime parameter `'a`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

given that the original motivation for the lifetime parameter was serde-sv2 compatibility, shouldn't we also do something about that?

it seems now there's no real motivation for this anymore, and simply removing the comment will make it hard for us to understand in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we will remove the lifetime parameters in the refactor binary_sv2 PR. I just didn't touch them in this PR since we agreed it would bloat the scope. Thanks for pointing it out for other reviewers to keep in mind while reviewing this and the binary_sv2 PR!

@@ -455,12 +447,12 @@ impl<'a, const ISFIXED: bool, const SIZE: usize, const HEADERSIZE: usize, const
}
}

/// The liftime is here only for type compatibility with serde-sv2
/// The lifetime 'a is defined.
Copy link
Collaborator

Choose a reason for hiding this comment

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

given that the original motivation for the lifetime parameter was serde-sv2 compatibility, shouldn't we also do something about that?

it seems now there's no real motivation for this anymore, and simply removing the comment will make it hard for us to understand in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we will remove the lifetime parameters in the refactor binary_sv2 PR. I just didn't touch them in this PR since we agreed it would bloat the scope. Thanks for pointing it out for other reviewers to keep in mind while reviewing this and the binary_sv2 PR!

@Shourya742 Shourya742 force-pushed the 2025-02-06-remove-binary_sv2_serde branch from b0aee13 to 684ca23 Compare February 9, 2025 09:56
- Add reg-test-block.toml to make the unit test work again
- Add serde as dev dependency to make the toml importing work.
@Shourya742 Shourya742 force-pushed the 2025-02-06-remove-binary_sv2_serde branch from 684ca23 to 49c78e3 Compare February 10, 2025 04:24
@plebhash plebhash merged commit f42ceb5 into stratum-mining:main Feb 10, 2025
32 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