• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

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

vertoe

Three of Nine
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.
 
Last edited by a moderator:
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);
 
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);
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
 
Update: X11 is working now.
Code:
$ ./src/qt/bitcoin-qt
00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6 #result of HashX11()
00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6 #hardcoded genesis hash

Next: Subsidy & KGW.
 
Last edited by a moderator:
Updated subsidy and wallet keypool.

Now its becoming interesting, KGW, DGW and enforcement.
 
Last edited by a moderator:
Code:
getblockcount
180673

getblockhash 180673
0000000000055a6dd7c6b229c890c1104d3018a7972ebd3f48020648f06db52a

:D :D :D

Screenshot.png Screenshot-1.png

Next: Enforcement!
 
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);

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. :)
 
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 ;)
 
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!
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.
 
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.
Sounds very good, does this mean GUI is going to change to something 'modern'?
 
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 ;-)
 
Back
Top