From https://github.com/zcash/zcash/issues/4138
zcashd ought to be more verbose in its debug logging of wallet state updates (txos/notes added, spent, expired, etc). There are many reported bugs about wallet state and they're difficult to analyze because the debug log says so little about this.
Also related: https://github.com/zcash/zcash/issues/3114
Please add your comments. Will be good to discuss what format and content this new entries will have in the log.
I suggest the following requirement:
With the requisite debugging flags enabled, it should be possible, just by scanning the debug log, to accurate track (or retroactively reproduce) the wallet state and its changes over time, in terms of:
Note that 2 can be deduced from 1, but reporting 2 explicitly would help debug the zcashd code that computes 2.
Working on this may open opportunities for new tests. Let's identify those, because we _know_ the current code is broken on some ill-understood corner cases! Ditto, refactoring opportunities.
Also, the wallet SDK and Zecwallet face some similar tasks, so perhaps there's overlap/inspiration there, or perhaps opportunities for code reuse or at least format-compatible logging? (ping: @str4d, @adityapk00)
@LarryRuane has submitted a few PRs that might aid much of what is discussed above.
@mdr0id / @LarryRuane can you post the links of submitted PRs? Looking to group together all related to "add more logs". Thanks.
Most helpful comment
I suggest the following requirement:
With the requisite debugging flags enabled, it should be possible, just by scanning the debug log, to accurate track (or retroactively reproduce) the wallet state and its changes over time, in terms of:
Note that 2 can be deduced from 1, but reporting 2 explicitly would help debug the zcashd code that computes 2.
Working on this may open opportunities for new tests. Let's identify those, because we _know_ the current code is broken on some ill-understood corner cases! Ditto, refactoring opportunities.
Also, the wallet SDK and Zecwallet face some similar tasks, so perhaps there's overlap/inspiration there, or perhaps opportunities for code reuse or at least format-compatible logging? (ping: @str4d, @adityapk00)