Problem
Bug description
When the pseudonym cache size is reduced, previously generated cached pseudonyms are not cleaned up after restart.
Current behavior
We currently have two cache settings:
mspCacheSize: cached pseudonyms for MSP Idemix (fp256bn)
defaultCacheSize: cached pseudonyms for wallet Idemix (bn254)
For example, if both values are set to 1000, the service pre-generates 1000 pseudonyms for each cache/pool.
If the configuration is later changed from 1000 to 10 for both settings, and the service is restarted, the previously generated 1000 pseudonyms per pool remain on disk. The service then creates a new cache using the updated value (10), but the old unused pseudonyms are not removed.
Expected behavior
When the cache size is reduced, the service should provide a way to clean up or remove pseudonyms inherited from the previous cache size, for both:
MSP Idemix (Fabric)
Wallet Idemix (FTS)
Impact
In a simple case with 1 wallet / 1 MSP, this leaves unused pseudonyms on the filesystem.
In our real use case, we have ~500 wallets, which results in thousands of unused pseudonyms accumulating on disk and requiring manual cleanup, with no easy way to identify and delete them safely without risking deleting relevant identities.
Suggested improvement
Add a mechanism to detect and remove obsolete cached pseudonyms when cache settings are reduced, or provide an explicit cleanup operation for unused pseudonyms from previous cache generations.
Observed in latest FTS version with Fabric 2.5 and Fabric Smart Client.
Solution
- Add a function or an algorithm, a script, to clean unused cached pseudonyms for MSP and wallet identities.
Alternatives
No response
Additional Context
No response
Problem
Bug description
When the pseudonym cache size is reduced, previously generated cached pseudonyms are not cleaned up after restart.
Current behavior
We currently have two cache settings:
mspCacheSize: cached pseudonyms for MSP Idemix (fp256bn)
defaultCacheSize: cached pseudonyms for wallet Idemix (bn254)
For example, if both values are set to 1000, the service pre-generates 1000 pseudonyms for each cache/pool.
If the configuration is later changed from 1000 to 10 for both settings, and the service is restarted, the previously generated 1000 pseudonyms per pool remain on disk. The service then creates a new cache using the updated value (10), but the old unused pseudonyms are not removed.
Expected behavior
When the cache size is reduced, the service should provide a way to clean up or remove pseudonyms inherited from the previous cache size, for both:
MSP Idemix (Fabric)
Wallet Idemix (FTS)
Impact
In a simple case with 1 wallet / 1 MSP, this leaves unused pseudonyms on the filesystem.
In our real use case, we have ~500 wallets, which results in thousands of unused pseudonyms accumulating on disk and requiring manual cleanup, with no easy way to identify and delete them safely without risking deleting relevant identities.
Suggested improvement
Add a mechanism to detect and remove obsolete cached pseudonyms when cache settings are reduced, or provide an explicit cleanup operation for unused pseudonyms from previous cache generations.
Observed in latest FTS version with Fabric 2.5 and Fabric Smart Client.
Solution
Alternatives
No response
Additional Context
No response