From 89e85ea3dbc97822f40a36d41878d4910b6ec562 Mon Sep 17 00:00:00 2001 From: opendansor Date: Fri, 18 Oct 2024 09:59:01 -0700 Subject: [PATCH] Remove old commit reveal hyperparameter and add a new one. Updated variable names and parameters from commit_reveal_weights_interval to commit_reveal_periods for consistency and clarity across multiple files. This includes changes in function parameters and dictionary keys. --- bittensor_cli/src/__init__.py | 2 +- bittensor_cli/src/bittensor/chain_data.py | 6 +++--- bittensor_cli/src/commands/weights.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bittensor_cli/src/__init__.py b/bittensor_cli/src/__init__.py index a5a87e16d..0d1d0a25e 100644 --- a/bittensor_cli/src/__init__.py +++ b/bittensor_cli/src/__init__.py @@ -334,7 +334,7 @@ class WalletValidationTypes(Enum): "kappa": "sudo_set_kappa", "difficulty": "sudo_set_difficulty", "bonds_moving_avg": "sudo_set_bonds_moving_average", - "commit_reveal_weights_interval": "sudo_set_commit_reveal_weights_interval", + "commit_reveal_periods": "sudo_set_commit_reveal_weights_periods", "commit_reveal_weights_enabled": "sudo_set_commit_reveal_weights_enabled", "alpha_values": "sudo_set_alpha_values", "liquid_alpha_enabled": "sudo_set_liquid_alpha_enabled", diff --git a/bittensor_cli/src/bittensor/chain_data.py b/bittensor_cli/src/bittensor/chain_data.py index 73f41b1fb..e58120882 100644 --- a/bittensor_cli/src/bittensor/chain_data.py +++ b/bittensor_cli/src/bittensor/chain_data.py @@ -87,7 +87,7 @@ class SubnetHyperparameters: max_validators: int adjustment_alpha: int difficulty: int - commit_reveal_weights_interval: int + commit_reveal_periods: int commit_reveal_weights_enabled: bool alpha_high: int alpha_low: int @@ -119,7 +119,7 @@ def from_vec_u8(cls, vec_u8: bytes) -> Optional["SubnetHyperparameters"]: max_validators=decoded.max_validators, adjustment_alpha=decoded.adjustment_alpha, difficulty=decoded.difficulty, - commit_reveal_weights_interval=decoded.commit_reveal_weights_interval, + commit_reveal_periods=decoded.commit_reveal_periods, commit_reveal_weights_enabled=decoded.commit_reveal_weights_enabled, alpha_high=decoded.alpha_high, alpha_low=decoded.alpha_low, @@ -721,7 +721,7 @@ def list_from_vec_u8(cls, vec_u8: bytes) -> list["SubnetInfo"]: ["max_validators", "Compact"], ["adjustment_alpha", "Compact"], ["difficulty", "Compact"], - ["commit_reveal_weights_interval", "Compact"], + ["commit_reveal_periods", "Compact"], ["commit_reveal_weights_enabled", "bool"], ["alpha_high", "Compact"], ["alpha_low", "Compact"], diff --git a/bittensor_cli/src/commands/weights.py b/bittensor_cli/src/commands/weights.py index cc5a7d379..8b914b676 100644 --- a/bittensor_cli/src/commands/weights.py +++ b/bittensor_cli/src/commands/weights.py @@ -148,7 +148,7 @@ async def _commit_reveal( ) -> tuple[bool, str]: interval = int( await self.subtensor.get_hyperparameter( - param_name="get_commit_reveal_weights_interval", + param_name="get_commit_reveal_periods", netuid=self.netuid, reuse_block=False, )