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

Multi-account and PCZT support #1517

Open
wants to merge 31 commits into
base: 1514-Finish-multi-account-support
Choose a base branch
from

Conversation

LukasKorba
Copy link
Collaborator

@LukasKorba LukasKorba commented Dec 4, 2024

Closes #522
Closes #1513
Closes #1514

This code review checklist is intended to serve as a starting point for the author and reviewer, although it may not be appropriate for all types of changes (e.g. fixing a spelling typo in documentation). For more in-depth discussion of how we think about code review, please see Code Review Guidelines.

Author

  • Self-review: Did you review your own code in GitHub's web interface? Code often looks different when reviewing the diff in a browser, making it easier to spot potential bugs.
  • Automated tests: Did you add appropriate automated tests for any code changes?
  • Code coverage: Did you check the code coverage report for the automated tests? While we are not looking for perfect coverage, the tool can point out potential cases that have been missed.
  • Documentation: Did you update Docs as appropiate? (E.g README.md, etc.)
  • Run the app: Did you run the app and try the changes?
  • Did you provide Screenshots of what the App looks like before and after your changes as part of the description of this PR? (only applicable to UI Changes)
  • Rebase and squash: Did you pull in the latest changes from the main branch and squash your commits before assigning a reviewer? Having your code up to date and squashed will make it easier for others to review. Use best judgement when squashing commits, as some changes (such as refactoring) might be easier to review as a separate commit.

Reviewer

  • Checklist review: Did you go through the code with the Code Review Guidelines checklist?
  • Ad hoc review: Did you perform an ad hoc review? In addition to a first pass using the code review guidelines, do a second pass using your best judgement and experience which may identify additional questions or comments. Research shows that code review is most effective when done in multiple passes, where reviewers look for different things through each pass.
  • Automated tests: Did you review the automated tests?
  • Manual tests: Did you review the manual tests?You will find manual testing guidelines under our manual testing section
  • How is Code Coverage affected by this PR? We encourage you to compare coverage befor and after your changes and when possible, leave it in a better place. Learn More...
  • Documentation: Did you review Docs, README.md, LICENSE.md, and Architecture.md as appropriate?
  • Run the app: Did you run the app and try the changes? While the CI server runs the app to look for build failures or crashes, humans running the app are more likely to notice unexpected log messages, UI inconsistencies, or bad output data.

- the FFI has been switched to a preview of import UFVK
- importAccount() WIP
- Some of the Zip32AccountIndex has been refactored to UUID
- Public import UFVK method in the SDK added

AccountUUID refactor - phase 1

- rebased
@LukasKorba LukasKorba requested review from nuttycom and str4d December 4, 2024 13:10
- SDK builds again, UUIDs refactored everywhere in the SDK and demo app
- tests will follow in the next phase
- refactor of documented code in the follow up
Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

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

This looks like it has a problem to me, which is that by just picking the first account in a lot of cases it may get inconsistent results. The order of accounts is nondeterministic, and it shouldn't be left to chance even if it was deterministic; the account that's in use needs to be tracked explicitly.

@LukasKorba LukasKorba requested a review from nuttycom December 4, 2024 18:50
Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

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

Overall looking good; the one thing that I think needs to be changed is that keySource should be optional.

Sources/ZcashLightClientKit/Initializer.swift Outdated Show resolved Hide resolved
Sources/ZcashLightClientKit/Model/WalletTypes.swift Outdated Show resolved Hide resolved
Sources/ZcashLightClientKit/Model/WalletTypes.swift Outdated Show resolved Hide resolved
Sources/ZcashLightClientKit/Model/WalletTypes.swift Outdated Show resolved Hide resolved
Sources/ZcashLightClientKit/Model/WalletTypes.swift Outdated Show resolved Hide resolved
Sources/ZcashLightClientKit/Rust/ZcashRustBackend.swift Outdated Show resolved Hide resolved
Sources/ZcashLightClientKit/Synchronizer.swift Outdated Show resolved Hide resolved
Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

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

Overall looking good; the one thing that I think needs to be changed is that keySource should be optional.

@LukasKorba LukasKorba requested a review from nuttycom December 5, 2024 09:02
@LukasKorba LukasKorba marked this pull request as ready for review December 5, 2024 09:04
- Comments in the code updated and cleaned up
- OfflineTests passes again, those failing has been removed from the bundle and marked to be fixed with a TODO

Fixes of build

- The SDK builds again
@LukasKorba LukasKorba force-pushed the import-ufvk-ffi-preview branch from 01984b2 to 27af6f1 Compare December 5, 2024 09:31
OfflineTests fixes
- updated to build and tests that are obsolete are now taken out of the bundle
- rust backend `getAccount` method implemented, it returns Account with associated data
- `listAccount()` has been modified to return an array of Accounts instead of AccountUUIDs
- Account refactored to conform to Equatable, Hashable, Codable, Identifiable
- importAccount(ufvk, purpose, name, keySource) API
UnifiedAddress Hashable conformance
@LukasKorba LukasKorba force-pushed the import-ufvk-ffi-preview branch from 9c239be to dcf6cd9 Compare December 9, 2024 13:28
- a new public API for DerivationTool to derive UA from the UFVK added
- also attempt to fix _uuid in views
- Refactored to the proper types
- ufvk removed from the parameters
from_account_uuid
@LukasKorba LukasKorba force-pushed the import-ufvk-ffi-preview branch from 985e677 to dd587ac Compare December 10, 2024 21:15
@LukasKorba LukasKorba force-pushed the import-ufvk-ffi-preview branch from ee8a88e to 75cfd08 Compare December 11, 2024 18:39
alias reverted

Alias logic updated
@LukasKorba LukasKorba force-pushed the import-ufvk-ffi-preview branch from 75cfd08 to 632626a Compare December 11, 2024 18:44
- The comments were provided
- Changelog updated
- Code cleaned up
- Tests fixed
- Error codes for the Pczt
@LukasKorba LukasKorba changed the title Import ufvk ffi preview Multi-account and PCZT support Dec 13, 2024
- FFI version bumped to 0.12.0
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