GenesisH0
GenesisH0 copied to clipboard
Script Crashes after 7 hours of mining.
Hello. I'm using this script to mine a sha256 genesis block but after 7 hours of mining it crashes with this error. Note: The script actually works if i start it without any parameters(by doing so i presume i mine satoshi's genesis block and it works )
bits: 0x1d00ffff
Searching for genesis hash..
179738.0 hash/s, estimate: 6.6 hTraceback (most recent call last):
File "genesis.py", line 203, in <module>
main()
File "genesis.py", line 20, in main
genesis_hash, nonce = generate_hash(block_header, algorithm, options.nonce, options.bits)
File "genesis.py", line 140, in generate_hash
data_block = data_block[0:len(data_block) - 4] + struct.pack('<I', nonce)
struct.error: 'I' format requires 0 <= number <= 4294967295
There needs to be code written to also iterate within the coinbase, the famous newspaper headline. 4294967295 is bigger than 0xFFFF FFFF
My understanding is that you start to add garbage characters to the start or end of the coinbase-message. But another way to do this is to sample the time again and restart mining for the Genesis and reset nonce.
Hope this helps /jonasbits
Den 29 jan 2018 kl. 06:58 skrev dizzydes [email protected]:
@jonasbits You mean code needs to be added to this script? What iteration in the coinbase do you mean?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I met this issue too, help pls.
I met this issue too, help pls.
I met this problem too. But I solved it by shorten my senetences and it works. This error is probably caused by using long sentence whose hash is longer than the limit in the programme. So I wish this would help you
In theory this commit in @jonasbits 's fork fixes the issue. Can't remember if it worked when i last used this tool, unfortunately it seems that the maintainer of this repo is long not responding soo yeah.
Same issue. Tried a shorter timestamp and still got the error. Original BTC timestamp is 69, mine was 65 so I think that is not the solution