-
Notifications
You must be signed in to change notification settings - Fork 266
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
Initial constants and config for the max initcode size #2627
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8969bd9
to
3fd6e2d
Compare
3fd6e2d
to
8b74286
Compare
asoto-iov
previously approved these changes
Aug 7, 2024
Vovchyk
previously approved these changes
Aug 7, 2024
8b74286
to
482204c
Compare
482204c
to
59943d6
Compare
nagarev
previously approved these changes
Aug 26, 2024
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.
LGTM!
pipeline:run |
59943d6
to
319d678
Compare
In order to implement the verification of initcode size, necessary for the RSKIP438, we need the constant value with the max allowed value. So we can start to validate and use it on the logic of the verification
319d678
to
f5da98a
Compare
* Initial constants and config for the max initcode size In order to implement the verification of initcode size, necessary for the RSKIP438, we need the constant value with the max allowed value. So we can start to validate and use it on the logic of the verification - Adding scenarios of test for the contract creation with DSL - The validation for the initCode size test was added - The validation is based on the RSKIP that enables it - Validation added for the contractCreation during transaction execution Finished the implementation of transactionCost and initcode size validation - All the logic related with transaction cost was changed to meet the new cost criteria - More tests were added to be sure that the flow is following the RSKIP438 - Tests were added to validate that this cost and validation doesn't impact before reach the activation height Applied some suggestions from review Adding tests to validate the failure if we don't have enough gas to cover initCode * Refactor from the Initcode cost calculation In order to have the exact same logic for the initcode cost calculation, we introduced some new classes that can be easily reused by the TransactionExecutor and VM classes. This way, if this logic change, we won't have to change the code in multiple places. It was also introduced an interface for it, so we can expand this idea and in the future, be able to calculate total transactions just calling a method to calculate it independent of the logic used. * Applying some more suggestions from review Co-Authored-By: Nazaret García Revetria <nazaret@iovlabs.org> Co-Authored-By: Vovchyk <volodymyr.kravets@outlook.com>
236401e
to
6a0e6e1
Compare
* Initial constants and config for the max initcode size In order to implement the verification of initcode size, necessary for the RSKIP438, we need the constant value with the max allowed value. So we can start to validate and use it on the logic of the verification - Adding scenarios of test for the contract creation with DSL - The validation for the initCode size test was added - The validation is based on the RSKIP that enables it - Validation added for the contractCreation during transaction execution Finished the implementation of transactionCost and initcode size validation - All the logic related with transaction cost was changed to meet the new cost criteria - More tests were added to be sure that the flow is following the RSKIP438 - Tests were added to validate that this cost and validation doesn't impact before reach the activation height Applied some suggestions from review Adding tests to validate the failure if we don't have enough gas to cover initCode * Refactor from the Initcode cost calculation In order to have the exact same logic for the initcode cost calculation, we introduced some new classes that can be easily reused by the TransactionExecutor and VM classes. This way, if this logic change, we won't have to change the code in multiple places. It was also introduced an interface for it, so we can expand this idea and in the future, be able to calculate total transactions just calling a method to calculate it independent of the logic used. * Applying some more suggestions from review Co-Authored-By: Nazaret García Revetria <nazaret@iovlabs.org> Co-Authored-By: Vovchyk <volodymyr.kravets@outlook.com>
…ksmart/rskj into feature/introduce_initcode_size_limit
pipeline:run |
Vovchyk
previously approved these changes
Sep 9, 2024
|
Vovchyk
approved these changes
Sep 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to implement the verification of initcode size, necessary for the RSKIP438, we need the constant value with the max allowed value. So we can start to validate and use it on the logic of the verification
Description
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: