-
Notifications
You must be signed in to change notification settings - Fork 29
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
Evaluate risks of keeping all the state in memory #1618
Comments
Thank you very much for creating this issue. First, I think it isn't going to be a problem for the foreseable future, as you said, since we only store very simple objects, and the on-chain operations gas and off-chain fees requirements would be limitants for attackers to abuse state space constraints. Proactively, we could and should put safeguards in place to prevent some specific peer/partner/sender/channel state becoming unreasonably big. Some of the best candidates could be:
The rest of the state is mostly temporary (although required to be persisted across restarts), like |
Good to know 👍 |
Description
In our current approach, the whole SDK state is kept in memory while it currently works fine and it is not a big problem, we keep adding things. As we keep adding more state that is kept in memory and persisted in local storage.
In #1607 the balance proofs received and send for each channel will be also added in the state. We have seen in the python client that extended usage keeps increasing the database size. For the light client, all this data is also active in memory.
We should evaluate any possible risks or problems that might arise from this approach.
Acceptance criteria
Tasks
The text was updated successfully, but these errors were encountered: