Bitcoin Forum
June 25, 2024, 05:54:26 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Alternate cryptocurrencies / Altcoin Discussion / Re: [ANN] Genesis Block Generator on: September 29, 2018, 05:59:03 AM
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
2  Alternate cryptocurrencies / Altcoin Discussion / Restored Litecoin Wallet, lost 12 LiteCoins on: August 04, 2017, 05:30:56 AM
Hello there,

I had to restore my Litecoin-Qt account using my old wallet.dat file which I had taken a backup in June 2017. But, lost 12 LiteCoins which I had received in July 2017. I dont have the private keys cause, I thought wallet.dat file is more than enough for the backup. I know, its my mistake. Let me explain exactly what happened.

1. In June 2017, I was introduced to the world of Cryptocurrencies and I started to invest in few of them. One of them were LiteCoins.
2. I purchase a few LiteCoins the first time and transferred them to my LiteCoin-Qt Desktop wallet in June itself.
3. Once I received the LietCoins, I took a backup of the wallet, which actually backs up the wallet.dat file. I thought, this was more than enough.
4. On 11st July 2017, I purchased 12 more LiteCoins through ShapeShift.io and transferred to a new address which was generated in my Litecoin-Qt desktop wallet software. For some reason, I didn't know that I could have used the old address itself which was used for Litecoin transfer in June 2017. This was successful and I could see the litecoins in my Litecoin-Qt desktop wallet.
5. A week ago, I my Macbook started acting strange and I was running out of Memory and diskspace. Hence I decided to format the system and re-install only those which I require from scratch. I seriously thought the old wallet.dat backup was enough to get all my Litecoins back. Hence, I did not backup the wallet.dat file again. Nor did I generate the private keys.
6. I formatted the system and installed Litecoin-Qt and restored my old wallet.dat file which I took as a backup in June 2017.
7. Since this wallet.dat file was backed up before generating the new address where I received 12 Litecoins - I am missing this last transaction and hence missing the 12 Litecoins.

After searching for similar issues on Internet, I came to know that each Address is unique and each time you create a new address,  you have to take a backup of the wallet.dat file or best way is to take backup of private key of each address generated in your account. I have the transaction id, Address and all other details of that 12 Litecoin transfer. Its present on the blockchain.

Is there anyway to recover this new address - transaction - Litecoins back to my account? Or have I lost it forever?

I have already resynced, rescanned and also re-indexed the whole blockchain. Is there anything else that I can do?

Regards,
Harish
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!