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

detect storage leaks automatically in unit tests #286

Open
brenzi opened this issue Nov 26, 2022 · 2 comments · May be fixed by #292
Open

detect storage leaks automatically in unit tests #286

brenzi opened this issue Nov 26, 2022 · 2 comments · May be fixed by #292

Comments

@brenzi
Copy link
Member

brenzi commented Nov 26, 2022

We've had several storage leak issues in the past and I think we don't approach this systematically yet. We might catch most probable leaks if we

  1. measure state size
  2. register and grow a community with more ceremonies than reputation lifetime
  3. purge community
  4. measure state size again during same phase. assert equal to above q.e.d.
@brenzi brenzi changed the title detect most detect storage leaks automatically in unit tests Nov 26, 2022
@brenzi
Copy link
Member Author

brenzi commented Nov 27, 2022

@brenzi brenzi linked a pull request Nov 27, 2022 that will close this issue
@clangenb
Copy link
Member

I think it will probably be hard to test this because I assume there are other storages that might persist in non-encointer pallets, like timestamp etc, this would basically imply that we need to do some stuff manually again. However, this would at least be false positives and not false-negatives.

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

Successfully merging a pull request may close this issue.

2 participants