z-classic / z-nomp

z-nomp is mining pool software for Zcash and Zclassic so you can create internet money in your home!
MIT License
288 stars 441 forks source link

Strange payment behavior #334

Closed bnuccio closed 6 years ago

bnuccio commented 6 years ago

Mining BTCZ. Everything generally works very well.

But payments are really screwing with me. I made 1 change to paymentprocessor.js and that was to not limit unshielding to 100 at a time.

I set minconf to 100. And stocked up my send address with coins. Block hits 100 confirmations, matures, and payment can be sent from my prefund immediately. Reason I preloaded is after 100 confirmation at the block matures, it immediately gets shielded at the 2.5 minute wallet setting . But from here it wants 100 confirmations to unshield to the tsending address, and then another 100 confirmations here before it will allow these coins to pay out.

But what it is doing is sending all the coins in my sending address, the miners get paid, but end with a bunch of coins in a random address.

We can see here. You can see the 3 miners that got paid, but 29724.70004038 BTCZ should of been left in the wallet I would of thought.

https://explorer.bitcoinz.site/tx/78b162942bb7c280379afc81e552d26aa6dc16c5ff14a90a3e1b3ae53a6684b5

The even stranger part is I set my rewardRecipients pool fee to the payout address also, but that was left. It was the same transaction, so it hit 100 confirmations at the same time.

Also nothing listed in zcash-cli listtransactions about those 29,000 coins being sent.

Looked through the code and it appears to just do a send many to the address with their amount.

And lastly, I see this note in the section where the payment will fail due to not enough coins -

"Fund pool wallet with coins to prevent this from happening"

Does anyone have any insight into this? Or perhaps experienced this? To be honest I have no idea how that would even be possible. How can you send someone 50 coins, but actually send 500 to have 450 returned?

I guess I could go ahead and set minconf to 10. The block doesn't mature for 100 confirmations. And then another 10+10 until payout happens. Going to leave it for now (will put around 15,000 in the payout address) and see what happens next block.

Thanks in advance for any help.

bnuccio commented 6 years ago

Never mind, this is expected behavior. False alarm!

Just set it to 10 minconf, it shouldn't add too much time to the payout.