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

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

eip 7840 implementation #7964

wants to merge 43 commits into from

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
@@ -20,7 +20,7 @@ public class PooledTxsRequestor(ITxPool txPool, ITxPoolConfig txPoolConfig) : IP
private readonly long _configuredMaxTxSize = txPoolConfig.MaxTxSize ?? long.MaxValue;

private readonly long _configuredMaxBlobTxSize = txPoolConfig.MaxBlobTxSize is not null
? txPoolConfig.MaxBlobTxSize.Value + (long)Eip4844Constants.MaxBlobGasPerBlock : long.MaxValue;
? txPoolConfig.MaxBlobTxSize.Value + (long)Eip4844Constants.GasPerBlob * 6 : long.MaxValue; // ToDo Yerken * 6 is incorrect here, quick fix to compile the project
Copy link
Contributor

Choose a reason for hiding this comment

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

this needs to be addressed, but how?

@@ -282,10 +283,10 @@ public async Task SendData(

if (defaultMaxFeePerBlobGas is null)
{
ulong excessBlobsReserve = 2 * Eip4844Constants.TargetBlobGasPerBlock;
ulong excessBlobsReserve = 2 * Cancun.Instance.TargetBlobCount;
Copy link
Contributor

Choose a reason for hiding this comment

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

we might need to change this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe we add spec as command line param to this tool

Comment on lines +265 to +266
spec.TargetBlobCount = 3;
spec.MaxBlobCount = 6;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think they should be zero as written here

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, according to the EIP it should be zero

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed back to zero

Copy link
Contributor

Choose a reason for hiding this comment

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

@MarekM25 did this i think to fix hive tests. For hive, i think we should specifiy them in its chainspec

@@ -97,7 +97,8 @@
"cancun": {
"target": 1,
"max": 2
}
},
"eip7840DefaultBlobCountFraction": 3
Copy link
Contributor

Choose a reason for hiding this comment

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

do we really need this variable?

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.

5 participants