Closed AArnott closed 3 months ago
@AArnott thanks very much for the report. Is there any chance that you can provide the contents of the scan queue (along with the current range being scanned) at the time that you encounter this error?
scan range at time of panic: 2516985..2523970
block_range_start | block_range_end | priority |
---|---|---|
419200 | 2224314 | 0 |
2224314 | 2516985 | 20 |
2516985 | 2546643 | 50 |
https://github.com/zcash/incrementalmerkletree/pull/107 removes the assertion that is at fault here, and improves the distinction between pruned nodes and inserted nodes. A librustzcash PR will follow from this, but the shardtree
change should be sufficient to work around your problem. @AArnott can you try it out?
Yes, I can confirm the panic goes away with that shardtree change.
The summary here is that the assertion that was added in conjunction with the previous bugfix was testing a flaky condition that doesn't work correctly with how subtree roots were previously being inserted. #1439 will change librustzcash to change how it does subtree root insertion to add a semantic distinction between fully-scanned-and-pruned subtree roots and inserted subtree roots, but I don't think it will be a good idea to reintroduce the assertion irrespective of this change.
I'm getting panics when syncing after merging the latest from main into my app. I've narrowed the problem down to this segment of commits:
03fc64cf Merge pull request #1396 from nuttycom/test/block_spanning_shards 3e090dca Apply suggestions from code review 3bc74b25 zcash_client_sqlite: Improve documentation for test setup functions. e3956c32 zcash_client_sqlite: Fix clippy complaint. ecea9ca1 zcash_client_sqlite: Fix shardtree error caused by pruning after frontier insertion. de66c5b1 zcash_client_sqlite: Add test to reproduce incomplete penultimate subtree error. 3db515e3 zcash_client_sqlite: Allow multi-output fake blocks to send to multiple keys. c88cd179 zcash_client_sqlite: Add multiple output capability to fake compact block construction.
The panic is in the shardtree processing, so it's reinforcing to see that shardtree appears in the list of changes.
Code at failure (incrementalmerkletree-963d685c35fcaf01\8b4b131\shardtree\src\prunable.rs:751):
Callstack