Open felixonmars opened 6 years ago
which version of bitcoin, 0.16 or 0.15 series?
bitcoind version is at the latest stable 0.15.1. Do I need a newer one?
Nah, 0.16 will be going changes and i thought this would be about it - but seems not.
im having same error. works with other coins though
Thanks bonesoul guess it's waiting on next Bitcoin update
actually we can fix it i guess.
Everything's possible :-) I'm enjoying using coiniumserv so far best stratum mpos jobby I have found. Supports enough coins for my liking. And minimal issues bar resources running out. There is an odd one that makes me have to put a fee on and basically mints 1 less coin than reward is for the block and it's not dev fees because set to 0 fee it won't mine and set to 0.1 It takes 1.1 off. Only did that with one coin though. Incakoin if you want to test it. Have to set up extras in conf :-/
Dears,
Do you have any idea to sovled this? I've downgraded a bitcoin core from 15.1 to 15.0 but problem is not solved. so just wonder if this able to fix later on
Regards, John Ahn
They will Probably change getnetworkhashps to getnetworkmhashps in the Bitcoin client or get it futureproof and use getnetworkphashps I missed the first line myself. It's exponential numbers. E+19 makes for a very very large number. If mhsps that's down to a smaller number but Mayne still an exponent so then it would need to be ghsps
Dears,
So should I change a source code in order to solved this issue?
if you have any idea share please...
Regards, John Ahn -----Original Message----- From: "regtable"<notifications@github.com> To: "bonesoul/CoiniumServ"<CoiniumServ@noreply.github.com>; Cc: "jeong760"<jeong760@naver.com>; "Comment"<comment@noreply.github.com>; Sent: 2018-01-30 (화) 13:41:03 Subject: Re: [bonesoul/CoiniumServ] Bitcoin getnetworkhashps overflow (#933)
They will Probably change getnetworkhashps to getnetworkmhashps in the Bitcoin client or get it futureproof and use getnetworkphashps I missed the first line myself. It's exponential numbers. E+19 makes for a very very large number. If mhsps that's down to a smaller number but Mayne still an exponent so then it would need to be ghsps
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
No I think it will be done in the Bitcoin client code. So it handles the request differently and outputs a more humane number. If not then yes I'm sure something could be done in code but that will break a lot of other things I'm sure. Lets see what bonesoul thinks. But I will see what can be done in the mean time. This must be a recent issue with the skyrocket in hashpower
@regtable, I am not sure this is solved by following but mine has been gone above issue.
{
"enabled":true,
"coin": "bitcoin.json",
"daemon": {
"host": "127.0.0.1",
"port": 8332,
"username": "RPC username",
"password": "Password of RPC user"
},
"meta": {
"motd": "Welcome to CoiniumServ pool, enjoy your stay! - http://www.coiniumserv.com",
"txMessage": "http://www.coiniumserv.com/"
},
"wallet" : {
"address": "1MMdwRZg4K9p6oH2bWUQdohbxGbAvXS1t1"
},
"rewards": [
{"1MMdwRZg4K9p6oH2bWUQdohbxGbAvXS1t1": 1}
],
"banning": {
"enabled": true,
"duration": 600,
"invalidPercent": 50,
"checkThreshold": 100,
"purgeInterval": 300
},
"payments": {
"enabled": true,
"interval": 60,
"minimum": 0.01
},
"miner": {
"validateUsername": true,
"timeout": 300
},
"job": {
"blockRefreshInterval": 1000,
"rebroadcastTimeout": 55
},
"stratum": {
"enabled": true,
"bind": "0.0.0.0",
"port": 3333,
"diff": 16,
"vardiff": {
"enabled": true,
"minDiff": 8,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
},
"storage": {
"hybrid": {
"enabled": false,
"redis": {
"host": "127.0.0.1",
"port": 6379,
"password": "",
"databaseId": 0 < --- assign a Redis keyvalues by each coins. like that bitcoin use a 0 and other use a 1 . etc.
},
"mysql": {
"host": "127.0.0.1",
"port": 3306,
"user": "username",
"password": "password",
"database": "db-name"
}
},
"mpos": {
"enabled": false,
"mysql": {
"host": "127.0.0.1",
"port": 3306,
"user": "username",
"password": "password",
"database": "db-name"
}
}
},
"vanilla": {
"enabled": false,
"bind": "localhost",
"port": 2223
}
}
I will try that.
On 1 Feb 2018 14:11, "jeong760" notifications@github.com wrote:
@regtable https://github.com/regtable, I am not sure this is solved by following but mine has been gone above issue.
- Create a each coins config file separtly like following The sample of bitcoin.json
{ "enabled":true, "coin": "bitcoin.json", "daemon": { "host": "127.0.0.1", "port": 8332, "username": "RPC username", "password": "Password of RPC user" }, "meta": { "motd": "Welcome to CoiniumServ pool, enjoy your stay! - http://www.coiniumserv.com", "txMessage": "http://www.coiniumserv.com/" },
"wallet" : { "address": "1MMdwRZg4K9p6oH2bWUQdohbxGbAvXS1t1" }, "rewards": [ {"1MMdwRZg4K9p6oH2bWUQdohbxGbAvXS1t1": 1} ], "banning": { "enabled": true, "duration": 600, "invalidPercent": 50, "checkThreshold": 100, "purgeInterval": 300 }, "payments": { "enabled": true, "interval": 60, "minimum": 0.01 }, "miner": { "validateUsername": true, "timeout": 300 }, "job": { "blockRefreshInterval": 1000, "rebroadcastTimeout": 55 }, "stratum": { "enabled": true, "bind": "0.0.0.0", "port": 3333, "diff": 16, "vardiff": { "enabled": true, "minDiff": 8, "maxDiff": 512, "targetTime": 15, "retargetTime": 90, "variancePercent": 30 } }, "storage": { "hybrid": { "enabled": false, "redis": { "host": "127.0.0.1", "port": 6379, "password": "", "databaseId": 0 }, "mysql": { "host": "127.0.0.1", "port": 3306, "user": "username", "password": "password", "database": "db-name" } }, "mpos": { "enabled": false, "mysql": { "host": "127.0.0.1", "port": 3306, "user": "username", "password": "password", "database": "db-name" } } }, "vanilla": { "enabled": false, "bind": "localhost", "port": 2223 }
}
- Change default.json as following and save. default.json { }
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bonesoul/CoiniumServ/issues/933#issuecomment-362276942, or mute the thread https://github.com/notifications/unsubscribe-auth/AHQVF04oc_subaSQ_HyPIsmNATAKvvaSks5tQcYigaJpZM4Ru_Wm .
it did not help me :-/
Getting this error as well and for the life of me I can't get it to work. using 15.1 core.
02/04/2018 13:27:16 -08:00 [Information] [PlatformManager] [global] Running over .Net, framework: 4.5 (v4.0.30319.42000). 02/04/2018 13:27:16 -08:00 [Debug] [Pool] [Bitcoin] Generated cryptographically random instance Id: 1471353524 02/04/2018 13:27:16 -08:00 [Information] [MySqlProvider] [Bitcoin] Mysql storage initialized: 127.0.0.1:3306, database: bitcoin. 02/04/2018 13:27:16 -08:00 [Information] [RedisProvider] [Bitcoin] Redis storage initialized: 127.0.0.1:6379. 02/04/2018 13:27:17 -08:00 [Error] [ShareManager] [Bitcoin] Error getting account for pool central wallet address: 19FSzo3vXnEkapELUwr86u1ySedr39bzWr - Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Information] [BanManager] [Bitcoin] No expired bans found to be cleared [remaining bans: 0]. 02/04/2018 13:27:17 -08:00 [Error] [JobManager] [Bitcoin] New job creation failed: Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Error] [JobManager] [Bitcoin] New job creation failed: Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Error] [JobManager] [Bitcoin] New job creation failed: Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Error] [BlockProcessor] [Bitcoin] Error getting account for pool central wallet address: 19FSzo3vXnEkapELUwr86u1ySedr39bzWr - Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Error] [PaymentProcessor] [Bitcoin] Halted as we can not connect to configured coin daemon: Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getdifficulty(): Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not probe submitblock() support: Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getinfo(): Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getmininginfo(): Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getblocktemplate(): Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Information] [NetworkInfo] [Bitcoin] symbol: BTC algorithm: sha256 version: null protocol: 0 wallet: 0 network difficulty: 0.00000000 block difficulty: 0.00 network hashrate: 0.00 KH/s network: mainnet peers: 0 blocks: -2 errors: none 02/04/2018 13:27:17 -08:00 [Information] [StratumServer] [Bitcoin] Stratum server listening on 0.0.0.0:0 02/04/2018 13:27:17 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getinfo(): Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getmininginfo(): Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getblocktemplate(): Unable to connect to the remote server 02/04/2018 13:27:17 -08:00 [Debug] [StatisticsManager] [global] Recached statistics - took 0.269 seconds 02/04/2018 13:27:18 -08:00 [Information] [WebServer] [global] Web-server listening on: http://localhost/ 02/04/2018 13:32:14 -08:00 [Information] [PlatformManager] [global] Running over .Net, framework: 4.5 (v4.0.30319.42000). 02/04/2018 13:32:15 -08:00 [Debug] [Pool] [Bitcoin] Generated cryptographically random instance Id: 1892005947 02/04/2018 13:32:15 -08:00 [Information] [MySqlProvider] [Bitcoin] Mysql storage initialized: 127.0.0.1:3306, database: bitcoin. 02/04/2018 13:32:15 -08:00 [Information] [RedisProvider] [Bitcoin] Redis storage initialized: 127.0.0.1:6379. 02/04/2018 13:32:15 -08:00 [Error] [ShareManager] [Bitcoin] Error getting account for pool central wallet address: 1HrB54m9GNajTy4Hz5HKHF2pgFfV2mhjYs - Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Information] [BanManager] [Bitcoin] No expired bans found to be cleared [remaining bans: 0]. 02/04/2018 13:32:15 -08:00 [Error] [JobManager] [Bitcoin] New job creation failed: Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Error] [JobManager] [Bitcoin] New job creation failed: Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Error] [JobManager] [Bitcoin] New job creation failed: Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Error] [BlockProcessor] [Bitcoin] Error getting account for pool central wallet address: 1HrB54m9GNajTy4Hz5HKHF2pgFfV2mhjYs - Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Error] [PaymentProcessor] [Bitcoin] Halted as we can not connect to configured coin daemon: Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getdifficulty(): Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not probe submitblock() support: Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getinfo(): Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getmininginfo(): Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getblocktemplate(): Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Information] [NetworkInfo] [Bitcoin] symbol: BTC algorithm: sha256 version: null protocol: 0 wallet: 0 network difficulty: 0.00000000 block difficulty: 0.00 network hashrate: 0.00 KH/s network: mainnet peers: 0 blocks: -2 errors: none 02/04/2018 13:32:15 -08:00 [Information] [StratumServer] [Bitcoin] Stratum server listening on 0.0.0.0:0 02/04/2018 13:32:15 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getinfo(): Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getmininginfo(): Unable to connect to the remote server 02/04/2018 13:32:15 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getblocktemplate(): Unable to connect to the remote server 02/04/2018 13:32:16 -08:00 [Debug] [StatisticsManager] [global] Recached statistics - took 0.267 seconds 02/04/2018 13:32:16 -08:00 [Information] [WebServer] [global] Web-server listening on: http://localhost/ 02/04/2018 13:34:57 -08:00 [Information] [PlatformManager] [global] Running over .Net, framework: 4.5 (v4.0.30319.42000). 02/04/2018 13:34:58 -08:00 [Debug] [Pool] [Bitcoin] Generated cryptographically random instance Id: 3724846033 02/04/2018 13:34:58 -08:00 [Information] [MySqlProvider] [Bitcoin] Mysql storage initialized: 127.0.0.1:3306, database: bitcoin. 02/04/2018 13:34:58 -08:00 [Information] [RedisProvider] [Bitcoin] Redis storage initialized: 127.0.0.1:6379. 02/04/2018 13:34:58 -08:00 [Error] [ShareManager] [Bitcoin] Error getting account for pool central wallet address: 1HrB54m9GNajTy4Hz5HKHF2pgFfV2mhjYs - Unable to connect to the remote server 02/04/2018 13:34:58 -08:00 [Information] [BanManager] [Bitcoin] No expired bans found to be cleared [remaining bans: 0]. 02/04/2018 13:34:58 -08:00 [Error] [JobManager] [Bitcoin] New job creation failed: Unable to connect to the remote server 02/04/2018 13:34:58 -08:00 [Error] [JobManager] [Bitcoin] New job creation failed: Unable to connect to the remote server 02/04/2018 13:34:58 -08:00 [Error] [JobManager] [Bitcoin] New job creation failed: Unable to connect to the remote server 02/04/2018 13:34:58 -08:00 [Error] [BlockProcessor] [Bitcoin] Error getting account for pool central wallet address: 1HrB54m9GNajTy4Hz5HKHF2pgFfV2mhjYs - Unable to connect to the remote server 02/04/2018 13:34:58 -08:00 [Error] [PaymentProcessor] [Bitcoin] Halted as we can not connect to configured coin daemon: Unable to connect to the remote server 02/04/2018 13:34:58 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getdifficulty(): Unable to connect to the remote server 02/04/2018 13:34:58 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not probe submitblock() support: Unable to connect to the remote server 02/04/2018 13:34:58 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getinfo(): Unable to connect to the remote server 02/04/2018 13:34:58 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getmininginfo(): Unable to connect to the remote server 02/04/2018 13:34:58 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getblocktemplate(): Unable to connect to the remote server 02/04/2018 13:34:58 -08:00 [Information] [NetworkInfo] [Bitcoin] symbol: BTC algorithm: sha256 version: null protocol: 0 wallet: 0 network difficulty: 0.00000000 block difficulty: 0.00 network hashrate: 0.00 KH/s network: mainnet peers: 0 blocks: -2 errors: none 02/04/2018 13:34:58 -08:00 [Information] [StratumServer] [Bitcoin] Stratum server listening on 0.0.0.0:9995 02/04/2018 13:34:59 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getinfo(): Unable to connect to the remote server 02/04/2018 13:34:59 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getmininginfo(): Unable to connect to the remote server 02/04/2018 13:34:59 -08:00 [Error] [NetworkInfo] [Bitcoin] Can not read getblocktemplate(): Unable to connect to the remote server 02/04/2018 13:34:59 -08:00 [Debug] [StatisticsManager] [global] Recached statistics - took 0.267 seconds 02/04/2018 13:34:59 -08:00 [Information] [WebServer] [global] Web-server listening on: http://localhost/ `
You know when I removed a bitcoin client and installation again it works few times but after that it generate a above error. also bitcoin 15.1 does not support a getinfo() anymore it depreciated RPC command but still works with warning message.
I think this problem of "Serilog", Newtonsoft.Json,Nancy does not have enough buffer for bitcoin difficult conversion. so this should be changed a some code.
The warning message when issued a getinfo() "deprecation-warning": "WARNING: getinfo is deprecated and will be fully removed in 0.16. Projects should transition to using getblockchaininfo, getnetworkinfo, and getwalletinfo before upgrading to 0.16",
I tried rolling the core back to 15.0 but still got errors
of course it works perfectly for litecoin. altho I have yet to test the pool as I don't have a scrypt miner lol
I think the issue occurs on line 75 in src/CoiniumServ/Daemon/Responses/MiningInfo.cs, the value being returned by the network is bigger than a UInt64 allows.
I'm not really a C# developer so am not sure how to fix it. I've tried using double but this causes other issues, also tried BigInteger but it fails to compile on linux and I am unsure of how to include System.Numerics in the build.
I have worked with c# will take a look at it, and yeah replacing just that with double don't fix it.
@mbruton I've changed following all value ulong but not solved the problem. because using System; is a UInt64. but I don't know where I can change to solve this...
src/CoininumServ/Daemon/Responses/miningInfo.cs [JsonProperty] private UInt64 NetworkHashps { get; set; }
[JsonIgnore]
public UInt64 NetworkHashPerSec { get; set; }
[OnDeserialized]
internal void OnDeserializedMethod(StreamingContext context)
{
NetworkHashPerSec = 0;
if (NetMHashps > 0)
NetworkHashPerSec = (UInt64)(NetMHashps*1000*1000);
else if (NetworkGhps > 0)
NetworkHashPerSec = (UInt64)(NetworkGhps * 1000 * 1000 * 1000);
else if (NetworkMhps > 0)
NetworkHashPerSec = (UInt64)(NetworkMhps * 1000 * 1000);
else if (NetworkHashps > 0)
NetworkHashPerSec = NetworkHashps;
}
src/CoininumServ/Pools/INetworkInfo.cs -46: public ulong Hashrate { get; private set; }
src/CoininumServ/Pools/NetowkrInfo.cs
Wouldn't it just work by removing the 100010001000 maths and having it change a value from khs to mhs ghs or phs ?
@jeong760 I believe ulong is also 64 bit and so not big enough.
@regtable the value is being returned by the Bitcoin API and so is too big to fit into the variable and so it fails before the calculations are even performed, the value should be stored in NetworkHashps which comes from the API call getMiningInfo.
@mbruton, Yes, ulong does not help to solve.
Just I assumed that Newtonsoft.Json also a problem to calculate a NetworkHashps value to UInt64 so it seems not the only CoiniumServ problem.
@mbruton, Do you know the biggest value to replace a UInt64 in C#? I am not a programmer so don't know which value should I use.
@bonesoul, Could you give us a clue to solve this? Because it seems able to solve but first I need to understand the structure... also your new hypepool project still does not support a sha256 and testing phase so... until then we need to use a CoiniumServ.
I tried, but then it started throwing up cast errors on the build. sometime this week I should be able to dig into it.
On Wed, Feb 14, 2018 at 3:58 PM, jeong760 notifications@github.com wrote:
@mbruton https://github.com/mbruton, Do you know the biggest value to replace a UInt64 in C#? I am not a programmer so don't know which value should I use.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bonesoul/CoiniumServ/issues/933#issuecomment-365785192, or mute the thread https://github.com/notifications/unsubscribe-auth/AG4-p0UFVpLEW025Xv6fL-IcfaYSgLEMks5tU3M3gaJpZM4Ru_Wm .
Dears,
VC2017 debugging phase point to the following /src/pool/DaemonBase.cs (175 ~ 189 lines) So I think this seems related to JsonResponse problem also, which does not convert a value to UInt64.
private DaemonResponse
_logger.Verbose("rx: {0}", json.PrettifyJson());
try
{
return JsonConvert.DeserializeObject<DaemonResponse<T>>(json);
}
catch (JsonException jsonEx)
{
httpWebRequest = null;
throw new Exception("There was a problem deserializing the response from the coin wallet.", jsonEx);
}
Regards, John Ahn
yes bitcoin has changed it's rpc response signature, i'll take a look.
@bonesoul, Thank you. so that's why it still generate an error even if I changed a following on src/Daemon/Response/DaemonResponse.cs.
Before [JsonProperty] private UInt64 NetworkHashps { get; set; }
After [JsonProperty] private ulong NetworkHashps { get; set; }
Regards, John Ahn
@bonesoul, here is getmininginfo code of bitcoin(16.01). which under sr/rpc/mining.cpp. I hope you will find a clue to fix this issue with bitcoin. and getinfo rpc command also needs to replace with etblockchaininfo, getnetworkinfo, and getwalletinfo before they'll release a 16.01 bitcoin core.
UniValue getmininginfo(const JSONRPCRequest& request) { if (request.fHelp || request.params.size() != 0) throw std::runtime_error( "getmininginfo\n" "\nReturns a json object containing mining-related information." "\nResult:\n" "{\n" " \"blocks\": nnn, (numeric) The current block\n" " \"currentblockweight\": nnn, (numeric) The last block weight\n" " \"currentblocktx\": nnn, (numeric) The last block transaction\n" " \"difficulty\": xxx.xxxxx (numeric) The current difficulty\n" " \"networkhashps\": nnn, (numeric) The network hashes per second\n" " \"pooledtx\": n (numeric) The size of the mempool\n" " \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n" " \"warnings\": \"...\" (string) any network and blockchain warnings\n" "}\n" "\nExamples:\n"
Regards, John Ahn
Cool.
On 14 Feb 2018 18:56, "Matt Bruton" notifications@github.com wrote:
@jeong760 https://github.com/jeong760 I believe ulong is also 64 bit and so not big enough.
@regtable https://github.com/regtable the value is being returned by the Bitcoin API and so is too big to fit into the variable and so it fails before the calculations are even performed, the value should be stored in NetworkHashps which comes from the API call getMiningInfo.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bonesoul/CoiniumServ/issues/933#issuecomment-365708566, or mute the thread https://github.com/notifications/unsubscribe-auth/AHQVF1ZpYU0DKsAZ1UQBE899j_Biq3Qbks5tUyxWgaJpZM4Ru_Wm .
Dears,
I've inquired about above issue on bitcoin git hub they told this answer. it means that we will need to change an integer to double or a more lager one in order to represent this values
-- Replied on bitcoin git -- You can't represent this value as a uint64 anymore, you'll need to use a double or a larger integer type.
This has nothing to do with a change in Bitcoin Core, but with the fact that the network's hash rate is now too large for your software to deal with.
Regards, John Ahn
@bonesoul,
Do we need to change a pool.cs on following but after I change it generate an error. so how I fixed it? How I use a double integer instead ulong or Uint64?
When after I changed an integer as ulong to double on both (Networkinfo.cs and INetworkInfo.cs) The following error message displayed
Error CS1929 'double' does not contain a definition for 'GetReadableHashrate' and the best extension method overload 'Humanize.GetReadableHashrate(ulong)' requires a receiver of type 'ulong' CoiniumServ D:\git\CoiniumServ\src\CoiniumServ\Pools\NetworkInfo.cs 153 Active
src/pools/INetworkinfo.cs (code line 87-160) [JsonProperty("hashrate")] UInt64 Hashrate { get; } ---> double Hashrate { get; }
src/pools/networkinfo.cs (code line 46) public ulong Hashrate { get; private set; } ---> public double Hashrate { get; private set; }
src/pools/networkinfo.cs (code line 110 till to 126) public void Recache() { try // read getinfo() based data. { var info = _daemonClient.GetInfo();
// read data.
CoinVersion = info.Version;
ProtocolVersion = info.ProtocolVersion;
WalletVersion = info.WalletVersion;
Testnet = info.Testnet;
Connections = info.Connections;
Errors = info.Errors;
// check if our network connection is healthy.
Healthy = Connections >= 0 && string.IsNullOrEmpty(Errors);
}
catch (RpcException e)
{
_logger.Error("Can not read getinfo(): {0:l}", e.Message);
Healthy = false; // set healthy status to false as we couldn't get a reply.
}
try // read getmininginfo() based data.
{
var miningInfo = _daemonClient.GetMiningInfo();
// read data.
Hashrate = miningInfo.NetworkHashPerSec;
Difficulty = miningInfo.Difficulty;
Round = miningInfo.Blocks + 1;
}
catch (RpcException e)
{
_logger.Error("Can not read getmininginfo(): {0:l}", e.Message);
Hashrate = 0;
Difficulty = 0;
Round = -1;
Healthy = false; // set healthy status to false as we couldn't get a reply.
}
try // read getblocktemplate() based data.
{
var blockTemplate = _daemonClient.GetBlockTemplate(_poolConfig.Coin.Options.BlockTemplateModeRequired);
Reward = (UInt64)blockTemplate.Coinbasevalue / 100000000; // coinbasevalue is in satoshis, convert it to actual coins.
}
catch (RpcException e)
{
_logger.Error("Can not read getblocktemplate(): {0:l}", e.Message);
Reward = 0;
}
}
private void PrintNetworkInfo()
{
_logger.Information("symbol: {0:l} algorithm: {1:l} " +
"version: {2:l} protocol: {3} wallet: {4} " +
"network difficulty: {5:0.00000000} block difficulty: {6:0.00} network hashrate: {7:l} " +
"network: {8:l} peers: {9} blocks: {10} errors: {11:l} ",
_poolConfig.Coin.Symbol,
_poolConfig.Coin.Algorithm,
CoinVersion,
ProtocolVersion,
WalletVersion,
Difficulty,
Difficulty*_hashAlgorithm.Multiplier,
**Hashrate.GetReadableHashrate(),** <--- this requires a **ulong** integer
Testnet ? "testnet" : "mainnet",
Connections,
Round - 1,
string.IsNullOrEmpty(Errors) ? "none" : Errors);
}
Regards, John Ahn
@bonesoul is there anything should I change?
@bonesoul and Others, I think I've solved(Refers to pictures) a Network Hash rate issue on CoinuimServ after made several tests by my self. I've lost and don't know why but found that public static string GetReadableHashrate(this double hashrate) on Humanize.cs to give a Hashrate.GetReadableHashrate() on NetowrkInfo.cs. so I've additionally changed it, And then it works well with Bitcoin.
src/Algorithms/HashAlgorithmStatistics.cs 47: public double Hashrate { get; private set);
src/Algorithms/IHashAlgorithmStatistics.cs 51: double Hashrate { get; }
src/Daemon/Responses/MiningInfo.cs 54: public double HashesPerSec { get; set; } 75: private double NetworkHashps { get; set; } 78: public double NetworkHashPerSec { get; set; }
src/Pools/NetworkInfo.cs 46: public double Hashrate { get; private set; }
src/Pools/INetworkInfo.cs 55: double Hashrate { get; }
src/Pools/Pools.cs 66: public double Hashrate { get; private set; }
src/Pools/IPools.cs 51: double Hashrate { get; }
src/Statistics/StatisticsManager.cs 42: public double Hashrate { get; private set; }
src/Statistics/IStatisticsManager.cs 43: double Hashrate { get; }
src/Utils/Humanize.cs 43: public static string GetReadableHashrate(this UInt64 hashrate) ---> public static string GetReadableHashrate(this double hashrate)
And finally please removed following code on web. it seems not implemented on CoiniumServ srv/web/default/views/partial/pools.cshtml 22:
Regards, John Ahn
@bonesoul, I will open a new PR for this issue after making a week test in my pool. So if you think this no need to open a PR then please apply it to yourself as soon as possible, please.
@bonesoul , Could you add a Globaltoken(GLT) and its icon? I think it omitted. so need to manual add please
@felixonmars @regtable @dracolumina @mbruton , Does anyone confirmation that above change not affect alt-coins work?
Does any one knows how to solve the time out issue below: How we can alter the IOCP Min from 8 to 300 Error Below: 01:57:02 [Error] [HybridStorage] [Bitcoin] An exception occured while comitting share: Timeout performing ZADD bitcoin:hashrate, inst: 3, queue: 0, qu: 0, qs: 0, qc: 0, wr: 0, wq: 0, in: 0, ar: 0, clientName: DESKTOP-BASKBI5, serverEndpoint: 127.0.0.1:6379, keyHashSlot: 12176, IOCP: (Busy=1,Free=999,Min=8,Max=1000), WORKER: (Busy=327,Free=1720,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)
@Maleksh, please increased a memory on your system. Redis is in memory key value storage so it needed at least 1GB for it. I’ve recommanded you increase a yout system memory morethan 2GB.
@jeong760 , I have 32GB installed on the Workstation, with 1 TB M550 Crucial SSD, including 1 GB Cache memory. no luck, memory usage not more than 4 GB.
I ran into this same issue today. Is there anything I can do to help expedite a solution?
I was able to Increase the Dot Net Framwork Threads by following the below instruction: However, i am getting a new error at the End: Open C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config And C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config Edit the below: From processModel autoConfig="true" To processModel minIoThreads="50" Note, 50* 4 No. Of CPU Cores=200 Min Threads Allowed as per the above settings
New Error Below: Anyone have any idea what to do 11:42:41 [Error] [StratumServer] [BitcoinDB] Send System.Net.Sockets.SocketException (0x80004005): A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at CoiniumServ.Server.Mining.Stratum.Sockets.SocketServer.Send(Connection connection, Byte[] buffer, Int32 start, Int32 count, SocketFlags flags)
@BenKnigge Which kind of issue do you mean? bitcoin network hash rate issue or other like related Redis
@jeong760 I have tried your changes, but when I go to compile I get the error Severity Code Description Project File Line Suppression State Error CS0738 'NetworkInfo' does not implement interface member 'INetworkInfo.Hashrate'. 'NetworkInfo.Hashrate' cannot implement 'INetworkInfo.Hashrate' because it does not have the matching return type of 'ulong'. CoiniumServ C:\Users\Draco\Downloads\CoiniumServ-master\CoiniumServ-master\src\CoiniumServ\Pools\NetworkInfo.cs 40 Active
@jeong760 The same issue as in the stack trace. I ended up downgrading the full node to version 15 and it resolved the issue.
Currently bitcoind returns a big float for getnetworkhashps:
This prevents CoiniumServ from starting up: