-
Notifications
You must be signed in to change notification settings - Fork 441
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
Blob gas info in receipts #5767
Blob gas info in receipts #5767
Conversation
UInt256 effectiveGasPrice = t.CalculateEffectiveGasPrice(isEip1559Enabled, block.BaseFeePerGas); | ||
UInt256? dataGasPrice = null; | ||
ulong? dataGasUsed = null; | ||
if (t.SupportsBlobs) | ||
{ | ||
dataGasPrice = IntrinsicGasCalculator.CalculateDataGasPrice(block.Header, t); | ||
dataGasUsed = IntrinsicGasCalculator.CalculateDataGas(t); | ||
} |
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 code seems to get duplicated. Maybe lets calculate TxGasInfo
in one call?
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.
You mean something like tx.GetGasInfo()
?
@@ -45,4 +45,23 @@ public interface IBlockchainBridge : ILogFinder | |||
void RunTreeVisitor(ITreeVisitor treeVisitor, Keccak stateRoot); | |||
|
|||
} | |||
|
|||
public class TxGasInfo |
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.
struct
if (postEip4844) | ||
blockchainBridge.GetReceiptAndGasInfo(Arg.Any<Keccak>()).Returns((receipt, new(UInt256.One, 2, 3), 0)); | ||
else | ||
blockchainBridge.GetReceiptAndGasInfo(Arg.Any<Keccak>()).Returns((receipt, new(UInt256.One), 0)); |
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.
would prefer blockchainBridge.GetReceiptAndGasInfo(Arg.Any<Keccak>()).Returns((receipt, postEip4844 ? new(UInt256.One, 2, 3) : new(UInt256.One), 0));
…s' into feature/eip-4844-dataGas # Conflicts: # src/Nethermind/Nethermind.Evm/IntrinsicGasCalculator.cs
* Blob gas info in receipts * Fix gas price * Fix spaces * Add tests * Supports blobs * Ignore on null * Fix suggestions * Fix build --------- Co-authored-by: Nikita Mescheryakov <[email protected]>
* Blob gas info in receipts * Fix gas price * Fix spaces * Add tests * Supports blobs * Ignore on null * Fix suggestions * Fix build --------- Co-authored-by: Nikita Mescheryakov <[email protected]>
* Add data gas calculations * ChainSpecs/BlockProcessing: Fix syncing on Genesis block due to ExcessDataGas mismatch. * TxValidator: Move KZG version check into network wrapper verification. * ExcessData gas on genesis block * Check versioned hash earlier * Remake gas, preview * Fix recursion * Add tests, refactor * Get rid of parent block header finder * Clean up * Clean up checks * Fix tests * Fix header mapping to rpc * Fix data gas calculations * Add safety checks * Fix and improve * Blob gas info in receipts (#5767) * Blob gas info in receipts * Fix gas price * Fix spaces * Add tests * Supports blobs * Ignore on null * Fix suggestions * Fix build --------- Co-authored-by: Nikita Mescheryakov <[email protected]> * Increase data gas limits * Clean up * Add more blob space * Fix tests; clean up * Add tests, refacator * Fix MaxFeePerDataGas affects consensus on low balance * Improve max fee per data gas fix * Fix receipts * Add overflow checks * Fix tests * Fix encoding; improve text; clean up * Add gas fields to the local 4844 network genesis * Refactor BlockValidator * Add additional check --------- Co-authored-by: spencer-tb <[email protected]> Co-authored-by: Nikita Mescheryakov <[email protected]> Co-authored-by: Nikita Mescheryakov <[email protected]>
Fixes Closes Resolves #
ethereum/execution-apis#398
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?