-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: add support for eth_getBlockReceipts #12447
Conversation
Hey! For the gen-check and docs-check to pass, you need to run I will take a look at the other failing tests tomorrow morning |
// Verify that the receipt is correct. | ||
receipts, err := client.EthGetBlockReceipts(ctx, ethtypes.EthBlockNumberOrHash{BlockHash: &receipt.BlockHash}) | ||
require.NoError(t, err) | ||
require.Len(t, receipts, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to be able to get a version of this with >1 transactions in a block, we have some other tests that do a multi-message submission and wait for them to land, it would be good if we could replicate that behaviour here in a non-flaky way, have a fish around and see if you can find something, otherwise let me know if you have trouble and I might be able to either find something similar or cook something up
I have made the changes mentioned above, I just couldn't figure out get more than 1 transaction block, I am researching a bit more on that. |
@virajbhartiya check out #12269 - I think that what we want is already there, You also need to |
I re-requested @rvagg review given https://filecoinproject.slack.com/archives/CP50PPW2X/p1726515846011179 |
Some feedback:
This is quite a diversion from the original task, that's my bad for not looking far enough into the future at the fact that we're being asked for the tipset with the messages but what we need is on the next tipset where those messages are executed. This is getting complicated, and I'm happy to guide you through the process but please let me know if this gets bigger in scope than what you're happy to work on and I can either hop in and contribute or take over. The main problem we have is that this API can be asked for an arbitrary tipset. If it just took block "numbers" (epochs) then we might be able to get away with it, but it can also be a block hash, which is a tipset CID. Unfortunately, that tipset may not be on the canonical chain, it could be part of a reorg that shunts it off to a fork that's discarded, but it's still valid as long as we have it. So So, what we need to do is re-execute the current tipset to get the next so that we have receipts and for execution of the messages we care about, and therefore the logs too. In most cases, it will already have been executed, and there is an execution cache, so it's going to be cheap most of the time. If you look in Unfortunately it gets trickier from there because we need to go from the raw events to the eth logs. This might take some refactoring to expose the pieces we need and it's also going to be impacted a little by #12421, but I think we can ignore that for now. In |
I have reverted the changes made in I'm trying to implement |
Hey @Kubuxu Why did we close this issue ? |
I deleted the main branch, which closed this. The author will reopen. |
@virajbhartiya just retarget your PR to |
nevermind, I see we are continuing in #12478 |
Related Issues
Fixes #12429
Proposed Changes
Implimented
eth_getBlockReceipts
method which accepts a block number and returns all the transaction receipts for itAdditional Info
QuickNode
Infura
Checklist
Before you mark the PR ready for review, please make sure that: