filecoin-project / lotus

Reference implementation of the Filecoin protocol, written in Go
https://lotus.filecoin.io/
Other
2.85k stars 1.27k forks source link

Support eth_getBlockReceipts #12429

Closed rvagg closed 1 month ago

rvagg commented 2 months ago

I think the output of this is the same as eth_getTransactionReceipts but you query for the block number instead of transaction hash and the result is just an array with all of the eth_getTransactionReceipts results.

This is an efficient way to get all details of a tipset rather than querying for all messages and constructing it yourself. Just need to be careful about doing proper de-duplication.

virajbhartiya commented 2 months ago

I'd Like to work on this

rjan90 commented 2 months ago

I'd Like to work on this

Awesome, I will assign this ticket to you then @virajbhartiya. Let us know if you need additional pointers to where this should go in code, either here or in the #fil-lotus-dev channel in Slack.

virajbhartiya commented 2 months ago

Yes sure. Thanks a lot

virajbhartiya commented 2 months ago

Hey, @rjan90, so just to be clear, we have to implement a function eth_getBlockReceipts that will allow clients to retrieve all transaction receipts from a specific block. So instead of querying for each transaction usingeth_getTransactionReceipt, we query for the block, and it would return an array of all transaction receipts from that block?

rvagg commented 2 months ago

@virajbhartiya yes, but please do a bit of research on the various forms of Ethereum documentation out there to confirm that eth_getBlockReceipts is precisely that. That's my understanding from a brief bit of research but it would be good to confirm.

virajbhartiya commented 2 months ago

@rvagg @rjan90 I have submitted a PR, can you please give it a look

virajbhartiya commented 1 month ago

Hey @rvagg @rjan90 im having some trouble passing a few tests, could you please help me out with those