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

eip 7840 implementation #7964

Merged
merged 105 commits into from
Jan 24, 2025
Merged

eip 7840 implementation #7964

merged 105 commits into from
Jan 24, 2025

Conversation

yerke26
Copy link
Contributor

@yerke26 yerke26 commented Dec 23, 2024

Closes #9129

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.

Copy link
Contributor

@smartprogrammer93 smartprogrammer93 left a comment

Choose a reason for hiding this comment

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

looks good, but please add tests.

Copy link
Contributor

@smartprogrammer93 smartprogrammer93 left a comment

Choose a reason for hiding this comment

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

Also, as discussed. i dont think we need the EIP7840 enabled. we can just replace the constants with whatever we push in the chainspec for the cancun through the same mechanism

@yerke26 yerke26 requested a review from rubo as a code owner December 30, 2024 12:02
"terminalTotalDifficulty": "231707791542740786049188744689299064356246512"
"terminalTotalDifficulty": "231707791542740786049188744689299064356246512",
"blobSchedule": {
"cancun": {
Copy link
Member

Choose a reason for hiding this comment

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

Don't like it to be honest it is inconsistent with our previous chainspecs. EIP's shouldn't define internal stuff. Should we consider going to timestamps @MarekM25 ?

{
if (_logger.IsTrace) _logger.Trace($"Declining {blobTx.ToShortString()}, no more blob space. Block already have {blobGasCounter} blob gas which is max value allowed.");
break;
}

checkedBlobTransactions++;

ulong txBlobGas = (ulong)(blobTx.BlobVersionedHashes?.Length ?? 0) * _eip4844Config.GasPerBlob;
if (txBlobGas > _eip4844Config.MaxBlobGasPerBlock - blobGasCounter)
ulong txBlobGas = (ulong)(blobTx.BlobVersionedHashes?.Length ?? 0) * Eip4844Constants.GasPerBlob;
Copy link
Member

Choose a reason for hiding this comment

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

This looks to me like it should be an extension method on Transaction object

src/Nethermind/Nethermind.Evm/VirtualMachine.cs Outdated Show resolved Hide resolved
tools/SendBlobs/SendBlobs.csproj Show resolved Hide resolved
yerke26 and others added 5 commits January 23, 2025 21:28
# Conflicts:
#	src/Nethermind/Nethermind.Specs.Test/ChainSpecStyle/ChainSpecBasedSpecProviderTests.cs
#	src/Nethermind/Nethermind.Specs/ChainSpecStyle/ChainSpecBasedSpecProvider.cs
@MarekM25 MarekM25 merged commit a453048 into master Jan 24, 2025
79 checks passed
@MarekM25 MarekM25 deleted the eip-7840 branch January 24, 2025 14:08
brbrr pushed a commit that referenced this pull request Jan 27, 2025
Co-authored-by: MarekM25 <[email protected]>
Co-authored-by: Tanishq Jasoria <[email protected]>
@brbrr brbrr added this to the 1.31.0 milestone Jan 27, 2025
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