dcrwallet icon indicating copy to clipboard operation
dcrwallet copied to clipboard

Expire old addresses

Open davecgh opened this issue 9 years ago • 1 comments

Currently, once an address is generated, the wallet will watch it for transactions that involve it forever.

This is not ideal because it means that over time more and more addresses need to be kept in memory and tracked even though each address is really only intended to be used once. While it's true that it takes a ton of addresses to really make any noticeable impact, I think expiring old addresses should ultimately be implemented. There really isn't any reason to continue watching super old addresses that were only intended for a single use, no longer have any coins associated with them, and will never be used again.

Obviously it would be important to carefully consider the conditions under which addresses are expired. I suspect something like all addresses with 0 balance and >3 months since a transaction has involved them would be a pretty reasonable set of conditions for expiration.

Such a feature would clearly need to be accompanied by an RPC to unexpire an address and perhaps some type of automatic infrequent periodic rescan of expired addresses to catch any unexpected funds that somehow got sent to an old expired address.

The end result of this would be that the set of watched addresses would stay relatively small and tidy forever instead of ballooning over time as they currently do.

davecgh avatar Mar 16 '16 06:03 davecgh

Working on this

ReevesAk avatar Jul 08 '19 13:07 ReevesAk