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

Implement EIP-7623: Increase calldata cost #7539

Open
wants to merge 571 commits into
base: master
Choose a base branch
from
Open

Conversation

tanishqjasoria
Copy link
Contributor

@tanishqjasoria tanishqjasoria commented Oct 2, 2024

Resolves #7527

https://eips.ethereum.org/EIPS/eip-7623

Changes

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Optional. Remove if not applicable.

Documentation

Requires documentation update

  • Yes
  • No

If yes, link the PR to the docs update or the issue with the details labeled docs. Remove if not applicable.

Requires explanation in Release Notes

  • Yes
  • No

If yes, fill in the details here. Remove if not applicable.

Remarks

Optional. Remove if not applicable.

MarekM25 and others added 30 commits May 15, 2024 15:24
Co-authored-by: Ben Adams <[email protected]>
Co-authored-by: Kamil Chodoła <[email protected]>
Co-authored-by: nethermind-machine <[email protected]>
Co-authored-by: LukaszRozmej <[email protected]>
Co-authored-by: Daniel Kyutae Jung <[email protected]>
Co-authored-by: Ahmad Bitar <[email protected]>
Co-authored-by: Lukasz Rozmej <[email protected]>
Co-authored-by: Amirul Ashraf <[email protected]>
Co-authored-by: yerke26 <[email protected]>
Co-authored-by: yeerke <[email protected]>
Co-authored-by: Ruben Buniatyan <[email protected]>
Co-authored-by: Alexey <[email protected]>
Co-authored-by: Nikita Mescheryakov <[email protected]>
Co-authored-by: Lautaro Emanuel <[email protected]>
Co-authored-by: Marcos Antonio Maceo <[email protected]>
Co-authored-by: ak88 <[email protected]>
Co-authored-by: Yaroslav Kukharuk <[email protected]>
Co-authored-by: Marek Moraczyński <[email protected]>
Co-authored-by: Ahmad Bitar <[email protected]>
Co-authored-by: Oleg Jakushkin <[email protected]>
Co-authored-by: Kamil Chodoła <[email protected]>
Co-authored-by: healthyyyoung <[email protected]>
@tanishqjasoria tanishqjasoria marked this pull request as ready for review October 3, 2024 12:06
Copy link
Contributor

@MarekM25 MarekM25 left a comment

Choose a reason for hiding this comment

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

Don't merge, we need to merge 7702 at first

// This is unnecessarily calculated twice - at validation and execution times.
transaction.GasLimit < IntrinsicGasCalculator.Calculate(transaction, releaseSpec)
var intrinsicGas = IntrinsicGasCalculator.Calculate(transaction, releaseSpec, out var floorGas);
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if there's a more elegant way to handle this than using an out parameter. For example, the IntrinsicGasCalculator could encapsulate the transaction validation logic within the class itself.

src/Nethermind/Nethermind.Evm/IntrinsicGasCalculator.cs Outdated Show resolved Hide resolved
src/Nethermind/Nethermind.Evm/IntrinsicGasCalculator.cs Outdated Show resolved Hide resolved
@@ -343,7 +344,7 @@ protected TransactionResult ValidateStatic(
return "EIP-3860 - transaction size over max init code size";
}

return ValidateGas(tx, header, intrinsicGas, validate);
return ValidateGas(tx, header, Math.Max(intrinsicGas, floorGas), validate);
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see it is needed here. Perhaps, out is the best solution then, but think about it

Base automatically changed from pectra_fix_7702_after_merge to master October 7, 2024 14:00
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.

6 participants