Overview of Commune Consensus Protocols
Commune is a modular chain supporting multiple consensus protocols to adapt to different use cases. The primary protocols include Linear, Yuma, and Yomama, with the ability to add more in the future.
website·Indexed 30 days ago
https://comdocs.netlify.appDeveloper resources for CommuneAI, featuring guides on the PyParse CLI, module basics, and the Subspace module. Includes tutorials for deploying miners, registering validators, staking tokens, and managing keys, as well as technical specifications from the blackpaper regarding emissions, profit sharing, and the module filesystem.
c.modules() and retrieve detailed information about a module using the info() method or by calling the module's info endpoint.# Search for a specific module
c.modules('model.openai')
# View module info via module object
model_openai = c.module('model.openai')
c.print(model_openai.info(*args, **kwargs))
# View module info via direct call
c.print(c.call('model.openai/info', *args, **kwargs))commune folder. It maps a module's short-form name (the key) to the absolute file path of the module class (the value). This allows the system to resolve object imports to their corresponding source files globally.{
"repo": "/Users/saltoshi/commune/modules/repo/repo.py",
"tool.web": "/Users/saltoshi/commune/modules/tool/web/web.py",
"miner.add": "/Users/saltoshi/commune/miner/add/add.py"
}The Access Module restricts access based on stake and permissions using the following logic:
max_rate (determined by total stake divided by the stake2rate variable).module.py file acts as an anchor for the module filesystem. Modules are organized by their directory path relative to the project root. For example, a dataset module stored at {PWD}/dataset/text is referenced by the path dataset.text. Note that there is currently a limitation where the name of the configuration must match the name of the Python object.import commune as c
class Model(c.Module):
def __init__(self, c=0):
self.c = c
def add(self, a=1, b=1):
return a + b + self.cThe validator operates by randomly sampling modules within a network (subnet) and applying a score function to them.
vote_staleness parameter (the number of blocks between votes).commune package provides functions to list, search, and retrieve detailed information about managed keys.# List all keys
c.keys()
# or
c keys
# Search for keys containing a specific term
c keys ali
# Get detailed info for a specific key
c.key_info('fam')
# Remove a key
c.rm_key('demo')