Skip to content

Add getTreeMetadata API endpoint #23

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

Open
wants to merge 115 commits into
base: jorrit/feat-add-test
Choose a base branch
from

Conversation

sergeytimoshin
Copy link

Implement a new API method getTreeMetadata to retrieve metadata about queue-tree mappings.

sergeytimoshin and others added 30 commits February 20, 2025 14:55
Update src/dao/generated/accounts.rs

Co-authored-by: ananas-block <58553958+ananas-block@users.noreply.github.com>

Update src/ingester/parser/batch_event_parser.rs

Co-authored-by: ananas-block <58553958+ananas-block@users.noreply.github.com>

refactor: remove getSubtrees method and related API documentation

Update src/ingester/parser/mod.rs

Co-authored-by: ananas-block <58553958+ananas-block@users.noreply.github.com>

Refactor struct fields to use camelCase naming convention

replace the `calculate_two_inputs_hash_chain` function with the `create_two_inputs_hash_chain` method from the `light_compressed_account` crate.

Refactor error handling in `parse_public_transaction_event_v2`

format

Remove obsolete and commented-out account update code

Move `node_index_to_leaf_index` function to the appropriate location and remove dead code

Add comments to clarify nullifier field usage

Add comments to clarify tx_hash field usage in account struct

Add comments to clarify seq field usage in account struct

Add comments to clarify nullifier_queue_index field usage in account struct

Refactor get_compressed_accounts_by_owner module and add common utilities for account filtering

add validity proof v2

Add get_validity_proof_v2 and update API specifications

remove unnecessary logging

fix: mock tests

fix for getValidityProof (v1)

refactor: remove unused tree height parameters and add getValidityProofV2 method

fix: update method name from address_from_bytes to state_from_bytes in mod.rs consistency.

fix indexed_accounts query

fix get_compressed_account_by_owner v1

refactor: simplify account handling and improve code consistency in transaction processing

refactor: remove queue_position handling and update related queries and indexes

upd .gitignore

cargo fmt and fixed tests
wip e2e test

make get_compressed_accounts_by_owner_v2 return AccountV2 primitive

add mock_tests.rs

add prove_by_index to AccountV2

refactor: validate heights of inclusion and non-inclusion proofs

refactor: implement AccountWithContext constructor and remove parse_account_data function

refactor: move spend_input_accounts_batched function to spend_batch module

refactor: rename spend_batch module to spend and move spend_input_accounts function

refactor: streamline transaction parsing

refactor: restructure ingester/parser module

refactor: restructure ingester/persist module

Co-authored-by: ananas-block <58553958+ananas-block@users.noreply.github.com>

Co-authored-by: ananas-block <58553958+ananas-block@users.noreply.github.com>

Co-authored-by: ananas-block <58553958+ananas-block@users.noreply.github.com>

test: add compressed token in batched tree test
…id-arg

feat: add support for custom account compression program ID
…d address is in the AddressQueue but not in tree yet, we should return error. For V1 trees we still return non-inclusion proof, because we don't have information about V1 queue.

* Add offset as request parameter to get_batch_address_update_info.
* Various cleanups
Implement a new API method `getTreeMetadata` to retrieve metadata about queue-tree mappings.
@sergeytimoshin sergeytimoshin force-pushed the jorrit/feat-add-test branch from 2800b7f to 8812f95 Compare May 30, 2025 10:02
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 this pull request may close these issues.

3 participants