Skip to content

Instantly share code, notes, and snippets.

@JohnReedV
JohnReedV / SubtensorHyperparameters.md
Last active October 7, 2025 14:32
Subtensor Hyperparameters

A) Global Hyperparameters

Parameter Current value
TxRateLimit 1 block
TxDelegateTakeRateLimit 216,000 blocks
TxChildkeyTakeRateLimit 216,000 blocks
NetworkRateLimit 28,800 blocks

Subtensor Storage Query Examples

1. ActivityCutoff

  • Description: Activity cutoff for networks.
  • Query Type: u16 -> u16
  • Parameters:
    • netuid: u16
  • Default Value: 5000
  • Python Example:
@JohnReedV
JohnReedV / signedextensionerrors.md
Last active August 12, 2024 18:09
Custom Errors in Subtensor Signed Extension

Custom Error Variants in Subtensor Signed Extension

This document describes the custom error variants used in the subtensor signed extension. The errors are presented to the user in the following format:

{'code': 1010, 'message': 'Invalid Transaction', 'data': 'Custom error: [Error Code]'}.

Custom error: 1

Description: The account (who) attempting the commit_weights call does not meet the minimum stake requirement for weights.

  • Error from Subtensor: {'code': 1010, 'message': 'Invalid Transaction', 'data': 'Custom error: 1'}
@JohnReedV
JohnReedV / childhotkeys.md
Last active June 27, 2024 19:05
Child Hotkeys

Child Keys

Motivation

The child-key feature in Subtensor is being introduced with several key objectives:

  1. Decentralization of Stake Weight: Validators are able to allocate state weights to several other validators (child keys) within a subnet
  2. Enabling STAO / DTAO: As we scale the number of subnets in STAO / DTAO, it becomes infeasible for any validator to validate all the subnets . Allocating stake proportions to childkeys helps solve this.
  3. Enhanced Security: In case 1 childkey is compromised , it only affects the stakeweight associated with that subnet, and is easily revoked.
@JohnReedV
JohnReedV / contracts...1_Storage.sol
Created August 18, 2021 05:39
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {