Skip to content
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

master -> rskip351+rskip144 merge #2755

Merged
merged 99 commits into from
Sep 26, 2024

Conversation

Vovchyk
Copy link
Contributor

@Vovchyk Vovchyk commented Sep 25, 2024

Description

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Tests for the changes have been added (for bug fixes / features)
  • Requires Activation Code (Hard Fork)

fed:rskip351+rskip144

asoto-iov and others added 30 commits May 23, 2024 15:50
…multi_factory

feat(smgp): implements eth_call exchange rate provider
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
In order to have the RIT tests working as we have it today, we need to add triggers for
every commit and for when the PR is opened, but only for masters and *-rc branches base branches.
* 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 <[email protected]>
Co-Authored-By: Vovchyk <[email protected]>
* 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 <[email protected]>
Co-Authored-By: Vovchyk <[email protected]>
…ksmart/rskj into feature/introduce_initcode_size_limit
fmacleal and others added 22 commits September 19, 2024 16:12
…e_limit

Initial constants and config for the max initcode size
…-fix

fix(MaxInitcodeSize): fix NPE in transactionCost() method
chore: increase min supported java version to 17
@Vovchyk Vovchyk requested review from a team as code owners September 25, 2024 13:52
Copy link

sonarcloud bot commented Sep 26, 2024

Copy link
Contributor

@fmacleal fmacleal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Vovchyk Vovchyk merged commit ebc5664 into rskip351+rskip144 Sep 26, 2024
7 checks passed
@Vovchyk Vovchyk deleted the vovchyk/master-rskip351+rskip144-merge branch September 26, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants