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

In some cases Stratum server reads part of the message and ignores it #2524

Closed
hashmap opened this issue Feb 4, 2019 · 3 comments
Closed
Labels

Comments

@hashmap
Copy link
Contributor

hashmap commented Feb 4, 2019

20190204 13:28:07.478 WARN grin_servers::mining::stratumserver - (Server ID: 0) Failed to parse JSONRpc: JSON error - [106, 115, 111, 110, 114, 112, 99, 34, 58, 34, 50, 46, 48, 34, 125, 10] 20190204 13:28:07.478 WARN grin_servers::mining::stratumserver - (Server ID: 0) Dropping worker: 6120

At this moment server reads jsonrpc " : " 2 . 0 " }. It drops the first part of the message here https://github.com/mimblewimble/grin/blob/master/servers/src/mining/stratumserver.rs#L179
if read operation is about to block.

@hashmap hashmap added the bug label Feb 4, 2019
hashmap added a commit to cyclefortytwo/grin that referenced this issue Feb 4, 2019
If WouldBlock error happens Stratum server drops part of a message to
read or write. This PR inroduces a worker's buffer to store partially
read message which will be completed next time. For write the existing
util function is used.
Fixes mimblewimble#2524
de1acr0ix pushed a commit to btccom/grin that referenced this issue Feb 7, 2019
If WouldBlock error happens Stratum server drops part of a message to
read or write. This PR inroduces a worker's buffer to store partially
read message which will be completed next time. For write the existing
util function is used.
Fixes mimblewimble#2524
hashmap added a commit that referenced this issue Feb 12, 2019
If WouldBlock error happens Stratum server drops part of a message to
read or write. This PR inroduces a worker's buffer to store partially
read message which will be completed next time. For write the existing
util function is used.
Fixes #2524
@bladedoyle
Copy link
Contributor

Ah, the "appends" part is worth mentioning, yes and thank you.

But then your comment about the server read should be:

At this moment server reads jsonrpc " : " 2 . 0 " }\n (with the newline) and then its clear.

Thanks again for the explanation.

@hashmap
Copy link
Contributor Author

hashmap commented Feb 15, 2019

@bladedoyle you are right, as you can see it has 10 at the end

@bladedoyle
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants