ethereum / solidity

Solidity, the Smart Contract Programming Language
https://soliditylang.org
GNU General Public License v3.0
23.29k stars 5.77k forks source link

block.coinbase should not be payable #10692

Open thegostep opened 3 years ago

axic commented 3 years ago

Good catch, the coinbase does not need to be actually payable, since the "coinbase transaction" is not executing any code.

thegostep commented 3 years ago

there are use cases where you would want to send eth to the miner

see: https://ethresear.ch/t/flashbots-frontrunning-the-mev-crisis/8251

leonardoalt commented 3 years ago

@thegostep given your last comment, are you suggesting it should or should not be payable?

thegostep commented 3 years ago

I think it should default to non-payable for consistency but still work with payable(block.coinbase).transfer()

cameel commented 3 years ago

I guess this should have been changed in 0.8.0 along with the types of the other addresses. Do we consider it a bug or just a missing feature?

chriseth commented 3 years ago

It doesn't actually hurt anyone, so I would just schedule for 0.9