From e50b59b878c40fc1e666bcec44a74082136ae6d5 Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 5 Nov 2024 11:34:32 -0800 Subject: [PATCH] review comments fixed --- bittensor/core/extrinsics/registration.py | 10 +++++++++- bittensor/core/extrinsics/set_weights.py | 2 ++ bittensor/core/extrinsics/transfer.py | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/bittensor/core/extrinsics/registration.py b/bittensor/core/extrinsics/registration.py index 15df860d9..de38869a8 100644 --- a/bittensor/core/extrinsics/registration.py +++ b/bittensor/core/extrinsics/registration.py @@ -155,6 +155,10 @@ def register_extrinsic( ) return True + logging.debug( + f"Registration hotkey: {wallet.hotkey.ss58_address}, Public coldkey: {wallet.coldkey.ss58_address} in the network: {subtensor.network}." + ) + if not torch: log_no_torch_error() return False @@ -380,6 +384,10 @@ def burned_register_extrinsic( return True logging.info(":satellite: Recycling TAO for Registration...") + + recycle_amount = subtensor.recycle(netuid=netuid) + logging.info(f"Recycling {recycle_amount} to register on subnet:{netuid}") + success, err_msg = _do_burned_register( self=subtensor, netuid=netuid, @@ -389,7 +397,7 @@ def burned_register_extrinsic( ) if not success: - logging.error(f":cross_mark: Failed: {err_msg}") + logging.error(f":cross_mark: Failed error: {err_msg}") time.sleep(0.5) return False # Successful registration, final check for neuron and pubkey diff --git a/bittensor/core/extrinsics/set_weights.py b/bittensor/core/extrinsics/set_weights.py index 6495c9e76..0475b4222 100644 --- a/bittensor/core/extrinsics/set_weights.py +++ b/bittensor/core/extrinsics/set_weights.py @@ -151,6 +151,8 @@ def set_weights_extrinsic( logging.info( f":satellite: Setting weights on {subtensor.network} ..." ) + logging.debug(f"Weights: {[float(v / 65535) for v in weight_vals]}") + try: success, error_message = do_set_weights( self=subtensor, diff --git a/bittensor/core/extrinsics/transfer.py b/bittensor/core/extrinsics/transfer.py index d2fba617d..b2e060606 100644 --- a/bittensor/core/extrinsics/transfer.py +++ b/bittensor/core/extrinsics/transfer.py @@ -159,6 +159,11 @@ def transfer_extrinsic( return False logging.info(":satellite: Transferring...") + logging.info(f"\tAmount: {transfer_balance}") + logging.info(f"\tfrom: {wallet.name}:{wallet.coldkey.ss58_address}") + logging.info(f"\tTo: {dest}") + logging.info(f"\tFor fee: {fee}") + success, block_hash, error_message = do_transfer( self=subtensor, wallet=wallet,