-
Notifications
You must be signed in to change notification settings - Fork 475
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
eip 7840 implementation #7964
Conversation
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.
looks good, but please add tests.
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.
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
# Conflicts: # src/Nethermind/Nethermind.Specs/ChainSpecStyle/ChainParameters.cs
src/Nethermind/Nethermind.Specs/ChainSpecStyle/ChainSpecBasedSpecProvider.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Specs/ChainSpecStyle/ChainSpecLoader.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Blockchain.Test/TransactionSelectorTests.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Blockchain.Test/TransactionSelectorTests.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Blockchain.Test/Validators/TxValidatorTests.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Blockchain.Test/Validators/ShardBlobBlockValidatorTests.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Blockchain.Test/Validators/TxValidatorTests.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Evm.Test/TransactionProcessorEip4844Tests.cs
Outdated
Show resolved
Hide resolved
"terminalTotalDifficulty": "231707791542740786049188744689299064356246512" | ||
"terminalTotalDifficulty": "231707791542740786049188744689299064356246512", | ||
"blobSchedule": { | ||
"cancun": { |
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.
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 ?
src/Nethermind/Nethermind.Consensus/Messages/TxErrorMessages.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs
Outdated
Show resolved
Hide resolved
{ | ||
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; |
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.
This looks to me like it should be an extension method on Transaction
object
src/Nethermind/Nethermind.Core.Test/Encoding/BlockDecoderTests.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.JsonRpc/Modules/Eth/FeeHistory/FeeHistoryOracle.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Specs/ChainSpecStyle/ChainSpecBasedSpecProvider.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Specs/ChainSpecStyle/ChainSpecBasedSpecProvider.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Marek Moraczyński <[email protected]>
# Conflicts: # src/Nethermind/Nethermind.Specs.Test/ChainSpecStyle/ChainSpecBasedSpecProviderTests.cs # src/Nethermind/Nethermind.Specs/ChainSpecStyle/ChainSpecBasedSpecProvider.cs
src/Nethermind/Nethermind.JsonRpc/Modules/Eth/FeeHistory/FeeHistoryOracle.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Specs/ChainSpecStyle/ChainSpecBasedSpecProvider.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Specs/ChainSpecStyle/ChainSpecBasedSpecProvider.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Specs.Test/ChainSpecStyle/ChainSpecBasedSpecProviderTests.cs
Show resolved
Hide resolved
src/Nethermind/Nethermind.Specs/ChainSpecStyle/ChainSpecBasedSpecProvider.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Consensus/Validators/BlockValidator.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Consensus/Messages/BlockErrorMessages.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: MarekM25 <[email protected]> Co-authored-by: Tanishq Jasoria <[email protected]>
Closes #9129
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Optional. Remove if not applicable.
Documentation
Requires documentation update
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
If yes, fill in the details here. Remove if not applicable.
Remarks
Optional. Remove if not applicable.