You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This doesn't seem like a terrible idea. You could either add a field uint8 leaf_or_parent = 0/1; to LeafNodeHashInput and ParentNodeHashInput, or define an enum and do the same, or make a select. For example:
enum { reserved(0), leaf(1), parent(2), (255) } TreeNodeType;
struct {
TreeNodeType node_type;
select (TreeHashInput.node_type) {
case leaf: /* ParentNodeHashInput, as a struct or inlined */
case parent: /* ParentNodeHashInput, as a struct or inlined */
}
} TreeHashInput;
When computing the tree hash, should there be an indicator bit for whether the value being hashed represents a leaf or parent node?
The text was updated successfully, but these errors were encountered: