Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR - Get Pooling Wallet Balance #99

Open
bhorvitz opened this issue Jul 18, 2023 · 4 comments
Open

FR - Get Pooling Wallet Balance #99

bhorvitz opened this issue Jul 18, 2023 · 4 comments

Comments

@bhorvitz
Copy link

Confirmed with clydewallace22 in #support on discord that if self-pooling and a Pool Wallet has Wallet ID 2, chia_wallet_confirmed_balance{wallet_id="2"} will return a 0 balance, even if there is xch in the wallet.

Additionally, confirmed that chia_wallet_confirmed_balance{wallet_type="9"} also returns 0 if there is a balance in the pooling wallet.

FR is a metric to be able to retrieve Pool Wallet balance

@cmmarslender
Copy link
Contributor

@bhorvitz Can you provide the output of chia rpc wallet get_wallet_balance '{"wallet_id":2}' (update wallet ID to the id of the pooling wallet, if it isn't actually 2).

@bhorvitz
Copy link
Author

Here you can see the RPC query and exporter data don't align:
$ chia rpc wallet get_wallet_balance '{"wallet_id":2}'
{ "success": true, "wallet_balance": { "confirmed_wallet_balance": 1750000000000, "fingerprint": 1206818994, "max_send_amount": 0, "pending_change": 0, "pending_coin_removal_count": 0, "spendable_balance": 1750000000000, "unconfirmed_wallet_balance": 1750000000000, "unspent_coin_count": 2, "wallet_id": 2, "wallet_type": 9 } }

image

But if I look at a different wallet_id they do:
$ chia rpc wallet get_wallet_balance '{"wallet_id":5}'
{ "success": true, "wallet_balance": { "asset_id": "a628c1c2c6fcb74d53746157e438e108eab5c0bb3e5c80ff9b1910b3e4832913", "confirmed_wallet_balance": 42000, "fingerprint": 1206818994, "max_send_amount": 42000, "pending_change": 0, "pending_coin_removal_count": 0, "spendable_balance": 42000, "unconfirmed_wallet_balance": 42000, "unspent_coin_count": 1, "wallet_id": 5, "wallet_type": 6 } }

image

@bhorvitz
Copy link
Author

This gets more interesting. Now there is more balance in the Pool Wallet (added current time for alignment with the Grafana output):

$ date
Thu Jul 20 11:12:23 AM PDT 2023
$ chia rpc wallet get_wallet_balance '{"wallet_id":2}'
{
    "success": true,
    "wallet_balance": {
        "confirmed_wallet_balance": 5250000000000,
        "fingerprint": 1206818994,
        "max_send_amount": 0,
        "pending_change": 0,
        "pending_coin_removal_count": 0,
        "spendable_balance": 5250000000000,
        "unconfirmed_wallet_balance": 5250000000000,
        "unspent_coin_count": 4,
        "wallet_id": 2,
        "wallet_type": 9
    }
}

It shows a previous balance:
image

@cmmarslender
Copy link
Contributor

I suspect the event we listen to to know to re-check the wallet balances isn't fired when there is a new reward available to claim in the pooling wallets, but will have to dig in a bit to confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants