From f85cdb401bf3682c916812d79c35f10bb6738406 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Wed, 29 Mar 2023 15:49:52 +0200 Subject: [PATCH] fix line allocation when evenLineDistribution=True vector should have chi elements for each validator Signed-off-by: Csaba Kiraly --- DAS/simulator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DAS/simulator.py b/DAS/simulator.py index a6788b8..c58b20f 100644 --- a/DAS/simulator.py +++ b/DAS/simulator.py @@ -46,8 +46,9 @@ class Simulator: lightVal = int(self.shape.numberNodes * self.shape.class1ratio * self.shape.vpn1) heavyVal = int(self.shape.numberNodes * (1-self.shape.class1ratio) * self.shape.vpn2) totalValidators = lightVal + heavyVal - rows = list(range(self.shape.blockSize)) * (int(totalValidators/self.shape.blockSize)+1) - columns = list(range(self.shape.blockSize)) * (int(totalValidators/self.shape.blockSize)+1) + totalRows = totalValidators * self.shape.chi + rows = list(range(self.shape.blockSize)) * (int(totalRows/self.shape.blockSize)+1) + columns = list(range(self.shape.blockSize)) * (int(totalRows/self.shape.blockSize)+1) offset = heavyVal*self.shape.chi random.shuffle(rows) random.shuffle(columns)