Reputation: 151
How the validators are receiving money in their account.? How gas price amount get deduced from the user account to validator accounts. ? And how to check the balances of user account and validator account , before and after.?
Upvotes: 1
Views: 975
Reputation: 21
How the validators are receiving money in their account?
Validators do not receive "money". In the Cosmos Hub (Gaia), which uses the x/distribution
module in the Cosmos-SDK. This module implements the F1 distribution spec. In this spec, it is defined that validators earn inflation rewards, part of the globally collected fees and a possible commission (if they charge it). So to answer your question, the hub does lazy accounting where it tracks how many rewards a validator and its delegates earn on a block-by-block basis.
Validators and their delegates can withdraw these rewards at any time.
How gas price amount get deduced from the user account to validator accounts?
Fees are deducted from the fee paying account during the AnteHandler
execution during DeliverTx
. Every tx has a dedicated fee payer -- typically the first signer of the tx.
And how to check the balances of user account and validator account , before and after?
There exist APIs, in addition to the CLI, that allows you to query the balance of an address. You can easily search or google for these APIs.
Upvotes: 2