Fees & Gas
On the Secret Network gas is a special unit used for tracking the the use of resources during code execution (usually paid by the transaction sender). Gas fees are normally paid to execute read / write commands, but can also be used to pay for more resource intensive computational tasks.
Gas primarily serves two purposes:
To ensure each block is not over consuming resources, and that each block will be finalized on-chain. The cost of
gasconsumed duringmessageexecution results in afeewherefees = gas * gas-prices.To prevent end-users from spamming and abusing the Secret Network. Most applications implement fee mechanisms to prevent spam, but the
secretclidoes not enforce gas pricing by default.
Each transaction supplies fees or gas prices, but never both.
Validator's have a minimum gas price (multi-denom) configuration used to determine if they should include a transaction in a block during CheckTx, where gasPrices >= minGasPrices.
Note: Transactions must supply fees greater than or equal to any fees set by validators. Validators may start to prioritize transactions by gasPrice in the mempool, increasing transaction priority based on fees or gas prices.
e.g.
# secretcli tx bank send [from_key_or_address] [to_address] [amount] [flags]
secretcli tx bank send ... --fees=50000uscrtor
secretcli tx bank send ... --gas-prices=0.0125uscrtLast updated
Was this helpful?