-
Notifications
You must be signed in to change notification settings - Fork 377
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
Add EIP-4844 transaction and receipt #398
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, should it also not be part of the encoding as noticed by @jochem-brouwer
I don't think we'd want it encoded since the values can be derived from protocol rules. The field is being added more for convenience. And to that end, I wonder if the value of data_gasprice should be in there too, in order to be able to conveniently compute the gas cost component incurred by the blobs. Without this you'd have to re-implement get_data_gasprice from the spec and hope the parameters never change. |
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 change seems fine, but there are other large changes to the RPC that need to be made for cancun so I am going to hold off merging this until that solidifies. We don't really have much ability on execution rpc side of things to denote fork-related info.
Is this change only for RPC and not for receipts RLP in devp2p? |
That was my understanding from the discussion on the last implementers call. |
Can we add dataGasPrice too? I think without it this change isn't very helpful. Having both fields allows one to calculate total gas cost easily from the tx receipt in a way that will be forward compatible with any 4844 parameter tweaks:
|
dataGasUsed
to receipts for 4844 txsdataGasUsed
and dataGasPrice
to receipts for 4844 txs
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.
some punctuation nits
We should rename these to blobGasUsed and blobGasPrice |
Yes, please. See ethereum/EIPs#7354 |
Done. Thanks for the reminder. |
dataGasUsed
and dataGasPrice
to receipts for 4844 txsblobGasUsed
and blobGasPrice
to receipts for 4844 txs
blobGasUsed
and blobGasPrice
to receipts for 4844 txs
@acolytec3 I'm co-opting this PR a bit to push through all the EIP-4844 changes together. |
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
8e4ffc1
to
db28871
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! Going to merge this into eth-cancun
to push up the combined tests.
* Add dataGasUsed to receipt * Make dataGasUsed optional * Add dataGasPrice * Update src/schemas/receipt.yaml Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> * Update src/schemas/receipt.yaml Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> * Update src/schemas/receipt.yaml Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> * rename data gas to blob gas - eip 7354 * schemas/tx: add 4844 tx * schemas/tx: add 4844 blob fields to generic transaction * eth/submit: make note that 4844 txs must be in network form for sendRawTransaction * schemas: fix typo in 4844 tx uint ref * schemas: remove some extra spacing * schema: update required fields for blob tx repr --------- Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: lightclient <lightclient@protonmail.com>
* Add Parent Beacon Block Root to Block (#450) * Add EIP-4844 transaction and receipt (#398) * Add dataGasUsed to receipt * Make dataGasUsed optional * Add dataGasPrice * Update src/schemas/receipt.yaml Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> * Update src/schemas/receipt.yaml Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> * Update src/schemas/receipt.yaml Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> * rename data gas to blob gas - eip 7354 * schemas/tx: add 4844 tx * schemas/tx: add 4844 blob fields to generic transaction * eth/submit: make note that 4844 txs must be in network form for sendRawTransaction * schemas: fix typo in 4844 tx uint ref * schemas: remove some extra spacing * schema: update required fields for blob tx repr --------- Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: lightclient <lightclient@protonmail.com> * eth: add new 4844 header fields * tests: update for cancun * tests: non-zero parent beacon block root --------- Co-authored-by: Ahmad Bitar <33181301+smartprogrammer93@users.noreply.github.com> Co-authored-by: acolytec3 <17355484+acolytec3@users.noreply.github.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
As discussed in recent 4844 implementers calls, this proposes to add optional fields for
blobGasUsed
andblobGasPrice
to the transaction receipt object specific to 4844 blob transactions.