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
- feat(DisputeKitPlurality): split the responsibility of drawing jurors between Core and Dispute Kit ([f339e2b](https://github.com/kleros/kleros-v2/commit/f339e2b))
9
10
- refactor: add arbitrator data index getter ([47a1623](https://github.com/kleros/kleros-v2/commit/47a1623))
SortitionSumTreeFactory.SortitionSumTree storage tree = sortitionSumTrees.sortitionSumTrees[_key];
94
+
SortitionSumTree storage tree = sortitionSumTrees.sortitionSumTrees[_key];
92
95
k = tree.K;
93
96
stack = tree.stack;
94
97
nodes = tree.nodes;
@@ -120,4 +123,35 @@ contract MockKlerosCore {
120
123
minJurors = MIN_JURORS;
121
124
}
122
125
}
126
+
127
+
128
+
// SORTITION TREE FACTORY
129
+
130
+
struct SortitionSumTree {
131
+
uint256 K; // The maximum number of childs per node.
132
+
// We use this to keep track of vacant positions in the tree after removing a leaf. This is for keeping the tree as balanced as possible without spending gas on moving nodes around.
133
+
uint256[] stack;
134
+
uint256[] nodes;
135
+
// Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node.
0 commit comments