From 2ede615490c94851afd044f45b77f3d47917be7a Mon Sep 17 00:00:00 2001 From: 0xFugue <119708655+0xFugue@users.noreply.github.com> Date: Wed, 6 Sep 2023 14:32:16 +0530 Subject: [PATCH] handling onenode trees --- scripts/build_tests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/build_tests.py b/scripts/build_tests.py index f8633d8..8dabe91 100644 --- a/scripts/build_tests.py +++ b/scripts/build_tests.py @@ -73,15 +73,17 @@ def main(ctx: typer.Context, failure_threshold, CARNOT_ADVERSARY_THRESHOLD_PER_COMMITTEE, CARNOT_NETWORK_ADVERSARY_THRESHOLD) - tree_depth= math.ceil(math.log(num_comm, 2)) if num_comm > 1 else 1 + tree_depth = 1 + int(math.log(num_comm, 2)) if num_comm > 1 else 1 num_nodes_branch= tree_depth * comm_size - print( + + '''print( f"num_nodes={num_nodes}, " f"total_tree_nodes={num_comm}, comm_size={comm_size}, remainder={remainder}, computed={prob:f}(req={failure_threshold:f}), depth={tree_depth}" ) + ''' + tree_spec = f"tree,{num_nodes},{comm_size}," branch_spec = f"branch,{num_nodes_branch},{tree_depth}," - print(tree_spec) print(branch_spec)