-
Notifications
You must be signed in to change notification settings - Fork 21.5k
core: implement blobfee opcode #28098
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
Conversation
core/evm.go
Outdated
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.
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.
The problem is that most of these cases are in tests where we only set one or two of the fields. We can't really update them to use the constructor since that will need a header to populate the fields. We could theoretically create a constructor that will set every field, but that will result in a lot of NewBlockContext(nil, nil, .-.. nil). Also we pass the struct by value very often so most of the initializatios are actually BlockCOntext{}
3df5c8a to
7d8ad92
Compare
7d8ad92 to
a09c7f1
Compare
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.
LGTM
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.
We can remove the ExcessBlobGas from the vm context, its redundant with the fee
| if vmContext.ExcessBlobGas != nil { | ||
| execRs.CurrentExcessBlobGas = (*math.HexOrDecimal64)(vmContext.ExcessBlobGas) | ||
| if vmContext.BlobBaseFee != nil { | ||
| // TODO (MariusVanDerWijden): I have no idea why we have this field at all. |
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.
I think the idea here is that if you provide parentExcessBlobGas and parentBlobGasUsed t8n will automatically calculate that block's excessBlobGas. In these instances you would probably want the calculated value output so that you can pipe it in for the next transition.
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.
Fixed, sry
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.
I still don't think that this is really needed
| if tx.Type() == types.BlobTxType { | ||
| receipt.BlobGasUsed = uint64(len(tx.BlobHashes()) * params.BlobTxBlobGasPerBlob) | ||
| receipt.BlobGasPrice = eip4844.CalcBlobFee(*evm.Context.ExcessBlobGas) | ||
| receipt.BlobGasPrice = evm.Context.BlobBaseFee |
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.
How come that the "gasprice" is calculated as the basefee? I mean, the base is only one part of the price, no?
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.
There is no blob priority fee yet, so it's just base fee!
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.
What was ExcessBlobGas exactly before?
And the concept of ExcessBlobGas no longer exists?
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.
LGTM
Implements "EIP-7516: BLOBBASEFEE opcode" for cancun, as per spec: https://eips.ethereum.org/EIPS/eip-7516
Implements "EIP-7516: BLOBBASEFEE opcode" for cancun, as per spec: https://eips.ethereum.org/EIPS/eip-7516
Implements "EIP-7516: BLOBBASEFEE opcode" for cancun, as per spec: https://eips.ethereum.org/EIPS/eip-7516
Implements "EIP-7516: BLOBBASEFEE opcode" for cancun, as per spec: https://eips.ethereum.org/EIPS/eip-7516
This reverts commit 5585e79.
This reverts commit 5585e79.
…71c907d1dc6504ed32a9161e71351 Merge Geth master updates starting from 766272f ending by 16ce7bf. The list of PRs that are important for us: - ethereum/go-ethereum#28147 removal of rollback mechanism in downloader. We may still need this mechanism since we're pre-merge and allow forks; - ethereum/go-ethereum@3dc45a3 related to release pipeline, example of pre-release version update; - ethereum/go-ethereum@dc34fe8 related to release pipeline, example of post-release version update; - ethereum/go-ethereum#28098 BLOBBASEFEE opcode implemented as a part of Cancun (we have to support it eventually); - ethereum/go-ethereum#28195 introduce new Cancun-related block fields to eth tools; - ethereum/go-ethereum#28243 introduce blob transactions support for internal eth services; - ethereum/go-ethereum#28084 allows to invoke contract at specific block hash, may be useful for Governance contract integration; - ethereum/go-ethereum#28538 Dockerfile.alltools update example, just to remember that it should be in sync with Dockerfile; - ethereum/go-ethereum#28605 Improved Cancun- and Shanghai- related consensus verification. Although we must enable Shanghai and Cancun in dBFT, this PR is a hint of what should be changed wrt Clique/Ethash implementation for this; - ethereum/go-ethereum#28549 GitHub actions are added for tests; - ethereum/go-ethereum#27766 Beacon Committee chain implementation (light chain that is able to verify signed blocks once synced); Signed-off-by: Anna Shaleva <[email protected]>
…1dc6504ed32a9161e71351 Merge Geth master updates starting from 766272f ending by 99dc3fe (v1.13.11 stable release). The list of PRs that are important for us: - ethereum/go-ethereum#28147 removal of rollback mechanism in downloader. We may still need this mechanism since we're pre-merge and allow forks; - ethereum/go-ethereum@3dc45a3 related to release pipeline, example of pre-release version update; - ethereum/go-ethereum@dc34fe8 related to release pipeline, example of post-release version update; - ethereum/go-ethereum#28098 BLOBBASEFEE opcode implemented as a part of Cancun (we have to support it eventually); - ethereum/go-ethereum#28195 introduce new Cancun-related block fields to eth tools; - ethereum/go-ethereum#28243 introduce blob transactions support for internal eth services; - ethereum/go-ethereum#28084 allows to invoke contract at specific block hash, may be useful for Governance contract integration; - ethereum/go-ethereum#28538 Dockerfile.alltools update example, just to remember that it should be in sync with Dockerfile; - ethereum/go-ethereum#28605 Improved Cancun- and Shanghai- related consensus verification. Although we must enable Shanghai and Cancun in dBFT, this PR is a hint of what should be changed wrt Clique/Ethash implementation for this; - ethereum/go-ethereum#28549 GitHub actions are added for tests; - ethereum/go-ethereum#27766 Beacon Committee chain implementation (light chain that is able to verify signed blocks once synced); Signed-off-by: Anna Shaleva <[email protected]>
implement BLOBBASEFEE opcode (0x4a) (ethereum#28098) Conflicts: core/evm.go core/vm/evm.go Both nitro and upstream added fields to BlockContextx. Using both. Additions: accounts/abi/bind/base.go eth/tracers/js/goja.go common.Address no longer has the Hash() function that we sometimes used. It now, however, has a Big() function. Previous calls to Address.Hash().Big() were converted to .Big()

Implements the https://eips.ethereum.org/EIPS/eip-7516 opcode for cancun