Subject: [Din] Quorum slice representation in revised SCP draft draft-mazieres-dinrg-scp-02

From: Piers Powlesland <[email-masked]>
Date: Tue, 12 Jun 2018 18:13:04 +0100

Hi all,

The description of a node's quorum slices in the white paper is a
collection of sets of nodes for which any set is sufficient to convince the
node of system wide agreement. I would represent this as a list of lists.

So I'm wondering why the recursive SCPQuorumSet struct was chosen to
represent quorum slices?

Thanks,

Piers

---

From: David Mazieres <[email-masked]>
Date: Tue, 12 Jun 2018 20:01:01 -0700

> So I'm wondering why the recursive SCPQuorumSet struct was chosen to

The whitepaper uses sets of sets for the proofs because it's the most
general thing possible.  However, often people want a very large number
of quorum slices--like, say, k of n nodes.  For, say, a 7-out-of-10
configuration, that's 120 different quorum slices, which would be quite
unwieldy to ship around as a list of lists.

David

---

From: Piers Powlesland <[email-masked]>
Date: Wed, 13 Jun 2018 19:55:28 +0100

Thanks David,

That makes a bunch of sense.

If I did want to encode a bunch of explicit slices in a manner similar to
that discussed in the whitepaper using the SCPQuorumSet structure (
https://tools.ietf.org/html/draft-mazieres-dinrg-scp-02#section-3.3). I
guess I could have a top level set with the threshold set to 1 and then
encode each quorum slice in separate SCPQuorumSet1 instances each of which
would have the threshold set to the length of their validators.

Reading that section again I'm wondering why only 2 levels of nesting are
allowed?

---

From: David Mazieres <[email-masked]>
Date: Wed, 13 Jun 2018 12:27:14 -0700

> Reading that section again I'm wondering why only 2 levels of nesting are

Again, it's a compromise between flexibility and practical aspects.
Arbitrary recursion would make checking more expensive.  More
practically, many implementations of XDR use recursive functions to
parse recursive data structures, so would be vulnerable to DoS attacks
that blow out the stack if the structures could nest arbitrarily.

David