Bitcoin Forum
November 04, 2024, 04:20:28 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3]  All
  Print  
Author Topic: [ANN] Genesis Block Generator  (Read 30925 times)
Tokenista
Member
**
Offline Offline

Activity: 910
Merit: 14

Everyone join Blurt.blog & Steemit.com


View Profile
August 25, 2018, 07:36:41 AM
 #41

Ethereum Smart Contract pre-compiled
https://github.com/satansdeer/ethereum-token-tutorial
harishbp
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
September 29, 2018, 05:59:03 AM
 #42

Hello,

I am using the below code to generate genesis block. I got the Coinbase, PubkeyScript, Merkle Hash, Byteswapped. However, it is stuck at Generating block... . The Hashes/s and Nonce keep changing. I thought it will just take a few mins to generate the first block. But, generally, how much time does it take to generate the first block? Am I missing something? Should I have changed something in code to generate the first block faster?

Waiting for your reply.

Regards,
Harish

Thanks, it works great for me. I have made small changes to improve it, see https://github.com/liveblockchain/genesisgen

1. Gets invalid result when the timestamp string is longer than 76 bytes, as it has to use `OP_PUSHDATA1(0x4c)` as prefix of the data.

Code:
if (timestamp_len > 76) {
transaction->scriptSig[scriptSig_pos++] = 0x4c;
}

2. Add command line arguments for nonce and unixtime for quick poc test.

Code:
Usage: ./genesis [options] <pubkey> "<timestamp>" <nBits> <startNonce> <unixtime>
$ ./genesis 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" 486604799 2083236893 1231006505
    nBits: 0x1d00ffff
    startNonce: 2083236893
    unixtime: 1231006505

    Coinbase: 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73

    PubkeyScript: 4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac

    Merkle Hash: 3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a
    Byteswapped: 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
    Generating block...

    Block found!
    Hash: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
    Nonce: 2083236893
    Unix time: 1231006505
bitcoinforktech
Jr. Member
*
Offline Offline

Activity: 32
Merit: 4


View Profile WWW
October 09, 2020, 03:25:15 AM
 #43

Updated for Blake hashing.

Also demonstrates changing the hashing algorithm for genesis block creation and the block reward.

https://github.com/bitcoinforktech/genesis-block-generator
Tokenista
Member
**
Offline Offline

Activity: 910
Merit: 14

Everyone join Blurt.blog & Steemit.com


View Profile
October 23, 2020, 06:24:36 AM
 #44

Glad to see things like this still happening.

I originally learned from LernCoin
gcrypto
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
April 29, 2021, 05:29:24 PM
 #45

Should this work for pivx clone?

Have tried to use it for a pivx clone that has been running for about 3 years now. Expected that the actual genesis hash of the running chain would be the output after I've input all the required fields, but instead it outputs a different genesis block hash, as well as a different merkle, to what is in the chain/code.

SikkieNL
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
July 19, 2023, 12:16:17 AM
 #46

Does this also work for neoscrypt ?
Pages: « 1 2 [3]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!