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

Parse type field in Receipts #1687

Closed
wants to merge 2 commits into from
Closed

Conversation

mfornet
Copy link

@mfornet mfornet commented Jun 18, 2021

This field was introduced Berlin Hard Fork as part of EIP-2930

@ricmoo
Copy link
Member

ricmoo commented Jun 22, 2021

Is this widely adopted now? At the time, it was hit-or-miss if a backend returned it. I'll look into this. :)

@ricmoo ricmoo added investigate Under investigation and may be a bug. on-deck This Enhancement or Bug is currently being worked on. labels Jun 22, 2021
@mfornet
Copy link
Author

mfornet commented Jun 22, 2021

Is this widely adopted now? At the time, it was hit-or-miss if a backend returned it. I'll look into this. :)

I've only tried geth, and some common RPC providers (like infura) and they are providing this field both for Ropsten and Mainnet.

We need this features in our project, since we are building proofs for inclusion of Receipts in blocks, and they need to be serialized exactly as expected, and this field is necessary to know how to serialize it properly. Read more in this issues: Near-One/rainbow-bridge#557, aurora-is-near/eth-object#1

In case these field doesn't exists, it should be probably safe to initialise it with 0.

@ricmoo
Copy link
Member

ricmoo commented Jun 22, 2021

I’ve added this locally and been chatting with some people on Geth and the author of the EIP.

There seems to be a disconnect; some expected type 0 to be available as a future type and some thought it was reserved to represent legacy transactions.

I’ve started a document in the specifications to formalize the reserved typed transaction version bytes and will give it a few days to settle and get some feedback before sending a PR. Then I should be able to add the necessary changes to start using 0 for legacy transactions. :)

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Jun 26, 2021
@ricmoo
Copy link
Member

ricmoo commented Jun 26, 2021

This has been published in 5.4.0. I've added type to TransactionResponse and TransactionReceipt as well as effectiveGasPrice to TransactionReceipt. Try it out and let me know if you have any problems. :)

@ricmoo ricmoo added enhancement New feature or improvement. and removed investigate Under investigation and may be a bug. labels Jun 26, 2021
@mfornet
Copy link
Author

mfornet commented Jun 28, 2021

It is working! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants