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

Script Crashes after 7 hours of mining. #16

Open
luckcolors opened this issue Feb 28, 2016 · 7 comments
Open

Script Crashes after 7 hours of mining. #16

luckcolors opened this issue Feb 28, 2016 · 7 comments

Comments

@luckcolors
Copy link

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
@jonasbits
Copy link

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

@jonasbits
Copy link

jonasbits commented Jan 30, 2018 via email

@hcaihao
Copy link

hcaihao commented Feb 1, 2018

I met this issue too, help pls.

1 similar comment
@Linge19494492
Copy link

I met this issue too, help pls.

@zxk19981227
Copy link

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

@luckcolors
Copy link
Author

luckcolors commented Sep 11, 2018

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.

@MaherKM
Copy link

MaherKM commented May 18, 2021

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

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

6 participants