Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tech debt: no pattern is used when dealing with cached data in irmaclient.Client #365

Open
ivard opened this issue Dec 13, 2023 · 0 comments

Comments

@ivard
Copy link
Member

ivard commented Dec 13, 2023

The irmaclient.Client struct currently caches various data, representing the data stored in irmaclient.storage. No specific pattern is followed in this caching process, making it difficult to detect errors in maintaining consistency between the cache and the storage.

Revocation poses a particular challenge because numerous updates are required when re-downloading the nonrevocation witness. These updates occur in background tasks. Currently, it is challenging to assess whether potential race conditions exist because strict module separation is not applied.

The cached storage is currently used, among other things, to calculate the choices the user currently has when starting a disclosure session. Presently, an update is sent for each session every time the cache is updated. This mechanism is fragile, and it would be better if each session kept its own administration and only received an event when updates occurred. In this sense, the 'sessions' struct is also considered a code smell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant