-
Notifications
You must be signed in to change notification settings - Fork 110
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
Public method to build checksum for wasm code #359
Comments
Could be done. However, I think it's safe to say sha256 is the checksum and that's not going to change any time soon. I took sha256 from the wasmd codebase long time ago if I recall correctly, so it was introduced there first. Also we have such docs: "Checksum is the sha256 hash of the stored code". Sholdn't we start by deduplicating all the
What's that method doing? It cannot tell of something is a checksum or not. |
The wasmvm lib owns the checksum generation so it would be the cleanest to have it in this project. I trust the Go version of sha256 to work the same way as the Rust one. No need to call into Rust. Sorry, |
There's a bug related to this that I've fixed on our fork: osmosis-labs/wasmd#15 Basically: the checksum is being checked wrong in the CLI (it's checking the zipped instead of unzipped source) I can upstream this next week if no one gets to it before me |
Could you please report this in wasmd? Thank you! This issue is for creating a hasher, not hashing the right data so the bug is out of scope for wasmvm. |
I have the assumption that the checksum is a sha256 hash on the unzipped wasm code. It would be better to not have this assumption but call into the wasmvm library to let it do the checksum calculation.
Also helpful in this context:
IsChecksum([]byte) bool
The text was updated successfully, but these errors were encountered: