freenet-core
freenet-core copied to clipboard
Ensure validate_state() is called after update_state() to enforce state validity and reduce redundant validation
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.
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.
Done