bonesoul / CoiniumServ

Next-gen crypto currency mining pool software
Other
798 stars 494 forks source link

UniversalCurrency (UNIT) Issue #950

Open King-ZA opened 6 years ago

King-ZA commented 6 years ago

Has anybody managed to get UNIT working with CoiniumServ? I have tried every option that i can find for POW+POS coins and am still receiving the following error:

Can not read getmininginfo(): An unknown exception occured while reading json response.

The getmininginfo response from my wallet is as follows:

{ "Blocks" : 2970015, "Current Block Size" : 1000, "Current Block Tx" : 0, "Difficulty" : { "Proof of Work" : 256598815.18617886, "Proof of Stake" : 0.09541662, "Search Interval" : 0 }, "Block Value" : 500000000, "Net MH/s" : 24490744875.93302917, "Net Stake Weight" : 6535898.88508313, "Errors" : "", "Pooled Tx" : 0, "Stake Weight" : { "Minimum" : 79, "Maximum" : 0, "Combined" : 79 }, "Stake Interest" : 1000000, "Testnet" : false }

And finally my coins\unit.json file is as follows

{ "name": "Unit", "symbol": "UNIT", "algorithm": "sha256", "site": "https://www.u-currency.com/", "blockExplorer": { "block": "https://explorer.u-currency.com/block/", "tx": "https://explorer.u-currency.com/tx/", "address": "https://explorer.u-currency.com/address/" }, "options": { "isProofOfStakeHybrid": true, "blockTemplateModeRequired": false, "useDefaultAccount": false, "txMessageSupported": false
} }

Maleksh commented 6 years ago

as per bitcoin response: You can't represent this value as a uint64 anymore, you'll need to use a double or a larger integer type., I need some one to adjust this double integer value in the code and compile it for windows,

jeong760 commented 6 years ago

@Maleksh, @King-ZA, It has been solved by me today. please see the pull request and this link for manual modification. #933

Regards, John Ahn

Maleksh commented 6 years ago

Great new, that's owsom, do you have a windows compiled version ready please, I will give you 100 dollars, lease share your bitcoin receive address

jeong760 commented 6 years ago

Dears Maleksh.

By dafult CoiniumServ is support a Windows and Linux Could you explaining me exactly what issues do you have?

Regards, John Ahn-----Original Message----- From: "Maleksh"<notifications@github.com> To: "bonesoul/CoiniumServ"<CoiniumServ@noreply.github.com>; Cc: "jeong760"<jeong760@naver.com>; "Comment"<comment@noreply.github.com>; Sent: 2018-02-18 (일) 04:41:46 Subject: Re: [bonesoul/CoiniumServ] UniversalCurrency (UNIT) Issue (#950)

Great new, that's owsom,

do you have a windows compiled version ready please,

I will give you 100 dollars, lease share your bitcoin receive address

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Maleksh commented 6 years ago

Many Thx for your support, I just figured out how to compile it, I was using the debug compiler, now I use the release compiler and working fine 👍

jeong760 commented 6 years ago

@Maleksh Does your Universal Currency works fine now? Or do you still needed my help?

King-ZA commented 6 years ago

@jeong760 Thank you very much for your assistance.

I have compiled with this pull request https://github.com/bonesoul/CoiniumServ/pull/953 and am still receiving the same error with Universal Currency.

[Information] [NetworkInfo] [Unit] symbol: UNIT algorithm: sha256 version: v1.0.2.0-g protocol: 60100 wallet: 60000 network difficulty: 0.00000000 block difficulty: 0.00 network hashrate: 0.00 KH/s network: mainnet peers: 12 blocks: -2 errors: none [Error] [NetworkInfo] [Unit] Can not read getmininginfo(): An unknown exception occured while reading json response.

Please let me know if I can help with any other logs of information.

Maleksh commented 6 years ago

Thank you for asking, Actually, I still need your help, I was able to compile the code, but I run into time out and Full CPU Utilizations, I have latest Core i7 High End CPUs, with Crucial SSD "1GB Memory cache", and still CPU Full, and many Times outs as below error: running on Windows 10 12:28:54 [Error] [HybridStorage] [Bitcoin] An exception occured while comitting share: Timeout performing HINCRBYFLOAT bitcoin:shares:round:current, inst: 11, queue: 12, qu: 0, qs: 12, qc: 0, wr: 0, wq: 0, in: 419, ar: 0, clientName: DESKTOP-BASKBI5, serverEndpoint: 127.0.0.1:6379, keyHashSlot: 11468, IOCP: (Busy=2,Free=998,Min=8,Max=1000), WORKER: (Busy=312,Free=1735,Min=8,Max=2047) (Please take a look at this article for some common client-side issues that can cause timeouts: http://stackexchange.github.io/StackExchange.Redis/Timeouts)

jeong760 commented 6 years ago

@Maleksh, is still valid an "I will give you 100 dollars, please share your bitcoin receive address"? then my bitcoin address here.

1LTEVmonsNZ6UZLahBepSQyVaTzsJw1WXG

jeong760 commented 6 years ago

UNIT uses a different method for following that's why CoiniumServ does not get necessary getmininginfo() from coin daemon

So this need to change or made a new code for UNIT daemon.

jeong760 commented 6 years ago

Normally CoiniumServ get necessary information from getmininginfo and getinfo but seems UNIT uses a different method to represent them.

Following is need to get in order to initialize a coin pool by CoiniumServ.

symbol: BTC algorithm: sha256 version: 150100 **protocol: 70015 wallet: 139900 network difficulty: 2874674234415.94000000 block difficulty: 2874674234415.94 network hashrate: 23.63 EH/s network: mainnet peers: 19 blocks: 509648 errors:** none

jeong760 commented 6 years ago

@King-ZA, The following is UNIT mininginfo code but this information is different, so that's why CoiniumServ does not get correct info.

@bonesoul, Could you give some advises where I can modify to support a UNIT coin? its mininginfo code is following

The getmininginfo code of UNIT coin

Value getmininginfo(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getmininginfo\n" "Returns an object containing mining-related information.");

uint64_t nMinWeight = 0, nMaxWeight = 0, nWeight = 0;
pwalletMain->GetStakeWeight(*pwalletMain, nMinWeight, nMaxWeight, nWeight);

Object obj, diff, weight;
obj.push_back(Pair("Blocks",        (int)nBestHeight));
obj.push_back(Pair("Current Block Size",(uint64_t)nLastBlockSize));
obj.push_back(Pair("Current Block Tx",(uint64_t)nLastBlockTx));

diff.push_back(Pair("Proof of Work",       GetDifficulty()));
diff.push_back(Pair("Proof of Stake",       GetDifficulty(GetLastBlockIndex(pindexBest, true))));
diff.push_back(Pair("Search Interval",      (int)nLastCoinStakeSearchInterval));
obj.push_back(Pair("Difficulty",    diff));

obj.push_back(Pair("Block Value",    (uint64_t)GetProofOfWorkReward(0)));
obj.push_back(Pair("Net MH/s",     GetPoWMHashPS()));
obj.push_back(Pair("Net Stake Weight", GetPoSKernelPS()));
obj.push_back(Pair("Errors",        GetWarnings("statusbar")));
obj.push_back(Pair("Pooled Tx",      (uint64_t)mempool.size()));

weight.push_back(Pair("Minimum",    (uint64_t)nMinWeight));
weight.push_back(Pair("Maximum",    (uint64_t)nMaxWeight));
weight.push_back(Pair("Combined",  (uint64_t)nWeight));
obj.push_back(Pair("Stake Weight", weight));

obj.push_back(Pair("Stake Interest",    (uint64_t)COIN_YEAR_REWARD));
obj.push_back(Pair("Testnet",       fTestNet));
return obj;

}

Regards, John Ahn

jeong760 commented 6 years ago

@bonesoul, Could you give me the clue to this request? where I can add or modification to get UNIT network hash and block difficult...

flyx2888 commented 6 years ago

@King-ZA @Maleksh @jeong760

unit

I have this working now for UNIT. Forthcoming with new code shortly after testing.

flyx2888 commented 6 years ago

@King-ZA @Maleksh @jeong760

UNIT.zip

New: src\CoiniumServ\Daemon/Converters\PropertyConverter.cs Modified: src\CoiniumServ\Daemon\Responses\MiningInfo.cs Modified: src\CoiniumServ\Daemon\DaemonBase.cs

flyx2888 commented 6 years ago

You will need to do a git pull for the latest source as this works with the the fix for #975 before applying these 3 files.

jeong760 commented 6 years ago

@flyx2888 @King-ZA @Maleksh @bonesoul

I've opened a new PR included this code modification.

Regards, John Ahn

flyx2888 commented 6 years ago

@jeong760

Thank you.