Commune's blockchain Subspace, is built on top of the Rust Substrate framework.
Overview
Subspace is built using Substrate, a framework for developing scalable and upgradeable blockchains. It provides the core functionality and security needed for Commune's platform:
Implements Commune's consensus mechanism
Advertises cluster modules and their IP addresses
Enables peer discovery for nodes to connect with each other
To run a single development node with ephemeral storage:
This will start a Subspace node with a clean state. The node's state will be discarded on exit.
To retain the node's state between runs, specify a base path:
Other useful commands:
Test
To run all tests:
To run specific tests:
To run tests with detailed logs:
Architecture
Subspace leverages the modular and extensible architecture of Substrate. It uses FRAME pallets to encapsulate domain-specific logic such as consensus, storage, and p2p networking.
Notable components:
/node: Implementation of the Subspace node including networking, consensus, and RPC
/runtime: The core blockchain logic responsible for validating and executing state transitions
/pallets: Custom FRAME pallets with Commune-specific logic