add config.validatorBasedCustody
the overall number of row/columns taken into custody by a node is determined by a base number (custody) and a class specific multiplier (validatorsPerNode). We support two models: - validatorsBasedCustody: each validator has a unique subset of size custody, and custody is the union of these. I.e. VPN is a "probabilistic multiplier" - !validatorsBasedCustody: VPN is interpreted as a simple custody multiplier Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
3292d70c1a
commit
a634aa07e0
|
@ -78,6 +78,11 @@ class Node:
|
||||||
|
|
||||||
self.rowIDs = set(rows)
|
self.rowIDs = set(rows)
|
||||||
self.columnIDs = set(columns)
|
self.columnIDs = set(columns)
|
||||||
|
if config.validatorBasedCustody:
|
||||||
|
for v in validators:
|
||||||
|
self.rowIDs = self.rowIDs.union(v.rowIDs)
|
||||||
|
self.columnIDs = self.columnIDs.union(v.columnIDs)
|
||||||
|
else:
|
||||||
if (self.vpn * self.shape.custodyRows) > self.shape.nbRows:
|
if (self.vpn * self.shape.custodyRows) > self.shape.nbRows:
|
||||||
self.logger.warning("Row custody (*vpn) larger than number of rows!", extra=self.format)
|
self.logger.warning("Row custody (*vpn) larger than number of rows!", extra=self.format)
|
||||||
self.rowIDs = range(self.shape.nbRows)
|
self.rowIDs = range(self.shape.nbRows)
|
||||||
|
@ -90,10 +95,6 @@ class Node:
|
||||||
else:
|
else:
|
||||||
self.columnIDs = set(random.sample(range(self.shape.nbCols), self.vpn*self.shape.custodyCols))
|
self.columnIDs = set(random.sample(range(self.shape.nbCols), self.vpn*self.shape.custodyCols))
|
||||||
|
|
||||||
#for v in validators:
|
|
||||||
# self.rowIDs = self.rowIDs.union(v.rowIDs)
|
|
||||||
# self.columnIDs = self.columnIDs.union(v.columnIDs)
|
|
||||||
|
|
||||||
self.rowNeighbors = collections.defaultdict(dict)
|
self.rowNeighbors = collections.defaultdict(dict)
|
||||||
self.columnNeighbors = collections.defaultdict(dict)
|
self.columnNeighbors = collections.defaultdict(dict)
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,13 @@ blockSizes = range(64, 113, 128)
|
||||||
# Per-topic mesh neighborhood size
|
# Per-topic mesh neighborhood size
|
||||||
netDegrees = range(8, 9, 2)
|
netDegrees = range(8, 9, 2)
|
||||||
|
|
||||||
# number of rows and columns a validator is interested in
|
# the overall number of row/columns taken into custody by a node is determined by
|
||||||
|
# a base number (custody) and a class specific multiplier (validatorsPerNode).
|
||||||
|
# We support two models:
|
||||||
|
# - validatorsBasedCustody: each validator has a unique subset of size custody,
|
||||||
|
# and custody is the union of these. I.e. VPN is a "probabilistic multiplier"
|
||||||
|
# - !validatorsBasedCustody: VPN is interpreted as a simple custody multiplier
|
||||||
|
validatorBasedCustody = False
|
||||||
custody = [2]
|
custody = [2]
|
||||||
|
|
||||||
# ratio of class1 nodes (see below for parameters per class)
|
# ratio of class1 nodes (see below for parameters per class)
|
||||||
|
|
Loading…
Reference in New Issue