-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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-2242 Transaction postdata #2242
Conversation
* Add EIP draft for transaction postdata. * Minor fixes and wording cleanups. * Assign EIP number and add discussion. * Rename file.
* Add EIP draft for transaction postdata. * Minor fixes and wording cleanups. * Assign EIP number and add discussion. * Rename file.
1. `version` is `0`. | ||
1. `data` is an RLP-encoded list of binary data. This EIP does not interpret the data in any way, simply considering it as a binary blob, though future EIPs may introduce different interpretation schemes for different values of `version`. | ||
|
||
The gas cost of the posted data is `1 gas per byte`. This cost is deducted from the `startGas`; if the remaining gas is non-positive the transaction immediately reverts with an out of gas exception. |
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.
Why would the postdata
be priced differently from calldata
? It is using precisely the same resources - network bandwidth and transaction history space - to precisely the same extent. Note that the EVM only "sees" calldata if it uses CALLDATALOAD
or CALLDATACOPY
, each of which have their own associated gas cost in addition to the cost for the presence of the data. So, calldata that is not read by the EVM is identical to your proposed postdata, and probably should be priced the same.
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.
it does not have to be loaded to memory at the time of execution and does not have to be included in witnesses and so on
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.
What @tkstanczak said above. Additionally, there is a simultaneous suggestion to reduce the gas cost of calldata to around 2 gas per byte as well (see: ethereum/pm#159). It might be a good idea though to set the gas price of post data proportional to calldata instead of fixed.
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.
it does not have to be loaded to memory at the time of execution
Neither does call data - I covered this point in my comment.
does not have to be included in witnesses
OK, this is true, but not relevant to Eth1 as it currently exists, right?
* Add EIP draft for transaction postdata. * Minor fixes and wording cleanups. * Assign EIP number and add discussion. * Rename file.
* Add EIP draft for transaction postdata. * Minor fixes and wording cleanups. * Assign EIP number and add discussion. * Rename file.
No description provided.