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?