-
Notifications
You must be signed in to change notification settings - Fork 136
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
common_messages_sv2
docs
#1242
common_messages_sv2
docs
#1242
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1242 +/- ##
=======================================
Coverage 19.30% 19.30%
=======================================
Files 164 164
Lines 10849 10849
=======================================
Hits 2094 2094
Misses 8755 8755
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
bf46414
to
920076b
Compare
protocols/v2/subprotocols/common-messages/src/channel_endpoint_changed.rs
Outdated
Show resolved
Hide resolved
protocols/v2/subprotocols/common-messages/src/channel_endpoint_changed.rs
Outdated
Show resolved
Hide resolved
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbesraa, could you also update the sv2.h
file to match the changes in the docs? I noticed a few public structures, methods, and enums missing documentation. Maybe add #![deny(missing_docs)]
at the top level to catch those and see what's missing?
Also, these methods seem a bit off:
pub fn set_requires_standard_job(&mut self) {
self.flags |= 0b_0000_0000_0000_0000_0000_0000_0000_0001;
}
pub fn set_async_job_negotiation(&mut self) {
self.flags |= 0b_0000_0000_0000_0000_0000_0000_0000_0001;
}
Both are setting the LSB and set_requires_standard_job
looks like it's only used in tests.
/// | ||
/// This message is sent in response to a [`SetupConnection`] message. | ||
/// | ||
/// The connection setup process could fail because of protocol version negotiation. In order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// The connection setup process could fail because of protocol version negotiation. In order | |
/// The connection setup process could fail because of protocol version negotiation. In order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbesraa did you miss this one?
b1d08ac
to
aa72fcd
Compare
Thanks for the review. What exactly should be changed in In regards to the function that might be wrong/unused, I would leave that to a separate PR. |
@GitGab19 Thanks for the review. I believe I addressed all of your comments. Some of the structs throw a warning(https://github.com/stratum-mining/stratum/actions/runs/11878855683/job/33100048008?pr=1242) for missing documentation for the |
Bencher Report
🚨 7 Alerts
Click to view all benchmark results
|
Bencher Report
Click to view all benchmark results
|
Bencher Report
Click to view all benchmark results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left two minor things. For me we can open the PR review process to everyone now. What do you think @jbesraa ?
Why do you say it will be fixed when |
aa72fcd
to
27d54cf
Compare
Because it is complaining about functions inside |
sounds good |
27d54cf
to
a23801f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's open the review process to anyone to move on with this PR. I also saw that @Shourya742 already started to review it partially, don't know if he can complete it with a second one.
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
We can track the methods mentioned in the refactor issue for this crate to ensure they aren't forgotten. Regarding the |
@@ -1,7 +1,13 @@ | |||
//! # Stratum V2 Common Messages Crate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't directly related to documentation, but we can create a separate prop_test
module to consolidate all the generation code, instead of applying the feature gate to individual lines. This could be included as part of a refactoring issue.
/// `extension_type`. | ||
/// | ||
/// When a downstream receives such a message, any extension state (including version and extension | ||
/// support) must be reset and renegotiated. | ||
#[repr(C)] | ||
#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq)] | |
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] |
This isn't related to documentation, but either Copy
or Clone
can be removed, as both aren't necessary. Additionally, Eq
is not required. This could be added to the refactoring tracker.
2dd5ca0
to
ff01340
Compare
@jbesraa is it ready for a final round of review? I see you still need to address some comments from @Shourya742 |
I still need to fix the header thing, but feel free to review. Addressed all comments. |
ff01340
to
fc1540f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left only a single minor comment.
protocols/v2/subprotocols/common-messages/src/setup_connection.rs
Outdated
Show resolved
Hide resolved
6a776a4
to
19651b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good to go for me. I just pinged you on a couple of comments you might have missed.
/// | ||
/// This message is sent in response to a [`SetupConnection`] message. | ||
/// | ||
/// The connection setup process could fail because of protocol version negotiation. In order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbesraa did you miss this one?
dccb2c2
to
0a92680
Compare
@GitGab19 Addressed the above |
@jbesraa there's the semver check which is failing, when you solve it, I will merge this one. |
No idea why would this actually fail. could you please rerun it? |
.. and fix some styling inconsistency
As part of the effort to improve Stratum V2 protocols docs, this commit aims to improves and make the documentation more comprehensive and accessible for contributors and end users alike.
Use the template README used across the different Stratum V2 protocol crates to `common_messages_sv2` crate.
0a92680
to
aadf42d
Compare
resolves #1203