Open renheren opened 3 years ago
Same for me. Shardpool + zilminer 0.4.01
me too
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.
Describe the bug While mining on shardpool.io, zilminer crash upexpectedly with 'Json::LogicError'
To Reproduce Steps to reproduce the behavior:
Expected behavior continous mining without crash
Environment (please complete the following information):