Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename config variable #123

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.26"
version = "v0.6.27"
description = "StakeWise Python utils"
authors = ["StakeWise Labs <[email protected]>"]
license = "GPL-3.0-or-later"
Expand Down
4 changes: 2 additions & 2 deletions sw_utils/protocol_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
)
6 changes: 3 additions & 3 deletions sw_utils/typings.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ class ProtocolConfig:

exit_signature_recover_threshold: int

# max exiting validators for genesis vault
# zero value means threshold is not set
vault_exiting_validators_threshold: int = 0
# max exiting validators bps for genesis vault
# zero value means limit is not set
vault_exiting_validators_limit_bps: int = 0

# Keeper settings
validators_threshold: int = 0
Expand Down
Loading