Bitcoin Forum
April 16, 2024, 12:33:00 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 4 5 »  All
  Print  
Author Topic: *** Complete Guide on How to Create a New Alt Coin – Update 2018 ***  (Read 20857 times)
haoqian
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
May 04, 2018, 01:43:16 PM
 #21

Thank you for your reply.

I do generate my own genesis block. It seems that it is just keeping downloading.

It would be a lot helpful if you could run a git diff on your workspace and paste the change you have made, so that we can identify the problem.

Changes including this... (with 0x, did not show on the git diff)

consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000100010001");

The bitcoind is still keep downloading.
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713270780
Hero Member
*
Offline Offline

Posts: 1713270780

View Profile Personal Message (Offline)

Ignore
1713270780
Reply with quote  #2

1713270780
Report to moderator
hushan (OP)
Member
**
Offline Offline

Activity: 61
Merit: 15


View Profile
May 05, 2018, 02:07:02 PM
 #22

Thank you for your reply.

I do generate my own genesis block. It seems that it is just keeping downloading.

It would be a lot helpful if you could run a git diff on your workspace and paste the change you have made, so that we can identify the problem.

Thank you very much for your reply.

Those are the changes I made:
https://github.com/zhq422194011/bitcoin/commit/e0b0d5c9b4be209cf640cf6e8ae29bf1525c58da

My bitcoin.conf is:
Code:
server=1
gen=1
rpcbind=0.0.0.0
rpcuser=rpcuser
rpcpassword=111111
rpcallowip=127.0.0.1
rpcallowip=0.0.0.0/0
listen=1

I run the following two bitcoinds:

Code:
sudo ~/bitcoin/src/bitcoind -addnode=127.0.0.1:9332 -port=8963 -rpcport=8962 -debug=rpc -dns=0 -dnsseed=0

sudo ~/bitcoin/src/bitcoind -datadir=$HOME/.bitcoin2 -addnode=127.0.0.1:8962 -port=9333 -rpcport=9332 -debug=rpc -dns=0 -dnsseed=0

When I run ./bitcoin-cli getblocktemplate, I got:
Code:
error code: -10
error message:
Bitcoin is downloading blocks...



The code change looks right, for the first node, don't use -addnode, becuase the second node hasn't started yet, also add "-connect=0 -listen=1 -maxtipage=$((24*60*60*5000))" to it, for second node, use addnode to add the first node.

BTC: 38ykUxZeSv5aqav1keCc4KUxXLPPGkfrm5 LTC: MPpWNvqDCVB1PHJt4A28j9oFfc6Y1KKDno ETH: 0x07C8c68d5253247038947EF9495b054160c8737c
haoqian
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
May 06, 2018, 05:48:31 AM
 #23

Thank you for your reply.

I do generate my own genesis block. It seems that it is just keeping downloading.

It would be a lot helpful if you could run a git diff on your workspace and paste the change you have made, so that we can identify the problem.

Thank you very much for your reply.

Those are the changes I made:
https://github.com/zhq422194011/bitcoin/commit/e0b0d5c9b4be209cf640cf6e8ae29bf1525c58da

My bitcoin.conf is:
Code:
server=1
gen=1
rpcbind=0.0.0.0
rpcuser=rpcuser
rpcpassword=111111
rpcallowip=127.0.0.1
rpcallowip=0.0.0.0/0
listen=1

I run the following two bitcoinds:

Code:
sudo ~/bitcoin/src/bitcoind -addnode=127.0.0.1:9332 -port=8963 -rpcport=8962 -debug=rpc -dns=0 -dnsseed=0

sudo ~/bitcoin/src/bitcoind -datadir=$HOME/.bitcoin2 -addnode=127.0.0.1:8962 -port=9333 -rpcport=9332 -debug=rpc -dns=0 -dnsseed=0

When I run ./bitcoin-cli getblocktemplate, I got:
Code:
error code: -10
error message:
Bitcoin is downloading blocks...



