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

Uploader optimisation #1889

Merged
merged 3 commits into from
Jun 17, 2024
Merged

Uploader optimisation #1889

merged 3 commits into from
Jun 17, 2024

Conversation

maqi
Copy link
Member

@maqi maqi commented Jun 14, 2024

This pull request primarily focuses on improving the sn_client module in the Rust codebase. The changes include refactoring and renaming methods in the Client implementation, adding new methods to handle and resend unconfirmed transactions, and improving log messages for better debugging and user experience. Additionally, a new unit test has been added in the sn_transfers module to test the payment selection functionality.

Changes in sn_client module:

  • sn_client/src/api.rs:
    • The trace! log message in the Client implementation has been updated to include a pretty printed version of the record key for better debugging.
    • The RetryStrategy for GetRecordCfg in the Client implementation has been removed to avoid unnecessary retries.
    • The crawl_spend_from_network method has been renamed to peek_a_spend and its get_quorum value has been changed to Quorum::One to fetch a single copy of the spend.
    • The is_genesis_spend_present method now uses the peek_a_spend method to check for the presence of the Genesis spend.
  • sn_client/src/uploader/upload.rs:
    • The InnerUploader implementation now includes a call to resend_pending_transaction_blocking_loop method to handle any pending transactions.
  • sn_client/src/wallet.rs:
    • A new method resend_pending_transaction_blocking_loop has been added to the WalletClient implementation. This method continuously resends unconfirmed transactions until they are all uploaded or the user manually terminates the process. It also logs and prints helpful messages for the user to understand the state of unconfirmed transactions.

Changes in sn_transfers module:

  • sn_transfers/src/wallet/api.rs:
    • A new unit test payment_selective has been added to test the functionality of selecting a payment transaction.

@maqi maqi force-pushed the uploader_optimisation branch from 86b9fd7 to 0515753 Compare June 14, 2024 15:53
sn_client/src/wallet.rs Outdated Show resolved Hide resolved
@maqi maqi force-pushed the uploader_optimisation branch from 0515753 to 29c5940 Compare June 16, 2024 21:47
@maqi maqi enabled auto-merge June 16, 2024 21:48
@maqi maqi added this pull request to the merge queue Jun 17, 2024
Merged via the queue into maidsafe:main with commit 55b3af1 Jun 17, 2024
41 checks passed
@maqi maqi deleted the uploader_optimisation branch June 17, 2024 00:52
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.

2 participants