Author

Topic: start bitcoin core private blockchain (Read 233 times)

jr. member
Activity: 113
Merit: 5
May 24, 2018, 03:58:46 AM
#8
when i run the bitcoin-cli, i got the error

error code: -28
error message:
Loading wallet...

In the protocol.h, the error meaning is:

RPC_IN_WARMUP                   = -28, //!< Client still warming up
jr. member
Activity: 113
Merit: 5
May 24, 2018, 02:53:29 AM
#7
i only changed the timestamp, when starting bitcoind, i got the error in debug.log

2018-05-24 07:50:44 mapAddressBook.size() = 1
2018-05-24 07:50:44 ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8)
2018-05-24 07:50:44 *** Failed to read block
2018-05-24 07:50:44 Error: Error: A fatal internal error occurred, see debug.log for details

It is solved by running bitcoind with -reindex
jr. member
Activity: 113
Merit: 5
May 24, 2018, 02:40:27 AM
#6

Quote
No it's not enough.
Read some guide, for example this one:
Complete Guide on How to Create a New Alt Coin

I read it.
jr. member
Activity: 113
Merit: 5
May 24, 2018, 02:28:42 AM
#5
i found a good link
https://bitcoin.stackexchange.com/questions/13122/scriptsig-coinbase-structure-of-the-genesis-block

i tried to print out the value in chainparams.cpp before assert in line 125. But value is printed out as 0x0,  and 0x103?

Quote
fprintf(stdout,"0x%x\n",consensus.hashGenesisBlock);
fprintf(stdout,"0x%x\n",genesis.hashMerkleRoot);

the warning is : format specifies type 'unsigned int' but the argument has type 'uint256'

Update: use this to print uint256. They are string.
Quote
fprintf(stdout,"%s\n", consensus.hashGenesisBlock.ToString().c_str());
fprintf(stdout,"%s\n",genesis.hashMerkleRoot.ToString().c_str());
QRC
newbie
Activity: 10
Merit: 2
May 24, 2018, 01:34:21 AM
#4
what do you mean by private bitcoin core chain?
1) bitcoin core it's just a client, so use bitcoin blockchain term.
2) do you want to fork bitcoin codebase? In this case you have to change more parameters than genesis block: port number, magic message number ect.
3) But if you just want to run private bitcoin blockchain for your own testing or something similar, you don't have to change anything Smiley just start daemon with -regtest option.

Thank you. I would like to fork bitcoin code base.

In src/chainparams.cpp
Quote
    const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
    const CScript genesisOutputScript = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3 8c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;

Can i just change the timestamp and genesis output script, to create a customised bitcoin ?
No it's not enough.
Read some guide, for example this one:
Complete Guide on How to Create a New Alt Coin
jr. member
Activity: 113
Merit: 5
May 24, 2018, 01:07:14 AM
#3
what do you mean by private bitcoin core chain?
1) bitcoin core it's just a client, so use bitcoin blockchain term.
2) do you want to fork bitcoin codebase? In this case you have to change more parameters than genesis block: port number, magic message number ect.
3) But if you just want to run private bitcoin blockchain for your own testing or something similar, you don't have to change anything Smiley just start daemon with -regtest option.

Thank you. I would like to fork bitcoin code base.

In src/chainparams.cpp
Quote
    const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
    const CScript genesisOutputScript = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3 8c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;

Can i just change the timestamp and genesis output script, to create a customised bitcoin ?
QRC
newbie
Activity: 10
Merit: 2
May 24, 2018, 12:52:53 AM
#2
To start a customised private bitcoin core blockchain, all i need to do is:

1) change the genesis block
2) change the timestamp of genesis block

is there anything else?

what do you mean by private bitcoin core chain?
1) bitcoin core it's just a client, so use bitcoin blockchain term.
2) do you want to fork bitcoin codebase? In this case you have to change more parameters than genesis block: port number, magic message number ect.
3) But if you just want to run private bitcoin blockchain for your own testing or something similar, you don't have to change anything Smiley just start daemon with -regtest option.
jr. member
Activity: 113
Merit: 5
May 24, 2018, 12:36:06 AM
#1
To start a customised private bitcoin core blockchain, all i need to do is:

1) change the genesis block
2) change the timestamp of genesis block

is there anything else?
Jump to: