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

Archive node API does not expose enough information by which to order actions #106

Open
45930 opened this issue Oct 21, 2024 · 0 comments · May be fixed by #107
Open

Archive node API does not expose enough information by which to order actions #106

45930 opened this issue Oct 21, 2024 · 0 comments · May be fixed by #107

Comments

@45930
Copy link
Contributor

45930 commented Oct 21, 2024

Relates to: o1-labs/o1js#1872

There are four different orderings that we need to consider when fetching transaction data from the archive DB-

  1. Blocks: blocks need to be ordered as per the canonical chain. For the ones pending ones you’ll need to select based on consensus rules which I believe is handled in the archive node API
  2. Transactions within a block have a sequence. There is a sequence_no column in blocks_zkapp_commands table that gives you the ordering
  3. Account updates within a zkapp transaction have a sequence. The ids are stored as an array dictating the order. zkapp_account_updates_ids column in zkapp_commands table
  4. Events/actions within an account update have a sequence. Same as account updates, ids are stored as array in zke.element_ids column in zkapp_events table

It doesn’t seem like the queries in the archive API consider 2, 3, and 4

We need to expose these details in the graphQL response to ensure clients have the information they need to correctly process actions.

@45930 45930 linked a pull request Oct 21, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant