Giter Site home page Giter Site logo

Comments (2)

mycroft avatar mycroft commented on August 14, 2024

I do not think there is an issue here. You're just being unlucky and it just takes time to find a valid hash with the parameters. I was able to get one valid hash with your parameters and it took 30-45 min on my end unfortunately:

$ ./generate-genesis -nonce 0 -psz "03/May/2024 Bitcoin block 000000000000000000001ebd58c244970b3aa9d783bb001011fbe8ea8e98e00e" -timestamp 1714777860 -pubkey 000000000000000000000000000000000000000000000000000000000000000000 -workers 48 -maxprocs 128

Ctrl Hash:      0x00000000f3c23edbdaabb23bab7598874aed89a515ef182c121f7469c9b8b05e
Target:         0x00000000ffff0000000000000000000000000000000000000000000000000000
Blk Hash:       0x00000000f3c23edbdaabb23bab7598874aed89a515ef182c121f7469c9b8b05e
Mkl Hash:       0x44c6a56ff59c8016031e3be56c4c9d60fa95086a7803a454f7b507084d0c6e12
Nonce:          3185950820
Timestamp:      1714777866
Pubkey:         000000000000000000000000000000000000000000000000000000000000000000
Coins:          5000000000
Psz:            '03/May/2024 Bitcoin block 000000000000000000001ebd58c244970b3aa9d783bb001011fbe8ea8e98e00e'

It went from timestamp 1714777860 to 1714777866 which means it computed like 30 trillions signatures (~60 trillions sha256 unless I'm wrong) to get there.

Please remember this piece of code is written in golang which is definitely not the best language for this kind of stuff as I'm 100% sure our modern CPUs could handle a lot more hashes/sec and have faster results.

However, it's been a while I did not profile golang compiled stuff but I might give a look to find out if there is no quick win scenario to have faster results. I've already added configurable workers/GOMAXPROCS flags to customize cpu usage but golang seems to limit cpu usage to 85% here (50% prior modification)

from generate-genesis.

jlopp avatar jlopp commented on August 14, 2024

Aha, fair enough!

from generate-genesis.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.