From a70844a3c9b46a84d4bf0306519d7f3a798458c1 Mon Sep 17 00:00:00 2001 From: Dmitri Tsumak Date: Fri, 25 Oct 2024 13:08:03 +0100 Subject: [PATCH 1/2] Rename config variable --- pyproject.toml | 2 +- sw_utils/protocol_config.py | 4 ++-- sw_utils/typings.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 72b29e4..1058c6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sw-utils" -version = "v0.6.26" +version = "v0.6.27" description = "StakeWise Python utils" authors = ["StakeWise Labs "] license = "GPL-3.0-or-later" diff --git a/sw_utils/protocol_config.py b/sw_utils/protocol_config.py index 010fa48..6205abf 100644 --- a/sw_utils/protocol_config.py +++ b/sw_utils/protocol_config.py @@ -30,7 +30,7 @@ def build_protocol_config( if validators_threshold and exit_signature_recover_threshold > validators_threshold: raise ValueError('Invalid exit signature threshold') - vault_exiting_validators_threshold = config_data.get('vault_exiting_validators_threshold') or 0 + vault_exiting_validators_limit_bps = config_data.get('vault_exiting_validators_limit_bps') or 0 return ProtocolConfig( oracles=oracles, @@ -47,5 +47,5 @@ def build_protocol_config( exit_signature_epoch=config_data['exit_signature_epoch'], signature_validity_period=config_data['signature_validity_period'], until_force_exit_epochs=config_data['until_force_exit_epochs'], - vault_exiting_validators_threshold=vault_exiting_validators_threshold, + vault_exiting_validators_limit_bps=vault_exiting_validators_limit_bps, ) diff --git a/sw_utils/typings.py b/sw_utils/typings.py index 0aeb956..0c3d2e3 100644 --- a/sw_utils/typings.py +++ b/sw_utils/typings.py @@ -65,9 +65,9 @@ class ProtocolConfig: exit_signature_recover_threshold: int - # max exiting validators for genesis vault + # max exiting validators bps for genesis vault # zero value means threshold is not set - vault_exiting_validators_threshold: int = 0 + vault_exiting_validators_limit_bps: int = 0 # Keeper settings validators_threshold: int = 0 From 7d36cb35aa55792a8a5fdc425179391781bc2001 Mon Sep 17 00:00:00 2001 From: Dmitri Tsumak Date: Fri, 25 Oct 2024 13:13:13 +0100 Subject: [PATCH 2/2] Fix comment --- sw_utils/typings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw_utils/typings.py b/sw_utils/typings.py index 0c3d2e3..7f5ed64 100644 --- a/sw_utils/typings.py +++ b/sw_utils/typings.py @@ -66,7 +66,7 @@ class ProtocolConfig: exit_signature_recover_threshold: int # max exiting validators bps for genesis vault - # zero value means threshold is not set + # zero value means limit is not set vault_exiting_validators_limit_bps: int = 0 # Keeper settings