diff --git a/apps/commune-page/next-env.d.ts b/apps/commune-page/next-env.d.ts index 40c3d680..4f11a03d 100644 --- a/apps/commune-page/next-env.d.ts +++ b/apps/commune-page/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/commune-blockchain.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/commune-blockchain.mdx index bce6ff1c..477404b9 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/commune-blockchain.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/commune-blockchain.mdx @@ -10,6 +10,11 @@ Subspace is built using [Substrate](https://substrate.io/), a framework for deve 2. Advertises cluster modules and their IP addresses 3. Enables peer discovery for nodes to connect with each other +### Rpc Methods + +- Connect To Mainnet: *wss://api.communeai.net* +- Connect To Testnet: *wss://testnet.api.communeai.net* + ## Installation 1. Complete the [basic Rust setup instructions](https://github.com/renlabs-dev/subspace-network/blob/main/docs/rust-setup.md). diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/deploying-a-subnet.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/deploying-a-subnet.mdx index 308f0f81..8d6b497f 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/deploying-a-subnet.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/deploying-a-subnet.mdx @@ -8,33 +8,22 @@ First follow the guides at: ## Registering a New Subnet After you have your full subnet code ready, according to all of the predefined requirements. -Proceed with registering a new subnet storage. The cost of doing so might vary based on several factors, where the primary factor is whether the maximum amount of subnets is registered. -In the case that the protocol has reached the subnet limit, you have to deploy more tokens than the **least staked** subnet in order to register. +Proceed with registering a new subnet storage. You can register a new subnet by proceeding with the following command: ```bash -comx module register [--new-subnet-name ] +comx subnet register [--metadata] ``` -In case the subnet storage is full, which you can see by listing all of the subnets +Note that you will be asked to pay a subnet burn fee, these tokens will be permanently lost. +To determine the cost beforehand, you can query: ```bash -comx subnet list +comx subnet params ``` -And then comparing it to the **max_allowed_subnets** field, which you can query by - -```bash -comx network params -``` - -Then you will have to pass a large enough stake value. - -```bash -comx module register [--new-subnet-name ] [--stake ] -``` +and look for the *subnet_registration_cost* field. After you registered your subnet, you are still not eligible for an emission distribution. -For **emissions** to start your subnet will have to pass the **subnet_stake_threshold** global parameter field, in the moment of writing, defined as 5% of the overall network stake. -To accomplish this, we would recommend reaching out to the community and pitching your idea, into convincing members why they should stake to your subnet. +For **emissions** to start your subnet there will need to be enough consensus weight set on it by rootnet validators. \ No newline at end of file diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/evm.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/evm.mdx new file mode 100644 index 00000000..8f25c5ce --- /dev/null +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/evm.mdx @@ -0,0 +1,212 @@ +# EVM + +EVM (Ethereum Virtual Machine): A computation engine that handles smart contract deployment and execution in Ethereum-compatible blockchains. + +Commune is EVM compatible, we are currently in the process of **testing** this feature on our **testnet** + +## EVM Tutorials + +### Installation + +First, install the required Python packages: + +```bash +pip install substrate-interface eth-account web3 python-dotenv communex +``` + +### Environment Setup + +Create a `.env` file in your project root and initialize it with the following: + +```env +ETH_PRIVATE_KEY=your_private_key_here +SUBSTRATE_PRIVATE_KEY=your_sub_seed_here +RPC_URL=https://testnet.api.communeai.net +WS_URL=wss://testnet.api.communeai.net +``` + +Replace `your_private_key_here` and `your_sub_seed_here` with your actual keys. + +### Getting Funds to EVM + +To interact with smart contracts and use EVM features on Commune, you need to have funds in your EVM-compatible address. This section explains how to transfer funds from your native Commune address to your EVM address. + +The EVM in Commune uses the secp256k1 key type, which differs from the native mainnet keys of type sr25519. To deploy your funds on the EVM, you'll need to use address mapping, converting your ss58 address to the corresponding h160 address. + +#### Using MetaMask + +1. Install [MetaMask](https://metamask.io/) browser extension if you haven't already. +2. Click on the network dropdown in MetaMask and select "Add Network". +3. Enter the following details: + - Network Name: Commune Testnet + - New RPC URL: https://testnet.api.communeai.net + - Chain ID: 9461 + - Currency Symbol: COMAI + - Explorer: https://communeai.tryethernal.com/ +4. Click "Save" to add the network. +5. Your MetaMask address is now your h160 address on the Commune EVM. + +#### Transfer Using Python + +```py +import os +import asyncio +from dotenv import load_dotenv +from substrateinterface import SubstrateInterface, Keypair +from eth_account import Account +from web3 import Web3 +from eth_utils import to_bytes +from scalecodec.utils.ss58 import ss58_encode +import hashlib +from communex.client import CommuneClient + +# Load environment variables from .env file +load_dotenv() + +# Access environment variables +ETH_PRIVATE_KEY = os.getenv('ETH_PRIVATE_KEY') +SUBSTRATE_PRIVATE_KEY = os.getenv('SUBSTRATE_PRIVATE_KEY') +RPC_URL = os.getenv('RPC_URL') +WS_URL = os.getenv('WS_URL') +def convert_h160_to_ss58(eth_address): + # Ensure the eth_address starts with '0x' + if not eth_address.startswith('0x'): + eth_address = '0x' + eth_address + + # Convert the prefix to bytes + prefix = b'evm:' + + # Convert the Ethereum address to bytes + address_bytes = to_bytes(hexstr=eth_address) + + # Combine prefix and address + combined = prefix + address_bytes + + # Hash the combined data using Blake2 256-bit + blake2_hash = hashlib.blake2b(combined, digest_size=32).digest() + + # Convert the public key to SS58 format + ss58_address = ss58_encode(blake2_hash, ss58_format=42) # Using 42 as the network ID, adjust as needed + + return ss58_address + + +async def perform_transfer(): + keypair = Keypair.create_from_uri(SUBSTRATE_PRIVATE_KEY) + + eth_account = Account.from_key(ETH_PRIVATE_KEY) + recipient_ethereum_address = eth_account.address + + ss58_address = convert_h160_to_ss58(recipient_ethereum_address) + print(f"Mirror: {ss58_address}") + + amount = 10_000_000_000 # 10 tokens + + client = CommuneClient(WS_URL) + + print(client.transfer(key=keypair, dest=ss58_address, amount=amount)) + print(f"Transfer sent to {recipient_ethereum_address} (its ss58 mirror address is: {ss58_address})") + +if __name__ == "__main__": + asyncio.run(perform_transfer()) + +``` + +You should now have funds in your EVM account. + +### Deploying A Smartcontract + +*Adapation of: Moonbeam article at [https://docs.moonbeam.network/builders/ethereum/dev-env/remix/](https://docs.moonbeam.network/builders/ethereum/dev-env/remix/)* + +Now that you have some funds in your EVM account, you can deploy a smart contract. + +#### Getting to Know Remix + +When you visit [Remix](https://remix.ethereum.org/), you'll notice it is divided into four main sections: + +1. Plugin panel: This area displays icons for each preloaded plugin, the plugin manager, and settings menu. You'll see icons for File explorer, Search in files, Solidity compiler, and Deploy and run transactions. As you activate more plugins, their icons will appear here too. + +2. Side panel: This shows the content of the currently active plugin. By default, you'll see the File explorer, which displays your workspace and files. Clicking other icons in the plugin panel will switch the content here. + +3. Main panel: This is where you'll do most of your work. It opens with a "Home" tab full of helpful resources. You can always reopen this by clicking the blue Remix icon in the top left. As you open files, they'll appear as tabs here. + +4. Terminal: This works like a standard terminal. You can run scripts, view logs, and even interact with Ethers and Web3 JavaScript libraries directly. + +#### Creating Your Smart Contract + +Let's create a simple ERC-20 token contract: + +1. In the File explorer, click the new file icon. +2. Name your new file `MyToken.sol`. +3. In the main panel, paste this code: + +```solidity +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +contract MyToken is ERC20 { + constructor(uint256 initialSupply) ERC20("MyToken", "MYTOK") { + _mint(msg.sender, initialSupply); + } +} +``` + +This contract creates a token called "MyToken" with the symbol "MYTOK". It mints the initial supply to the contract creator. + +#### Compiling Your Contract + +Before compiling, make sure you've selected the right file in the File explorer. Then: + +1. Click the Solidity Compiler icon in the plugin panel. +2. Check that the compiler version matches your contract requirements. For this example, you need 0.8.20 or newer to be compatible with OpenZeppelin's `ERC20.sol`. +3. If you want, you can check "Auto compile" for automatic recompilation when you make changes. +4. Click "Compile MyToken.sol". + +A green checkmark will appear next to the Solidity compiler icon if compilation is successful. + +#### Deploying to Commune + +Now, let's deploy your contract to Commune: + +1. Select the Deploy and run transactions plugin. +2. From the "ENVIRONMENT" dropdown, choose your wallet (e.g., "Injected Provider - MetaMask"). +3. Connect your wallet to Remix when prompted. +4. Ensure you're connected to the Commune network in your wallet. +5. Keep the default gas limit of 3,000,000. +6. For "VALUE", leave it as 0. +7. Make sure `MyToken.sol` is selected in the "CONTRACT" dropdown. +8. For initial supply, let's use 8 million tokens: 8000000000000000000000000 (remember, ERC-20 tokens typically use 18 decimal places). +9. Click "Deploy" and confirm the transaction in your wallet. + +Once deployed, you'll see transaction details in the Remix terminal and your contract will appear under "Deployed Contracts". + +#### Interacting with Your Contract + +Under "Deployed Contracts", you'll see all the functions you can interact with: + +- Orange buttons are for non-payable functions that write to the blockchain. +- Red buttons are for payable functions that write to the blockchain. +- Blue buttons are for functions that only read data. + +To use a function: +1. Click on its name to expand it. +2. Fill in any required parameters. +3. Click the function button to execute it. + +For example, to use the `approve` function: +1. Enter the spender's address (e.g., 0x3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0). +2. Enter the amount to approve (e.g., 10000000000000000000 for 10 tokens). +3. Click "transact" and confirm in your wallet. + +To view your balance or transfer tokens, you'll need to add the token to your wallet. Check your wallet's documentation for instructions on adding custom tokens. + +Remember, every interaction that changes the blockchain state will require a transaction, so keep an eye on your wallet for confirmation prompts. + + +#### Precompiles + +Precompiles: Built-in contracts that can directly access and modify the blockchain's runtime storage, enabling powerful core-level operations. + +We are actively working on completing the documentation for precompiles. In the meantime, you can refer to our [Subspace Precompiles Section](https://github.com/renlabs-dev/subspace-network/tree/feat/merged-weight-copying/runtime/src/precompiles) for preliminary information. diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/general-subnet-dao.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/general-subnet-dao.mdx index 321ff848..e3c506a7 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/general-subnet-dao.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/general-subnet-dao.mdx @@ -1,28 +1,61 @@ -# Subnet 0 Module Curation DAO +# General Subnet Module Curation DAO -The general subnet (netuid 0) has no consensus to protect against dishonest actors and hence needs an alternative solution. The Module Curation DAO is perpetually curating a onchain whitelist of module key addresses that have a clear value proposition to Commune based on their collective 2/3 majority-based evaluation. The whitelist acts as a condition to be registered on subnet 0. +The general subnet (s2) operates without a limiting consensus mechanism, allowing flexible weight allocation but requiring protection against abuse. The Module Curation DAO serves this purpose by maintaining an on-chain whitelist of validated module key addresses through a 2/3 majority voting system. -New modules have to submit an application to the DAO, which will be reviewed, discussed and voted on by its members. Members can start votes to remove existing modules from the whitelist. +## Purpose and Function -note: since the whitelist stores the ss58 addresses, modules will not have to reapply to the DAO after getting deregistered +The DAO protects against dishonest weights on junk modules by: +- Evaluating module applications based on clear value propositions +- Maintaining a curated whitelist of approved modules +- Enabling removal of modules that no longer meet standards +- Ensuring only quality modules receive stake-weight allocations -Capacities of the S2 DAO: +> **Note:** Since the whitelist stores ss58 addresses, modules don't need to reapply after deregistration. -- approve modules to join the whitelist -- remove modules from the whitelist -- add DAO members -- remove DAO members +## Module Requirements and Economics -The DAO starts at initially 12 members and is capped at 21 members. +### Whitelist Conditions +- Only whitelisted modules can receive stake-weight allocations +- Whitelisting is required for reward eligibility +- Modules must demonstrate clear value to the Commune ecosystem -# DAO Interface +### Economic Model +- Modules define stake-weight requirements for access +- Access bandwidth scales with allocated stake +- Rewards increase with stakeholder demand +- Flexible pricing models based on stake-weight -For high daily participation rate the DAO is native to discord, ran through a discord bot with a dedicated channel on the official Commune AI discord. Applicants and members run bot commands, which can be done easily from the phone. The discord bot is a centrally managed multisignature address. +## Application and Registration Process -# DAO Decentralization +Modules can join through two pathways in the [Governance Portal][governance]: -This compromise in decentralization for UX is mitigated by storing the public address of the multisignature key as a global chain parameter. This means if the entity running the bot becomes unavailable, corrupted or is otherwise unable to continue running the bot, the decentralized onchain governance process can vote to change the global parameter to a new multisignature address. This effectively allows the community to replace the bot with a new instance on the fly, as the bot is fully open source and can be operated by anyone. +1. **S2 Application** + - `Propose Change → Create new S2 Application` + - Full DAO review and voting process -# DAO Participation Reward +2. **Direct Registration** + - `Propose Change → Register a Module → S2` + - Must meet pre-established criteria -All Module Curation DAO activity is tracked and tied to the members. This allows to retrospectively or actively distribute rewards to members for participation. At launch, there will be no reward, but it can be expected that after the implementation of the DAO treasury rewards are distributed retrospectively to members. +## Governance Structure + +### Decision Making +- 2/3 majority required for all decisions +- Members can initiate removal votes +- Applications undergo collective review and discussion + +### Platform Integration +- Primary interface: [Governance Portal][governance] +- Validator interface: [Community Validator Platform][validator] +- Integrated weight management and stakeholder participation tracking + +## Future Developments + +The system will expand to include: +- API for modules to check stake-weight allocations +- Module idea suggestion platform +- Integration with new human-centric subnets +- Enhanced delegation capabilities for existing validators + +[governance]: https://governance.communeai.org +[validator]: https://validator.communeai.org \ No newline at end of file diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/general-subnet.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/general-subnet.mdx index e0d872bd..4784f872 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/general-subnet.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/general-subnet.mdx @@ -1,6 +1,6 @@ # General Subnet -The general subnet (netuid 0) is the only subnet without a consensus mechanism or founder, it is owned by the protocol. It is the only subnet where generality is technically possible as there is no consensus forcing all subnet validators to converge on a uniform validation methodology. This makes the subnet fully flexible to incentivize diverse usecases or initiatives on the fly, even if there is only a single module serving them. +The general subnet with the consensus **linear** is the only subnet without a consensus mechanism or founder, it is owned by the protocol. It is the only subnet where generality is technically possible as there is no consensus forcing all subnet validators to converge on a uniform validation methodology. This makes the subnet fully flexible to incentivize diverse usecases or initiatives on the fly, even if there is only a single module serving them. Meaning to incentivize something, instead of requiring a robust autonomous validation system, it can just directly allocate incentive towards it. diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/index.tsx b/apps/commune-page/src/app/docs/[...slug]/tutorials/index.tsx index 3dd54a48..96a1684f 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/index.tsx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/index.tsx @@ -25,7 +25,6 @@ import RunningPrivateChain from "./running-private-chain.mdx"; // Installation import SetupCommune from "./setup-commune.mdx"; import SetupWallet from "./setup-wallet.mdx"; -import SubnetList from "./subnet-list.mdx"; import SubnetParameters from "./subnet-parameters.mdx"; import SubnetTemplate from "./subnet-template.mdx"; import Testnet from "./testnet.mdx"; @@ -40,6 +39,8 @@ import WhatIsMining from "./what-is-mining.mdx"; import WhatIsValidating from "./what-is-validating.mdx"; import YumaConsensus from "./yuma-consensus.mdx"; import YumaSubnets from "./yuma-subnets.mdx"; +import RootSubnet from "./root-subnet.mdx"; +import EVM from "./evm.mdx"; const gettingStartedSection = [ { @@ -146,10 +147,10 @@ const subnetsSection = [ name: "Yuma Subnets", }, { - component: , - href: `subnet-list`, - name: "Subnet List", - }, + component: , + href: `root-subnet`, + name: "Root Subnet", + } ]; const workingWithKeysSection = [ @@ -217,11 +218,7 @@ const validatingSection = [ // href: `deploy-subnet`, // name: 'Deploy a subnet', // }, -// { -// component: , -// href: `subnet-list`, -// name: 'Subnet List', -// }, + // { // component: , // href: `subnet-threshold-calculation`, @@ -265,6 +262,11 @@ const subspaceSection = [ href: `testnet`, name: "Testnet", }, + { + component: , + href: `evm`, + name: "EVM", + }, { component: , href: `running-local-node`, diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/module-register.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/module-register.mdx index ba4c530a..9c1da672 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/module-register.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/module-register.mdx @@ -23,5 +23,5 @@ of the subnet you're being registered. You can use **--new-subnet-name** if you If you are not satisfied with any parameter on your module, you can update it: ```bash -comx module update [--delegation-fee] [--netuid] [--metadata] +comx module update [--name] [--ip] [--port] [--delegation-fee] [--metadata] ``` diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/participating-on-a-subnet.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/participating-on-a-subnet.mdx index 1a53fba2..8940f7ca 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/participating-on-a-subnet.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/participating-on-a-subnet.mdx @@ -7,7 +7,7 @@ Subnets have 3 classes of actors - Subnet [Validators](/docs/validating/what-is-validating) - Subnet [Miners](/docs/mining/what-is-mining) -If you are a holder and want to access or support a subnet with your stake, start a validator or delegate your stake to a validator active on the subnet. +If you are a holder and want to access or support a subnet with your stake, start a validator or delegate your stake to a validator who is setting his rotnet weights on that subnet. If you want to mine on a subnet, look into their github repository and resources provided by the subnet team to get an idea of what is required. diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/root-subnet.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/root-subnet.mdx new file mode 100644 index 00000000..5534bc97 --- /dev/null +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/root-subnet.mdx @@ -0,0 +1,7 @@ +## Root Subnet + +The root subnet operates with **Root** consensus and is maintained by the protocol itself. Users cannot register this subnet. + +The root subnet controls emission distribution across other protocol subnets. Instead of traditional miners, it uses subnets as miners. To become a validator on the root subnet, your stake must exceed that of the lowest-staked validator. The subnet has a 256-validator limit. + +Root subnet consensus is determined by a weight-stake distribution through a sigmoid function, whose steepness is controlled by network parameters. \ No newline at end of file diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/running-private-chain.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/running-private-chain.mdx index 6b086912..84ff5942 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/running-private-chain.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/running-private-chain.mdx @@ -50,7 +50,7 @@ cargo xtask run --bob Once the node is running, you can connect to it at: -`ws://localhost:30341` +`ws://localhost:9951` ## Additional Information diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/setup-wallet.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/setup-wallet.mdx index 548c0d74..766e257b 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/setup-wallet.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/setup-wallet.mdx @@ -9,7 +9,7 @@ This tutorial will guide you through setting up a wallet using the SubWallet ext 1. **Download the Extension**: Visit the [SubWallet download page](https://www.subwallet.app/download.html) and choose the appropriate extension for your browser (Chrome, Brave, Firefox, or Microsoft Edge). 2. **Add to Browser**: Click on the download link and follow the prompts to add the SubWallet extension to your browser. -#### Step 2: Create AaNew Wallet +#### Step 2: Create New Wallet 1. **Open SubWallet**: Click on the SubWallet icon in your browser’s extension area to open the wallet. 2. **Create a Master Password**: You will be prompted to create a master password. This password is crucial as it encrypts your wallet data on your device for security. @@ -22,8 +22,10 @@ This tutorial will guide you through setting up a wallet using the SubWallet ext #### Step 4: Connect To Commune -1. **Adding Commune Support**: You can scroll down on your subwallet until you see button *Manage tokens* window saying *Search token* will open up. Search for *com* until you can see the Communa AI icon. Turn on the *C* symbol, now you should be able to see your Commune balance. -2. **Staking Your tokens**: Visit the [explorer](https://explorer.communeai.net/#/accounts), connect your wallet, and follow the [video tutorial](https://www.youtube.com/watch?v=JrQKG7ko14M&t=195s) +1. **Adding Commune Support**: Visit your subwallet and scroll down to the "Manage tokens" button. In the "Search token" window, type "com" to find the Commune icon. Enable the "C" symbol to view your Commune balance. +2. **Staking Your Tokens**: Visit the [communeai wallet](https://wallet.communeai.org/), connect your wallet, click on **Stake** and select your desired validator. +3. **Unstaking Your Tokens**: Visit the [communeai wallet](https://wallet.communeai.org/), connect your wallet, click on **Unstake** and select from your staked validators. +4. **Sending Tokens**: Visit the [communeai wallet](https://wallet.communeai.org/), connect your wallet, click on **Send** and specify the recipient and amount. #### Additional Features diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/subnet-list.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/subnet-list.mdx deleted file mode 100644 index ce15ffd0..00000000 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/subnet-list.mdx +++ /dev/null @@ -1,9 +0,0 @@ -import { SubnetListCards } from '../components' - -# Subnet List - - - -
- -## Others Coming Soon ! diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/subnet-parameters.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/subnet-parameters.mdx index 38cde48c..bc914afb 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/subnet-parameters.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/subnet-parameters.mdx @@ -2,7 +2,7 @@ Subnet parameters are local to each subnet and do not impact anything outside of it. They provide a set of tools for the subnet founder to configure its constraints to optimize its functioning. -## Fields +## Important Fields - **name**: The name of the subnet. @@ -35,3 +35,15 @@ To list the parameters on a certain subnet ```bash comx subnet info ``` + +Or for all subnets + +```bash +comx subnet list +``` + +To update subnet parameters on your subnet + +```bash +comx subnet update [--param 1] [--param 2] +``` \ No newline at end of file diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/subnet-template.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/subnet-template.mdx index f19f7d00..dbbcd0ad 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/subnet-template.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/subnet-template.mdx @@ -2,45 +2,12 @@ import { SubnetCards } from '../components' # Commune Subnet Template - - -
- -## Template TL;DR - To make things easier for subnet builders. Commune AI provides a subnet template that you can get started off of. -## Dependencies - -The whole subnet template is built on top of the [CommuneX library / SDK](https://github.com/renlabs-dev/communex). -Which is truly the only essential dependency. - -Although in order to make the template more explicit we also provide additional libraries. -You can find the whole dependency list we used in the [requirements.txt](./requirements.txt) file. - -```txt -communex -typer -uvicorn -keylimiter -pydantic-settings -``` - -## Miner - -From the root of your project, you can just call **comx module serve**. For example: - -```sh -comx module serve commune-subnet-template.subnet.miner.model.Miner [--subnets-whitelist ] \ -[--ip ] [--port ] -``` + -## Validator +
-To run the validator, just call the file in which you are executing **validator.validate_loop()**. For example: -```sh -python3 -m commune-subnet-template.subnet.cli -``` diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/testnet.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/testnet.mdx index fcb4cb2e..182e1853 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/testnet.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/testnet.mdx @@ -4,12 +4,12 @@ Communai Ai provides a [public testnet](https://telemetry.testnet.communeai.net/ ## Connecting To Testnet Nodes -If you want to perform any onchain operation on a testnet, with CLI, simply pass the **--testnet** flag +If you want to perform any onchain operation on a testnet, with CLI, simply pass the **--testnet** flag Structure usage ```bash -comx --testnet [SUBCOMMAND] COMMAND [ARGS] +comx --testnet [SUBCOMMAND] COMMAND [ARGS] ``` For example, list your balances on a testnet by @@ -18,6 +18,10 @@ For example, list your balances on a testnet by comx --testnet key balances ``` -### Faucet +### Faucet -The faucet functionality is planned, and will soon be introduced as a POW token generation method for the testnet. +To run a faucet + +```bash +comx --testnet balance run-faucet +``` diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/what-is-a-subnet.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/what-is-a-subnet.mdx index d191c98f..7d8a7db3 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/what-is-a-subnet.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/what-is-a-subnet.mdx @@ -2,6 +2,6 @@ Subnets are distinct incentive environments running in parallel on the Commune protocol. Each is unique based on a set of characteristic defined by its consensus, parameters and validation methodology. -Every subnet, except subnet 0, has a founder who has control over its parameters while driving its development. +Every subnet, with the consensus of **yuma**, has a founder who has control over its parameters while driving its development. Miners compete around subnet emissions, while subnets compete around protocol emissions. diff --git a/apps/commune-page/src/app/docs/[...slug]/tutorials/yuma-subnets.mdx b/apps/commune-page/src/app/docs/[...slug]/tutorials/yuma-subnets.mdx index 103618cd..5086d592 100644 --- a/apps/commune-page/src/app/docs/[...slug]/tutorials/yuma-subnets.mdx +++ b/apps/commune-page/src/app/docs/[...slug]/tutorials/yuma-subnets.mdx @@ -2,6 +2,4 @@ Subnets that run on Yuma Consensus, giving them a set of characteristics important to understand for participants. See [Yuma Consensus](/docs/subspace/yuma-consensus) -Every subnet except the general subnet 0 is a yuma subnet. - -The active stake on yuma subnets has to exceed the SubnetStakeThreshold level to start producing emissions. This is because Consensus only is as strong as the amount of Stake active within a subnet. +Every subnet marked with consensus `Yuma` is considered a yuma subnet.