Skip to content

Commit

Permalink
Cleaning old files
Browse files Browse the repository at this point in the history
  • Loading branch information
steinerkelvin committed May 1, 2024
1 parent 9bb1561 commit 11b4bfe
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 58 deletions.
20 changes: 10 additions & 10 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
root = true

[*]
indent_style=space
indent_size=2
tab_width=2
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
tab_width = 4

[*.{rs,toml}]
indent_style=tab
indent_size=tab
tab_width=4
max_line_length=100
max_line_length = 100

[Makefile]
indent_style = tab
1 change: 0 additions & 1 deletion CODEOWNERS

This file was deleted.

34 changes: 13 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
This is free and unencumbered software released into the public domain.
MIT No Attribution

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
Copyright 2024 communeai.org

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
83 changes: 58 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,39 @@
[![Build Status](https://img.shields.io/travis/com/paritytech/substrate/master?label=stable)](https://travis-ci.com/paritytech/substrate)
[![Coverage Status](https://img.shields.io/codecov/c/gh/paritytech/substrate?label=coverage)](https://codecov.io/gh/paritytech/substrate)

Subspace is a FRAME-based [Substrate](https://substrate.io/) blockchain node that provides the foundation for [Commune's](https://www.communeai.org/) network. It serves as the trusted base layer responsible for consensus, module advertising, and peer discovery.
Subspace is a FRAME-based [Substrate](https://substrate.io/) blockchain node
that provides the foundation for [Commune's](https://www.communeai.org/)
network. It serves as the trusted base layer responsible for consensus, module
advertising, and peer discovery.

## Table of Contents

- [Overview](#overview)
- [System Requirements](#system-requirements)
- [Installation](#installation)
- [Installation](#installation)
- [Usage](#usage)
- [Build](#build)
- [Run](#run)
- [Test](#test)
- [Architecture](#architecture)
- [Contributing](#contributing)
- [License](#license)
- [Acknowledgements](#acknowledgements)
- [Acknowledgments](#acknowledgments)

## Overview
Subspace is built using [Substrate](https://substrate.io/), 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

Subspace is built using [Substrate](https://substrate.io/), 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 OSs: Linux, MacOS
- Supported Architectures: x86_64
- Memory: ~ 286MB
- Memory: ~ 286MB
- Disk: ~500MB
- Network: Public IPv4 address, TCP ports 9944, 30333 open

Expand All @@ -38,34 +46,43 @@ Subspace is built using [Substrate](https://substrate.io/), a framework for deve
1. Complete the [basic Rust setup instructions](./docs/rust-setup.md).

2. Clone this repository:
```bash

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

## Usage

### Build

To build the node without launching it, run:
```bash

```sh
cargo build --release
```

### Run

To run a single development node with ephemeral storage:
```bash

```sh
./target/release/node-subspace --dev
```
This will start a Subspace node with a clean state. The node's state will be discarded on exit.

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:
```bash

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

Other useful commands:
```bash

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

Expand All @@ -77,35 +94,51 @@ RUST_BACKTRACE=1 ./target/release/subspace-ldebug --dev
```

### Test

To run all tests:
```bash

```sh
cargo test --all
```

To run specific tests:
```bash

```sh
cargo test -p pallet-subspace --test test_voting
```

To run tests with detailed logs:
```bash

```sh
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.

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

- `/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.
## Contributing

Please make sure your code follows the house coding style and passes all tests before submitting. See [CONTRIBUTING.md](docs/CONTRIBUTING.md) for detailed guidelines.
We welcome contributions to Subspace! Feel free to submit issues, fork the
repository and send pull requests.

Join our [Discord community](https://discord.gg/communeai) to discuss the project, ask questions and meet other contributors.
Please make sure your code follows the house coding style and passes all tests
before submitting. See [CONTRIBUTING.md](docs/CONTRIBUTING.md) for detailed
guidelines.

Join our [Discord community](https://discord.gg/communeai) to discuss the
project, ask questions and meet other contributors.

## Acknowledgments
Special thanks to the teams at [Parity Technologies](https://www.parity.io/) and [Web3 Foundation](https://web3.foundation/) for their work on Substrate and FRAME.

Special thanks to the teams at [Parity Technologies](https://www.parity.io/) and
[Web3 Foundation](https://web3.foundation/) for their work on Substrate and
FRAME.
2 changes: 1 addition & 1 deletion .env → old/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NODE_DIR=/subspace/node
CONTRACT_DIR=/subspace/contract
SUBSPACE_PATH=./
SUBSPACE_PATH=./
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 11b4bfe

Please sign in to comment.