Introduction
The decentralized subnet template, named the Mesh Template, is tested in a Linux environment, but should be able to be built in a macOS environment. The Windows environment may require further development.
GitHub
https://github.com/hypertensor-blockchain/mesh
Introduction
At the heart of the Hypertensor platform is a simple but powerful ethos: every subnet should operate as a fully decentralized peer-to-peer (P2P) network. These subnets sit at the intersection of blockchain and AI — not to be confused with the Hypertensor blockchain itself — and provide a robust foundation for building decentralized AI-native applications.
Each Hypertensor subnet leverages the same foundational technologies that power leading blockchain ecosystems. This includes libp2p, the modular P2P networking stack used by major chains like Ethereum, Base, Arbitrum, Polkadot, Avail, Unichain, Hypertensor, applications like IPFS, and hundreds of other blockchains and decentralized applications. For a full list of libp2p adopters, see the official list of libp2p builders.
By combining blockchain-grade P2P infrastructure with AI-native capabilities, Hypertensor subnets empower developers to create fully decentralized, intelligent applications.
You can think about subnets like blockchains designed for AI. All of the computational limitations from gas and block weight have been removed.
Getting Started
As a builder, the primary focus is on building the application logic and how nodes will be able to form consensus and score each other.
In the inference-subnet, the focus is on the Inference Protocol (see protocols), and a commit-reveal scheme utilizing the DHT Records with a record validator.
Start building:
Clone the template:
git clone https://github.com/hypertensor-blockchain/mesh-template.git
Building a subnet revolves around two main points: protocols and consensus. Everything else is built-in and ready to go.
Protocols
Consensus
Protocols are where the application logic lives and how nodes communicate with each other. Call inference on nodes, run automated tasks, and more!
Consensus is where nodes score each other, and it runs in parallel to the Hypertensor consensus mechanism for validating and attesting. This is also where you will build the scoring mechanism.
What’s Included in the Subnet Template?
The Hypertensor Subnet Template includes all the core components required to launch a decentralized AI application, including:
Kademlia DHT (KAD-DHT) – for scalable, decentralized storage and routing
Asyncio-based DHT Node – designed for fast, concurrent communications
DHT Protocol – allows DHT nodes to request keys/neighbors from other DHT nodes, and manages routing tables
DHT Record Storage – with support for versioned and validated records with customizable predicate extensions
Record Validators – attach custom validation logic to any stored record, such as key authentication and Pydantic schemas
DHT Traversal Tools – Traverse the DHT graph
Routing Tables – manage network topology and neighbor nodes. A data structure that contains DHT peers bucketed according to their distance to node_id. Follows Kademlia routing table
P2P Servicer Base – register RPC methods to the DHT for nodes to call on one another
Proof-of-Stake Integration – incentivize and secure participation
Hypertensor Consensus – Ready to run in parallel to the Hypertensor consensus mechanism
Substrate Integration – Connect to Hypertensor with an RPC endpoint
Secure Communication – support for Ed25519 and RSA authentication for communication
💡 Focus on Logic, Not Plumbing The networking, cryptography, consensus, and storage layers are already handled. As a subnet builder, your only responsibility is to implement the application logic — the custom AI protocols and behaviors that live on top of the DHT.
Last updated