File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,9 +36,13 @@ contract SortitionTree {
3636 // level7 2M
3737 uint256 internal root;
3838
39- // A mapping from layer => (index => branch). For example, to access the 6th
40- // (0-index) branch in the 2nd layer (right below the root node), call
41- // branches[2][6]. Mappings are used in place of arrays for efficiency.
39+ // A 2-index mapping from layer => (index (0-index) => branch). For example,
40+ // to access the 6th branch in the 2nd layer (right below the root node; the
41+ // first branch layer), call branches[2][5]. Mappings are used in place of
42+ // arrays for efficiency. The root is the first layer, the branches occupy
43+ // layers 2 through 7, and layer 8 is for the leaves. Following this
44+ // convention, the first index in `branches` is `2`, and the last index is
45+ // `7`.
4246 mapping (uint256 => mapping (uint256 => uint256 )) internal branches;
4347
4448 // A 0-index mapping from index => leaf, acting as an array. For example, to
You can’t perform that action at this time.
0 commit comments