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

Include transaction receipt information in eth_getBlockByHash and eth_getBlockByNumber #547

Open
antonydenyer opened this issue May 14, 2024 · 0 comments

Comments

@antonydenyer
Copy link

antonydenyer commented May 14, 2024

A common use case for developers is implementing some kind of blockchain follower. Logic would usually be written to index data into a local database (think block explorer). The developer would long poll the chain by number, then check the parent hash for forks etc. If the developer wants to get any information about the transactions in that block they need to subsequently call eth_getTransactionReceipt for each one.

Ideas/Proposals/Request for comments

Add an additional optional flag parameter to eth_getBlockBy* to indicate the desire for transaction receipt data.

The problem I see with this is that these endpoints can return a pending block which can not return transaction receipt data, but validation could be put in place to reject that combination. The optional flag would default to false to maintain backwards compatibility. There's a danger of payload bloat so perhaps returning everything except logs (although I feel this negates some of the benefit of adding the parameter)?

It could be bundled as part of #304, but I think they're addressing different issues.

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

No branches or pull requests

1 participant