From ea93e9412f297865942f35c5ed6704ca7b89a398 Mon Sep 17 00:00:00 2001 From: Leonardo Bautista-Gomez Date: Thu, 13 Apr 2023 15:22:50 +0200 Subject: [PATCH] Changing the success condition --- DAS/results.py | 4 +++- config_example.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/DAS/results.py b/DAS/results.py index 7134ff2..c6a87f1 100644 --- a/DAS/results.py +++ b/DAS/results.py @@ -21,7 +21,9 @@ class Result: self.shape = shape self.missingVector = missingVector missingSamples = missingVector[-1] - if missingSamples == 0: + validatorsReady = self.metrics["progress"]["validators ready"][-1] + #print("There are %05.3f%% validators ready" % (validatorsReady*100)) + if validatorsReady > config.successCondition: self.blockAvailable = 1 self.tta = len(missingVector) * (config.stepDuration) else: diff --git a/config_example.py b/config_example.py index 39a0591..7263ca1 100644 --- a/config_example.py +++ b/config_example.py @@ -76,6 +76,9 @@ randomSeed = "DAS" # Number of steps without progress to stop simulation steps4StopCondition = 7 +# Number of validators ready to asume block is available +successCondition = 0.9 + # If True, print diagnostics when the block is not available diagnostics = False