39

Is there any step-by-step tutorial about how to build own cryptocurrency based on Bitcoin code?

Michal
  • 609
  • 1
  • 7
  • 9

4 Answers4

25

To start a new chain, use a genesis generator, apply the new genesis to the source, and remove the checkpoints.

If you want to apply new/different rules, be prepared for a difficult task. Changing even the slightest protocol rule will most likely affect all other rules because of the complexity of PoW.

If the only thing you want to alter is the maximum coins, this should be relatively easy to alter in the source.

Nick ODell
  • 29,396
  • 11
  • 72
  • 130
  • what are the checkpoints? why should you remove them? – smatthewenglish May 06 '17 at 18:30
  • Checkpoints are old blocks hardcoded into the source. As you want to start a new chain, using a checkpoint from Bitcoin, would prevent to start from scratch.

    See: https://bitcoin.stackexchange.com/questions/1797/what-are-checkpoints

    – FedFranz Dec 04 '17 at 12:18
  • You can find a guide to create your own Genesis block here. https://medium.com/@dophuoc/how-to-mine-a-genesis-block-for-your-bitcoin-fork-471b1fb47efb – Phuoc Do Feb 23 '19 at 02:15
  • Not found 404, https://github.com/bitcoin/bitcoin/blob/master/src/checkpoints.cpp – Max Base Jan 22 '22 at 04:47
9

There is a Complete Guide on How to Create a New Alt Coin on Bitcoin Talk.

Murch
  • 75,206
  • 34
  • 186
  • 622
Fire Bird
  • 111
  • 1
  • 6
8

Here is a guide: How to Fork Bitcoin (create your own chain).

I really think Bitcoin as a concept is unique and powerful, and the project is well maintained by very talented developers, so I wanted to write this not just to help make it easy to clone, but to help increase understanding of the concepts and how to fully utilize them in other projects. I would love comments if you think I can improve it in any way. It covers the following:

  • Forking
  • Building from source
  • Customizations:
    1. Change default ports for all nets (mainnet, testnet, regtest)
    2. Change the “magic message” or the message prefix for all nets (mainnet, testnet, regtest)
    3. Change the address prefixes (optional) for all nets (mainnet, testnet, regtest) and for all address types (P2PKH, P2SH, and secret keys).
    4. Change the block reward (optional)
    5. Change the coinbase maturity (optional)
    6. Change the halving interval (optional)
    7. Update max money check value (required if this should be different)
    8. Reset minimum chain work
    9. Remove DNS seeds
    10. Remove checkpoints
    11. Update DEFAULT_MAX_TIP_AGE
    12. Change block time (optional) for all nets (mainnet, testnet, regtest)
    13. Change the difficulty adjustment interval (optional) for all nets (mainnet, testnet, regtest)
  • Managing Updates
JBaczuk
  • 7,388
  • 1
  • 13
  • 34
4

There are some tutorials out there, check out:
https://bitcointalk.org/index.php?topic=225690.0

If that one is not sufficient let me know, and maybe I'll write one up.

There are also a lot of coins on github that you could just fork, create your own genesis block, modify parameters (coins per block, max coins, etc) and start mining.
One example is:
https://github.com/0xfff/VanCoin

Albert S
  • 1,630
  • 12
  • 21
  • 1
    imho it's insufficient- if you want to write one I'd be the first to read it – smatthewenglish May 06 '17 at 18:30
  • Please make one tutorial. Most out there are old and does not work at all, and all occurs error or even does not desctibe what they uses. I am using Windows 10 laptop. – creator Jan 25 '18 at 09:11