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

ZILminer crash with 'Json::LogicError' from time to time #24

Open
renheren opened this issue Jan 14, 2021 · 3 comments
Open

ZILminer crash with 'Json::LogicError' from time to time #24

renheren opened this issue Jan 14, 2021 · 3 comments

Comments

@renheren
Copy link

Describe the bug
While mining on shardpool.io, zilminer crash upexpectedly with 'Json::LogicError'

 i 19:57:12 zilminer Job: d5703775… us1-zil.shardpool.io [ip-of-shardpool:5000]
terminate called after throwing an instance of 'Json::LogicError'
  what():  Value is not convertible to bool.

To Reproduce
Steps to reproduce the behavior:

  1. Just mining on shardpool with zilminer, it will happen from time to time. For me, it's a few times a day.

Expected behavior
continous mining without crash

Environment (please complete the following information):

  • Operating System: Ubuntu 18.04
  • Hardware: any Nvidia card
  • ZILminer Version: 0.4.01
  • ZILminer options used: --pow-start pow_start.sh --pow-end pow_end.sh --pow-end-at-startup -U --work-timeout=99998 --retry-delay=998 --farm-retries=99998 -P zil://[email protected]:5000/api --report-hr=1
@dentatar
Copy link

Same for me. Shardpool + zilminer 0.4.01

@Kgonla
Copy link

Kgonla commented Mar 13, 2021

me too

@moette
Copy link

moette commented Jun 24, 2021

The issue was caused by malformed answers to the eth_getWork call that shardpool.io send out randomly. These answers contained two json objects, the first not being in expected ZIL format:

`{"id":0,"jsonrpc":"2.0","result":["0x6ea9c64b8b48f6d8ff36805f5b58af599c040560b54d7c8120b4a97a5cbcd0ee","0x0000000000000000000000000000000000000000000000000000000000000000","0x0100010001000100010001000100010001000100010001000100010001","12382"]
} {"id":1,"jsonrpc":"2.0","result":["0x6ea9c64b8b48f6d8ff36805f5b58af599c040560b54d7c8120b4a97a5cbcd0ee","0x0000000000000000000000000000000000000000000000000000000000000000","0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff",true,0]}

OR

{"id":0,"jsonrpc":"2.0","result":["0xa8e787d3d85597e20702cc584d09c7e3e727a20bf0d0f86dd8b4dbebfb5cdb28","0x0000000000000000000000000000000000000000000000000000000000000000","0x0100010001000100010001000100010001000100010001000100010001","12374"]}{"id":1,"jsonrpc":"2.0","result":["","","",true,0]}`

ZILminer expects the result array to have 5 elements, the 4th being a bool. The current code accesses and converts the array elements without checking them. I prepared a fix and will add a PR later.

In the meantime shardpool.io have fixed the issue on their side. So single mining zil should work without the miner crashing now.

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

No branches or pull requests

4 participants