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

refactor framing_sv2 example #1468

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

Conversation

plebhash
Copy link
Collaborator

@plebhash plebhash commented Feb 9, 2025

close #1467

Copy link

codecov bot commented Feb 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 18.85%. Comparing base (bec1d3e) to head (cb2b67b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1468      +/-   ##
==========================================
+ Coverage   18.28%   18.85%   +0.56%     
==========================================
  Files         127      116      -11     
  Lines        9738     8758     -980     
==========================================
- Hits         1781     1651     -130     
+ Misses       7957     7107     -850     
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <ø> (ø)
binary_sv2-coverage 6.95% <ø> (ø)
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 24.88% <ø> (ø)
codec_sv2-coverage 0.02% <ø> (ø)
common_messages_sv2-coverage 0.17% <ø> (ø)
const_sv2-coverage 0.00% <ø> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.37% <ø> (ø)
jd_client-coverage 0.42% <ø> (ø)
jd_server-coverage 12.98% <ø> (ø)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 2.38% <ø> (ø)
mining-coverage 3.15% <ø> (-0.03%) ⬇️
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 0.82% <ø> (ø)
noise_sv2-coverage 5.78% <ø> (ø)
protocols 23.89% <ø> (-0.02%) ⬇️
roles 5.56% <ø> (-2.16%) ⬇️
roles_logic_sv2-coverage 11.62% <ø> (ø)
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage ?
utils 25.04% <ø> (ø)
v1-coverage 3.11% <ø> (ø)

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.

@plebhash plebhash force-pushed the refactor-framing-sv2-example branch 5 times, most recently from 7d24f3f to 52e824f Compare February 10, 2025 17:13
@plebhash plebhash marked this pull request as ready for review February 10, 2025 17:13
@plebhash plebhash changed the title [WIP] refactor framing_sv2 example refactor framing_sv2 example Feb 10, 2025
Copy link
Contributor

@jbesraa jbesraa left a comment

Choose a reason for hiding this comment

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

Looks good. do we actually run this in the ci?

@plebhash
Copy link
Collaborator Author

Looks good. do we actually run this in the ci?

nice catch, we didn't but I just added a commit that runs it from test.yml

@Shourya742
Copy link
Contributor

Looks good. do we actually run this in the ci?

nice catch, we didn't but I just added a commit that runs it from test.yml

Should we also add other examples that we recently included during our documentation efforts, since not all of them have been added to CI?


// Example message type (e.g., SetupConnection)
const MSG_TYPE: u8 = 1;
// Example extension type (e.g., a standard Sv2 message)
const EXT_TYPE: u16 = 0x0001;

#[derive(Serialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct CustomMessage {
Copy link
Contributor

Choose a reason for hiding this comment

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

thinking out loud here, wouldn't it be more beneficial to actually have an SV2 message here? for the MSG_TYPE, SETUP_CONNECTION is used, maybe here as well?

we need to assert that the deserialized message has the same content from the original
@plebhash plebhash force-pushed the refactor-framing-sv2-example branch from cd6226b to cb2b67b Compare February 19, 2025 02:36
@Shourya742
Copy link
Contributor

This should be good to go now? cc: @plebhash

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.

framing_sv2 example is incomplete
3 participants