-
Notifications
You must be signed in to change notification settings - Fork 128
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
About use of eth_getBlockReceipts
JSON RPC for cryo txs
#93
Comments
part of this is a documentation issue, part of this is a bug documentation: when cryo fetches transaction data, it only grabs the transaction receipts if either of the bug: when |
Thanks for your kind reply. I also agree with all the points you mentioned: introducing a different data type for txs without receipts (except the example name was a bit verbose), bug about fallback logic, and smarter rpc selection with metadata. Any actionable item that I may contribute? I think the bug you mentioned about fallback is most urgent one to work on, and I had no clue of the fallback when I read through the logic for fetching receipts. Is it really present but not applied, or is it omitted? |
I implemented the originally intended fallback logic in #94. Could you please take a look and let me know your opinions? |
Is your feature request related to a problem? Please describe.
Use of new JSON RPC API -
eth_getBlockRecipts
broke some scripts that worked before, especially for other chains that forked ethereum's execution clients (apparently geth) complying with most of JSON RPC specs but not very up-to-date. Tested on optimism & arbitrum, for official mainnet sequencer rpc endpoints.This problem occured after merge of #89 which was introduced to filter out reverted txs (#46). While this feature will be indeed crucial and very useful for majority of cryo users, I have some doubts about its current specification and implementation.
First,
eth_getBlockReceipts
was standarized recently. While almost every execution clients implement the method on ethereum, I found most of other evm-like chains and its execution clients do not have the method. The only chain I found implementing this method aside from ethereum was bnb.Second, in terms of clarifying which data the user wants to extract, the
status
,gas_used
andtransaction_index
etc. are actually properties ofreceipts
, nottx
s. If only raw transaction data is needed for certain analysis, fetching receipts causes unnecessary overhead. (Still, I think there are very few analysis can be done with tx data without receipts) This is important because while there were receipt related properties on transaction schema before, it was considered optional, but current implementation for--exclude-failed
seems to force fetching receipts and fails if fetching receipt errors whether the option is supplied or not.Describe the solution you'd like
eth_getBlockReceipts
errors - iterating over transaction hashes and calleth_getTransactionReceipt
. This will emit much more RPC calls than the original solution, but is considerable if it is better than failing.eth_getBlockReceipts
errors leave receipt field None, and if--exclude-failed
option was supplied, panic ontransform
stepAlso, this RPC method will have to be mentioned on README.md as used method for fetching txs data.
Describe alternatives you've considered
cryo txs
fromcryo receipts
- but this would not help much for users to overcome this issue but increase product's complexity.Additional context
If specs are fixed, I would be happy if I can submit a PR to implement the fix.
The text was updated successfully, but these errors were encountered: