-
Notifications
You must be signed in to change notification settings - Fork 145
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
Handlers refactoring #1567
base: main
Are you sure you want to change the base?
Handlers refactoring #1567
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1567 +/- ##
==========================================
+ Coverage 19.31% 19.60% +0.29%
==========================================
Files 131 132 +1
Lines 9298 9160 -138
==========================================
Hits 1796 1796
+ Misses 7502 7364 -138
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c13c721
to
52bb662
Compare
I was under the impression that we would also get some deeper simplifications on is that going to be done on future PRs? or did you conclude that it's not possible for some reason? |
another relevant point related to the scope of this PR is the fact that for some reason, stratum/roles/test-utils/mining-device/src/lib/mod.rs Lines 345 to 388 in 079e823
|
related to my comments above, here's how I visualize the ideal - pub trait ParseMiningMessagesFromUpstream<
- Down: IsMiningDownstream + D,
- Selector: DownstreamMiningSelector<Down> + D,
- Router: MiningRouter<Down, Self, Selector>,
- > where
- Self: IsMiningUpstream<Down, Selector> + Sized + D,
+ pub trait ParseMiningMessagesFromUpstream
+ where
+ Self: Sized, - pub trait ParseMiningMessagesFromDownstream<
- Up: IsMiningUpstream<Self, Selector> + D,
- Selector: DownstreamMiningSelector<Self> + D,
- Router: MiningRouter<Self, Up, Selector>,
- > where
- Self: IsMiningDownstream + Sized + D,
+ pub trait ParseMiningMessagesFromDownstream
+ where
+ Self: Sized, I feel all those generics and trait bounds are over-engineered, bringing a lot of unnecessary complexity without any clear benefit if we compare them with their JDP and TDP equivalents, we see that those are much simpler |
52bb662
to
7db0936
Compare
I have it almost ready locally, it's built on top of this PR and will be pushed soon |
that's great, I suspected that could be the case but it still leaves the questions about perhaps that could also be addressed in a follow-up PR, but I just want to make sure we don't wrap up the refactorings on |
Thanks for putting emphasis on this, it's very important. I'm gonna tackle it in the next PR, promise! :) |
7db0936
to
e897684
Compare
30c1f3f
to
d8bbd79
Compare
d8bbd79
to
d6b4821
Compare
This PR refactors
handlers
insideroles_logic_sv2
crate.Closes #1443