-
Notifications
You must be signed in to change notification settings - Fork 35
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
Migrate to latest darkside.proto
to help fix Darkside tests
#1191
Conversation
@@ -33,7 +33,7 @@ class AdvancedReOrgTests: ZcashTestCase { | |||
walletBirthday: birthday + 50, | |||
network: network | |||
) | |||
try await coordinator.reset(saplingActivation: 663150, branchID: self.branchID, chainName: self.chainName) | |||
try await coordinator.reset(saplingActivation: 663150, startSaplingTreeSize: 128607, startOrchardTreeSize: 0, branchID: self.branchID, chainName: self.chainName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bunch of the tests reference block height 663150, which corresponds to a persisted mainnet block elsewhere in the codebase. So everywhere I see that reference, I applied the Sapling tree size corresponding to it. There's likely a nicer way to do this, but that's refactoring I don't know how to do in Swift.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is coupled to the datasets for these tests here https://github.com/zcash-hackworks/darksidewalletd-test-data
These tests start from 663150 onwards. that's why they have that height. If you were to use another height then you need to reference a new dataset.
I think that this change makes sense.
Does Sbs require the wallet to get TreeStates to make node spendable? If so you should get those into dlwd as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@str4d how do you obtain this tree size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obtaining the tree states is what enables fast spendability; I believe that @str4d has already made the required change to lightwalletd here: zcash/lightwalletd#448
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That being said, the wallets should still function when connected to a LWD that doesn't support retrieval of tree states, but they'll be limited to linear scanning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pacu I fetched the tree size for that block height from my mainnet zcashd node. One of the RPCs exposes it.
b09e0a0
to
585082c
Compare
585082c
to
4c74e4d
Compare
Rebased on current |
darkside.proto
to fix Darkside testsdarkside.proto
to help fix Darkside tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first pass of review.
Will attempt to run the test and check their state
@@ -33,7 +33,7 @@ class AdvancedReOrgTests: ZcashTestCase { | |||
walletBirthday: birthday + 50, | |||
network: network | |||
) | |||
try await coordinator.reset(saplingActivation: 663150, branchID: self.branchID, chainName: self.chainName) | |||
try await coordinator.reset(saplingActivation: 663150, startSaplingTreeSize: 128607, startOrchardTreeSize: 0, branchID: self.branchID, chainName: self.chainName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is coupled to the datasets for these tests here https://github.com/zcash-hackworks/darksidewalletd-test-data
These tests start from 663150 onwards. that's why they have that height. If you were to use another height then you need to reference a new dataset.
I think that this change makes sense.
Does Sbs require the wallet to get TreeStates to make node spendable? If so you should get those into dlwd as well
@@ -33,7 +33,7 @@ class AdvancedReOrgTests: ZcashTestCase { | |||
walletBirthday: birthday + 50, | |||
network: network | |||
) | |||
try await coordinator.reset(saplingActivation: 663150, branchID: self.branchID, chainName: self.chainName) | |||
try await coordinator.reset(saplingActivation: 663150, startSaplingTreeSize: 128607, startOrchardTreeSize: 0, branchID: self.branchID, chainName: self.chainName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@str4d how do you obtain this tree size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran the tests using SDK 4c74e4d2041d5432bb25696b6bbf658b321fbf55
and LWD current master
branch commit 8269810eeefac56ce326b0f6878c1ea3821b8ad5
.
The dLWD tests are able to start and reset the chain.
The Tests fail for other reasons that appear not to be related to darkside.proto
failures.
Sync failed with error: rustScanBlocks("Error while scanning blocks: The underlying block store produced the following error: Requested height 663199 does not exist in the block cache")
If this is the sole purpose of the PR as it appears to be, then I consider it approved.
Approving as I also think the purpose of this PR is fulfilled. |
Depends on zcash/lightwalletd#448.
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
Reviewer