This is an extended question to What is "gas" and transaction fee in Ethereum?.
Who gets paid and how much does the caller pay?
Let's make some assumptions:
- There is a function
Fwhich costs1,000 gas; - There are 2 miners,
M1andM2;- Their gas prices are
1 GWei/gasand2 GWei/gasrespectively;
- Their gas prices are
- There is an external address
A.
The questions are:
- When a caller
AinvokesF, how much doesAneed to pay (ignoring data transfer fees)? - Is it the total (
3 kGWei) or is it determined by whoever mines it first (1 kGWeior2 kGWei)? - If
M1mines it first, willM2just trust the result or will it do it all over again to check the correctness?- Then
M2should also get paid, right?
- Then
- Will the result be stored in all full nodes, or just the miner nodes, or just the miner nodes that are "willing" to store it (with matching gas price)?
- Then other nodes should get paid too?