Skip to content

cybercongress/cybertensor

Repository files navigation

CYBERTENSOR

GitHub Python PyPI - Version

Game of Tensors subnet ideas:

  1. Subnet for ambassadors
  2. Subnet for knowledge domains
  3. Subnet for network infrastructure operators
  4. Subnet for relayers infrastructure operators
  5. Subnet for IPFS nodes operators
  6. Your idea here

When? Soon

Install

  1. With pip:
pip3 install cybertensor
  1. From source:
git clone https://github.com/cybercongress/cybertensor.git
python3 -m pip install -e cybertensor/
  1. To test your installation, type:
ctcli --help

or using python

import cybertensor

Space Pussy setup

  1. Clone:
git clone https://github.com/cybercongress/cybertensor.git
cd cybertensor
  1. [Optional] Create and activate a virtual environment:
python3 -m venv venv
. venv/bin/activate
  1. Install from the source
python3 -m pip install -e .
  1. To test your installation, type:
ctcli --help

or using python

import cybertensor

Dev setup

  1. Use localbostrom:
git clone https://github.com/cybercongress/localbostrom
cd localbostrom
./hard_restart.sh
  1. Add mnemonics from localbostrom's README to local keystore:
cyber keys add validator --recover --home ./home
  1. Deploy code and instantiate contract:
cyber tx wasm store cybernet.wasm --from validator --home ./home --chain-id localbostrom --gas 8000000 --broadcast-mode block -y --keyring-backend test
cyber tx wasm instantiate 1 "{}" --from validator --home ./home --chain-id localbostrom --gas 5000000 --label cybernet1 --admin bostrom1phaxpevm5wecex2jyaqty2a4v02qj7qm5n94ug --broadcast-mode block -y --keyring-backend test
  1. Send tokens to contract and activate (with dmn):
cyber tx bank send validator bostrom14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sww4mxt 1000000000000boot --home ./home --chain-id localbostrom --gas 500000 --broadcast-mode block -y --keyring-backend test
cyber tx wasm execute bostrom14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sww4mxt '{"activate":{}}' --from validator --home ./home --chain-id localbostrom --gas 5000000 --broadcast-mode block -y --keyring-backend test
  1. Add mnemonics from localbostrom's README to ctcli keystore:
ctcli w regen_hotkey
ctcli w regen_coldkey
  1. Add contract and schemas to .cybertensor/contract dir:
tree ~/.cybertensor/contract 
/Users/cyberhead/.cybertensor/contract
├── cybernet.wasm
└── schema
    ├── execute.json
    ├── instantiate.json
    ├── query.json
    └── schema.json
  1. Register network:
ctcli s create