From 911ee6b6e4ad9b36b695b39a3b7d768d2b170101 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Fri, 1 Mar 2024 10:46:24 +0100 Subject: [PATCH] fix validator progress counter if custody is based on the requirements of underlying individual validators, we can get detailed data on how many validated. Otherwise, we can only use the weighted average. Signed-off-by: Csaba Kiraly --- DAS/simulator.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/DAS/simulator.py b/DAS/simulator.py index b11ad2d..adae044 100644 --- a/DAS/simulator.py +++ b/DAS/simulator.py @@ -290,10 +290,18 @@ class Simulator: cnD1 = "Dup class1 mean" cnD2 = "Dup class2 mean" + # if custody is based on the requirements of underlying individual + # validators, we can get detailed data on how many validated. + # Otherwise, we can only use the weighted average. + if self.config.validatorBasedCustody: + cnVv = validatorProgress + else: + cnVv = validatorAllProgress + progressVector.append({ cnS:sampleProgress, cnN:nodeProgress, - cnV:validatorProgress, + cnV:cnVv, cnT0: trafficStats[0]["Tx"]["mean"], cnT1: trafficStats[1]["Tx"]["mean"], cnT2: trafficStats[2]["Tx"]["mean"],