-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Comments
OH nice can I be assigned to this please? |
@gogo2464 You're welcome to try it and submit a pull request, assuming @iduartgomez hasn't started work on it. |
seems I could do it. |
Hasn't this been merged already? If so please close. |
not yet |
is this issue still active please? I can do it. |
@iduartgomez Is this still relevant? |
validate_state has been removed. We just need to ensure the code is still present in update_state. I think it is not anymore actually. You could close this issue. |
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 afterupdate_state()
. This will ensure that the state remains valid after a delta is applied, without relying on redundant validation inside theupdate_state()
function itself. We should remove thevalidate_delta()
function (if present) and explicitly discourage performing state validation withinupdate_state()
, asvalidate_state()
will handle this post-update validation.The text was updated successfully, but these errors were encountered: