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

Review PR for changes to ZcashLightClientKit for fast spendability. #1257

Closed
wants to merge 82 commits into from

Conversation

nuttycom
Copy link
Contributor

This PR is not intended to be merged; instead, it's intended to allow for a unified UI for review of the feature/DAG-sync changes that includes changes already merged to main.

str4d and others added 30 commits July 19, 2023 18:13
Migrate to Rust backend with fast spendability support
- SubtreeRoot placeholder removed, we can rely on the generated one from the gprc
The previous FFI repo revision no longer exists; commits between
87faf91 and here will not build.
epk -> ephemeralKey refactor done so offline tests in the SDK pass, therefore the CI passes as well
Update Rust dependencies with bugfixes
- mainnet & testnet checkpoints
- firstUnenhancedHeight is now properly used
- fixed tests
…ot-called

[#1184] FirstUnenhancedHeight not called
The previous FFI repo revisions no longer exist; commits between
87faf91 and here will not build.
Update Rust dependencies with checkpoint and memo bugfixes
Bumps [github.com/apple/swift-nio-extras](https://github.com/apple/swift-nio-extras) from 1.12.1 to 1.19.0.
- [Release notes](https://github.com/apple/swift-nio-extras/releases)
- [Commits](apple/swift-nio-extras@1.12.1...1.19.0)

---
updated-dependencies:
- dependency-name: github.com/apple/swift-nio-extras
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…/swift-nio-extras-1.19.0

Bump github.com/apple/swift-nio-extras from 1.12.1 to 1.19.0
- the priorities for log levels have been updated

[#1196] Check logging level priorities

- changelog updated
The previous FFI repo revisions no longer exist; commits between
87faf91 and here will not build.
Update Rust dependencies with scanning and spending bugfixes
- hotfix for explicit use of self in a Task, CI fails to build it without it
Migrate to latest `darkside.proto` to help fix Darkside tests
- endpoint updated to the latest and workable server
Update the `zcash-light-client-ffi` dependency version.
The previous FFI repo revisions no longer exist; commits between
87faf91 and here will not build.

Update Rust dependencies with account birthdays and scan progress

- fixes for SampleApp
Update Rust dependencies with account birthdays and scan progress
draft

[#1165] Step 1 - Download note commitment tree data from lightwalletd

- code cleanup after draft

[#1165] Step 1 - Download note commitment tree data from lightwalletd

- UpdateSubtreeRootsAction added, ensuring the roots are downloaded and stored in the DB

[#1165] Step 1 - Download note commitment tree data from lightwalletd

- added ZcashError for putSaplingSubtreeRoots failure
- cleaned up action

[#1165] Step 1 - Download note commitment tree data from lightwalletd

- demo app config temporarily updated to Nighthawk server

[#1165] Step 1 - Download note commitment tree data from lightwalletd

- file header updated

[#1165] Step 1 - Download note commitment tree data from lightwalletd (#1174)

- demo app config cleaned up

[#1165] Step 1 - Download note commitment tree data from lightwalletd (#1174)

- offline tests fixed
Copy link
Contributor Author

@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.

I opened this review-only PR, so I cannot approve or request changes. None of my comments are blocking, but it would be helpful to have the questions addressed and where changes are required, please create issues.

Copy link
Collaborator

@str4d str4d left a comment

Choose a reason for hiding this comment

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

Reviewed as of 2ac984a (excluding some files under Tests/).

Copy link
Contributor

@pacu pacu left a comment

Choose a reason for hiding this comment

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

image can't reject. :/

Reviewed the files and left questions and change request.

- all comments from the review (round 1) resolved
- when isContinuityError occurred, the next action  should be rewind, fixed
- adding a context so it's clear why division by 0 is not a concern
- pending transactions removed from the DemoApp's UI, #1260 is a followup
- the logic deciding if verify range is present and going to the rewind is no longer valid, so removed
- tests updated
- cbp_state_machine.png as well as .puml files updated to reflect the State Machine changes after SBS
- one small cleanup of clearCache, no longer needed to be called twice, only after enhance (missed removal of linear sync)
- the diagram png + puml updated
- rewind action continues to the process scan ranges
- more comments resolved
- totalProgressRange removed from the SDK
- ScanRange now takes into account the given value and properly initializes, + added tests
- tests fixed
- totalProgressRange was removed from the protocol but not from the actual implementation
- only the matching priorities are allowed, otherwise fatalError
Copy link
Collaborator

@str4d str4d left a comment

Choose a reason for hiding this comment

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

utACK 26fe1f7

@nuttycom
Copy link
Contributor Author

utACK 26fe1f7

Copy link
Contributor

@pacu pacu left a comment

Choose a reason for hiding this comment

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

changes are non blocking for an RC, but I would pay specific attention to the Division By Zero and the allocations on the RustBackend not leaking

Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm not missing any other, this is the only action that actually implements the stop() method.

It's seems that stop doesn't belong to the protocol itself but to the implementation of the DownloadAction

@@ -409,35 +409,30 @@ public class Initializer {
/// - Parameter seed: ZIP-32 Seed bytes for the wallet that will be initialized
/// - Throws: `InitializerError.dataDbInitFailed` if the creation of the dataDb fails
/// `InitializerError.accountInitFailed` if the account table can't be initialized.
func initialize(with seed: [UInt8]?, viewingKeys: [UnifiedFullViewingKey], walletBirthday: BlockHeight) async throws -> InitializationResult {
Copy link
Contributor

Choose a reason for hiding this comment

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

Documentation of the function is outdated and does not match the parameters required. Consider updating them

Sources/ZcashLightClientKit/Initializer.swift Show resolved Hide resolved
@nuttycom
Copy link
Contributor Author

Closing as complete with the 2.0.0 release.

@nuttycom nuttycom closed this Sep 25, 2023
@nuttycom nuttycom deleted the feature/DAG-sync branch September 25, 2023 22:55
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.

None yet

4 participants