-
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: ETH API: Add V1 API to convert Filecoin Address to ETH address #12324
Conversation
Implementation seems fine to me, but we can't call this We have a couple of problems to wrestle with:
I proposed two alternative solutions:
I'd like to hear @Stebalien's thoughts on this though. |
@aarshkshah1992 I just stumbled upon this, after tinkering on the gateway: filecoin-project/ref-fvm#1573 For It was implemented in #10027. That PR has a lot of noise to support the subscribe data flow so it needs a whole reverse implementation for the client. But the relevant bit is the replacement of the method's params with There are 3 methods that do this in the codebase so far:
All with the same pattern. So, I think you can just do this for |
Also tested this on a devnet node
|
Co-authored-by: Rod Vagg <rod@vagg.org>
@rvagg Addressed your review. Please can you 🟢 ? |
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'm a tiny bit hesitant because it's quite disruptive when you see how you have to deal with the API in Go via Lotus directly, but I'm going to make the assumption that the majority of callers of this method are doing it via plain RPC or some other RPC wrapper.
Co-authored-by: Rod Vagg <rod@vagg.org>
@rvagg IIUC, most clients do indeed consume this via RPC so I think the cost is worth it as it allows to get away without creating a new API and confusing RPC users. |
…12324) - `` Co-authored-by: Rod Vagg <rod@vagg.org> --------- Co-authored-by: Rod Vagg <rod@vagg.org>
…ilecoin-project#12324) - `` Co-authored-by: Rod Vagg <rod@vagg.org> --------- Co-authored-by: Rod Vagg <rod@vagg.org>
Closes #12308.
Introduces a new
FilecoinAddressToEthAddressV1
API that allows all Filecoin address types (f0/1/2/3/4) to ETH addresses based on the user's reorg tolerance.Deprecates the existing
FilecoinAddressToEthAddress
API that only supportsf0
/f4
addresses in favour ofFilecoinAddressToEthAddressV1
.