-
Notifications
You must be signed in to change notification settings - Fork 20.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
core: implement eip-7623: increase calldata cost #29040
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
)
} |
closing this in favor of #30946 |
Draft implementation for discussion