Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug] a user encounters an error when trying to sync their wallet #1422

Closed
true-jared opened this issue May 1, 2024 · 1 comment
Closed
Assignees
Labels
bug Something isn't working M-user-support User support issue P-high High priority

Comments

@true-jared
Copy link
Contributor

true-jared commented May 1, 2024

Slack report: https://zcash.slack.com/archives/C06S4T7F3J5/p1714555758041279

Logs containing given error:
scratch_110.txt

@true-jared true-jared added bug Something isn't working M-user-support User support issue P-high High priority labels May 1, 2024
@true-jared true-jared added this to the Android Zashi 1.1 milestone May 1, 2024
@true-jared true-jared added the S-in-progress Status: Work is currently in progress on this item. label May 1, 2024
@true-jared true-jared self-assigned this May 1, 2024
@true-jared true-jared changed the title [Bug] user encounters an error when trying to sync their wallet [Bug] a user encounters an error when trying to sync their wallet May 1, 2024
@str4d
Copy link
Contributor

str4d commented Jul 3, 2024

My hypothesis is that this is a zebrad bug.

The error in question is due to lightwalletd returning an error when asked for the (presumably Sapling) tree state at height 419200. At that height, the tree was empty (because no Sapling transactions were mined in the first Sapling block); the tree gains its first note at height 419201.

z_gettreestate is designed to support backing nodes that don't persist a tree state for every block. finalState is omitted if the backing node does not have it, and instead skipHash is provided pointing to the most recent prior block height for which the backing node has a tree state.

In zcashd's implementation, if there is no such prior state, then skipHash is also omitted. However, zcashd encodes the empty tree state for blocks in which the tree is empty, so there is always a base case (at least for height requests from Sapling activation).

My suspicion is that zebrad does not store the empty tree, and as such when queried for z_gettreestate 419200 it omits finalState, leading to lightwalletd reporting this error: https://github.com/zcash/lightwalletd/blob/6e3816b5834583c492c37ce05b0faaf9fe12c87f/frontend/service.go#L288-L290 (which itself is misleading as it implicates zcashd no matter the backend).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working M-user-support User support issue P-high High priority
Projects
None yet
Development

No branches or pull requests

4 participants