Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Darkcoin-0.11: Porting the Bitcoin-0.9 tree ...

Discussion in 'Official Developer Thread' started by vertoe, Nov 27, 2014.

  1. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    I am trying to port the latest bitcoin 0.9-tree to be compatible with the Darkcoin network:
    https://github.com/bitcoin/bitcoin/tree/0.9

    The bitcoin 0.9.x core wallet is a state of the art reference implementatoin and we should start porting its feature rather sooner than later. I can't promise anything, will do it step by step and document any progress in this thread.

    First step is compiling a list of things which need to be done:
    https://github.com/darkcoin/darkcoin/blob/v0.11.0.x/TODO.md


    Any hints and discussion very welcome. This is the first time I'm working on a 0.9.x-tree.
     
    #1 vertoe, Nov 27, 2014
    Last edited by a moderator: Dec 27, 2014
    • Like Like x 6
  2. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    flare do you know by any chance what EXT_PUBLIC_KEY or EXT_SECRET_KEY is? And what could it be for darkcoin?

    Code:
      base58Prefixes[PUBKEY_ADDRESS] = list_of(76); // Darkcoin addresses start with X
      base58Prefixes[SCRIPT_ADDRESS] = list_of(5);
      base58Prefixes[SECRET_KEY] =  list_of(128);
      base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x88)(0xB2)(0x1E);
      base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x88)(0xAD)(0xE4);
    
     
  3. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,426
    Trophy Points:
    1,183
    I don't think Darkcoin has them (yet) as these keys are part of BIP32 implementation (key derivation) in Bitcoin 0.9.3.x

    https://github.com/bitcoin/bitcoin/...4af#diff-64cbe1ad5465e13bc59ee8bb6f3de2e7R150
     
  4. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    • Like Like x 1
  5. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,426
    Trophy Points:
    1,183
    Good stuff, Evan wants to have BIP32 too :)
     
    • Like Like x 1
  6. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    Update: X11 is working now.
    Code:
    $ ./src/qt/bitcoin-qt
    00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6 #result of HashX11()
    00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6 #hardcoded genesis hash
    
    Next: Subsidy & KGW.
     
    #6 vertoe, Nov 29, 2014
    Last edited by a moderator: Dec 4, 2014
    • Like Like x 3
  7. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    Updated subsidy and wallet keypool.

    Now its becoming interesting, KGW, DGW and enforcement.
     
    #7 vertoe, Dec 2, 2014
    Last edited by a moderator: Dec 4, 2014
  8. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    Code:
    getblockcount
    180673
    
    getblockhash 180673
    0000000000055a6dd7c6b229c890c1104d3018a7972ebd3f48020648f06db52a
    :D :D :D

    Screenshot.png Screenshot-1.png

    Next: Enforcement!
     
    • Like Like x 3
  9. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    Hey UdjinM6 do you have an opinion about EXT_PUBLIC_KEY and EXT_SECRET_KEY and how we could initialize these for Darkcoin? I'm totally clueless. :)
     
  10. crowning

    crowning Official Dash Dev
    Core Developer Moderator

    Joined:
    May 29, 2014
    Messages:
    1,430
    Likes Received:
    2,009
    Trophy Points:
    183
    • Like Like x 1
  11. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,613
    Likes Received:
    3,524
    Trophy Points:
    1,183
    • Like Like x 1
  12. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    Ok cool, so we can leave that for now.

    I've reset the testnet (v4) and changed testnet addresses to start with a small 'x' too. I will fix the miner code now to generate correct blocks and after that we can start testing on testnet4 ;)
     
  13. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    • Like Like x 5
  14. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,426
    Trophy Points:
    1,183
  15. eduffield

    eduffield Core Developer
    Dash Core Team

    Joined:
    Mar 9, 2014
    Messages:
    1,084
    Likes Received:
    5,317
    Trophy Points:
    183
    Hey, I've been wanting to do this for awhile now and it looks like you did all of the heavy lifting. I'll definitely run with what you have and port Darksend/Masternodes and InstantX, that'll be version 10.18. Thanks for the help!
     
    • Like Like x 3
  16. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    I will notify as soon as the branch is basically ready to run everything for darkcoin that the upstream tree is allowing you to do with the latest bitcoin wallet.

    I had an idea to publish something like a 0.11.x branch on the first birthday of darkcoin in january which should be a modern darkcoin wallet including both, the bitcoin-0.9.x features and the latest darkcoin achievements.

    The bitcoin-0.9 branch is very different from the litecoin-0.8 tree I noticed. I did some refactoring and code cleanup while porting darkcoin properties. In addition I did a testnet reset (v4) and changed testnet address version to start pubkeys with a small x. That way we will be able to test this branch independently from the existing testnet (which is required I think to verify DGW and MN are working well on the new network right from the beginning).

    Let me know if there is anything else I should prepare.
     
    • Like Like x 3
  17. AjM

    AjM Well-known Member
    Foundation Member Masternode Owner/Operator

    Joined:
    Jun 23, 2014
    Messages:
    1,299
    Likes Received:
    564
    Trophy Points:
    283
    Sounds very good, does this mean GUI is going to change to something 'modern'?
     
  18. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    No, this is more like a modern code base. Scroll up for some screenshots. We still need someone redoing the GUI.
     
  19. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    The walletminer is working now.

    Screenshot.png
     
    • Like Like x 5
  20. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    Ok, I got 3 bugs and 1 task left on my list.
    • Daemon and CLI tool can't connect to testnet/regtest instances (wrong port?)
    • Daemon and CLI tool can't authenticate via RPC (wrong whatever?)
    • Qt wallet can't find the config file in testnet mode (wrong path?)
    • RPC Mining still untested (but should work)
    The Qt wallet is working flawless :)

    As soon as the bugs are squashed, I will call for some testers ... stay tuned ;-)
     
    • Like Like x 2
  21. Dr.Crypto

    Dr.Crypto Member

    Joined:
    Jul 9, 2014
    Messages:
    46
    Likes Received:
    32
    Trophy Points:
    58
    What do you mean, they cannot connect?
    I haven't extensively tested them but here is what I get when I CPU-mine for the 101 first blocks in regtest mode:
    Code:
    ➜  src git:(tree-0.9.3) ✗ ./bitcoin-cli -datadir=../datadir/darkcoil getinfo
    {
        "version" : 90300,
        "protocolversion" : 71000,
        "walletversion" : 61000,
        "balance" : 500.00000000,
        "blocks" : 101,
        "timeoffset" : 0,
        "connections" : 0,
        "proxy" : "",
        "difficulty" : 0.00000000,
        "testnet" : false,
        "keypoololdest" : 1418137744,
        "keypoolsize" : 1001,
        "paytxfee" : 0.00000000,
        "relayfee" : 0.00001000,
        "errors" : ""
    }
     
  22. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    • Like Like x 1
  23. crowning

    crowning Official Dash Dev
    Core Developer Moderator

    Joined:
    May 29, 2014
    Messages:
    1,430
    Likes Received:
    2,009
    Trophy Points:
    183
    darkcoind and darkcoin-cli build fine, but darkcoin-qt won't because qmake finds nothing to do.

    Which file and/or make-option is missing?
     
  24. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    no qmake no workie :)

    Code:
    ./autogen.sh
    ./configure
    make -j $(nproc)
    how did you get the daemon compiled without these steps? there should be no makefile available without calling autogen.sh
     
    • Like Like x 1
  25. Dr.Crypto

    Dr.Crypto Member

    Joined:
    Jul 9, 2014
    Messages:
    46
    Likes Received:
    32
    Trophy Points:
    58
    If you used autogen, there should be no need for qmake. Did you check the /src/qt folder? This is where it's supposed to build (while daemon and client are in /src)
     
  26. stonehedge

    stonehedge Well-known Member
    Foundation Member

    Joined:
    Jul 31, 2014
    Messages:
    701
    Likes Received:
    341
    Trophy Points:
    233
    This is really exciting stuff. Can't wait to get stuck into testing.
     
    • Like Like x 1
  27. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    Yeah me neither. I already premined 600 blocks on testnet4 :)
     
  28. crowning

    crowning Official Dash Dev
    Core Developer Moderator

    Joined:
    May 29, 2014
    Messages:
    1,430
    Likes Received:
    2,009
    Trophy Points:
    183
    ./autogen.sh
    ./configure
    make

    This created everything BUT darkcoin-qt, no errors at all.
    And, no, darkcoin-qt was also not created in the qt folder.

    I guess when I'm back home I'll download the source again and start from scratch.

    Edit: and I have already done this with older versions quite often and without problems, so every library which is need is installed.
     
  29. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    pics* or didnt happen :)

    *) or rather logs ;p
     
  30. stonehedge

    stonehedge Well-known Member
    Foundation Member

    Joined:
    Jul 31, 2014
    Messages:
    701
    Likes Received:
    341
    Trophy Points:
    233

    Lets try to keep difficulty sensible by starting off with setgenerate true yes? ;)
     

Share This Page