Open plebhash opened 7 months ago
We can leverage the work done in #854 in this effort when we start listing the technical debt for each crate.
What do you think about merging all the v2/binary-sv2/**
into a single v2/binary-sv2
for the following reason https://github.com/stratum-mining/stratum/issues/1134#issuecomment-2333691340 ?
I don't think that this is a good idea as we wouldn't be able to opt out serde anymore
Oh sorry maybe my comment was not clear. I was just suggesting to merge them in terms of the effort to document and refactor them, not merge the crates into a single one.
What do you think about merging all the
v2/binary-sv2/**
into a singlev2/binary-sv2
for the following reason #1134 (comment) ?
As discussed in last week's dev call (sep 10th 2024), binary-sv2/serde-sv2
is a candidate for deprecation. This crate is the only reason we maintain the with_serde
feature flag, which is known to be causing some trouble on downstream projects. Therefore it is highly desirable that we eliminate the with_serde
feature flag by getting rid of this crate.
So spending time documenting this crate would probably be wasted effort.
The only thing preventing us from deprecating it right now is the fact the MG uses it as a dependency.
we are starting to write many ideas to our Technical Debt
issues
we should allow ourselves room to brainstorm and propose ideas, this is the time to get creative
but when we start doing the actual refactoring PRs, it's of strategic importance that we cultivate a disciplined mindset around Goodhart's Law so we can make the right engineering tradeoffs and compromises
maybe #1233 can fit in this issue ?
We recently published our
protocols
crates tocrates.io
. We need to make sure the APIs provided by those crates are properly documented under the Rust Best Practices.This is also the perfect opportunity to map and address technical debt on those crates. As we go through the code and try to understand it, we take the chance to write down a list of ways the code could be improved. Things such as:
unwrap
,panic!
,expect
)// todo
comments,todo!
macros, edge cases withunimplemented!
orpanic!
Task list
Rust Docs
v1
(already documented but worth a look before proceding)v2/binary-sv2/binary-sv2
v2/binary-sv2/no-serde-sv2/codec
v2/binary-sv2/no-serde-sv2/derive_codec
v2/binary-sv2/serde-sv2
v2/const-sv2
v2/framing-sv2
v2/codec-sv2
v2/noise-sv2
v2/subprotocols
(already documented but worth a look before proceeding)v2/roles-logic-sv2
v2/sv2-ffi
utils/buffer
Refactor Implementation
Dependencies graph
protocols
'DEPENDENCIES.md
PR: https://github.com/stratum-mining/stratum/pull/1233protocols
' updatedDEPENDENCIES.md
PR (after refactoring): todo