The code change looks right, for the first node, don't use -addnode, becuase the second node hasn't started yet, also add "-connect=0 -listen=1 -maxtipage=$((24*60*60*5000))" to it, for second node, use addnode to add the first node.

It works!  Thank you very much! Your instruction is very useful!

Fews details I want to ask you. Mining only works for second node. So the connection is one way only?
I found that connects is pretty unstable (sometime connections would be disconnected). why?
haoqian
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
May 06, 2018, 05:57:26 AM
 #24

Thank you for your reply.

I do generate my own genesis block. It seems that it is just keeping downloading.

It would be a lot helpful if you could run a git diff on your workspace and paste the change you have made, so that we can identify the problem.

Thank you very much for your reply.

Those are the changes I made:
https://github.com/zhq422194011/bitcoin/commit/e0b0d5c9b4be209cf640cf6e8ae29bf1525c58da

My bitcoin.conf is:
Code:
server=1
gen=1
rpcbind=0.0.0.0
rpcuser=rpcuser
rpcpassword=111111
rpcallowip=127.0.0.1
rpcallowip=0.0.0.0/0
listen=1

I run the following two bitcoinds:

Code:
sudo ~/bitcoin/src/bitcoind -addnode=127.0.0.1:9332 -port=8963 -rpcport=8962 -debug=rpc -dns=0 -dnsseed=0

sudo ~/bitcoin/src/bitcoind -datadir=$HOME/.bitcoin2 -addnode=127.0.0.1:8962 -port=9333 -rpcport=9332 -debug=rpc -dns=0 -dnsseed=0

When I run ./bitcoin-cli getblocktemplate, I got:
Code:
error code: -10
error message:
Bitcoin is downloading blocks...



The code change looks right, for the first node, don't use -addnode, becuase the second node hasn't started yet, also add "-connect=0 -listen=1 -maxtipage=$((24*60*60*5000))" to it, for second node, use addnode to add the first node.

One more question, I found that the first node will not download the blocks from second one (first node is still at block 0). I also run a third node which connects to the second node. The third node will also not download the blocks (still at block 0 and the getblocktemplate works fine). Why?
supermoney
Legendary
*
Offline Offline

Activity: 1161
Merit: 1004



View Profile
May 23, 2018, 12:55:50 PM
Last edit: May 24, 2018, 01:56:43 PM by supermoney
 #25

Thanks for the guide, it has helped me a lot since I'm running latest Bitcoin Core version.
However I'm having some trouble with the mining part: [Solved+Fix] Issue with mined coins of my altcoin
supermoney
Legendary
*
Offline Offline

Activity: 1161
Merit: 1004



View Profile
May 24, 2018, 01:58:53 PM
 #26

Thanks for the guide, it has helped me a lot since I'm running latest Bitcoin Core version.
However I'm having some trouble with the mining part: [Solved+Fix] Issue with mined coins of my altcoin

Issue was successfully fixed, you better go check it out because if you are running Bitcoin Core with HD enabled (MANDATORY!) then you have to apply the fix to your Minerd/CPU Miner/-Multi.
victorkimba17
Jr. Member
*
Offline Offline

Activity: 113
Merit: 5


View Profile
May 25, 2018, 08:52:16 AM
Last edit: May 26, 2018, 02:41:35 AM by victorkimba17
 #27

i made changes to the bitcoin-core v0.15.1 code.

Here is my bitcoin.conf
Code:
server=1
port=12000
rpcport=12001
rpcallowip=0.0.0.0/0
rpcuser=username
rpcpassword=password
daemon=1

This is how i run bitcoind
Code:
src/bitcoind -conf=../datadir/bitcoin.conf -datadir=../datadir/ -reindex

When i run bitcoin-cli, i got error code of -28.
Code:
src/bitcoin-cli  -conf=../datadir/bitcoin.conf -datadir=../datadir/ help
error code: -28
error message:
Loading wwwallet...

debug.log
Code:
2018-05-25 09:05:39 Keys: 2002 plaintext, 0 encrypted, 2002 w/ metadata, 2002 total
2018-05-25 09:05:39  wallet                   45ms
2018-05-25 09:05:39 setKeyPool.size() = 2000
2018-05-25 09:05:39 mapWallet.size() = 0
2018-05-25 09:05:39 mapAddressBook.size() = 1
2018-05-25 09:05:39 Reindexing block file blk00000.dat...
2018-05-25 09:05:40 ERROR: AcceptBlock: high-hash, proof of work failed (code 16)
2018-05-25 09:05:40 Reindexing finished
2018-05-25 09:05:40 Failed to open mempool file from disk. Continuing anyway.
2018-05-25 09:06:22 ThreadRPCServer method=help

How could i solve this error ?
victorkimba17
Jr. Member
*
Offline Offline

Activity: 113
Merit: 5


View Profile
May 25, 2018, 10:15:27 AM
Last edit: May 26, 2018, 02:41:13 AM by victorkimba17
 #28

after i made more changes , the customised bitcoind works! The changes can be applied to bitcoin core v0.15.1.

this is how i run bitcoind
Code:
src/bitcoind -debug=rpc -dns=0 -dnsseed=0 -datadir=../datadir/

this is how i run bitcoin-cli
Code:
src/bitcoin-cli -datadir=../datadir/ getinfo

the bitcoin.conf
Code:
server=1
gen=1
port=8963
rpcport=8962
rpcbind=0.0.0.0
rpcallowip=0.0.0.0/0
rpcuser=username
rpcpassword=password
listen=1
victorkimba17
Jr. Member
*
Offline Offline

Activity: 113
Merit: 5


View Profile
May 25, 2018, 12:12:57 PM
 #29

why we need to add -maxtipage=$((24*60*60*5000)) to first node , so that getblocktemplate can work ?

first node:
src/bitcoind -debug=rpc -dns=0 -dnsseed=0 -datadir=../datadir/ -connect=0 -maxtipage=432000000 -daemon

second node:
src/bitcoind -debug=rpc -addnode=127.0.0.1:8963 -dns=0 -dnsseed=0 -datadir=../datadir_1/ -daemon
supermoney
Legendary
*
Offline Offline

Activity: 1161
Merit: 1004



View Profile
May 26, 2018, 12:11:15 PM
 #30

why we need to add -maxtipage=$((24*60*60*5000)) to first node , so that getblocktemplate can work ?

first node:
src/bitcoind -debug=rpc -dns=0 -dnsseed=0 -datadir=../datadir/ -connect=0 -maxtipage=432000000 -daemon

second node:
src/bitcoind -debug=rpc -addnode=127.0.0.1:8963 -dns=0 -dnsseed=0 -datadir=../datadir_1/ -daemon

In the case you generated a new genesis block then you don't need for maxtipage, just run your miner and start mining.
zhaviabieber405
Newbie
*
Offline Offline

Activity: 88
Merit: 0


View Profile
May 26, 2018, 01:32:15 PM
 #31

Nice guide, just shows how easy it is for even a semi experienced developer. I guess that's a good thing though.
hushan (OP)
Member
**
Offline Offline

Activity: 61
Merit: 15


View Profile
May 27, 2018, 08:10:39 AM
 #32

Thanks a lot.

I have set up and began mining, but have not mined Block 1 several hours.

Should I modify the difficulty of POW ? and how to ?

Thanks in advance.




The debug.log saying,

......
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
......


Is there something wrong?



Hi, what's your command line to run bitcoind and the miner?

BTC: 38ykUxZeSv5aqav1keCc4KUxXLPPGkfrm5 LTC: MPpWNvqDCVB1PHJt4A28j9oFfc6Y1KKDno ETH: 0x07C8c68d5253247038947EF9495b054160c8737c
bingble
Newbie
*
Offline Offline

Activity: 111
Merit: 0


View Profile WWW
May 27, 2018, 10:39:35 AM
Last edit: May 27, 2018, 10:50:53 AM by bingble
 #33

Thanks a lot.

I have set up and began mining, but have not mined Block 1 several hours.

Should I modify the difficulty of POW ? and how to ?

Thanks in advance.




