-
Notifications
You must be signed in to change notification settings - Fork 683
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
[rpc] we need the rpc to subscribe or filter the event for substrate chain. #1532
Comments
duplicate to #278? |
The node will never start to interpret the metadata. Metadata is an opaque blob for the node. We also want to prevent to add more non-light-client friendly RPCs. |
I think rpc need a way to filter event by pallet index at least. Using pallet index is not related to metadata, and it's good enough to reduce too many network IO about events. |
You can just add a runtime api for doing this on your chain. |
For now, due the event is a storage in frame-system, for 3rd parties, we can only fetch all event for a block, then parse the event in logic.
I know the event is related with the runtime metadata info, but for 3rd party, we really do no need other events, which will waste lots of network traffic for we do not need them.
In fact in the production env, the event is already nearly largest storage for every block, but the useful information for the developer is very small.
So I think polkadot-sdk for now, can design a protocol to describe how to subscribe or filter the event in node part rather then in the client part.
The rpc can be optional, and it parses the runtime metadata in node part, so user/developer just need to provide the information for the event name or other thing, node will know the info and return the event data if it appears in blocks.
The text was updated successfully, but these errors were encountered: