zkevm-circuits icon indicating copy to clipboard operation
zkevm-circuits copied to clipboard

Handle coinbase block rewards

Open ed255 opened this issue 2 years ago • 2 comments
trafficstars

See https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/f185b1276b67b730448724930b33c72a342ad96a/zkevm-circuits/src/evm_circuit/execution/end_block.rs#L89-L91

Investigate current execution client behavior and see if this applies and how feasible is to solve it now.

ed255 avatar Feb 14 '23 11:02 ed255

btw i noticed this line may not be correct?

https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/1691c53e68754279ae2654747a4c47f78a9eeb34/bus-mapping/src/evm/opcodes.rs#L601

coinbase_balance_prev + effective_tip * (state.tx.gas - exec_step.gas_left.0 - effective_refund);

lispc avatar Feb 27 '23 04:02 lispc

Ah just saw this, you are right, now I see the refund is added back to gas left so the reward to coinbase should minus that.

han0110 avatar Mar 06 '23 14:03 han0110