Skip to content

Commit

Permalink
Add ProtocolConfig.vault_exiting_validators_threshold attr
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-stakewise committed Sep 18, 2024
1 parent acf84c6 commit 9036baf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sw-utils"
version = "v0.6.22"
version = "v0.6.23"
description = "StakeWise Python utils"
authors = ["StakeWise Labs <[email protected]>"]
license = "GPL-3.0-or-later"
Expand Down
3 changes: 3 additions & 0 deletions sw_utils/protocol_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
)
5 changes: 5 additions & 0 deletions sw_utils/typings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9036baf

Please sign in to comment.