DynamicTree

Git Source

DynamicTree is a struct representing a Merkle Tree with 2**AGENT_TREE_HEIGHT leaves.

  • A single operation is available: update value for leaf with an arbitrary index (which might be a non-empty leaf).
  • This is done by requesting the proof of inclusion for the old value, which is used to both verify the old value, and calculate the new root.

Based on Original idea from ER forum post.

struct DynamicTree {
    bytes32 root;
}