-
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
avoid JDS dropping connection on SubmitSolution
with missing txs
#1025
Conversation
1e5340b
to
5d8098e
Compare
Bencher
Click to view all benchmark results
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
Bencher
Click to view all benchmark results
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
Bencher
Click to view all benchmark results
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
Bencher
Click to view all benchmark results
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
5d8098e
to
131bca5
Compare
993430e
to
d4510a5
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.
Looks good. Would be good if someone with more knowledge about MG tests than myself can chime in as well.
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.
ACK d4510a5. Just few nits
test/message-generator/mock/jdc-mock-jds-receive-solution-while-processing-declared-job.json
Outdated
Show resolved
Hide resolved
test/message-generator/mock/jdc-mock-jds-receive-solution-while-processing-declared-job.json
Outdated
Show resolved
Hide resolved
3c9cf45
to
38c87ef
Compare
f462ccb
to
ee17907
Compare
test/message-generator/mock/jdc-mock-jds-receive-solution-while-processing-declared-job.json
Show resolved
Hide resolved
ee17907
to
5440147
Compare
Did you consider to remove a placeholder for the inner error here? JdsError::MempoolError(error_inner) => {
match error_inner {
EmptyMempool => {...},
NoClient => {...},
Rpc(RpcError) => {...},
PoisonLock(String) => {...},
}
} and return send_status(sender, e, error_handling::ErrorBranch::Break).await or send_status(sender, e, error_handling::ErrorBranch::Continue).await according on when you want the JDS to continue or break |
following suggestion by @lorbax stratum-mining#1025 (comment) the implementation diverged a bit from the suggestion, but it was still a good reminder that we should leverage `handle_result!` macro here
this comment was a good reminder of I ended up with a different solution, which is simpler than what @lorbax suggested above it can be summarized on this commit: 7b8765a basically, when the bug described in #912 is triggered, JDS encounters a stratum/roles/jd-server/src/lib/status.rs Lines 124 to 126 in 2cbc88a
so we can simply defer to the default/standard error handling mechanism of JDS, which is the |
following suggestion by @lorbax stratum-mining#1025 (comment) the implementation diverged a bit from the suggestion, but it was still a good reminder that we should leverage `handle_result!` macro here
1d33e46
to
7b8765a
Compare
following suggestion by @lorbax stratum-mining#1025 (comment) the implementation diverged a bit from the suggestion, but it was still a good reminder that we should leverage `handle_result!` macro here
7b8765a
to
493e326
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.
Nice, I learned about handle_result
.
I think 3rd commit should be squashed into the first one
I think that in the long term we should get rid of it. I usually prefer handling the task as close as possible from where I start it, I also think that for production code abort the task on dropping is better, since it easier to understand if there is a bug |
following suggestion by @lorbax stratum-mining#1025 (comment) the implementation diverged a bit from the suggestion, but it was still a good reminder that we should leverage `handle_result!` macro here
493e326
to
f7cd687
Compare
this is the actual fix for stratum-mining#912 use handle_result! macro following suggestion by @lorbax stratum-mining#1025 (comment) the implementation diverged a bit from the suggestion, but it was still a good reminder that we should leverage `handle_result!` macro here
f7cd687
to
7a419d3
Compare
this is the actual fix for stratum-mining#912 use handle_result! macro following suggestion by @lorbax stratum-mining#1025 (comment) the implementation diverged a bit from the suggestion, but it was still a good reminder that we should leverage `handle_result!` macro here
7a419d3
to
a197770
Compare
this is the actual fix for stratum-mining#912 use handle_result! macro following suggestion by @lorbax stratum-mining#1025 (comment) the implementation diverged a bit from the suggestion, but it was still a good reminder that we should leverage `handle_result!` macro here
this PR: