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

feat(cli): skip payment and upload for existing chunks #1069

Merged
merged 1 commit into from Dec 12, 2023

Conversation

maqi
Copy link
Member

@maqi maqi commented Dec 12, 2023

Description

Summary generated by Reviewpad on 12 Dec 23 13:13 UTC

This pull request includes the following changes:

  1. Added an environment variable "SAFE_DATA_PATH" and set its value to "/home/runner/.local/share/safe".
  2. Added a step to start a different client to upload the same file using a different client. This step includes various commands to perform the upload and display the output.
  3. Added a step for testing data integrity during nodes churn.
  4. Made changes in the sn_cli module to handle the verification of chunks and payment for storage.
  5. Made changes in the sn_client module to handle payment for chunks and storage, and added a function to skip existing chunks during payment.
  6. Made changes in the sn_client module to handle payment for storage in the ClientRegister struct.
  7. Made changes in the sn_client module to add a list of existing chunks that need to be skipped during payment for storage.
  8. Made changes in the sn_client module to return a list of skipped chunks during payment for storage.
  9. Made changes in the sn_node module to handle storage payment proofs cached in the wallet.
  10. Updated the test cases in the storage_payments module to reflect the changes in payment for storage.

Overall, these changes improve the handling of payment for storage and the verification of chunks in the code.

@reviewpad reviewpad bot requested a review from joshuef December 12, 2023 13:13
@reviewpad reviewpad bot added Small Pull request is small waiting-for-review labels Dec 12, 2023
cat transfer_hex
cargo run --bin safe --release -- --log-output-dest=data-dir wallet receive --file transfer_hex
cargo run --bin safe --release -- --log-output-dest=data-dir files upload "./the-test-data.zip" --show-holders > second_upload.txt
cat second_upload.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this a full test and check the output here has no spend? (or am I missing that?)

Copy link
Member Author

Choose a reason for hiding this comment

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

added an rg check to confirm the balance of wallet remain unchanged

sn_client/src/file_apis.rs Outdated Show resolved Hide resolved
@joshuef joshuef added this pull request to the merge queue Dec 12, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 12, 2023
@maqi maqi added this pull request to the merge queue Dec 12, 2023
Merged via the queue into maidsafe:main with commit 45c0ed3 Dec 12, 2023
29 checks passed
@maqi maqi deleted the skip_existing_chunks branch December 12, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Small Pull request is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants