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

internal/ethapi,webext: add debug_getTransactionReceiptRlp RPC #24726

Conversation

ryanschneider
Copy link
Contributor

@jflo as he was requesting this. Follows the same pattern as debug_getBlockRlp above it, using the same preamble code as eth_getTransactionReceipt (https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1547).

Tested on this Sepolia transaction:

> debug.getTransactionReceiptRlp("0x30296f5f32972c7c3b39963cfd91073000cb882c294adc2dcf0ac9ca34d67bd2")
"0xb9018902f901850182aebbb9010000800000000000000000000000000000000000000000100000020000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000400000000000000000f87cf87a94830bf80a3839b300291915e7c67b70d90823ffedf842a0e1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109ca00000000000000000000000001b57edab586cbdabd4d914869ae8bb78dbc05571a00000000000000000000000000000000000000000000000000de0b6b3a7640000"

https://sepolia.otterscan.io/tx/0x30296f5f32972c7c3b39963cfd91073000cb882c294adc2dcf0ac9ca34d67bd2

@s1na
Copy link
Contributor

s1na commented Apr 21, 2022

Isn't it possible to encode the result of getTransactionReceipt on the requester side?

@ryanschneider
Copy link
Contributor Author

Isn't it possible to encode the result of getTransactionReceipt on the requester side?

Yup its definitely possible to do client side, but then again you need something to compare your results against when developing your client side code (which is why I originally wrote this, as I wanted to write my own client side code to compute the RLP of a receipt). Note that this is in the debug namespace so is not meant for broad usage.

@ryanschneider
Copy link
Contributor Author

ryanschneider commented Apr 21, 2022

Hmm, actually while this does return the RLP for a receipt, that's not actually what's needed post-EIP-2718 for non-legacy transactions. I'll close for now and revisit at a later time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants