Working on the android wallet for DVC, got my first transaction
Android wallet works in conjunction with the new devcoin client, no new devcoin client = no android wallet.
devcoinj (bitcoinj) minimum protocol version is 7000 (bitcoin 0.8.5), so older client peers wont be able to connect. This is not a fork, its just that the wallet will only work by connecting to peers once the new client is being used and the DNS nodes are updated to the new software.
https://sourceforge.net/projects/devcoin/files/devcoinj.PNG/downloadI suggest a 4 share bounty for the first informative testing post of the Android devcoin wallet, then 3 shares, then 2, then 1. It might not be possible to test it until there are new peers, so it might not be possible to test it now, in which case the bounty would just be in wait.
Also, Sidhujag is now Source Admin.
I really liked the mycelium wallet, having ported it over to DVC I realized it was using a centralized API to act as "supernodes" and force the wallet to funnel through the MyCelium server's in order to get/send transactions. Since this API is working on their server acting as a bitcoin server it wouldn't work for my dvc transactions so I wasn't seeing my coins being sent to it. I asked them if they would allow us to clone their API to work for devcoin, but I still am not sure about it since it woudl be a centralized solution, although no blockchain downloading would be necessary and it is super fast.
Currently it only takes a few hours to download the devcoin block chain, so we don't need it yet. Maybe in a year or two the block chain will get so fat that we'll want to avoid downloading it.
Well the idea is that the wallet wouldnt need to download a fresh copy of the blockchain anyway... since noone is using it
The real nodes are the clients you and I are using as of now, the android client acts as a thin client, however you can download it (taking 2-3 days because of the the target smoothing happening on every block, thanks to whoever did that... made life much more difficulty developing as well as testing, and now performance. The emulator downloads 50 blocks under block 12800 but only 5 or 6 max after that because of the averaging.
Im connecting to my own local client running on my PC, it is 1.0.10 and I made sure my router is forwarding 52333 back to my local ip as 52333. Then in my android wallet I can tell it to connect to my ip (router ip not your 192.168.x.x) and then it talks to your pc wallet to download blocks.
In the process of creating my checkpoints using a utility in bitcoinj-tools I found out that the blocks were not downloading after 10700 (which was because the getminfee obviously was changed in devcoin from bitcoin), and then 10800 which was the median timespan averaging (the thing that slows everything down)... and then I noticed block 25000 was crashing the checkpoint utility. After looking at devcoin I realized that checkProofWork() was doing somethign different for merged-mining based on when the aux block started (25000):
if (nHeight >= GetAuxPowStartBlock())
{
// Prevent same work from being submitted twice:
// - this block must have our chain ID
// - parent block must not have the same chain ID (see CAuxPow::Check)
// - index of this chain in chain merkle tree must be pre-determined (see CAuxPow::Check)
if (!fTestNet && nHeight != INT_MAX && GetChainID() != GetOurChainID())
return error("CheckProofOfWork() : block does not have our chain ID");
if (auxpow.get() != NULL)
{
if (!auxpow->Check(GetHash(), GetChainID()))
return error("CheckProofOfWork() : AUX POW is not valid");
// Check proof of work matches claimed amount
if (!::CheckProofOfWork(auxpow->GetParentBlockHash(), nBits))
return error("CheckProofOfWork() : AUX proof of work failed");
}
else
{
// Check proof of work matches claimed amount
if (!::CheckProofOfWork(GetHash(), nBits))
return error("CheckProofOfWork() : proof of work failed");
}
}
else
{
if (auxpow.get() != NULL)
{
return error("CheckProofOfWork() : AUX POW is not allowed at this block");
}
// Check proof of work matches claimed amount
if (!::CheckProofOfWork(GetHash(), nBits))
return error("CheckProofOfWork() : proof of work failed");
}
So if I just return true on the first if check where nHeight is >= 25000 it seems to work, however I don't think that is right? proof work will always return true for todays blocks.
Thats where I am right now... then I have to rename bitcoin to devcoin and I have to figure out a way for the devcoin ticker to show in devcoin per btc/devcoin per usd. There are some graphics aswell that we will need I will update you guys on that later after I get the thing working properly.