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

Ensure validate_state() is called after update_state() to enforce state validity and reduce redundant validation #1242

Open
sanity opened this issue Sep 26, 2024 · 1 comment
Assignees

Comments

@sanity
Copy link
Collaborator

sanity commented Sep 26, 2024

To prevent buggy or malicious contract behavior from propagating invalid states across the network, we should enforce a design where validate_state() is always called after update_state(). This will ensure that the state remains valid after a delta is applied, without relying on redundant validation inside the update_state() function itself. We should remove the validate_delta() function (if present) and explicitly discourage performing state validation within update_state(), as validate_state() will handle this post-update validation.

@gogo2464
Copy link
Contributor

OH nice can I be assigned to this please?

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

No branches or pull requests

3 participants