-
Notifications
You must be signed in to change notification settings - Fork 463
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-3860 Max init code size limit and extra gas charge #4740
Conversation
@@ -57,6 +57,11 @@ private static long DataCost(Transaction transaction, IReleaseSpec releaseSpec) | |||
} | |||
} | |||
|
|||
if (transaction.IsContractCreation && releaseSpec.IsEip3860Enabled) | |||
{ | |||
dataCost += EvmPooledMemory.Div32Ceiling((ulong)transaction.Data.Length) * GasCostOf.InitCodeWord; |
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 ulong cast and not directly to UInt256?
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.
In all the occurances I found when Div32Ceiling was called for an int parameter, it was cast to ulong.
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.
Resolves #4588
Changes:
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyTesting
Requires testing
In case you checked yes, did you write tests??
Comments about testing , should you have some (optional)
Further comments (optional)
Implements EIP-3860 which is still draft.