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

Supporting parsed data #5

Open
linuskendall opened this issue Nov 5, 2023 · 4 comments
Open

Supporting parsed data #5

linuskendall opened this issue Nov 5, 2023 · 4 comments
Labels
downstream what rpc will provide to users/clients/consumers of the API

Comments

@linuskendall
Copy link

linuskendall commented Nov 5, 2023

There are a few corners of the current RPC spec that requires knowledge about onchain programs and the ability to interpret them (or rely on some kind of indexed data store) - in particular to support the jsonParsed encoding.

There has also been requests from developers for having higher level interfaces for both filter (getPA style) and for getting more parsed account data (a la jsonParsed). Currently jsonParsed supports only a limited set of programs (https://github.com/solana-labs/solana/tree/master/transaction-status/src) and has no easy way to extend.

Suggestions that have been floated:

  • Have RPC server support anchor IDLs a way to expand the set of programs that can be used
  • Have graph QL support for more rich querying (a la Solana FM?) (this would probably rely on an indexed store)
@linuskendall linuskendall changed the title Supporting indexed/parsed data Supporting parsed data Nov 5, 2023
This was referenced Nov 5, 2023
@grooviegermanikus
Copy link
Contributor

are you looking at this to have preprocesses (pre-parsed) data or to parser on query?

pre-parsed:

  • PRO: faster access, indexing
  • PRO: data issues will be detected early
  • CON: parsing needs to be defined prematurely
  • CON: migration/extending is hard

@grooviegermanikus
Copy link
Contributor

could you clarify - we need it parse account data as well as instructions? @linuskendall

@vovkman
Copy link

vovkman commented Nov 10, 2023

Referencing this thread here - https://x.com/redacted_noah/status/1723031204180398374?s=20

Using runtime parsing would probably work for such a usecase, but we could also consider a separate table, or additional field for JSON data if we wanted to make use of DB to seek over specific values in a JSON from IDL. Obv scanning over rows in mem would be nasty for large scans

@vovkman
Copy link

vovkman commented Nov 10, 2023

are you looking at this to have preprocesses (pre-parsed) data or to parser on query?

pre-parsed:

  • PRO: faster access, indexing
  • PRO: data issues will be detected early
  • CON: parsing needs to be defined prematurely
  • CON: migration/extending is hard

IMO any parsing that ends up in a data store should be based on IDL, then you eliminate the two CON's

Anything additional should be computed on query

@grooviegermanikus grooviegermanikus added the downstream what rpc will provide to users/clients/consumers of the API label Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
downstream what rpc will provide to users/clients/consumers of the API
Projects
None yet
Development

No branches or pull requests

3 participants