-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: implement initial Lotus V2 State
APIs
#13027
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
Conversation
State
APIsState
APIs
8783dfe
to
ec07ded
Compare
This is fine, except for the Rather than pollute this issue I broke out a new issue to dump my current thoughts over @ #13028 I also followed up looking at how useful So maybe we should hold off on the |
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.
Things that came to mind while following along. Nothing blocking here.
I was wondering something similar. Do we focus on shipping some clear cut wins initially (e.g., ETH API group and read APIs for Chain/State) before gettng bogged down in the more complicated cases. |
Now that the topic has been opened up, I'm thinking that instead of modifying the /v1 API as I'm doing in #12822 maybe we should just start working on a /v2 replacement for these APIs. But it's a low priority and I don't think needs to be part of an initial release of this work, unless we're getting signal from elsewhere that this is an important API? |
|
This is consistent with my take, in that if there is not a fire to put out in v1 APIs I would say the energy is best spent on getting v2 the best that it can be. I am also conscious that I don't know as much on the context of the work involved in modifying v1 APIs. |
Implement the Lotus V2 APIs for : * `StateGetActor` - enhanced to accept tipset selector. * `StateGetID` - enhanced to accept tipset selector / renamed from `LookupID` in v1 for consistency. * `StateSimulate` - enhanced to accept tipset selector, and separated out of v1 `StateCompute` to focus solely on simulation of compute for future instances. Additionally, it accepts a limit either relative or absolute for how far to simulate. * `StateCompute` - enhanced to accept tipset selector, and changed to purely apply state at given tipset based on a common usage pattern across exchanges. This function now implicitly computes for the height of the given tipset. For simulation of future heights, use `StateSimulate`. Tests are added to exercise the end-to-end API call through JSON rpc with the raw wire format of the JSON-RPC request. Additional factory functions are added for `TipSetLimit`, a new concept to specify a limit for tipsets either as absolute height or relative to some tipset selector. The future State message search APIs in v2 aim to use Limit in upcoming PRs.
To unblock progress in making incremental progress at v2 apis I am removing the implementation of StateSimulate and StateCompute in light of discussions at #13028.
60debd0
to
68e1d35
Compare
# Conflicts: # CHANGELOG.md
Updated the Filecoin v2 API docs to include the new APIs introduced here. Merging and happy to address any further comments retrospectively. |
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.
Late to the party but SGWM given what we discussed
Implement the Lotus V2 APIs for :
StateGetActor
- enhanced to accept tipset selector.StateGetID
- enhanced to accept tipset selector / renamed fromLookupID
in v1 for consistency.Tests are added to exercise the end-to-end API call through JSON rpc with the raw wire format of the JSON-RPC request. Additional factory functions are added for
TipSetLimit
, a new concept to specify a limit for tipsets either as absolute height or relative to some tipset selector. The future State message search APIs in v2 aim to use Limit in upcoming PRs.Part of: #12990