Giter VIP home page Giter VIP logo

subspace's Introduction

Subspace

Discord Chat License: MIT Build Status Coverage Status

Subspace is a FRAME-based Substrate blockchain node that provides the foundation for Commune's network. It serves as the trusted base layer responsible for consensus, module advertising, and peer discovery.

Table of Contents

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:

  1. Implements Commune's consensus mechanism
  2. Advertises cluster modules and their IP addresses
  3. Enables peer discovery for nodes to connect with each other

System Requirements

  • Supported OSs: Linux, MacOS
  • Supported Architectures: x86_64
  • Memory: ~ 286MB
  • Disk: ~500MB
  • Network: Public IPv4 address, TCP ports 9944, 30333 open

Installation

  1. Complete the basic Rust setup instructions.

  2. Clone this repository:

git clone https://github.com/commune-network/subspace.git
cd subspace/

Usage

Build

To build the node without launching it, run:

cargo build --release

Run

To run a single development node with ephemeral storage:

./target/release/node-subspace --dev

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:

mkdir my-chain-state/
./target/release/node-subspace --dev --base-path ./my-chain-state/  

Other useful commands:

# Purge chain state
./target/release/node-subspace purge-chain --dev

# Detailed logging
RUST_BACKTRACE=1 ./target/release/subspace-ldebug --dev

# Explore parameters and subcommands 
./target/release/node-subspace -h

Test

To run all tests:

cargo test --all

To run specific tests:

cargo test -p pallet-subspace --test test_voting

To run tests with detailed logs:

SKIP_WASM_BUILD=1 RUST_LOG=runtime=debug cargo test -- --nocapture  

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

Contributing

We welcome contributions to Subspace! Feel free to submit issues, fork the repository and send pull requests.

Please make sure your code follows the house coding style and passes all tests before submitting. See CONTRIBUTING.md for detailed guidelines.

Join our Discord community to discuss the project, ask questions and meet other contributors.

Acknowledgments

Special thanks to the teams at Parity Technologies and Web3 Foundation for their work on Substrate and FRAME.

subspace's People

Contributors

supremesource avatar saiintbrisson avatar salvivona avatar aripiprazole avatar steinerkelvin avatar cuteolaf avatar realhardworkingdeveloper avatar devwckd avatar ndkazu avatar lvivona avatar foobar123asdf avatar daviptrs avatar psicothepato avatar atomoxetine avatar

Stargazers

vittorioPiotti avatar omega avatar Paul Koop avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.