From 1b146dfda8612ac3844dad8ccbfcf76a7f6d965f Mon Sep 17 00:00:00 2001 From: danielsanchezq Date: Wed, 5 Jul 2023 09:47:39 +0200 Subject: [PATCH] Sort committees before hashing --- carnot/tree_overlay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carnot/tree_overlay.py b/carnot/tree_overlay.py index 186beef..2cc2acc 100644 --- a/carnot/tree_overlay.py +++ b/carnot/tree_overlay.py @@ -8,7 +8,7 @@ import random def blake2b_hash(committee: Committee) -> bytes: hasher = blake2b(digest_size=32) - for member in committee: + for member in sorted(committee): hasher.update(member) return hasher.digest()