Re: [Din] draft-mazieres-dinrg-scp-04 peer priority algorithm

David Mazieres <> Tue, 07 August 2018 20:08 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 295FD1310C9 for <>; Tue, 7 Aug 2018 13:08:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id hxBk5jepHR3l for <>; Tue, 7 Aug 2018 13:08:25 -0700 (PDT)
Received: from ( [IPv6:2001:470:806d:1::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id D4ADA1310C3 for <>; Tue, 7 Aug 2018 13:08:25 -0700 (PDT)
Received: from (localhost []) by ( with ESMTP id w77K8OM4085305; Tue, 7 Aug 2018 13:08:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=scs; t=1533672504; bh=WRURceUWu7iBDb5ka1RsIJoFrjHFVuGOObBSQ6q5Veo=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version; b=k29rarBdTNSmORjDkP470HsCbJnLG55N9WMx2nQ0QmFlxF0B5TITAOGZnD/uGL2Bg sVU2HEJyxrX+f4GtjQ4ooNRzQ5Ei2UZeG6TKYKAwEBNjzESbkNuca8vjRzSFj1ugST jrgwTzCs6ykl5crs35X5ydfZOpR+n/mpQEmuVdw0=
Received: (from dm@localhost) by ( id w77K8Onl081658; Tue, 7 Aug 2018 13:08:24 -0700 (PDT)
From: David Mazieres <>
To: Piers Powlesland <>,
In-Reply-To: <>
References: <> <>
Reply-To: David Mazieres expires 2018-11-05 PST <>
Date: Tue, 07 Aug 2018 13:08:24 -0700
Message-ID: <>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <>
Subject: Re: [Din] draft-mazieres-dinrg-scp-04 peer priority algorithm
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: "Discussion of distributed Internet Infrastructure approaches, aspects such as Service Federation, and underlying technologies" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 07 Aug 2018 20:08:27 -0000

David Mazieres <> writes:

>> As I understand, this filtering could lead to a situation where the
>> neighbours set is empty, since there is no guarantee that any hash
>> calculated above will be less than '2^256 * weight(peer_id)'. Is this
>> intentional?
> There is a guarantee, because a node must belong to all of its own
> quorum sets.  So even if a node has no other neighbors, it will still be
> its own neighbor... which highlights the fact that maybe "neighbor" is a
> misleading term here?  Or maybe at least suggests we should mention
> this.

I went to clarify this in the draft and realize it's not clear at all
because of the way slices are defined.  (You implicitly have to be in a
quorum, but it never says you are in every slice.)  So I propose the
following wording on neighbors:

   o  Define the set of nodes "neighbors(n)" as the set of nodes v for
      which "Gi(1 || n || v) < 2^{256} * weight(v)", where "1" and "n"
      are both 32-bit XDR "int" values.  Note that a node is always its
      own neighbor because conceptually a node belongs to all of its own
      quorum slices.