Replace all usages of SafeHash with unverified Hash unless in cases where it is possible to track the source of the hash. If somewhere this is unavoidable, wait till the last second before unsafely converting to SafeHash.
Why
SafeHash is meant to encode that the hash has a pre-image, but this is not enforceable most of the time in practice, since both cardano-cli and cardano-api are often provided with the hash only, not with the pre-image.
Acceptance Criteria
There are no unsafe creations of SafeHash with the possible exception of just before interfaces with modules down the stack if unavoidable.
What
Replace all usages of
SafeHash
with unverifiedHash
unless in cases where it is possible to track the source of the hash. If somewhere this is unavoidable, wait till the last second before unsafely converting toSafeHash
.Why
SafeHash
is meant to encode that the hash has a pre-image, but this is not enforceable most of the time in practice, since bothcardano-cli
andcardano-api
are often provided with the hash only, not with the pre-image.Acceptance Criteria
SafeHash
with the possible exception of just before interfaces with modules down the stack if unavoidable.