How does algorand calculate block hash? - General - Algorand
How does algorand calculate block hash?
post by naveenvemy on Oct 6, 2022
Is there any documentation on how algorand computes block hashes?
post by fabrice on Oct 11, 2022
Usually on Algorand, everything is serialized using a canonical version of msgpack/messagepack (canonical means that zero values are omitted and keys are alphabetically sorted).
Then, hashing is done by applying SHA-512/256 on
prefix || msgpack_of_data
where || represents concatenation
and prefix is a prefix that is specified on specs/crypto.md at master · algorandfoundation/specs · GitHub / go-algorand/hash.go at 2bc55c06f4dacf247b93a15f47530f57b4925d28 · algorand/go-algorand · GitHub
You can find details of Block serialization there.