Skip to content

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Mar 31, 2025

Originally reported by @dumikau. I'm pretty sure the "not found" path for Eth calls should be to return nothing, but the usual path is: (1) search in ChainIndexer for the Eth hash and use that if it has it, then (2) to a naive conversion from the hash to a CID and use that (txHash.ToCid()). That second path is usually not what the user intends, and if we don't have it in the ChainIndexer then it's probably not landed on chain yet. But in the current case for eth_getTransactionReceipt we're doing a StateSearchMsg on the CID we get from a txHash.ToCid() and that will return an ipld: count not find when it gets down in to GetCMessage message trying to fetch it from the blockstore. Then we end up with this confusion message with a CID that bears no relationship to the hash the user asked for (from their perspective) and it's just confusing. I think the right thing to do is return nil which I believe is what Eth tooling dows.

Error could not coalesce error (error={ "code": 1, "message": "failed to lookup Eth Txn 0x2ea4388c7f8c43433500c9559bb219db2dc52f76a2f12e70c57bbafec2f8acbf as bafy2bzaceaxkioemp6gegqzvadevlg5sdhns3rjpo2rpcltqyv53v7wc7cwl6: failed to load message: ipld: could not find bafy2bzaceaxkioemp6gegqzvadevlg5sdhns3rjpo2rpcltqyv53v7wc7cwl6" }, payload={ "id": 298, "jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": [ "0x2ea4388c7f8c43433500c9559bb219db2dc52f76a2f12e70c57bbafec2f8acbf" ] }, code=UNKNOWN_ERROR, version=6.13.4)

@rvagg rvagg requested a review from aarshkshah1992 March 31, 2025 08:56
@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Mar 31, 2025
@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting Review in FilOz Mar 31, 2025
@rvagg rvagg force-pushed the rvagg/eth_transaction_lookup_notfound branch from 561cc23 to 3396934 Compare March 31, 2025 09:17
@rvagg rvagg force-pushed the rvagg/eth_transaction_lookup_notfound branch from 3396934 to 2550f4a Compare March 31, 2025 09:27
@BigLep BigLep requested a review from masih April 7, 2025 21:52
@BigLep
Copy link
Member

BigLep commented Apr 7, 2025

@masih : can you please take a look at this so we can get it merged and as a slight way to learn more about the ETH APIs?

@github-project-automation github-project-automation bot moved this from 🔎 Awaiting Review to ✔️ Approved by reviewer in FilOz Apr 8, 2025
@rvagg rvagg enabled auto-merge (squash) April 8, 2025 09:41
@rvagg rvagg merged commit dda1d23 into master Apr 8, 2025
90 checks passed
@rvagg rvagg deleted the rvagg/eth_transaction_lookup_notfound branch April 8, 2025 09:45
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

3 participants