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

Support the stabilised V2 RPCs? #186

Open
jsdw opened this issue Jun 12, 2024 · 4 comments
Open

Support the stabilised V2 RPCs? #186

jsdw opened this issue Jun 12, 2024 · 4 comments

Comments

@jsdw
Copy link

jsdw commented Jun 12, 2024

A set of the V2 RPC methods are now stable and available on modern substrate binaries (everything with v1 in the name in https://paritytech.github.io/json-rpc-interface-spec/). An advantage of these over the "legacy" RPCs is that they are properly specified.

Would it be possible to add support for these methods to Subway?

@ermalkaleci
Copy link
Collaborator

you can use config file to enable any method you want

@ermalkaleci
Copy link
Collaborator

This is more example/default config

@jsdw
Copy link
Author

jsdw commented Jun 12, 2024

Ah thanks for the link!

I guess then that "supporting" them in a basic way is pretty straightforward (just add them to the list). It's worth noting though that the new RPCs work together in a way that is quite different from any existing ones. For example, when you call chainHead_v1_follow, you get back a JSON-RPC subscription ID which you then pass to other methods like chainHead_v1_header or whatever. There is also a notion of pinned blocks, and a need to manually call chainHead_v1_unpin to unpin blocks and avoid losing the follow subscription. I'm not very familiar with Subway, but perhaps this could impact things like caching and such, and might be worth pondering more thoroughly :)

Perhaps the example config could also be updated to include the new stable RPCs?

@xlc
Copy link
Member

xlc commented Jun 12, 2024

would you able to add the new methods to the config and give it a try? if it works then we can just update the default config. it it doesn’t work the we can investigate what changes are needed

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

No branches or pull requests

3 participants