Skip to content

Add eth_getBlockReceipts #1156

Merged
sorpaas merged 15 commits intopolkadot-evm:masterfrom
darwinia-network:bear-eth-get_block_receipts
Aug 23, 2023
Merged

Add eth_getBlockReceipts #1156
sorpaas merged 15 commits intopolkadot-evm:masterfrom
darwinia-network:bear-eth-get_block_receipts

Conversation

@boundless-forest
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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.

Comment thread client/rpc-core/src/eth.rs Outdated
@boundless-forest
Copy link
Copy Markdown
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
Comment thread client/rpc/src/eth/block.rs
@tgmichel
Copy link
Copy Markdown
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
Copy Markdown
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
@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