You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #1327 we reworked the wasm validation at compile time to only validate the Code commitments instead of the Hash ones. This is because we need to validate the code that we receive from a transaction (even if the whitelist is in place the tx would be rejected by the VPs, so after it ran), but there's no need to validate the code that we retrieve from storage since that code should be validated when the code is written to storage in the first place (or on subsequent modifications).
This check though, is not done at the moment: we should include a call to validate_untrusted_wasm when initializing the storage (maybe in the pre_compile function?).
Wasm codes can also be added (or updated) through a governance proposal. In this case we could address this thing in two ways:
Protect the storage subspace of the wasm codes with a native vp running validation every time a write operation is performed
Provide a cli command to validate the wasm code
The second option seems to be more lightweight and easy to implement. Moreover, governance participants should check the content of a newly proposed wasm code anyway (to check what it does in practice and to validate the proposed whitelisted gas cost).
The text was updated successfully, but these errors were encountered:
In #1327 we reworked the wasm validation at compile time to only validate the
Code
commitments instead of theHash
ones. This is because we need to validate the code that we receive from a transaction (even if the whitelist is in place the tx would be rejected by the VPs, so after it ran), but there's no need to validate the code that we retrieve from storage since that code should be validated when the code is written to storage in the first place (or on subsequent modifications).This check though, is not done at the moment: we should include a call to
validate_untrusted_wasm
when initializing the storage (maybe in thepre_compile
function?).Wasm codes can also be added (or updated) through a governance proposal. In this case we could address this thing in two ways:
The second option seems to be more lightweight and easy to implement. Moreover, governance participants should check the content of a newly proposed wasm code anyway (to check what it does in practice and to validate the proposed whitelisted gas cost).
The text was updated successfully, but these errors were encountered: