GenesisH0 icon indicating copy to clipboard operation
GenesisH0 copied to clipboard

Script Crashes after 7 hours of mining.

Open luckcolors opened this issue 8 years ago • 7 comments

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

luckcolors avatar Feb 28 '16 12:02 luckcolors

There needs to be code written to also iterate within the coinbase, the famous newspaper headline. 4294967295 is bigger than 0xFFFF FFFF

jonasbits avatar Apr 13 '16 18:04 jonasbits

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.

jonasbits avatar Jan 30 '18 21:01 jonasbits

I met this issue too, help pls.

hcaihao avatar Feb 01 '18 03:02 hcaihao

I met this issue too, help pls.

Linge19494492 avatar Apr 05 '18 05:04 Linge19494492

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

zxk19981227 avatar Sep 11 '18 02:09 zxk19981227

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.

luckcolors avatar Sep 11 '18 21:09 luckcolors

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

MaherKM avatar May 18 '21 04:05 MaherKM