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

[feature request] Instruction-level queries #4991

Open
0x009922 opened this issue Aug 21, 2024 · 3 comments
Open

[feature request] Instruction-level queries #4991

0x009922 opened this issue Aug 21, 2024 · 3 comments
Labels
api-changes Changes in the API for client libraries Enhancement New feature or request queries question Further information is requested

Comments

@0x009922
Copy link
Contributor

0x009922 commented Aug 21, 2024

Use case

In Explorer we need to display history not only in terms of blocks/transactions, but in terms of specific instructions (atomic operations) too: registers, mints, burns, transfers, grants, revokes etc.

Desired solution

  • Introduce a new query, e.g. FindInstructions
  • Filter by instruction kind (Register, Mint, Transfer etc)
  • Filter by transaction hash
  • Filter by transaction authority (account id)
  • Sort from latest to oldest
  • Attach to each instruction a hash of the transaction containing it
  • Reconsider FindTransactions: allow fetch only shallow data of transactions, without "executable" - the list of ISIs in a single transaction could sometimes be vast; loading of WASM might not be needed at all.
@0x009922 0x009922 added Enhancement New feature or request question Further information is requested api-changes Changes in the API for client libraries queries labels Aug 21, 2024
@mversic
Copy link
Contributor

mversic commented Oct 10, 2024

This is unlikely to happen, at least not any time soon. This would be a black hole for memory consumption so it needs to be considered very carefully.

If we decide to do this, then for this feature to be useful and work correctly, we need to make sure that we also log every instruction that is executed from a smart contract, trigger or executor (it can modify existing or execute additional ISI)

@mversic mversic added this to Iroha Oct 10, 2024
@mversic mversic moved this to Roadmap in Iroha Oct 10, 2024
@mversic
Copy link
Contributor

mversic commented Oct 10, 2024

is there an example of other blockchain explorers providing this feature?

@0x009922
Copy link
Contributor Author

is there an example of other blockchain explorers providing this feature?

I think other blockchains tend to work in terms of transactions as units of mutation. In Iroha it is a single unit too, but it can consist of multiple actual operations. So the question is: do users need to query for specific operations? (I don't have a definitive answer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-changes Changes in the API for client libraries Enhancement New feature or request queries question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants