From Gavin Wood's yellow paper:
In general, Ether used to purchase gas that is not refunded is delivered to the beneficiary address, the address of an account typically under the control of the miner.
This looks like a way to tip the miner. I'm trying to understand how it works.
Inside a transaction, there are:
valuefield is the amount of ether to transfer to the recipient. So the tip paid to the beneficiary shouldn't be included here.gasLimitfield is the max gas to pay the gas costs of the contract steps. Any unused gas will be re-funded. Is there a mechanism for the sender to say to miner: "Hey why don't you keep the change? "
I looked at other fields but they all seem to be unrelated. So how does this work?
Also, since sender can set gasPrice higher which can be a way to tip the miner, so what's the point of including another way of tipping?
Thanks!
It is named gasLimit since any unused gas at the end of the transaction is refunded (at the same rate of purchase) to the sender’s account.So the transaction fee (that goes to miner beneficiary) should be equal to actually used amount of gas timesgasPriceand the rest will be refunded. Is that right? – user10375 Jun 12 '17 at 12:24