gasLimit & min cost
Last updated
Last updated
gasLimit
amount of gas that was implicitly purchases from the sender's account balance. basically, how much gas that has to be set aside for the transaction.
txn is considered invalid if balance cannot support such a purchase
any unused gas at the end of the txn is refunded
Why?
The nodes cannot look a txn and know how much gas it will require beforehand.
They have to compute it to know much it will require. So it makes more sense for the customer to set a reasonably high gas limit that would cover the gas costs for a txn.
The execution of a transaction defines a state transition. To that end, any transactions executed must first pass the initial tests of intrinsic validity, as mentioned in the yellow paper. These tests require 21,000 gas.
Therefore, every transaction costs at least 21,000 gas