-
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(api): v2 API integrating with F3 #12719
base: master
Are you sure you want to change the base?
Conversation
I updated this to lean in to the
The first two take an optional parameter (their The others take a But you can see how the pattern would extend. You'd get to something like Basic itests are in place to exercise some of this. So far I haven't set it up to exercise F3 doing its thing (though it should be wired up to work when I get a mock F3 instance going in the itest). I've listed all of the "Common Node API" methods in a TODO in the v2 docs, but the best approach might be to pick off the most logical F3 APIs and push this out as an "experimental" feature you can turn on and then flesh it out further over time. I'm a little afraid of this PR getting too large to reasonably review. |
For the record: I continue to believe that the push style My recommendation would be to move to a pull model unless there is a very clear usecase that requires concretely defined "event delivery guarantees". This needs a deeper Product Research. If you are a user of this API/building atop it: please reach out. |
We can opt to not put some of these methods onto the gateway. Currently /v0/ and /v1/ both expose |
Done. Thanks for pointing out that FIP. |
WIP but opening this for discussion purposes.
/v2
API set here, although I'm not committing to pursuing that as the solution, it just seems like an appropriate thing to do as long as we're messing with a bunch of standard methods. We could take a minimal approach of adding just the basics to begin with and then adding more as they prove to be necessary. The Common Node API seems like a good foundation to start with.EpochSelector
string type that's either"latest"
or"finalized"
and then in places it can either be:ChainHead()
orChainHead("finalized")
).TipSetKey
currently exists - so you can supply either a tsk or one of these strings in that position.ChainEpoch
currently exists - so you can supply an integer or one of these strings in that position."latest"
and"finalized"
to be JSON decoded into a valueTipSetKey
."latest"
comes out as anEmptyTSK
which is the same as providing[]
now."finalized"
comes out as a sentinelFinalizedTSK
, which is a special TSK comprising["bafkqaclgnfxgc3djpjswi"]
(raw identity CID with the string"finalized"
). This approach would allow us to leave the existing APIs unmolested and even work within/v1
transparently. Similar treatment could be done forabi.ChainEpoch
but that's a little bit trickier because of the need for a sentinel value, what would that be? Also the optional argument would be a breaking Go API change if we wanted to add something toChainHead
andChainNotify
.