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.?
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.?
Validators do not receive "money". In the Cosmos Hub (Gaia), which uses the
x/distributionmodule 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.
Fees are deducted from the fee paying account during the
AnteHandlerexecution duringDeliverTx. Every tx has a dedicated fee payer -- typically the first signer of the tx.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.