vagabondan / CoiniumServ

NOTE: No plans to return to this project because I've switched to more convenient and stable NOMP pool (https://github.com/vagabondan/ric-nomp) and recommend you to do the same.
Other
10 stars 6 forks source link

Issue mining SHA256 Joulecoin #24

Closed DecentralizeCoding closed 7 years ago

DecentralizeCoding commented 7 years ago

Hi very similar to the Deutsch emark coin problem here: https://github.com/vagabondan/CoiniumServ/issues/23 I am having issues mining Joulecoins. To confirm I can mine Mazacoins and Zetacoins on my pool without issue and they go from unconfirmed, confirmed and process for payment.

Here is the Coiniumserv debug log:

09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.ShareManager] [Joulecoin] TakeShare before share constructor: nonce=073375ac, extranonce2=69210000 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] Entering share constructor: "073375ac" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Jobs.Job] [Job] Share list length: 11 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] Serialize Share "073375ac" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] Getting Header buffer for Share "073375ac" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] Got share "073375ac" of length: 32 POW: 0000000000002023e8ca63dd48b00ea4d5b88f2020907b13ed19c01b9b4b300d TGT: 22225f0000000000000000000000000000000000000000000000 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] Job.Target is greater than or equal HeaderValue(POW-SCRYPT)!!!: "22225f0000000000000000000000000000000000000000000000" "2023e8ca63dd48b00ea4d5b88f2020907b13ed19c01b9b4b300d"

Big-Endian values for Block Header: job.BlockTemplate.Version=2 job.PreviousBlockHash="00000000000016CCACBD9CC5D14B1E3FC80EFD78DB50694D066A920C0D0240F1" MerkleRoot="5427777B5D1CBD8915CA34368DB639560D13F4814025B2EB5A4995BD1E48FC1E" NTime=1505493305 job.EncodedDifficulty="1a22225f" Nonce=120812972

result="02000000F140020D0C926A064D6950DB78FD0EC83F1E4BD1C59CBDACCC160000000000001EFC481EBD95495AEBB2254081F4130D5639B68D3634CA1589BD1C5D7B7727543901BC595F22221AAC753307"

Big-Endian: BlockHex=System.Byte[] BlockHash(2xSHA256)="0000000000002023E8CA63DD48B00EA4D5B88F2020907B13ED19C01B9B4B300D"

09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.ShareManager] [Joulecoin] Share accepted at 521991.87/1351.56 by miner JZPJQHVRjBRLB3T9uTfbU9Cz4CDCtHkaYV 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] BlockDiffAdjusted=491499.126544519 Difficulty=521991.867368472 ExtraNonce1=3355443202 ExtraNonce2=1763770368 Height=2840016 NTime=1505493305 Nonce=120812972 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] "BlockHash"="0000000000002023e8ca63dd48b00ea4d5b88f2020907b13ed19c01b9b4b300d" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] "CoinbaseBuffer"="02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2603d0552b062f503253482f03d5f81608c8000002692100000d2f436f696e69756d536572762f0000000002007b9a17000000001976a914a6883cb5272c9d881f057da9c55223f18d824a7288ac00093d00000000001976a914a6883cb5272c9d881f057da9c55223f18d824a7288ac00000000" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] CoinbaseHash="1efc481ebd95495aebb2254081f4130d5639b68d3634ca1589bd1c5d7b772754" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] HeaderBuffer="02000000F140020D0C926A064D6950DB78FD0EC83F1E4BD1C59CBDACCC160000000000001EFC481EBD95495AEBB2254081F4130D5639B68D3634CA1589BD1C5D7B7727543901BC595F22221AAC753307" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] "HeaderHash"="0d304b9b1bc019ed137b9020208fb8d5a40eb048dd63cae82320000000000000" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] HeaderValue="0D304B9B1BC019ED137B9020208FB8D5A40EB048DD63CAE82320" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.Share] [Share] "MerkleRoot"="5427777b5d1cbd8915ca34368db639560d13f4814025b2eb5a4995bd1e48fc1e" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Jobs.Job] [Job] CoinbaseInitial="02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2603d0552b062f503253482f03d5f81608" CoinbaseFinal="0d2f436f696e69756d536572762f0000000002007b9a17000000001976a914a6883cb5272c9d881f057da9c55223f18d824a7288ac00093d00000000001976a914a6883cb5272c9d881f057da9c55223f18d824a7288ac00000000" CreationTime=1505493303 Difficulty=491499.126544519 EncodedDifficulty="1a22225f" NTime="59bc0139" PreviousBlockHash="00000000000016ccacbd9cc5d14b1e3fc80efd78db50694d066a920c0d0240f1" PreviousBlockHashReversed="0d0240f1066a920cdb50694dc80efd78d14b1e3facbd9cc5000016cc00000000" Version="00000002" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Jobs.Job] [Job] Target="00000000000000000000000000000000000000000000005F2222" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Cryptology.Merkle.MerkleTree] [MerkleTree] Branches: 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Cryptology.Merkle.MerkleTree] [MerkleTree] Steps: 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Daemon.Responses.BlockTemplate] [BlockTemplate] Bits="1a22225f" Coinbasevalue=400000000 CurTime=1505493305 Height=2840016 MinTime=1505493056 NonceRange="00000000ffffffff" PreviousBlockHash="00000000000016ccacbd9cc5d14b1e3fc80efd78db50694d066a920c0d0240f1" SigOpLimit=20000 SizeLimit=1000000 Target="00000000000022225f0000000000000000000000000000000000000000000000" Version=2 Weightlimit=0Default_witness_commitment=null

09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Daemon.Responses.BlockTemplate] [BlockTemplate] Mutable: 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Daemon.Responses.BlockTemplate] [BlockTemplate] "time"

09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Daemon.Responses.BlockTemplate] [BlockTemplate] "transactions"

09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Daemon.Responses.BlockTemplate] [BlockTemplate] "prevblock"

09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Transactions.GenerationTransaction] [GenerationTransaction] "Final"="0d2f436f696e69756d536572762f0000000002007b9a17000000001976a914a6883cb5272c9d881f057da9c55223f18d824a7288ac00093d00000000001976a914a6883cb5272c9d881f057da9c55223f18d824a7288ac00000000" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Transactions.GenerationTransaction] [GenerationTransaction] "Initial"="02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2603d0552b062f503253482f03d5f81608" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Transactions.GenerationTransaction] [GenerationTransaction] "TxMessage"="1a687474703a2f2f7777772e636f696e6d696e65727a2e636f6d2f" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Transactions.GenerationTransaction] [GenerationTransaction] Version=2 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Transactions.GenerationTransaction] [GenerationTransaction] Inputs: 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Transactions.GenerationTransaction] [GenerationTransaction] input.PreviousOutput[4294967295].Hash="0000000000000000000000000000000000000000000000000000000000000000" 09/15/2017 17:35:54 +01:00 [Debug] [CoiniumServ.Shares.ShareManager] [Joulecoin] We thought a block was found but it was rejected by the coin daemon; [0000000000002023e8ca63dd48b00ea4d5b88f2020907b13ed19c01b9b4b300d] - reason; Block decode failed 09/15/2017 17:35:54 +01:00 [Error] [CoiniumServ.Server.Mining.Stratum.StratumService] [StratumService] Exception on mining.submit System.NullReferenceException: Object reference not set to an instance of an object. at CoiniumServ.Shares.ShareManager.SubmitBlock(IShare share) in C:\Users\James Henderson\Downloads\CoiniumServ-develop(2)\CoiniumServ-develop\src\CoiniumServ\Shares\ShareManager.cs:line 258 at CoiniumServ.Shares.ShareManager.HandleValidShare(IShare share) in C:\Users\James Henderson\Downloads\CoiniumServ-develop(2)\CoiniumServ-develop\src\CoiniumServ\Shares\ShareManager.cs:line 138 at CoiniumServ.Shares.ShareManager.ProcessShare(IStratumMiner miner, String jobId, String extraNonce2, String nTimeString, String nonceString) in C:\Users\James Henderson\Downloads\CoiniumServ-develop(2)\CoiniumServ-develop\src\CoiniumServ\Shares\ShareManager.cs:line 105 at CoiniumServ.Server.Mining.Stratum.StratumService.SubmitWork(String user, String jobId, String extraNonce2, String nTime, String nonce) in C:\Users\James Henderson\Downloads\CoiniumServ-develop(2)\CoiniumServ-develop\src\CoiniumServ\Server\Mining\Stratum\StratumService.cs:line 125

Here is the server log:

09/15/2017 17:35:54 +01:00 [Error] [CoiniumServ.Server.Mining.Stratum.StratumService] [StratumService] Exception on mining.submit System.NullReferenceException: Object reference not set to an instance of an object. at CoiniumServ.Shares.ShareManager.SubmitBlock(IShare share) in C:\Users\James Henderson\Downloads\CoiniumServ-develop(2)\CoiniumServ-develop\src\CoiniumServ\Shares\ShareManager.cs:line 258 at CoiniumServ.Shares.ShareManager.HandleValidShare(IShare share) in C:\Users\James Henderson\Downloads\CoiniumServ-develop(2)\CoiniumServ-develop\src\CoiniumServ\Shares\ShareManager.cs:line 138 at CoiniumServ.Shares.ShareManager.ProcessShare(IStratumMiner miner, String jobId, String extraNonce2, String nTimeString, String nonceString) in C:\Users\James Henderson\Downloads\CoiniumServ-develop(2)\CoiniumServ-develop\src\CoiniumServ\Shares\ShareManager.cs:line 105 at CoiniumServ.Server.Mining.Stratum.StratumService.SubmitWork(String user, String jobId, String extraNonce2, String nTime, String nonce) in C:\Users\James Henderson\Downloads\CoiniumServ-develop(2)\CoiniumServ-develop\src\CoiniumServ\Server\Mining\Stratum\StratumService.cs:line 125

