Skip to content

Commit

Permalink
perf: Specification Name
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkingLee committed Feb 6, 2022
1 parent 1b8068d commit ca3b028
Show file tree
Hide file tree
Showing 20 changed files with 105 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
9944
],
"preCreateCommand": ["cargo build", "cargo check"],
"postStartCommand": "./target/debug/zerodao-node --dev --ws-external",
"postStartCommand": "./target/debug/ourspace --dev --ws-external",
"menuActions": [
{"id": "polkadotjs",
"label": "Open PolkadotJS Apps",
Expand Down
82 changes: 41 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.PHONY: run-dev
run-dev:
./target/release/zerodao-node --dev --ws-external
./target/release/ourspace --dev --ws-external

.PHONY: build-release
build-release:
cargo build --release

.PHONY: purge-dev
purge-dev:
./target/release/zerodao-node purge-chain --dev
./target/release/ourspace purge-chain --dev

.PHONY: init
init:
Expand Down
49 changes: 38 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<div align="center">

[![Substrate version](https://img.shields.io/badge/Substrate-3.0.0-brightgreen?logo=Parity%20Substrate)](https://substrate.dev/)
[![codecov](https://codecov.io/gh/ZeroDAO/ZeroDAO-node/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ZeroDAO/ZeroDAO-node)
[![License](https://img.shields.io/github/license/ZeroDAO/ZeroDAO-node?color=green)](https://github.com/ZeroDAO/ZeroDAO-node/blob/main/LICENSE)
[![codecov](https://codecov.io/gh/ZeroDAO/ourspace/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ZeroDAO/ourspace)
[![License](https://img.shields.io/github/license/ZeroDAO/ourspace?color=green)](https://github.com/ZeroDAO/ourspace/blob/main/LICENSE)
<br />
[![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Fzerodaonet)](https://twitter.com/zerodaonet)
[![Discord](https://img.shields.io/badge/Discord-gray?logo=discord)](https://discord.gg/K56C6jtr)
Expand All @@ -16,13 +16,13 @@ For technical and guides, please refer to the [ZeroDAO Docs](https://docs.zeroda

# 1. Introduction

We define ZeroDAO as a public resource, including a social network, a reputation system. the ZeroDAO social network solves the incentive dilemma that currently exists in blockchain social networks, while incentivizing good behavior makes good behavior disappear. Imagine what Twitter would look like if you could get $1 for posting a tweet. Two-factor theory even concludes that security, salary, fringe benefits, good pay is not Motivators but Hygiene factors. Hygiene factors that do not give positive satisfaction or lead to higher motivation.
We define Ourspace as a public resource, including a social network, a reputation system. the Ourspace social network solves the incentive dilemma that currently exists in blockchain social networks, while incentivizing good behavior makes good behavior disappear. Imagine what Twitter would look like if you could get $1 for posting a tweet. Two-factor theory even concludes that security, salary, fringe benefits, good pay is not Motivators but Hygiene factors. Hygiene factors that do not give positive satisfaction or lead to higher motivation.

ZeroDAO social network solves the incentive dilemma by amplifying social motivation and internalizing external motivation.
Ourspace social network solves the incentive dilemma by amplifying social motivation and internalizing external motivation.

In the ZeroDAO network, we still quantify user contributions and settle them into Tokens, which we call social currency. It is frozen and at some point assigned to users trusted by the owner, it is also social currency and goes on to be shared. The user's social motivation is amplified. We use to shared information, now we share value.
In the Ourspace network, we still quantify user contributions and settle them into Tokens, which we call social currency. It is frozen and at some point assigned to users trusted by the owner, it is also social currency and goes on to be shared. The user's social motivation is amplified. We use to shared information, now we share value.

ZeroDAO social network brought us the reputation system and we proposed the TIR algorithm to compute the graph and obtain the reputation of each user. TIR is difficult to compute but easy to verify on-chain. This feature makes ZeroDAO's reputation system completely decentralized. At the same time, it has strong ability to prevent Sybil Attack to meet the security needs of financial products and on-chain governance. ZeroDAO also brings credit finance, zero-cost payments, and other applications to the blockchain.
Ourspace social network brought us the reputation system and we proposed the TIR algorithm to compute the graph and obtain the reputation of each user. TIR is difficult to compute but easy to verify on-chain. This feature makes Ourspace's reputation system completely decentralized. At the same time, it has strong ability to prevent Sybil Attack to meet the security needs of financial products and on-chain governance. Ourspace also brings credit finance, zero-cost payments, and other applications to the blockchain.

![Web3 Grants](https://github.com/ZeroDAO/www.ourspace.network/blob/main/src/assets/images/w3f.svg)

Expand Down Expand Up @@ -53,7 +53,7 @@ sudo apt install cmake pkg-config libssl-dev git clang libclang-dev

### More

ZeroDAO is based on Substrate, for more information please go to [Substrate](https://docs.substrate.io/v3/getting-started/overview/).
Ourspace is based on Substrate, for more information please go to [Substrate](https://docs.substrate.io/v3/getting-started/overview/).

## Installation

Expand All @@ -67,12 +67,39 @@ make init
make build-release
```

# 3. Run
# 3. Dev Network

## 1. Run as dev

```bash
make run-dev
```

## 2. Run as local

Start the local blockchain node using the `alice` account by running the following command:

```bash
./target/release/ourspace \
--base-path /tmp/alice \
--chain local \
--alice \
--node-key 0000000000000000000000000000000000000000000000000000000000000001
--validator
```

Start a second local blockchain node using the `bob` account by running the following command:

```bash
./target/release/ourspace \
--base-path /tmp/bob \
--chain local \
--bob \
--port 30334 \
--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp
--validator
```

# 4. Development

## Test All
Expand All @@ -98,11 +125,11 @@ make purge-dev
You can also

```bash
# Run ZeroDAO node without re-compiling
./scripts/docker_run.sh ./target/release/zerodao-node --dev --ws-external
# Run Ourspace node without re-compiling
./scripts/docker_run.sh ./target/release/ourspace --dev --ws-external

# Purge the local dev chain
./scripts/docker_run.sh ./target/release/zerodao-node purge-chain --dev
./scripts/docker_run.sh ./target/release/ourspace purge-chain --dev
```

# References
Expand Down
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ version: "3.2"

services:
dev:
container_name: zerodao-node
container_name: ourspace
image: paritytech/ci-linux:105b919b-20210617
working_dir: /var/www/zerodao-node
working_dir: /var/www/ourspace
ports:
- "9944:9944"
environment:
- CARGO_HOME=/var/www/zerodao-node/.cargo
- CARGO_HOME=/var/www/ourspace/.cargo
volumes:
- .:/var/www/zerodao-node
- .:/var/www/ourspace
- type: bind
source: ./.local
target: /root/.local
command: bash -c "cargo build --release && ./target/release/zerodao-node --dev --ws-external"
command: bash -c "cargo build --release && ./target/release/ourspace --dev --ws-external"
6 changes: 3 additions & 3 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ description = 'Decentralized social networks and reputation systems.'
edition = '2018'
homepage = 'https://0p0.org'
license = 'Unlicense'
name = 'zerodao-node'
repository = 'https://github.com/ZeroDAO/ZeroDAO-node'
name = 'ourspace'
repository = 'https://github.com/ZeroDAO/ourspace'
version = '0.0.1'

[[bin]]
name = 'zerodao-node'
name = 'ourspace'

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
Expand Down
2 changes: 1 addition & 1 deletion pallets/challenges/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["ZeroDAO <https://github.com/ZeroDAO>"]
description = 'The challenge logic of the TIR algorithm.'
name = 'zd-challenges'
repository = "https://github.com/ZeroDAO/ZeroDAO-node"
repository = "https://github.com/ZeroDAO/ourspace"
license = "Apache-2.0"
version = "0.0.1"
homepage = 'https://zerodao.net'
Expand Down
2 changes: 1 addition & 1 deletion pallets/refresh-reputation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["ZeroDAO <https://github.com/ZeroDAO>"]
description = 'The Refresh Reputation logic of the TIR algorithm.'
name = 'zd-refresh-reputation'
repository = "https://github.com/ZeroDAO/ZeroDAO-node"
repository = "https://github.com/ZeroDAO/ourspace"
license = "Apache-2.0"
version = "0.0.1"
homepage = 'https://zerodao.net'
Expand Down
2 changes: 1 addition & 1 deletion pallets/refresh-reputation/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
// Executed Command:
// ./target/release/zerodao-node
// ./target/release/ourspace
// benchmark
// --chain=dev
// --execution=wasm
Expand Down
2 changes: 1 addition & 1 deletion pallets/refresh-seeds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["ZeroDAO <https://github.com/ZeroDAO>"]
description = 'The Refresh Seeds logic of the TIR algorithm.'
name = 'zd-refresh-seeds'
repository = "https://github.com/ZeroDAO/ZeroDAO-node"
repository = "https://github.com/ZeroDAO/ourspace"
license = "Apache-2.0"
version = "0.0.1"
homepage = 'https://zerodao.net'
Expand Down
2 changes: 1 addition & 1 deletion pallets/refresh-seeds/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
// Executed Command:
// ./target/release/zerodao-node
// ./target/release/ourspace
// benchmark
// --chain=dev
// --execution=wasm
Expand Down
2 changes: 1 addition & 1 deletion pallets/reputation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["ZeroDAO <https://github.com/ZeroDAO>"]
description = 'The core of the Reputation System.'
name = 'zd-reputation'
repository = "https://github.com/ZeroDAO/ZeroDAO-node"
repository = "https://github.com/ZeroDAO/ourspace"
license = "Apache-2.0"
version = "0.0.1"
homepage = 'https://zerodao.net'
Expand Down
2 changes: 1 addition & 1 deletion pallets/seeds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["ZeroDAO <https://github.com/ZeroDAO>"]
description = 'The seeds logic of the TIR algorithm.'
name = 'zd-seeds'
repository = "https://github.com/ZeroDAO/ZeroDAO-node"
repository = "https://github.com/ZeroDAO/ourspace"
license = "Apache-2.0"
version = "0.0.1"
homepage = 'https://zerodao.net'
Expand Down
2 changes: 1 addition & 1 deletion pallets/support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "zd-support"
description = "Shared traits including `Renew`, `Reputation`, `Seed` and `Trust`."
authors = ["ZeroDAO <https://github.com/ZeroDAO>"]
repository = "https://github.com/ZeroDAO/ZeroDAO-node"
repository = "https://github.com/ZeroDAO/ourspace"
license = "Apache-2.0"
version = "0.0.1"
homepage = 'https://zerodao.net'
Expand Down
2 changes: 1 addition & 1 deletion pallets/tokens/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "zd-tokens"
description = "Support social finance"
authors = ["ZeroDAO <https://github.com/ZeroDAO>"]
repository = "https://github.com/ZeroDAO/ZeroDAO-node"
repository = "https://github.com/ZeroDAO/ourspace"
license = "Apache-2.0"
version = "0.0.1"
homepage = 'https://zerodao.net'
Expand Down
2 changes: 1 addition & 1 deletion pallets/tokens/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
// Executed Command:
// ./target/release/zerodao-node
// ./target/release/ourspace
// benchmark
// --chain=dev
// --execution=wasm
Expand Down
2 changes: 1 addition & 1 deletion pallets/trust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["ZeroDAO <https://github.com/ZeroDAO>"]
description = 'ZeroDAO trust pallet.'
name = 'zd-trust'
repository = "https://github.com/ZeroDAO/ZeroDAO-node"
repository = "https://github.com/ZeroDAO/ourspace"
license = "Apache-2.0"
version = "0.0.1"
homepage = 'https://zerodao.net'
Expand Down
2 changes: 1 addition & 1 deletion pallets/trust/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
// Executed Command:
// ./target/release/zerodao-node
// ./target/release/ourspace
// benchmark
// --chain=dev
// --execution=wasm
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ edition = '2018'
homepage = 'https://0p0.org'
license = 'Unlicense'
name = 'zerodao'
repository = 'https://github.com/ZeroDAO/ZeroDAO-node'
repository = 'https://github.com/ZeroDAO/ourspace'
version = '0.0.1'

[package.metadata.docs.rs]
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ pub mod opaque {
}

pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("ZeroDAO-node"),
impl_name: create_runtime_str!("ZeroDAO-node"),
spec_name: create_runtime_str!("ourspace"),
impl_name: create_runtime_str!("ourspace"),
authoring_version: 1,
spec_version: 100,
impl_version: 1,
Expand Down

0 comments on commit ca3b028

Please sign in to comment.