How to Verify by Hash that New Deployment is Identical to One at Different Canister?

Hello everyone,

I have a question regarding verifying deployments in the Internet Computer. Specifically, I want to ensure that a new deployment is identical to one already deployed on a different canister. Is there a recommended way to use hashes to perform this verification? If so, what steps should I follow to generate and compare these hashes to confirm the integrity and identical nature of the two deployments?

Any guidance or detailed instructions would be greatly appreciated!

Thank you!

dfx canister info shows the hash of the wasm that is installed in the canister. If this hash matches between two deployments then they run the same code.

If you want to include state or init values in your verification you need to do this on the application level