Bitcoin Forum
November 18, 2024, 08:06:18 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 [9] 10 11 »  All
  Print  
Author Topic: *** Complete Guide on How to Create a New Alt Coin ***  (Read 165958 times)
undead93
Newbie
*
Offline Offline

Activity: 33
Merit: 0


View Profile
February 02, 2018, 02:18:53 AM
 #161

Hey. I'm training to create a coin based on DashCoin with masternodes. I generated GenesisBlock and everything. After the launch, I get in the logs:

Quote
2017-10-09 16:55:58 CMasternodeSync::ProcessTick -- nTick 2593 nRequestedMasternodeAssets 1 nRequeste
dMasternodeAttempt 0 nSyncProgress 0.000000
2017-10-09 16:56:04 CMasternodeSync::ProcessTick -- nTick 2599 nRequestedMasternodeAssets 1 nRequeste
dMasternodeAttempt 0 nSyncProgress 0.000000
2017-10-09 16:56:10 CMasternodeSync::ProcessTick -- nTick 2605 nRequestedMasternodeAssets 1 nRequeste
dMasternodeAttempt 0 nSyncProgress 0.000000
I understand the mistake in the absence of the master. But how can I run it without having coins?

Perhaps it is necessary for the first time to turn off the master programs altogether?

In what direction should I move? Any ideas?


Hey buddy, did you end up getting this to work? And if so, how did you solve it?

We have disabled the sync for the duration of the first block

how to disabled the sync for the duration of the first block?
greatmemar
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
February 25, 2018, 08:12:54 AM
 #162

I followed this tutorial https://www.youtube.com/watch?v=YF3oE5uIP64&t=13s but stuck in running VM and creating wallet anyone can help?
I type getinfo show the connections 0
{
    "version" : 80704,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 0,
    "timeoffset" : 0,
    "connections" : 0,
    "proxy" : "",
    "difficulty" : 0.00024414,
    "testnet" : false,
    "keypoololdest" : 1519451476,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "mininput" : 0.00001000,
    "errors" : ""
}
PaxtonFabian
Newbie
*
Offline Offline

Activity: 128
Merit: 0


View Profile
February 25, 2018, 08:38:18 AM
 #163

Since there are so many garbage coins out there, I decide to create
this course to teach you how to create a new alt coin. It's so simple,
that I can usually do within 2 hours.

You need to have some basic knowledge of C++ programming. No need
to be an expert, but you need to understand the basic compiling errors
and how to fix them.

Follow the following steps to create a new alt coin:

Preparation Step:

Download the Litecoin full source code, you can find it in github, just
do a google, you'll find it.

If you use windows, follow the steps in this thread:
https://bitcointalk.org/index.php?topic=149479.0

set up environment and libs, and compile the Litecoin. If you are successful
in compiling it (and run it), then your environment is good.


Design your coin:

Now that you have env set up, before doing coding, you need to do some design of
your coin, this is simple math calculations, but you need them for parameters
in the coding.

Basically you need to determine what you want:
- name of the coin. Let's call it AbcCoin in our example. Also determine the symbol, we call it "ABC"
   in our example.
- block time: this is the average target time between blocks. Usually you set it between 15 sec and 2 mins.
   You can also do 10 mins if you want (like bitcoin), but it's too long imo.
- difficulty retarget time: this is important, since otherwise it could cause serious instamine problem.
   Usually it's between 1 hr to 1 day.
   (diff retarget time)/(block time) gives you how many blocks a diff retarget will happen. This is
   an important parameter to consider.
- what's the initial coin per block. People set it to 2 to 100, usually. You can set any you want.
   Also you can do coins per block based on the block number, or even randomly (like JKC/LKY etc).
- How long you want coins per block be halved. Usually it's 6 month to 3 years. But again you set whatever
   you like.
- Ports, you need two: connection and RPC ports. Choose the ones that are not used in common apps.
   You can google for a particular port usage.

There are some other things you may want to adjust, such as initial diffculty etc. But usually I don't want to bother with these.

Now with these parameters defined, one important thing is that you want to calculate how many blocks/coins
generated in a month, a year etc, and total coins ever will be generated. This gives you a good idea how overall
your coin will work, and you may want to re-adjust some parameters above.


Now the code change part.

Before you begin, copy the whole directory of Litecoin to Abccoin. Then modify the code in Abccoin.

Follow the below steps for code changes:

1. In Abccoin/src dir, do a search of "litecoin", and change most of them to "abccoin", note you may want
to do a case-sensitive replace. You don't have to replace all, but most should be replaced.
You can reference to smallchange code first commit
https://github.com/bfroemel/smallchange/commit/947a0fafd8d033f6f0960c4ff0748f76a3d58326
for the changes needed.

Note: smallchange 1st commit does not include many of the changes I will outline below, but it is a
good reference for what need to be changed.


2. In Abccoin/src dir, do a search on "LTC", and change them to "ABC".

3. Change the ports: use the ones you defined in coin design, and change in the following files:
- connection port: protocol.h and init.cpp
- rpc port: bitcoinrpc.cpp and init.cpp

4.  Change parameters, all in main.cpp:
   - block value (in GetBlockValue())
   - block time (right after GetBlockValue())
   - diff retarget time (right after GetBlockValue())
   - adjust the diff retarget scale to avoid instamine (in GetNextWorkRequired())

for the last item, refer to Luckycoin code, you will see how this is done.
For random coin values in block, refer to GetBlockValue() function in JKC and Luckycoin code.

5. According to your coin design, adjust the value in main.h:
   - max coin count
   - dPriority

6. Change transaction confirmation count (if you want say 3 confirmation transaction etc) in transactionrecord.h
also change COINBASE_MATURITY which affects the maturity time for mined blocks, in main.h/cpp.

7.  Create genesis block. Some people get stuck there, it's really easy:
- find LoadBlockIndex() function, inside, change:
    - paraphrase (pszTimestamp) to any recent news phase.
    - get the latest unix time (do a google), and put in block.nTime.
    - set any nNonce (doesn't really matter)
you can change the time/nonce for testnet too, if you want to use it.

After you are done, save it. Now the genesis block will not match the hash check and merkle root check, it doesn't matter.

The first time you run the compiled code (daemon or qt), it will say "assertion failed". Just exit the program, go to
config dir (under AppData/Roaming), open the debug.log, get the hash after "block.GetHash() = ", copy and paste it to the beginnig of main.cpp, hashGenesisBlock. Also get the merkle root in the same log file, paste it to the ... position in the following code, in LoadBlockIndex()
Quote
       assert(block.hashMerkleRoot == uint256("0x..."));

recompile the code, and genesis block created!

BTW, don't forget to change "txNew.vout[0].nValue = " to the coin per block you defined, it doesn't matter to leave as 50, just be consistent with your coin per block (do this before adjust the hash and m-root, otherwise they will be changed again).

Also you need to change the alert/checkpoint key, this depends on the coin type and version, you can find it in main.cpp, main.h, alert.cpp and checkpoint.cpp.

8. Set the correct address start letter in base58.h. You may want to do some trial and error to find the letter you want. I never can calculate precisely the letter location.

change corresponding "starts with " in sendcoinsentry.cpp
change example in signverifymessagedialog.cpp

9. Checkpoint: you want to disable the checkpoint check initially, otherwise you may get stuck.
You have multiple ways to disable it, my way is:
- open checkpoints.cpp
- there are 3 functions, comment out the normal return, and make them return either true, 0, or null, like this:
Quote
   bool CheckBlock(int nHeight, const uint256& hash)
    {
        if (fTestNet) return true; // Testnet has no checkpoints

        MapCheckpoints::const_iterator i = mapCheckpoints.find(nHeight);
        if (i == mapCheckpoints.end()) return true;
        // return hash == i->second;
      return true;
    }

    int GetTotalBlocksEstimate()
    {
        if (fTestNet) return 0;
   
        // return mapCheckpoints.rbegin()->first;
      return 0;
    }

    CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex)
    {
        if (fTestNet) return NULL;

        BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, mapCheckpoints)
        {
            const uint256& hash = i.second;
            std::map<uint256, CBlockIndex*>::const_iterator t = mapBlockIndex.find(hash);
            if (t != mapBlockIndex.end())
                // return t->second;
            return NULL;
        }
        return NULL;
    }

Now this is disabled. Once everything works, you can premine 50 blocks, and extract some hashes and put them in the checkpoints, and re-enable these functions.

That's about it. You can do compilation all the way along, no need to do in the end, you may get a lot compilation errors.

Oh, icons:

10. Find a nice image for your coin, then make 256x256 icons/images. You have 5 images to replace in src/qt/res/icons, and 1 to replace (splash) in src/qt/res/images.

11. Oh also edit those files in qt/forms. These are files for help etc, better make them look nice, display your coin names than litecoin ones.

12. Now for compilations:
- qt: modify the .pro file under abccoin, and follow the make process in
https://bitcointalk.org/index.php?topic=149479.0

- daemon: update one of the makefile for your system, and in my case I use mingw32 shell to make.


That's it, voila, you have your own alt coins!!


Great post and thanks sharing!!!
Many Coins
Member
**
Offline Offline

Activity: 294
Merit: 11

Lord Shiva


View Profile
March 01, 2018, 04:27:59 PM
 #164


7.  Create genesis block. Some people get stuck there, it's really easy:
- find LoadBlockIndex() function, inside, change:
    - paraphrase (pszTimestamp) to any recent news phase.
    - get the latest unix time (do a google), and put in block.nTime.
    - set any nNonce (doesn't really matter)
you can change the time/nonce for testnet too, if you want to use it.

After you are done, save it. Now the genesis block will not match the hash check and merkle root check, it doesn't matter.

The first time you run the compiled code (daemon or qt), it will say "assertion failed". Just exit the program, go to
config dir (under AppData/Roaming), open the debug.log, get the hash after "block.GetHash() = ", copy and paste it to the beginnig of main.cpp, hashGenesisBlock. Also get the merkle root in the same log file, paste it to the ... position in the following code, in LoadBlockIndex()
Quote
       assert(block.hashMerkleRoot == uint256("0x..."));

recompile the code, and genesis block created!

It's not working on BC 0.8, for example Sad
hushan
Member
**
Offline Offline

Activity: 61
Merit: 15


View Profile
March 12, 2018, 02:55:02 AM
 #165

Thanks for the post, although it's an old post, but it's a good way to learn how bitcoin and blockchain works.
But one thing I don't quite understand why do you create a guide based on Litecoin, wouldn't it be much better if forking directly from Bitcoin? After all Bitcoin is the Mother Of All Coins(MOAC).

BTC: 38ykUxZeSv5aqav1keCc4KUxXLPPGkfrm5 LTC: MPpWNvqDCVB1PHJt4A28j9oFfc6Y1KKDno ETH: 0x07C8c68d5253247038947EF9495b054160c8737c
preda
Sr. Member
****
Offline Offline

Activity: 756
Merit: 250


View Profile
March 21, 2018, 11:26:02 AM
 #166

Thank you so much it helped a lot. How can one create wallets for the newly created altcoin? Please write a tutorial on it also. Can someone tell me whose code has this guy forked? https://github.com/0xfff/VanCoin


Newbie with 1 post you wanna scam ppl with your new coin?😂 Ahahahaha
chicodosbitcoin
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
April 02, 2018, 11:55:13 PM
 #167

nice tutorial,

I have created the altcoin it is working perfeclty.

but my MAX_MONEY it is not working.

how can i fix this?

seams very complicated, my wallet it is creating more coins then suppose to have.

I created this but nobody helped.
https://bitcointalk.org/index.php?topic=3236523.msg33709414#msg33709414


someone can help me with this?
Ray3z
Member
**
Offline Offline

Activity: 188
Merit: 10


View Profile
April 03, 2018, 02:03:38 AM
 #168

Thanks a lot its really awesome being a decade as a programmer i never thought to create a coin . Now its given initial pushing thing .I got some priority work to finish once done i will dedicate some time and try to create coin . i have C++ in college days even i dont think its a big deal .

It make the programmers so easy to make their own coin and make so many useless altcoin out there.
So what we need to do now? I think regulation of the coin would help the good coin grows. Only coin which has capability and not sh** coin.
hushan
Member
**
Offline Offline

Activity: 61
Merit: 15


View Profile
April 20, 2018, 03:09:09 PM
 #169

I made an update to this post, based on latest bitcoin codebase, please see https://bitcointalk.org/index.php?topic=3345808.0

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

Activity: 2
Merit: 0


View Profile
July 31, 2018, 09:32:33 AM
 #170

nice tutorial,

I have created the altcoin it is working perfeclty.

but my MAX_MONEY it is not working.

how can i fix this?

seams very complicated, my wallet it is creating more coins then suppose to have.

I created this but nobody helped.
https://bitcointalk.org/index.php?topic=3236523.msg33709414#msg33709414


someone can help me with this?

What do you mean by it is not working? Did you test it and it let you have more then the max you set? Did you premine your coin?
nur1labs
Sr. Member
****
Offline Offline

Activity: 882
Merit: 250


Founder Nur1Labs


View Profile WWW
August 02, 2018, 02:34:35 AM
 #171

I made an update to this post, based on latest bitcoin codebase, please see https://bitcointalk.org/index.php?topic=3345808.0

will try look if this fixed genesis generate  Roll Eyes

==MuBdI BlockStream Platform - Future Blockchain Platform==
Sanmark
Jr. Member
*
Offline Offline

Activity: 112
Merit: 1


View Profile
August 02, 2018, 10:46:59 AM
 #172

If you want to make new coin, why just not use wawes platform to make it? I think that its not important how you make it, how much what that coin represents...

Word of Mouth Pro   │▌ https://wmpro.io ▐│
A Blockchain based Reputation and Rating Ecosystem
nur1labs
Sr. Member
****
Offline Offline

Activity: 882
Merit: 250


Founder Nur1Labs


View Profile WWW
August 02, 2018, 01:56:52 PM
 #173

If you want to make new coin, why just not use wawes platform to make it? I think that its not important how you make it, how much what that coin represents...

you wrong dude how can cat is different with dog?

that simple cat is cat. dog is dog. so i think combine become one no.....

innovation growth not by them platform but intelligent of self.

==MuBdI BlockStream Platform - Future Blockchain Platform==
Yowlahe
Newbie
*
Offline Offline

Activity: 34
Merit: 0


View Profile
August 06, 2018, 12:46:31 AM
 #174

it is a decent begin point, however in the event that you will code with most recent discharge, this guide is obsolote, part of things have changed since it was made.

So it should be refreshed, the vast majority of all, how to make the beginning square
nur1labs
Sr. Member
****
Offline Offline

Activity: 882
Merit: 250


Founder Nur1Labs


View Profile WWW
August 06, 2018, 09:06:49 AM
 #175

it is a decent begin point, however in the event that you will code with most recent discharge, this guide is obsolote, part of things have changed since it was made.

So it should be refreshed, the vast majority of all, how to make the beginning square

the code change by time to time...what we need follow up. if new player in this game in....i think will lose. because now bitcoin have segwit and another of fork have specialty of technology. this guide work old fork~

==MuBdI BlockStream Platform - Future Blockchain Platform==
goilom
Newbie
*
Offline Offline

Activity: 33
Merit: 0


View Profile
August 12, 2018, 02:13:20 PM
 #176

Calm intriguing on the grounds that these thing struck a chord path in those days when my interest about altcoin and really influenced an inquiry at the forefront of my thoughts on the best way to make one, and I effectively accepted it would be a troublesome one. As I've perused on operation, I could state it's extremely hard and I'm not mixed up, I'm not too great on c++ dialect but rather theres numerous things ought to be done in ready to make one. I would examine these means though..thanks for this
nur1labs
Sr. Member
****
Offline Offline

Activity: 882
Merit: 250


Founder Nur1Labs


View Profile WWW
August 12, 2018, 05:07:14 PM
 #177

Calm intriguing on the grounds that these thing struck a chord path in those days when my interest about altcoin and really influenced an inquiry at the forefront of my thoughts on the best way to make one, and I effectively accepted it would be a troublesome one. As I've perused on operation, I could state it's extremely hard and I'm not mixed up, I'm not too great on c++ dialect but rather theres numerous things ought to be done in ready to make one. I would examine these means though..thanks for this

new code more complex than this so need experiment self  Grin

==MuBdI BlockStream Platform - Future Blockchain Platform==
Playboi
Full Member
***
Offline Offline

Activity: 187
Merit: 103


View Profile
August 14, 2018, 12:16:54 PM
 #178

great thread
nur1labs
Sr. Member
****
Offline Offline

Activity: 882
Merit: 250


Founder Nur1Labs


View Profile WWW
August 15, 2018, 10:08:23 AM
 #179

great thread

rather cool if them update segwit ahahaha but. i try many thing here~bitcoin complexed codes!

==MuBdI BlockStream Platform - Future Blockchain Platform==
Pleemlio
Newbie
*
Offline Offline

Activity: 45
Merit: 0


View Profile
August 18, 2018, 01:48:17 PM
 #180

Calm fascinating on the grounds that these thing rung a bell route in those days when my interest about altcoin and really influenced an inquiry at the forefront of my thoughts on the most proficient method to make one, and I effectively accepted it would be a troublesome one. As I've perused on operation, I could state it's extremely hard and I'm not mixed up, I'm not too great on c++ dialect but rather theres numerous things ought to be done in ready to make one. I would think about these means though..thanks for this
Pages: « 1 2 3 4 5 6 7 8 [9] 10 11 »  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!