blackmennewstyle / miningcore

Miningcore is a high-performance Mining Pool Software for Linux and Windows.
MIT License
17 stars 34 forks source link

Payments not being input into database #95

Closed Arcazulus closed 4 months ago

Arcazulus commented 4 months ago

Describe the bug Whenever a block is accepted and payment is made, no data for payments is added into the postgres database table for payments. blocks are being entered though. payments are being sent to miner as well.

To Reproduce unsure how to reproduce as I did a standard install/setup for miningcore.

Expected behavior I would expect when the daemon is called to pay miners that the process would also update the database.

Additional context I am confused as to how some of the database functions work but others don't. so it would appear I am getting connected to postgres just fine. I am not experienced in diagnosing stuff like this. so if I could get some pointers as what to inspect.

blackmennewstyle commented 4 months ago

Hi there,

It's very unlikely that payments are not being recorded in the database unless you have some database connexion issues, unstable network maybe?

Please consider providing more info about your server configuration/architecture.

Also, keep in mind if you have networking issue, the code can't fix that for you.

Arcazulus commented 4 months ago

emptypayments

Arcazulus commented 4 months ago

Everything is running on same machine (Dell Workstation with Xeon, Ubuntu 22.04), so networking isn't an issue with database connection. All other tables are working as expected.

blackmennewstyle commented 4 months ago

This is a very first, i'm running almost 30 coins on my pools and i always had my payments table being incremented with data.

May i ask which coin you are running?

Also miningcore has log feature, did you enable it? That would help tremendously, I need data mate.

Arcazulus commented 4 months ago

[2024-02-28 18:55:15.0502] [I] [PayoutManager] Processing payments for pool kls1 [2024-02-28 18:55:15.0586] [I] [kls1] [Kaspa Payout Handler] Block 9977543 uses a custom minimum confirmations calculation [110] [2024-02-28 18:55:15.0586] [D] [kls1] [Kaspa Payout Handler] Block 9977543 contains child: de35de9abc40fb99f4fb2f514552df7bed69ec1f8f9e5be72f6da28251c8b1c7 [2024-02-28 18:55:15.0609] [D] [kls1] [Kaspa Payout Handler] Block 9977543 - block child 9977544 [de35de9abc40fb99f4fb2f514552df7bed69ec1f8f9e5be72f6da28251c8b1c7] provides 50 KLS => KLS address: karlsen:qzrdw3unkem0wawy7r9suths93y8292vdc8yu8wtm9tpfchahdak50y4hcqf7 [karlsen:qzrdw3unkem0wawy7r9suths93y8292vdc8yu8wtm9tpfchahdak50y4hcqf7] [2024-02-28 18:55:15.0609] [D] [kls1] [Kaspa Payout Handler] Block 9977543 contains child: 2587cff3a2d7374144380023db2bdd2ed3963622ee4c25b02e53629333879ed3 [2024-02-28 18:55:15.0609] [D] [kls1] [Kaspa Payout Handler] Block 9977543 - block child 9977544 [2587cff3a2d7374144380023db2bdd2ed3963622ee4c25b02e53629333879ed3] provides 0 KLS [2024-02-28 18:55:15.0609] [D] [kls1] [Kaspa Payout Handler] Block 9977543 contains child: 887552319a95bc689999b302ca02d08df3a6da8fa0e6dd21713666f6c79dc24b [2024-02-28 18:55:15.0609] [D] [kls1] [Kaspa Payout Handler] Block 9977543 - block child 9977544 [887552319a95bc689999b302ca02d08df3a6da8fa0e6dd21713666f6c79dc24b] provides 0 KLS [2024-02-28 18:55:15.0609] [I] [kls1] [Kaspa Payout Handler] Unlocked block 9977543 worth 50 KLS [2024-02-28 18:55:15.0609] [I] [PayoutManager] Processing payments for pool kls1, block 9977543 [2024-02-28 18:55:15.0659] [I] [SOLO Payment] Crediting karlsen:qrngkachw6lxppqykhmd3x4p3qd4jqfquqjw6lrgrht0cxe6x2um74s9jckqd with 50 KLS for block 9977543 [2024-02-28 18:55:15.0659] [I] [SOLO Payment] Deleting 178 discarded shares for karlsen:qrngkachw6lxppqykhmd3x4p3qd4jqfquqjw6lrgrht0cxe6x2um74s9jckqd [2024-02-28 18:55:15.0846] [I] [kls1] [Kaspa Payout Handler] Paying 50 KLS to 1 addresses [2024-02-28 18:55:15.0846] [I] [kls1] [Kaspa Payout Handler] Validating addresses... [2024-02-28 18:55:15.0846] [D] [kls1] [Kaspa Payout Handler] Address karlsen:qrngkachw6lxppqykhmd3x4p3qd4jqfquqjw6lrgrht0cxe6x2um74s9jckqd with amount [50 KLS] That's with logging in debug mode. it throws no errors. I am running only the one coin (Karlsen)

Arcazulus commented 4 months ago

If there is any other data you require. let me know.. if I knew what data would help you with this issue. then I would know how to fix it myself as well. :)

blackmennewstyle commented 4 months ago

You actually did not provide enough, the interesting part was later on.

Arcazulus commented 4 months ago

I guess I am unsure what more to tell you, I have shown you what is going on. It's running on bare metal Ubuntu Server 22.04, psql 14.11, it's submitting data to the other tables besides payments

API is showing "totalPaid": 0, and "paymentProcessing": { "enabled": true, "minimumPayment": 1, "payoutScheme": "SOLO", "payoutSchemeConfig": [ [ [] ] ], "extra": {} }

blocks are being hit, payouts to miner wallets are happening. miningcore log is not showing any errors as I have shown. I am not a coder so for me to be able to demonstrate anymore data, I would first need to know what it is you want to see.

blackmennewstyle commented 4 months ago

I'm trying to help you the best i can but i need data in order to narrow down if there is an issue or not.

I was trying to save us time. The log is very verbose in debug mode, normally there should be a transaction id returned by the node if payments are truly being sent to miners. It's the data i was seeking here but you are not very cooperative sadly.

Were you by any chance mining with the wallet address you have in the pool config.json?

Arcazulus commented 3 months ago

Yeah, that is exactly what I was doing. I was mining to the pool fee address.

blackmennewstyle commented 3 months ago

You should not mine with the pool address, the pool address should be only used by miningcore and not by mining software.

The table was not filled because there are no paiement needed to be made since the funds are aready where they should be.

If you start using an address which does not belong to the pool wallet, you will see that table being filled properly.

Next time take a deep breath and don't get mad at the person who coded and is trying to help you.

Enjoy your week 🙏🏽💪🏽