From 57e99ee96f17afe46780a6abfe4f8f93c8eadef8 Mon Sep 17 00:00:00 2001 From: Nicolas Gailly Date: Wed, 8 Feb 2023 16:29:27 +0100 Subject: [PATCH] use correct threshold in dkg (#45) This is fine for drand as we use our own threshold calculation in drand https://github.com/drand/drand/blob/master/key/group.go#L355 but the DKG package should use this as well. n / 2 + 1 is the right number --- share/dkg/dkg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/dkg/dkg.go b/share/dkg/dkg.go index db2a50d8a..d7a9ec576 100644 --- a/share/dkg/dkg.go +++ b/share/dkg/dkg.go @@ -1093,7 +1093,7 @@ func findIndex(list []Node, index Index) (kyber.Point, bool) { } func MinimumT(n int) int { - return (n + 1) / 2 + return (n >> 1) + 1 } func isIndexIncluded(list []Node, index uint32) bool {