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

Refactor eth_getBlockReceipts to use getTxReceipts(blockHash) #5962

Open
macfarla opened this issue Sep 28, 2023 · 6 comments
Open

Refactor eth_getBlockReceipts to use getTxReceipts(blockHash) #5962

macfarla opened this issue Sep 28, 2023 · 6 comments
Labels
RPC snack Smaller coding task - less than a day for an experienced dev

Comments

@macfarla
Copy link
Contributor

Refactor eth_getBlockReceipts to use BlockChainQueries.getTxReceipts which already gets all the receipts by block hash.

Current impl loops through receipts in each tx for a block. Would be more efficient to use this method directly.

See #5771

@macfarla macfarla added good first issue Good for newcomers snack Smaller coding task - less than a day for an experienced dev RPC labels Sep 28, 2023
@Shritesh99
Copy link
Contributor

Hi, can I work on the issue?

@hellojaliyah
Copy link

Hi, I'd like to take a look.

@Sah314
Copy link

Sah314 commented Oct 2, 2023

@macfarla i have almost understood the issue, can you assign it to me.

@non-fungible-nelson non-fungible-nelson assigned Sah314 and unassigned Sah314 Oct 2, 2023
@non-fungible-nelson
Copy link
Contributor

Hi folks - no assignee needed to work on this. Please open any PRs to complete this issue and tag us! In the spirit of open-source, we encourage all contributions. there are also plenty of other issues with the good first issues tag if you are eager. Reach out on discord.gg/hyperledger in the #besu-contributors channel if you have questions or want to submit a PR for review or feedback.

@siladu
Copy link
Contributor

siladu commented Oct 2, 2023

@Shritesh99
Copy link
Contributor

Hi @macfarla, I have analyzed the issue. BlockChainQueries.getTxReceipts(blockHash) returns List of TransactionReceipt however, getBlockReceiptsResult expects to return List of TransactionReceiptWithMetadata. No wrapper can convert TransactionReceipt to TransactionReceiptWithMetadata without looping through each tx for a block.

@macfarla macfarla removed the good first issue Good for newcomers label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RPC snack Smaller coding task - less than a day for an experienced dev
Projects
None yet
Development

No branches or pull requests

6 participants