fixed types in tree hash algorithm