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

Add eth_getBlockReceipts #1156

Merged

Conversation

boundless-forest
Copy link
Collaborator

@boundless-forest boundless-forest commented Aug 16, 2023

See the discussion at ethereum/execution-apis#438. This RPC is quite helpful for explorers.

@sorpaas @tgmichel Please take a review.

@boundless-forest boundless-forest marked this pull request as ready for review August 16, 2023 08:57
@arturgontijo
Copy link
Contributor

Hey, I agree that this method can be really useful! (eg parity_getBlockReceipts)

But I'm not sure about how we are implementing it:

for hash in transaction_hashes {
	receipts.push(self.transaction_receipt(hash).await?);
}

This looks expensive, as this is adding an expensive overhead to the process.

I'd like to suggest 2 approaches here:

1 - Using this storage override (cheers to @tgmichel for pointing it out while ago):
https://github.com/paritytech/frontier/blob/master/client/storage/src/overrides/schema_v3_override.rs#L102

2 - Move logic (after instantiating phase) from transaction_receipt() to a side function that can be called by that method and this one.

I'll provide a performance comparison (between your approach and 1) later today.

@boundless-forest
Copy link
Collaborator Author

boundless-forest commented Aug 17, 2023

I'd like to suggest 2 approaches here:

Nice suggestions! Let's update this today.

@boundless-forest boundless-forest marked this pull request as draft August 17, 2023 01:07
@boundless-forest boundless-forest marked this pull request as ready for review August 17, 2023 09:38
@tgmichel
Copy link
Contributor

@boundless-forest @arturgontijo hey guys, just to let you know I am currently taking a break as I recently left Moonbeam, so I will not be able to review for a while. I will be back at some point :)

@sorpaas
Copy link
Member

sorpaas commented Aug 23, 2023

😱 I'm quite amazed it doesn't seem to need any EIP process any more!

@sorpaas sorpaas merged commit df8b163 into polkadot-evm:master Aug 23, 2023
4 checks passed
@boundless-forest boundless-forest deleted the bear-eth-get_block_receipts branch August 23, 2023 09:17
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.

5 participants