stack_wallet icon indicating copy to clipboard operation
stack_wallet copied to clipboard

Activity at indices over maxNumberOfIndexesToCheck is ignored

Open sneurlax opened this issue 2 years ago • 2 comments

maxNumberOfIndexesToCheck is currently set to 1000. Activity at indices over this limit, eg at index 1001, is ignored.

Instead of a hard cap on wallet activity, this should be a dynamic limit based on the highest index with activity highestIndexWithActivity + the gap limit maxUnusedAddressGap. Then, maxNumberOfIndexesToCheck would be better described as minNumberOfIndexesToCheck, because we will always scan up to either minNumberOfIndexesToCheck or highestIndexWithActivity + maxUnusedAddressGap, whichever is higher.

Then, minNumberOfIndexesToCheck could be reduced to 0 or simply removed and we could just scan up to the gap limit maxUnusedAddressGap on any derivation paths. Short or removing minNumberOfIndexesToCheck entirely, it could safely be reduced from 1000 to 100 or any other lower number. I recommend removing minNumberOfIndexesToCheck entirely (or setting it to 0) and increasing maxUnusedAddressGap from 20 to 42.

sneurlax avatar Oct 21 '23 22:10 sneurlax

#683 implements the above, except leaving maxUnusedAddressGap at 20.

sneurlax avatar Oct 21 '23 22:10 sneurlax

The fusion testing wallet goes up to index 4164 currently btw

sneurlax avatar Oct 22 '23 00:10 sneurlax

Closed by #900

sneurlax avatar Jul 03 '24 23:07 sneurlax