The debug.log saying,

......
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
2018-05-26 23:46:14 ERROR: ProcessNewBlock: AcceptBlock FAILED
......


Is there something wrong?



Hi, what's your command line to run bitcoind and the miner?



Thank you for your kindly reply, I have made some mistakes, right now corrected and run well.

Thank you for your nice guide again, there is nothing incorrect.


victorkimba17
Jr. Member
*
Offline Offline

Activity: 113
Merit: 5


View Profile
May 27, 2018, 12:49:35 PM
Last edit: May 28, 2018, 02:29:06 AM by victorkimba17
 #34

why we need to add -maxtipage=$((24*60*60*5000)) to first node , so that getblocktemplate can work ?

first node:
src/bitcoind -debug=rpc -dns=0 -dnsseed=0 -datadir=../datadir/ -connect=0 -maxtipage=432000000 -daemon

second node:
src/bitcoind -debug=rpc -addnode=127.0.0.1:8963 -dns=0 -dnsseed=0 -datadir=../datadir_1/ -daemon

In the case you generated a new genesis block then you don't need for maxtipage, just run your miner and start mining.

I modified the timestamp, the nonce, in order to generate a new genesis block. But i still need to run bitcoind with maxtipage, so that getblocktemplate can work.

if i run bitcoind as: src/bitcoind -debug=rpc -dns=0 -dnsseed=0 -datadir=../datadir/ -connect=0 -daemon
i get the following errors:
Quote
src/bitcoin-cli -datadir=../datadir/ getblocktemplate
error code: -10
error message:
Bitcoin is downloading blocks...

Since i have generated  a new genesis block, why must bitcoind be run with maxtipage ?

In validation.cpp, IsInitialBlockDownload()
Code:
  if (chainActive.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge))
        return true;

With default value of nMaxTipAge of 86400, that function IsInitialBlockDownload returns true, so bitcoind will go on download blocks.

The purpose of setting a large number to maxtipage,  is to make bitcoind think that initial block has been downloaded, so bitcoind will NOT download initial block.
victorkimba17
Jr. Member
*
Offline Offline

Activity: 113
Merit: 5


View Profile
May 28, 2018, 02:37:39 AM
 #35

The default value of DEFAULT_MAX_TIP_AGE

Code:
src/validation.h:static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60;
which is equal to 86400.

I have set the value of nMaxTipAge to be multiplied by 4000.
 
Code:
src/validation.cpp:int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE * 4000;
Why it is not reflected in the bitcoind, it is still 86400, and must be set in command line with -maxtipage ?
sudoaaron
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
May 29, 2018, 03:05:02 PM
 #36

Everything runs well after following this guide, however there are SEGWIT errors when sending from client to client wallets. Can we expand on resetting the SEGWIT parameters in chainparams.cpp?
supermoney
Legendary
*
Offline Offline

Activity: 1161
Merit: 1004



View Profile
May 31, 2018, 12:56:38 AM
 #37

By the way, I also suggest you guys to read the following altcoin tutorial as well because it is including the how to retrieve the private key of genesis coinbase address in order to spend the block reward of genesis block: https://bitcointalk.org/index.php?topic=1030365.0

For anyone interested in increasing/decreasing the max block size weight then open ~/bitcoin/src/consensus/consensus.h and change MAX_BLOCK_WEIGHT from 4000000 (4MB) to any size you want.
Github reference: https://github.com/bitcoin/bitcoin/blob/master/src/consensus/consensus.h#L15

Alternative block size scaling solution here: https://gist.github.com/sipa/c65665fc360ca7a176a6

--------------------
hushan merited!
anthinguy21
Full Member
***
Offline Offline

Activity: 280
Merit: 101


OPEN GAMING PLATFORM


View Profile
May 31, 2018, 01:01:16 AM
 #38

Great to see this Smiley. I think there are so many members are looking for this. But why don't you provide a service about creating new altcoin in this forum?

I think you can earn a lot of money by this way Smiley. Beside as I can see there are some members also provide service like this and it's really good Grin

sudoaaron
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
June 01, 2018, 10:55:12 PM
 #39

When sending between two clients, an error message occurs -

Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or endable -fallbackfee.

What does this mean, and how do I fix it?

Log extract below....

2018-06-01T22:48:18Z Fee Calculation: Fee:16600 Bytes:166 Needed:16600 Tgt:0 (requested 0) Reason:"PayTxFee set" Decay 0.00000: Estimation: (-1 - -1) nan% 0.0/(0.0 0 mem 0.0 out) Fail: (-1 - -1) nan% 0.0/(0.0 0 mem 0.0 out)
2018-06-01T22:48:23Z CommitTransaction:
CTransaction(hash=578d837469, ver=2, vin.size=1, vout.size=2, nLockTime=157)
    CTxIn(COutPoint(a3a8c8cd92, 0), scriptSig=160014a7419391b687baff02, nSequence=4294967293)
    CScriptWitness(3045022100887e2a97a954e5300a92ddb920256955112fe0977121b1fd9b9876b8144b246602200 f067e29f0a555a914034d13b9203390448832f43277f447c42404119e5c328001, 03a0415edb85fbdbf4b9ab3b759c3f660b8e87fe57b7dc852237a5a670ee1ba791)
    CTxOut(nValue=48.99983400, scriptPubKey=a914b4f55ca5f2a9a9a67c6dd4f8a2)
    CTxOut(nValue=1.00000000, scriptPubKey=a9147bcc4af60d02ea64d6ad3dcfc0)
2018-06-01T22:48:23Z keypool keep 1001
2018-06-01T22:48:23Z AddToWallet 578d837469ebf22fe9fff4a97ad87c11ee4453ade47c36c378c9941374d4f2e9  new
2018-06-01T22:48:23Z CommitTransaction(): Transaction cannot be broadcast immediately, no-witness-yet (code 64)
2018-06-01T22:49:51Z keypool added 1 keys (1 internal), size=2000 (1000 internal)
sudoaaron
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
June 01, 2018, 11:16:05 PM
 #40

When sending between two clients, an error message occurs -

Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or endable -fallbackfee.

What does this mean, and how do I fix it?

Log extract below....

2018-06-01T22:48:18Z Fee Calculation: Fee:16600 Bytes:166 Needed:16600 Tgt:0 (requested 0) Reason:"PayTxFee set" Decay 0.00000: Estimation: (-1 - -1) nan% 0.0/(0.0 0 mem 0.0 out) Fail: (-1 - -1) nan% 0.0/(0.0 0 mem 0.0 out)
2018-06-01T22:48:23Z CommitTransaction:
CTransaction(hash=578d837469, ver=2, vin.size=1, vout.size=2, nLockTime=157)
    CTxIn(COutPoint(a3a8c8cd92, 0), scriptSig=160014a7419391b687baff02, nSequence=4294967293)
    CScriptWitness(3045022100887e2a97a954e5300a92ddb920256955112fe0977121b1fd9b9876b8144b246602200 f067e29f0a555a914034d13b9203390448832f43277f447c42404119e5c328001, 03a0415edb85fbdbf4b9ab3b759c3f660b8e87fe57b7dc852237a5a670ee1ba791)
    CTxOut(nValue=48.99983400, scriptPubKey=a914b4f55ca5f2a9a9a67c6dd4f8a2)
    CTxOut(nValue=1.00000000, scriptPubKey=a9147bcc4af60d02ea64d6ad3dcfc0)
2018-06-01T22:48:23Z keypool keep 1001
2018-06-01T22:48:23Z AddToWallet 578d837469ebf22fe9fff4a97ad87c11ee4453ade47c36c378c9941374d4f2e9  new
2018-06-01T22:48:23Z CommitTransaction(): Transaction cannot be broadcast immediately, no-witness-yet (code 64)
2018-06-01T22:49:51Z keypool added 1 keys (1 internal), size=2000 (1000 internal)

Do we have to wait 432 blocks before we can send between clients for segwit to activate?
Pages: « 1 [2] 3 4 5 »  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!