All other config files are standard and setup near identical to my deutsch emark settings in the other issue post referenced at the top of this thread.

Thanks!

DecentralizeCoding commented 7 years ago

Just an update I managed to get Deutsche eMark coins working and am now mining. The fix was adding in the extra lines of code needed to the coin.json file as outlined in Bonesoul's readme on the coin.json files. However I am still having the issues with Joulecoin using the default config. I know it is POW but not POS so I havent added the hybrid string. Any ideas? Thanks!

DecentralizeCoding commented 7 years ago

All working now.

BaalMcKloud commented 7 years ago

What is the fix for it? Maybe it is usefull for others too.

DecentralizeCoding commented 7 years ago

Hi BaalMcKloud,

Sorry yes would have been a good idea.

Okay so first make your PNG image for the coin as DEM and put it into the web, content, img, coins folder as DEM.png remember to make it the same as other coins 24x24

Here is my config to get DEM working:

deutscheemark.json = file from coin directory

{ "name": "DeutscheEMark", "symbol": "DEM", "algorithm": "sha256", "site": "http://deutsche-emark.de/", "blockExplorer": { "block": "http://blockexplorer.deutsche-emark.org/block/", "tx": "http://blockexplorer.deutsche-emark.org/tx/", "address": "http://blockexplorer.deutsche-emark.org/address/" }, "options": { "isProofOfStakeHybrid": true, "blockTemplateModeRequired": false, "useDefaultAccount": true, "txMessageSupported": true
} }


deutscheemark.json from pool directory

{ "enabled": true, "coin": "deutscheemark.json", "daemon": { "host": "enter your wallet server here", "port": use your emark wallet port here, "username": "replace with your own username", "password": "replace with your own password" }, "wallet": { "address": "NXLBzpCmeswrSLk3TSrBQLvNDST1vVEpjb", "txfee": 0.01 }, "rewards": [ { "NaBJ7WgsiC5aeBfvwhzRcfuhU7bzSr6xbj": 1 } ], "stratum": { "port": enter your public stratum port you want to use for emark here }, "storage": { "hybrid": { "mysql": { "database": "enter in your database you want to use for emark here" } } } }

emark.conf = coin conf file for wallet (staking is turned off for public mining as it will affect payouts)

server=1 rpcuser=your rpc username rpcpassword=your rpc password rpcallowip=your rpc allow IP rpcallowip=127.0.0.1 rpcport=your rpc port staking=0

I hope this helps anyone else wanting to mine emark using CoiniumServ

Thanks!

Kind Regards,

James

DecentralizeCoding commented 7 years ago

As for Joulecoin this is what I use for my config:

coin conf for wallet: listen=1 server=1 rpcuser=change rpcpassword=change rpcallowip=change rpcallowip=127.0.0.1 rpcport=change port=26789

joulcoin.json = pool file: { "enabled": true, "coin": "joulecoin.json", "daemon": { "host": "127.0.0.1", "port": change, "username": "change", "password": "change" }, "wallet": { "address": "JZiUiSFysvuDbkMERZe3g5YThGDutbxrnj", "txfee": 0.01 }, "rewards": [ { "JNnUa7eBGubs5idvmCv3vRBSe2f8imsomu": 1 } ], "stratum": { "port": change }, "storage": { "hybrid": { "mysql": { "database": "change" } } } }

joulecoin.json = coin file: { "name": "Joulecoin", "symbol": "XJO", "algorithm": "sha256", "site": "http://www.jouleco.in/", "blockExplorer": { "block": "https://chainz.cryptoid.info/xjo/block.dws?", "tx": "https://chainz.cryptoid.info/xjo/tx.dws?", "address": "https://chainz.cryptoid.info/xjo/address.dws?" }, "options": { "isProofOfStakeHybrid": false, "blockTemplateModeRequired": false, "useDefaultAccount": false, "txMessageSupported": true
} }

Thanks and hope this helps!

BaalMcKloud commented 7 years ago

Thanks for posting. hopefully it will help others with this coins to get it working :)

DecentralizeCoding commented 7 years ago

No problem at all @BaalMcKloud happy to help out the community where I can :) Cheers!