Skip to content

Commit

Permalink
Merge branch 'main' into docs/update-create-wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
rajkaramchedu committed Jul 10, 2024
2 parents e383d46 + 0030ef0 commit 88e95ea
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/learn/anatomy-of-incentive-mechanism.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The task defines the scope of work that miners will undertake, and what utility
### Subnet reward model
See **4** and **5** in the above diagram. Just as the task describes **what** miners should do, the reward model dictates **how** it should be done. Similarly, just as tasks should mimic user interactions, reward models should mimic user preferences or desired outcomes.

As with any machine learning model, a subnet has an objective function that it is continuously optimizing. The reward model defines the quality of all miner behvaiour in the subnet (both intended and unintended).
As with any machine learning model, a subnet has an objective function that it is continuously optimizing. The reward model defines the quality of all miner behaviour in the subnet (both intended and unintended).

Operationally, it is the mathematical object that converts miner responses into numerical scores. A reward model can in fact contain as many different reward mechanisms as are necesary to align miners with the intended task.

Expand Down
67 changes: 43 additions & 24 deletions docs/schedule-key-swap.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,29 @@ title: "Schedule Key Swap"

# Schedule Key Swap

This guide describes how to use the schedule coldkey swap feature. If you have a reason to believe that your wallet is at-risk as a result of July 2nd attack, as described in [Bittensor Community Update — July 3, 2024](https://blog.bittensor.com/bittnesor-community-update-july-3-2024-45661b1d542d), we strongly recommend that you use this feature to transfer your funds to a secure wallet. This feature schedules your funds transfer from an at-risk wallet to a new secure wallet.
This guide describes how to use the schedule coldkey swap feature. If you have a reason to believe that your wallet is at-risk as a result of the July 2nd attack, as described in [Bittensor Community Update — July 3, 2024](https://blog.bittensor.com/bittnesor-community-update-july-3-2024-45661b1d542d), we strongly recommend that you use this feature to transfer your funds to a secure wallet. This feature schedules your funds transfer from an at-risk wallet to a new secure wallet.

If you decide to use this feature, then run the commands described in this guide **before** the Bittensor mainnet opens.
If you decide to use this feature, then run the commands described in this guide **before** the Bittensor mainnet fully opens.

:::tip Window to use this schedule coldkey swap feature

You can use this schedule cold key swap feature **only in the window** starting Monday July 8, 5 PM US Eastern and ending when the mainnet opens fully on Thursday July 11, 5 PM US Eastern.
:::

## Description

The schedule coldkey swap feature works like this:

- The schedule coldkey swap feature enables you to only schedule the actual swapping of your TAO funds from your old potentially compromised coldkey to a new coldkey.
- The schedule coldkey swap feature enables you to schedule only the actual swapping of your TAO funds from your old potentially compromised coldkey to a new coldkey.
- When you use this feature, it will not actually swap your TAO funds. It will only schedule the swap event.
- All scheduled coldkey swaps will be executed on-chain when the mainnet opens for normal operations.

## Do not use this feature if

You may not need to use this feature. Do not use this feature if any of the following are true for you:

- If you never used `btcli`, regardless of the Bittensor version, then do not use this feature. Your funds are safe.
- If you never used Bittensor version 6.12.2, then do not use this feature. Your funds are safe.
- If you have never used `btcli`, regardless of the Bittensor version, then do not use this feature. Your funds are safe.
- If you have never used Bittensor version 6.12.2, then do not use this feature. Your funds are safe.
- If you only used any wallet browser extension or only a wallet application such as below, then your funds are safe:
- The Bittensor Wallet (for Chrome or iOS)
- SafeWallet, Talisman, Polkadot Vault, Tensor Wallet, Nova Wallet, polkadot.js
- Websites that utilize polkadot.js such as Taostats.io for staking unstaking
- Websites that utilize polkadot.js, such as Taostats.io, for staking unstaking
- If you hold your TAO only on exchanges, then your funds are safe.
- If you installed Bittensor 6.12.2 not via PyPi package but directly from GitHub source, then do not use this feature. **Only the PyPi package of Bittensor 6.12.2 is malicious.**

Expand Down Expand Up @@ -58,15 +54,13 @@ If you installed Bittensor 6.12.2 not via PyPi package but directly from GitHub

## Installing the schedule coldkey swap feature

:::tip Currently this feature is available on testnet only
:::

The schedule coldkey swap feature is available only at the below specified subtensor and bittensor repo branches and the testnet URL:
The schedule coldkey swap feature is available at the below specified subtensor and bittensor repo branches:

<!--
- **Testnet URL**: `wss://test.finney.opentensor.ai:443/`.

-->
- **Bittensor repo and branch**:
1. First make sure you use a virtual environment.
1. First, make sure you use a virtual environment.
2. Then install the `feat/arbitrage-coldkeys` branch of the Bittensor repo by running the below command:
```bash
/bin/bash -c "$(curl -fsSL https://github.com/raw/opentensor/bittensor/feat/arbitrage-coldkeys/scripts/install.sh)"
Expand All @@ -78,39 +72,55 @@ The schedule coldkey swap feature is available only at the below specified subte
which should show `schedule_coldkey_swap` as one of the positional arguments.
---

## Detailed steps using `btcli`
## How to use it with `btcli`

### Syntax

**This is syntax only. See the example below.**

```bash
btcli wallet schedule_coldkey_swap [--new_coldkey <new_coldkey_ss58_address>]
```
This command is used to **schedule** a swap your coldkey to a new coldkey. You must specify the new coldkey address. You must first separately create a new coldkey before using it in this command.
This command is used to **schedule** a swap of your coldkey to a new coldkey. You must specify the new coldkey address. You must first separately create a new coldkey before using it in this command.

- To create a new coldkey, see [Creating a coldkey using `btcli`](./getting-started/wallets.md#creating-a-coldkey-using-btcli).
- To see the SS58 address of your coldkey, see [Listing all the local wallets](https://docs.bittensor.com/getting-started/wallets#listing-all-the-local-wallets).
- To see your coldkey's SS58 address, see [Listing all the local wallets](https://docs.bittensor.com/getting-started/wallets#listing-all-the-local-wallets).
The command checks for the validity of the new coldkey and prompts for confirmation before proceeding with the scheduling process.
### Important
- This command does not immediately swap the coldkeys. It will schedule the coldkey swap event after a delay of 72-hours from the time this command is run.
- This command does not immediately swap the coldkeys. It will schedule the coldkey swap event after a delay of 72 hours from the time this command is run.
- The actual coldkey swap event occurs on-chain when the chain is back to normal operations.
- This is a free transaction. **However, you need a balance of at least one TAO in your old coldkey, or one TAO staked, to initiate a coldkey swap to your new coldkey.**
- This is a free transaction. **However, you need a balance of at least 0.1 TAO in your old coldkey, or one TAO staked, to initiate a coldkey swap to your new coldkey.**
- **For subnet owners**: You do not need any balance in your old coldkey to initiate a coldkey swap to your new coldkey.
- **For validators**: If you have 500 TAO or more delegated then you do not need any balance in your old coldkey to initiate a coldkey swap to your new coldkey.
- **For subnet owners**: Any subnet ownership from your old coldkey will move over to the new coldkey.
- The delegated stake will be transferred from your old coldkey to the new coldkey.
- For those who were staking to a validator from their old coldkey, their staking TAO will transfer to the new coldkey.
:::danger Do not run this command more than once using a same coldkey
:::danger Do not run this command more than once using the same coldkey
:::
### Example
**On mainnet**:
```bash
btcli wallet schedule_coldkey_swap
```
**On testnet**:
```bash
btcli wallet schedule_coldkey_swap --subtensor.network=test
```
Sample output:
```bash
btcli wallet schedule_coldkey_swap --subtensor.network=test
btcli wallet schedule_coldkey_swap
Enter wallet name (default):
Enter new coldkey SS58 address: 5HM...Srw
⚠If you call this on the same key multiple times, the key will enter arbitration.
Expand All @@ -127,6 +137,15 @@ For help description, run:
btcli wallet schedule_coldkey_swap --help
```
## Checking your scheduled swap status
To check if your coldkey has been scheduled for swap or has been placed in arbitration, run the below command. Make sure you have pulled the latest from the `feat/arbitrage-coldkeys` branch to use the below `check_coldkey_swap` command:
```bash
btcli wallet check_coldkey_swap
```
## Arbitration
When multiple coldkey swaps, involving either the same old coldkey or the same new coldkey, are scheduled, then the swap will not be performed when the mainnet opens. Instead, the swap enters an arbitration stage where the Senate votes to determine which coldkey swap should occur.
When multiple coldkey swaps involving the same coldkey are scheduled, the swap will not be performed when the mainnet opens. Instead, the swap will enter an arbitration stage, where the Senate votes to determine which coldkey swap should occur.

0 comments on commit 88e95ea

Please sign in to comment.