I know how to use the CLI to compute the hash of stake pool metadata file, what I'm not sure of is how the hash is actually computed. What hash algorithm is used? Is the file hashed as raw bytes? Pointers to the cardano-node source code where this is accomplished is also appreciated.
1 Answer
The hash algorithm is Blake2b 256 and it is calculated on the raw metadata bytes.
I do not know where it is in cardano-node
, but in cardano-db-sync
its calculated at https://github.com/input-output-hk/cardano-db-sync/blob/master/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/OffChain/Http.hs#L153