Skip to content

transaction performance #396

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

Merged
merged 11 commits into from
Apr 27, 2025
Merged

transaction performance #396

merged 11 commits into from
Apr 27, 2025

Conversation

dkackman
Copy link
Collaborator

@dkackman dkackman commented Apr 7, 2025

Get transactions and coins in a single query

@dkackman dkackman marked this pull request as draft April 7, 2025 02:49
@dkackman dkackman self-assigned this Apr 7, 2025
@dkackman dkackman added the enhancement New feature or request label Apr 8, 2025
@dkackman dkackman added this to the 0.10.2 milestone Apr 8, 2025
@dkackman dkackman marked this pull request as ready for review April 8, 2025 15:31
@Rigidity Rigidity requested a review from Copilot April 27, 2025 02:52
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to improve transaction performance by consolidating multiple transaction queries into a single query and removing redundant API endpoints. Key changes include:

  • Replacing combined search queries with a single getTransactions call in Transactions.tsx.
  • Updating the Transaction page to use getTransactions with a unified search parameter.
  • Removing deprecated bindings and command registrations for get_transactions_by_item_id and get_transaction.

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/pages/Transactions.tsx Simplified transaction fetching by removing separate search queries.
src/pages/Transaction.tsx Updated transaction retrieval to use a single query response.
src/bindings.ts & src-tauri/src/lib.rs Removed deprecated API bindings and command registrations.
crates/sage/src/endpoints/data.rs Modified grouping and transaction coin processing logic.
crates/sage-database/src/coin_states.rs Revised SQL query and helper logic to support the consolidated query design.
Files not reviewed (1)
  • crates/sage-api/endpoints.json: Language not supported
Comments suppressed due to low confidence (3)

src/pages/Transactions.tsx:57

  • The previous logic that merged search-based transaction queries has been removed in favor of a single query. Please confirm that this change is intentional, as it may impact advanced search features previously available on the transactions page.
setTransactions(result.transactions);

crates/sage/src/endpoints/data.rs:838

  • Ensure that the 'derivation_count' field is consistently included in all transaction coin queries; its absence could lead to unexpected behavior when determining the AddressKind.
let derivation_count: Option<u32> = transaction_coin.get("derivation_count");

crates/sage-database/src/coin_states.rs:483

  • The new filtering logic in the SQL query now handles asset ID and address validations. Verify that all edge cases are covered and that the performance of the query has been validated with these changes.
if is_valid_asset_id(value) {

@Rigidity Rigidity merged commit 56e6a68 into xch-dev:main Apr 27, 2025
5 of 8 checks passed
@dkackman dkackman deleted the tx-perf branch May 7, 2025 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants