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

feat(rpc) Implement Filecoin.EthGetTransactionReceipt #4691

Merged
merged 32 commits into from
Sep 13, 2024

Conversation

elmattic
Copy link
Contributor

@elmattic elmattic commented Aug 28, 2024

Summary of changes

Changes introduced in this pull request:

  • Partially implement RPC method Filecoin.EthGetTransactionReceipt
  • API compare tests
$ ./forest-tool api compare --lotus /ip4/127.0.0.1/tcp/1234/http --forest /ip4/127.0.0.1/tcp/2345/http forest_snapshot_calibnet_2024-09-10_height_1954295.forest.car.zst --filter EthGetTransactionReceipt 
| RPC Method                        | Forest                                                                                                                                                                    | Lotus                                                                                                                                                                                                                                                                                                                                    |
|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Filecoin.EthGetTransactionReceipt | Rejected("failed to lookup Eth Txn 0x4406ad83ab47f019d304ff465c82a614dafbb9b5361841b39c91813ba769ce70 as bafy2bzaceaa6vpuiuwxsn634dwdsjxni43nv5ou6kouqvbp7kdoef43l4zyak") | Rejected("failed to lookup Eth Txn 0x4406ad83ab47f019d304ff465c82a614dafbb9b5361841b39c91813ba769ce70 as bafy2bzaceaa6vpuiuwxsn634dwdsjxni43nv5ou6kouqvbp7kdoef43l4zyak: checking for message execution during lookback: amt load: failed to root: ipld: could not find bafy2bzaceb2zczwzvnxoogthzx7gzsyqh4nw446qlxzxetkenxn5cuzkxhbku") |
| Filecoin.EthGetTransactionReceipt | Rejected("failed to lookup Eth Txn 0xdb6fdf6dcd1e94100a6862a3563af98632d6ddce32af2ce6d5bda6c00398769a as bafy2bzacecksdmpvznjwegq5wz3zmhfis6kcbhzezyb6ohblmdfjehfptf4ay") | Rejected("failed to lookup Eth Txn 0xdb6fdf6dcd1e94100a6862a3563af98632d6ddce32af2ce6d5bda6c00398769a as bafy2bzacecksdmpvznjwegq5wz3zmhfis6kcbhzezyb6ohblmdfjehfptf4ay: checking for message execution during lookback: amt load: failed to root: ipld: could not find bafy2bzaceb2zczwzvnxoogthzx7gzsyqh4nw446qlxzxetkenxn5cuzkxhbku") |
| Filecoin.EthGetTransactionReceipt | Valid                                                                                                                                                                     | Valid                                                                                                                                                                                                                                                                                                                                    |

Remark:

Note that it would be complicated to test only successful responses.
That's the reason why I have introduced a new policy.
One way to create tests for Ethereum transactions that effectively have a receipt would be to export receipts in our snapshots (like Lotus does with lotus chain export-range --receipts) and test their presence before test creation.

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@elmattic elmattic mentioned this pull request Sep 6, 2024
8 tasks
@elmattic elmattic marked this pull request as ready for review September 11, 2024 11:29
@elmattic elmattic requested a review from a team as a code owner September 11, 2024 11:29
@elmattic elmattic requested review from hanabi1224 and sudo-shashank and removed request for a team September 11, 2024 11:29
@elmattic elmattic added this pull request to the merge queue Sep 13, 2024
Merged via the queue into main with commit 36f5a2c Sep 13, 2024
30 checks passed
@elmattic elmattic deleted the elmattic/eth-get-transaction-receipt branch September 13, 2024 08:21
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.

3 participants