diff --git a/pyproject.toml b/pyproject.toml index 4e0bc85..9b5001c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sw-utils" -version = "v0.6.22" +version = "v0.6.23" 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 026258c..010fa48 100644 --- a/sw_utils/protocol_config.py +++ b/sw_utils/protocol_config.py @@ -30,6 +30,8 @@ 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 + return ProtocolConfig( oracles=oracles, rewards_threshold=rewards_threshold or 0, @@ -45,4 +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, ) diff --git a/sw_utils/typings.py b/sw_utils/typings.py index 1f9a165..a242916 100644 --- a/sw_utils/typings.py +++ b/sw_utils/typings.py @@ -65,5 +65,10 @@ class ProtocolConfig: exit_signature_recover_threshold: int + # max exiting validators for genesis vault + # zero value means threshold is not applied + vault_exiting_validators_threshold: int = 0 + + # Keeper settings validators_threshold: int = 0 rewards_threshold: int = 0