Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Guide to forking Dash up to the genesis block?

Discussion in 'Development Tech Discussion' started by Koromoto, Dec 18, 2017.

Tags:
  1. Koromoto

    Koromoto Member

    Joined:
    Dec 2, 2017
    Messages:
    53
    Likes Received:
    6
    Trophy Points:
    48
    Hey guys, I'd like to fork Dash to play with tokens in my continuous research about solving world commerce and instant payment so any pointers on how to do that would be highly appreciated.

    I'll also create a very specific wallet with vanity numbers and instant exchange between X-DASH and fiat so links and refs are also highly welcome.

    Thanks.
     
  2. Koromoto

    Koromoto Member

    Joined:
    Dec 2, 2017
    Messages:
    53
    Likes Received:
    6
    Trophy Points:
    48
    Expanding a bit more, the whole idea is to have a master coin (store of value) with 100 tokens (country fiats), a wallet with two main accounts as savings (private) and cash (vanity) where transfers from personal accounts occur instantly (internal exchange) and transfers from wallets (world payment) also occur instantly.

    So if you have 1000 X-DASH in your savings they fluctuate according to demand and supply, usually up as it is deflationary and fixed in supply. Then if you want to pay for a Starbucks coffee you use your cash account and your wallet does an internal sell order at market price (X-DASH exchange) from X-DASH to US-DASH sending the money to the public cash account of Starbucks at 1-800-STARBUCKS. Starbucks at the same time moves all incoming US-DASH to X-DASH (internal exchange) so the buy/sell equilibrium is satisfied and the 1% spread goes to the Masternodes, cheaper than VISA or MasterCard.

    There will be no mining, only ten masternodes that will work as sharders/replicators of the master blockchain (1GB in size for one billion active accounts), while child blockchains will be consolidated and archived keeping only the latest balances, archived transactions will be available for child blockchain explorers.

    That's my dream and I'd like to test with DASH as it is the only crypto that has all I need to get started.
     
  3. codablock

    codablock Member
    Core Developer

    Joined:
    Mar 29, 2017
    Messages:
    98
    Likes Received:
    149
    Trophy Points:
    83
    I don't fully understand your idea, but that's fine ;) You could try out the new "devnets" feature that was just recently merged into our develop branch. The PR and description can be found here: https://github.com/dashpay/dash/pull/1791.
    More documentation and examples will probably follow, but you can already start trying things out. Just checkout the develop branch and give it a try.
     
    • Like Like x 2
  4. demo

    demo Well-known Member

    Joined:
    Apr 23, 2016
    Messages:
    3,114
    Likes Received:
    263
    Trophy Points:
    153
    Dash Address:
    XnpT2YQaYpyh7F9twM6EtDMn1TCDCEEgNX
    Is it possible to merge two devnet blockchains?
     
    #4 demo, Dec 25, 2017
    Last edited: Dec 25, 2017
  5. Milan

    Milan New Member

    Joined:
    Dec 29, 2017
    Messages:
    5
    Likes Received:
    2
    Trophy Points:
    3
    I'm also learning coursera's Cryptocurrency Technologies course and started to use Dash as more advance technology(compare to bitcoin).

    You need to change the PORT and change the genesis block which you can use lhartikk/GenesisH0 from github (couldn't put the full link because of spam protection)

    After that you'll hit other problems which I haven't manage to solve ;)

    But devnets looks interesting. I'll definitely try it out
     
  6. dashfan7

    dashfan7 New Member

    Joined:
    Apr 19, 2019
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    It would be nice to have a guide to forking Dash. There are others doing it but they aren't sharing their knowledge. Fine I suppose. But then trying to look at source code of Dash forks or attempted Dash forks with a new genesis block brings us back to the same problem: what else?

    What I would like to do is really understand Dash. To do that I'd like to dig around in its guts and make some gradual changes and test them out. One first one was to change the Proof of Work, and see what happens, which might lead to experiments in block timing and what happens with DGW. But then, how to make DGW active from genesis. It would be nice to have DH wallets from the start and maybe even BIP34 with the block height in the coinbase. It's hard even with simpler coins to get this working. It's almost impossible unless you can ask actual coin developers who have made this work, and understandably their time is in short supply.

    So far I think you can use nasa8x's genesis tool, or GenesisH0 for an X11 genesis block, but how to make BIP34 type genesis blocks, I don't know, or what the ramifications of that would be. If BIP34 was active from the beginning presumably there would be no invalid-cb-height errors in the debug log.

    So it looks like with changing the Proof of Work to understand that a bit more, retargeting, timeframes and so on, a few hacks are needed to genesis block creators. It's definitely easier than the old way going back to 2013 where most guides have a simple hack to force genesis block creation with the mining code then making the asserts fail for the merkle root and genesis hash, then look in the debug log for it, then put it in and remove the hack to keep creating a genesis block.

    So the code and especially nasa8x's node genesis block creator looks a little easier to work with, at least for me anyway, but GenesisH0 looks good too, if you're a Python wizard. We definitely need a neat new C++ genesis block creation tool to make it a lot faster than JS or Python.

    That aside, assuming we are keeping Dash prefixes, change the ports for P2P and RPC, then try to recompile and see if it sorta checks out. Then of course miner code needs to be hacked to make a "new" PoW check out, say for example removing a few hashing algorithms for X11 or making it 3x keccak or something of that nature. Just something interesting to play with, and hack on the miner code in Dash.

    So aside from genesis block, port numbers, optionally changing address prefixes, what to do with block times and when to readjust difficulty, what that means with DGW, and trying to integrate BIP34 if you want from the beginning, looking at whether you want the same coin supply and halving intervals, there's actually quite a bit of work to do forking DASH, especially if you aren't yet understanding Masternodes, confirmation times, whether it's reasonably easy and what the ramifications of changing confirmations would be (15 for MNs?) and rewards for MNs, plus what stake they have to have, and so on, it's harder than just cloning and adjusting a few bits and pieces from Bitcoin or Litecoin.

    DASH is a much more interesting coin to clone though in my view. Harder but more rewarding in the end, and you might get the benefit of understanding a lot more about DASH and how it really works and perhaps contribute to the DASH project in future.

    The developer guide is much better than others I've seen, but still it's inadequate for those new to coin/cryptocurrency development. It assumes too much, and there's no Mastering DASH or Programming DASH books out there to help along the way.
     
  7. dashfan7

    dashfan7 New Member

    Joined:
    Apr 19, 2019
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    All the forks seem to be from older repositories and it would be nice to just fork the latest that works.

    Having said that, there's a basic guide if you search for Flowercoin. Also search for paper29 and The method of design of an own cryptocurrency based on the dash project if you're having trouble finding paper29.pdf which describes the basic rebranding from DASH to Flowercoin if you really want a new DASH for some reason. Looks adequate though for trying out a new Dash and trying to understand its innards a bit more. A bit of a jump start to more interesting changes to understand it. If you can manage all the Masternode things, what on earth sporks are and exactly how privatesend and instant sending works and so on.
     
  8. Kayser

    Kayser New Member

    Joined:
    Dec 8, 2019
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Hi, did you manage to find a guide to the dash fork? I am facing the same problem and if you can share information with me I would be very grateful.