-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EIP: Coinbase Calls #2474
EIP: Coinbase Calls #2474
Conversation
There has been no activity on this pull request for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor formatting adjustments, but otherwise looks good to merge. @3esmit is this still desired given that EIP-1559 is likely to make it so miners have to pay some amount for gas?
Co-authored-by: Micah Zoltu <micah@zoltu.net>
Co-authored-by: Micah Zoltu <micah@zoltu.net>
This pull request was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment. |
It looks like there was activity after the initial stale notice, so this shouldn't have been closed? |
Hmm, good point... |
@3esmit Waiting to merge this until I heard back from you on #2474 (review) |
@MicahZoltu This shouldn't relate to EIP-1559. This EIP is likely being replaced by #2938 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@3esmit Would you prefer to close this PR in favor of Account Abstraction, or do you still want to pursue this separate from AA? If you want to pursue it, accept the suggested code change so the bot green lights and then @mention me so I remember to come back and merge. 😄
Co-authored-by: Micah Zoltu <micah@zoltu.net>
@MicahZoltu Ok, you can merge. For now we can left it as draft. Once AA gets defined/final, then move this to "abandoned". |
Allow contracts to be called directly by block.coinbase (block validator), without a transaction.
Allow contracts to be called directly by block.coinbase (block validator), without a transaction.
Simple Summary
Allow contracts to be called directly by
block.coinbase
(block validator), without a transaction.Abstract
In proof-of-work blockchains, validators are known as miners.
The validator might want to execute functions directly, without having to sign a transaction. Some examples might be presenting a proof in a contract for an change which also benefits the validator.
A notable example would be when a validator want to act as an EIP-1077 Gas Relayer, incentivized to pick up fees from meta transactions.
Without this change, they can do so by signing from any address a
gasPrice = 0
transaction with the gas relayed call.However this brings an overhead of a signed transaction by validator that does nothing, as
msg.sender
is never used, and there is no gas cost to EVM charge.This proposal makes possible to remove this unused ecrecover.
Motivation
In order to reduce the overhead of calls that don't use
msg.sender
and are being called by validator withtx.gasPrice = 0
.Specification
The calls to be executed by
block.coinbase
would be included first at block, and would consume normally the gas of block, however they won't pay/cost gas, instead the call logic would pay the validator in other form.Would be valid to execute any calls without a transaction by the block coinbase, except when the validator call tries to read
msg.sender
, which would throw an invalid jump.Calls included by the validator would have
tx.origin = block.coinbase
andgas.price = 0
for the rest of call stack, the rest follows as normal calls.Rationale
TBD
Backwards Compatibility
tx.origin = block.coinbase
could cause some issues on bad designed contracts, such as usingtx.origin
to validate a signature, an analysis on how contracts use tx.origin might be useful to decide if this is a good choice.Test Cases
TBD
Implementation
TBD
Security Considerations
TBD
Copyright
Copyright and related rights waived via CC0.