Skip to content

AsHashTree - what is it? Does it require data to be hashed? #668

@vporton

Description

@vporton

From https://docs.rs/ic-certified-map/latest/ic_certified_map/trait.AsHashTree.html it's unclear the following:

For AsHashTree is it required that leafs are pseudorandom?

If I, for example, have an u64 value, transform is to U256 and further to [u8; 32] and then to Vec<u8> of length 32, will it be a suitable value for a leaf? It isn't a pseudo-random hash, because it has leading zeros.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions