-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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
core: implement eip-7623: increase calldata cost #29040
base: master
Are you sure you want to change the base?
Conversation
The floor implementation looks like it's counting bytes rather than tokens?
What I think you want is something like:
|
Yep, you're right. We have not had the concept of tokens yet, so I got a bit confused. edit: (nvm, the contract creation gas is still in the max, fixing...) |
b04762c
to
2071539
Compare
36a3d65
to
9793cfc
Compare
the current implementation doesn't seems to match the specification on https://github.com/ethereum/EIPs/blob/a7fb2260ae2ea39bdd31886832c9e45452d0e76a/EIPS/eip-7623.md In the EIP, the new formula is tx.gasUsed = {
21000 \
+
max (
STANDARD_TOKEN_COST * tokens_in_calldata \
+ evm_gas_used \
+ isContractCreation * (32000 + InitCodeWordGas * words(calldata)),
TOTAL_COST_FLOOR_PER_TOKEN * tokens_in_calldata
)
} This implementation looks like tx.gasUsed = {
21000 \
+ evm_gas_used \
+ isContractCreation * (32000 + InitCodeWordGas * words(calldata)) \
+ max (
STANDARD_TOKEN_COST * tokens_in_calldata ,
TOTAL_COST_FLOOR_PER_TOKEN * tokens_in_calldata
)
} |
Draft implementation for discussion