Module akd::node_state[][src]

Expand description

The representation for the label of a history tree node.

Structs

parameters are azks_id, node location, epoch, child index

This struct represents the state of the child of a node at a given epoch and contains all the information its parent might need about it in an operation. The dummy_marker represents whether this child was real or a dummy. In particular, the children of a leaf node are dummies.

A HistoryNodeState represents the state of a crate::history_tree_node::HistoryTreeNode at a given epoch. As you may see, when looking at HistoryChildState, the node needs to include its hashed value, the hashed values of its children and the labels of its children. This allows the various algorithms in crate::history_tree_node::HistoryTreeNode to build proofs for the tree at any given epoch, without having to do a traversal of the history tree to find siblings. The hash value of this node at this state. To be used in its parent, alongwith the label.

The NodeLabel struct represents the label for a HistoryTreeNode. Since the label itself may have any number of zeros pre-pended, just using a native type, unless it is a bit-vector, wouldn’t work. Hence, we need a custom representation.

This struct is just used for storage access purposes. parameters are azks_id, node location, and epoch

Enums

Marks whether a child state is real

Functions

Hashes a label of type NodeLabel using the hash function provided by the generic type H.