Giter Site home page Giter Site logo

generate-genesis's Introduction

Hello, I'm mycroft!

I'm currently an unemployed software engineer. I also do devops stuff if that matters.

Recent news

  • 2024-08-03: Now doing ziglings.
  • 2024-08-02: Redone a rustlings pass.
  • 2024-07-20: I wrote a .git/objects parser to learn git internals.
  • 2024-07-13: Not that much :-(

generate-genesis's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

generate-genesis's Issues

another issue not finding genesis block

Running latest version of master, this took 4 minutes on my machine:

./generate-genesis -nonce 1 -psz "03/May/2024 Bitcoin block" -timestamp 1714777860 -pubkey 000000000000000000000000000000000000000000000000000000000000000000
Ctrl Hash:	0x0000000074d0d22027690df0c540b7892a735a28f27f2259dfc36abefef4a47f
Target:		0x00000000ffff0000000000000000000000000000000000000000000000000000
Blk Hash:	0x0000000074d0d22027690df0c540b7892a735a28f27f2259dfc36abefef4a47f
Mkl Hash:	0x25b153370db436b43fe33df10bb93eb8655b93e5102cacf7889d7b61bd181c5b
Nonce:		1300206773
Timestamp:	1714777860
Pubkey:		000000000000000000000000000000000000000000000000000000000000000000
Coins:		5000000000
Psz:		'03/May/2024 Bitcoin block'

This command found a solution in a couple minutes:

./generate-genesis -nonce 1 -psz "03/May/2024 000000000000000000001ebd58c244970b3aa9d783bb001011fbe8ea8e98e00e" -timestamp 1714777860 -pubkey 000000000000000000000000000000000000000000000000000000000000000000
Ctrl Hash:	0x00000000da84f2bafbbc53dee25a72ae507ff4914b867c565be350b0da8bf043
Target:		0x00000000ffff0000000000000000000000000000000000000000000000000000
Blk Hash:	0x00000000da84f2bafbbc53dee25a72ae507ff4914b867c565be350b0da8bf043
Mkl Hash:	0x7aa0a7ae1e223414cb807e40cd57e667b718e42aaf9306db9102fe28912b7b4e
Nonce:		393743547
Timestamp:	1714777860
Pubkey:		000000000000000000000000000000000000000000000000000000000000000000
Coins:		5000000000
Psz:		'03/May/2024 000000000000000000001ebd58c244970b3aa9d783bb001011fbe8ea8e98e00e'

But this one ran for over half an hour without finding anything and exhausting the nonce space:

./generate-genesis -nonce 1 -psz "03/May/2024 Bitcoin block 000000000000000000001ebd58c244970b3aa9d783bb001011fbe8ea8e98e00e" -timestamp 1714777860 -pubkey 000000000000000000000000000000000000000000000000000000000000000000
nonce was reset. Timestamp is now 1714777861

psz length check too high?

Just a heads up in case you want to look into it.

It seems like the length check for psz is way too high. The tool allows me to attempt generating a block with a psz that is hundreds of characters. If I try that, it simply never finds a block.

Or maybe it isn't specifically the max psz length, but something related to longer pszs. All I know is that when I try generating a genesis block with a psz > 64 chars, I never succeed in minting a block even after having the script run for hours.

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.