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

zcash_client_sqlite: account_balance_delta is non-deterministically set to *balance* at the time instead of the delta #1610

Open
AArnott opened this issue Nov 6, 2024 · 0 comments
Assignees

Comments

@AArnott
Copy link
Contributor

AArnott commented Nov 6, 2024

I have access to a Zcash account of one of my users, where one particular transaction will sometimes be downloaded and reported in the v_transactions view with an account_balance_delta of the new balance on the account after the transaction is applied instead of the delta that led to that balance.

Ya, pretty weird.

Specifically in the bug repro case, it is set to 81726753. In the "good" case, it is set to -285674820. In both cases, the data in the database expresses that the transaction has one spend, a fee, and no incoming value. The spent value is 28566482, which when added to the 10000 fee equals the real delta on the account balance.
So why would that column sporadically be set not to the delta, but to the balance after the delta is applied?

This was a fully shielded transaction, BTW. So I don't think the explanation could have anything to do with UTXOs that had or had not yet been saved to the database.

@nuttycom nuttycom self-assigned this Nov 7, 2024
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

No branches or pull requests

2 participants