🌍 The Earth Blockchain on Polkadot (archived)

Overview

Social Network Blockchain · GitHub license PRs Welcome

The Social Network blockchain is a next-generation governance, economic, and social system for humanity built on Polkadot Substrate. To learn more read the whitepaper 🚀 🌎 .

Substrate Builders Program

Earn NET by running a Node

The Social Blockchain is powered by a decentralized backend which allows anyone in the world to participate by running the node software in this repository. This removes the need for a central party or middleman to extract rent or censor the network for personal gain, control, or power.

The network is capable of securing and maintaining a single source of truth, globally, with 6 second finality using a byzantine fault tolerant, nominated Proof-of-Stake consensus algorithm. In addition, nodes can run dedicated real time applications off-chain, and use the network consensus for discovery and access control of their services from from end social network users.

Node operators are incentivized with NET tokens for keeping the software running, and earn greater rewards the more reliable their nodes are over time. Fees generated on the chain, are distributed to Node operators proportional to how much staked NET they have on their node. Node operators can specify which Social token they wish to support, such that when NET token holders stake their tokens to a node, they will receive a bonus amount of that Social token in their wallet. These social tokens can then be used for governance or voting on global social networking applications.

Running a NET Node

To get started, you can follow the steps depending on your operating system:

Macos

Open the Terminal application and execute the following commands:

# Install Homebrew if necessary https://brew.sh/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

# Make sure Homebrew is up-to-date, install openssl and cmake
brew update
brew install openssl cmake

Ubuntu/Debian

Use a terminal shell to execute the following commands:

sudo apt update
# May prompt for location information
sudo apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev curl libz-dev

Arch Linux

Run these commands from a terminal:

pacman -Syu --needed --noconfirm cmake gcc openssl-1.0 pkgconf git clang
export OPENSSL_LIB_DIR="/usr/lib/openssl-1.0"
export OPENSSL_INCLUDE_DIR="/usr/include/openssl-1.0"

Windows

Please see this guide to get setup using Windows.

Setup your Rust Environment

The Social Network software is built in rust, so Guardians must setup their tooling as follows:

Install rust with the following:

# Install
curl https://sh.rustup.rs -sSf | sh
# Configure
source ~/.cargo/env
# Configure Rust toolchain to the one needed for The Social Blockchain
rustup install nightly-2021-01-25
rustup default nightly-2021-01-25
# Install WebAssembly (WASM)
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-01-25

Download The Social Blockchain

To get a copy of The Social Blockchain software on your machine:

git clone https://github.com/social-network/blockchain.git

The runtime of the blockchain is compiled down to Web Assembly (WASM) so it can be ran in embedded devices, or even the browser. To compile it run:

cd blockchain
WASM_BUILD_TOOLCHAIN=nightly-2021-01-25 cargo build --release

Note if you are doing other blockchain development work, you will need to update your toolchain to match our version for the compilation to work. Feel free to join the #support circle in the Social Technologies Society if you need help getting setup.

Help Build The Social Blockchain

As a decentralized project, we welcome all contributions that help us reach our mission faster, but ask that you follow our values. See our welcome blog for more details.

To jump right in, visit our jobs page to find a job or bounty that you think you can complete. Contributors will earn NET tokens to participate in the platform governance and help steward the decentralized technical development.

Security

The security policy and procedures can be found in docs/SECURITY.md.

License

The reason for the split-licensing is to ensure that for the vast majority of teams using Substrate to create feature-chains, then all changes can be made entirely in Apache2-licensed code, allowing teams full freedom over what and how they release and giving licensing clarity to commercial teams.

In the interests of the community, we require any deeper improvements made to Substrate's core logic (e.g. Substrate's internal consensus, crypto or database code) to be contributed back so everyone can benefit.

Type definitions

In order to be compatible with polkadot.js the following type definitions will need to be added:

{
  "AttributeTransaction": {
    "signature": "Signature",
    "name": "Vec<u8>",
    "value": "Vec<u8>",
    "validity": "u32",
    "signer": "AccountId",
    "identity": "AccountId"
  },
  "Attribute": {
    "name": "Vec<u8>",
    "value": "Vec<u8>",
    "validity": "BlockNumber",
    "creation": "Moment",
    "nonce": "u64"
  },
  "SwapId": "u64",
  "Swap": {
    "token_id": "TokenId",
    "swap_token": "TokenId",
    "account": "AccountId"
  },
  "AssetId": "u32",
  "SocialTokenBalance": "u128",
  "RegistrarIndex": "u32",
  "Judgement": {
    "_enum": [
      "Requested",
      "Approved"
    ]
  },
  "JudgementItem": "(RegistrarIndex, Judgement)",
  "Registration": {
    "judgements": "Vec<JudgementItem>",
    "account_id": "AccountId"
  },
  "Bloom": "H256",
  "Log": {
    "address": "H160",
    "topics": "Vec<H256>",
    "data": "Bytes"
  },
  "Receipt": {
    "state_root": "H256",
    "used_gas": "U256",
    "logs_bloom": "Bloom",
    "logs": "Vec<Log>"
  },
  "TransactionAction": {
    "_enum": {
	"Call": "H160",
	"Create": "Null"
    }
  },
  "TransactionRecoveryId": "u64",
  "TransactionSignature": {
    "v": "TransactionRecoveryId",
    "r": "H256",
    "s": "H256"
  },
  "Transaction": {
    "nonce": "U256",
    "gas_price": "U256",
    "gas_limit": "U256",
    "action": "TransactionAction",
    "value": "U256",
    "input": "Bytes",
    "signature": "TransactionSignature"
  },
  "TransactionStatus": {
    "transaction_hash": "H256",
    "transaction_index": "u32",
    "from": "H160",
    "to": "Option<H160>",
    "contract_address": "Option<H160>",
    "logs": "Vec<Log>",
    "logs_bloom": "Bloom"
  },
  "Id": "AuthorityId",
  "ChainId": "u8",
  "ResourceId": "Vec<u8>",
  "ExchangeId": "u64",
  "CurrencyOf": "Balance",
  "NftId": "U256",
  "Erc721Token": {
    "id": "NftId",
    "metadata": "Vec<u8>"
  }
}
Issues
  • Rebasing v3 to master

    Rebasing v3 to master

    This PR is an attempt to rebase master against v3 so that v3 can eventually be merged into master. Since there were recent features added to both v3 and master, please pay particular attention to social-nfts and social-bridge while reviewing.

    Sorry that it's such a massive PR :(

    opened by aphelionz 4
  • Update pallet-social-treasury and pallet-social-champions

    Update pallet-social-treasury and pallet-social-champions

    • Added payout_stakers extrinsic to pallet-social-treasury
    • Updated pallet-social-champions storage
    A0-pleasereview 
    opened by andor0 2
  • Fixing some workspace tests

    Fixing some workspace tests

    This PR fixes some workspace tests, and ignores others i.e. 998985b

    A0-pleasereview 
    opened by aphelionz 1
  • Rust CI

    Rust CI

    This PR adds simple CI via cargo test

    A3-inprogress 
    opened by aphelionz 1
  • Fix compilation errors

    Fix compilation errors

    A0-pleasereview 
    opened by andor0 0
  • Fixing millisecs typo

    Fixing millisecs typo

    A0-pleasereview 
    opened by aphelionz 0
  • Update of pallet-social-nft

    Update of pallet-social-nft

    • Done pallet-social-nft more ERC721-compatible
    • Added tests
    • Renamed Erc721 to SocialNft in tests of pallet-social-nft
    A0-pleasereview 
    opened by andor0 0
  • Small cargo check fix

    Small cargo check fix

    This PR adds the const NET: u128 = 1000; to bin/node/executor/benches/bench.rs to prevent a cargo check error

    A0-pleasereview 
    opened by aphelionz 0
  • Test: adding rustup update to CI

    Test: adding rustup update to CI

    A0-pleasereview 
    opened by aphelionz 0
  • Remove Polkadot Compaion Labels CI

    Remove Polkadot Compaion Labels CI

    This PR removes what, I believe, is an extraneous carryover from the paritytech/substrate codebase

    A0-pleasereview 
    opened by aphelionz 0
  • Ignored tests

    Ignored tests

    Due to our codebase diverging from substrate core (mainly in expectations of blockchain events and/or transaction behavior), some of the lower-level crate tests fail.

    I marked them as #[ignore] for now. See this commit for the list: https://github.com/social-network/blockchain/commit/998985be47fe68443d16ace6bb3b44167dbf026d

    Z0-unconfirmed 
    opened by aphelionz 0
  • ERROR: Instantiation: Export ext_misc_chain_id_version_1 not found

    ERROR: Instantiation: Export ext_misc_chain_id_version_1 not found

    Built with the nightly from late Jan, keep getting the following error when running

    ./social-network --pruning=archive

    2021-05-13 11:27:18 🌎 Social 🌍 Network 🌏
    2021-05-13 11:27:18 ✌️  version 3.0.0-7bc55a5e5-x86_64-linux-gnu
    2021-05-13 11:27:18 ❤️  by Parity Technologies <[email protected]>, 2017-2021
    2021-05-13 11:27:18 📋 Chain specification: Chi
    2021-05-13 11:27:18 🏷 Node name: dazzling-nation-2708
    2021-05-13 11:27:18 👤 Role: FULL
    2021-05-13 11:27:18 💾 Database: RocksDb at /home/jake/.local/share/social-network/chains/chi/db
    2021-05-13 11:27:18 ⛓  Native runtime: social-network-1 (chi-0.tx2.au1)
    Error: Service(Client(StateDatabase("Expected pruning mode: archive")))
    [email protected]:~/codebases/blockchain/target/release$ ./social-network --pruning=archive
    2021-05-13 11:27:26 🌎 Social 🌍 Network 🌏
    2021-05-13 11:27:26 ✌️  version 3.0.0-7bc55a5e5-x86_64-linux-gnu
    2021-05-13 11:27:26 ❤️  by Parity Technologies <[email protected]>, 2017-2021
    2021-05-13 11:27:26 📋 Chain specification: Chi
    2021-05-13 11:27:26 🏷 Node name: dull-stone-9886
    2021-05-13 11:27:26 👤 Role: FULL
    2021-05-13 11:27:26 💾 Database: RocksDb at /home/jake/.local/share/social-network/chains/chi/db
    2021-05-13 11:27:26 ⛓  Native runtime: social-network-1 (chi-0.tx2.au1)
    2021-05-13 11:27:26 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
    2021-05-13 11:27:26 Cannot create a runtime: Instantiation("Instantiation: Export ext_misc_chain_id_version_1 not found")
    Error: Service(Client(Execution(RuntimeConstruction(Instantiation("Instantiation: Export ext_misc_chain_id_version_1 not found")))))```
    Z0-unconfirmed 
    opened by jakehemmerle 0
  • Feature: OrbitDB Manifests

    Feature: OrbitDB Manifests

    This PR creates a new pallet called social-orbit-db-manifests that acts as a binding between a Society and an OrbitDB manifest in IPFS.

    This is functional but WIP because of security and further optimizations:

    • [ ] Need to implement ensure_founder to make sure only the founder of the Society can assign a manifest
    • [ ] Rustfmt and whitespace
    • [ ] Tests
    • [ ] Doc
    • [x] Runtime version bump
    • [x] Can't utilize pallet_assets or pallet_society due to compilation error: duplicate lang item in crate 'sp_io'
    A0-pleasereview 
    opened by aphelionz 0
Owner
social.network
The Decentralized Social Network
social.network
The Phala Network Blockchain, pRuntime and the bridge.

Phala Blockchain Phala Network is a TEE-Blockchain hybrid architecture implementing Confidential Contract. This repo includes: node/: the main blockch

Phala Network 196 Sep 16, 2021
Basilisk node - cross-chain liquidity protocol built on Substrate

Basilisk node Local Development Follow these steps to prepare a local Substrate development environment ??️ Simple Setup Install all the required depe

Galactic Council 15 Sep 11, 2021
A CLI application which allows you to archive Urbit channels and all linked content in them.

The Urbit Content Archiver is a small CLI application that exports channels from your Urbit ship and auto-downloads any directly linked content locall

Robert Kornacki 25 Sep 11, 2021
Statemint Node Implementation

Statemint Implementation of Statemint, a blockchain to support generic assets in the Polkadot and Kusama networks. Statemint will allow users to: Depl

Parity Technologies 69 Sep 15, 2021
Substrate Node for Anmol Network

Anmol Substrate Node ?? ??️ ?? Anmol is the First Cross-Chain NFT Toolkit, on Polkadot. Introducing: Moulds NFT Breeding Multi-Chain NFT Migration ink

Anmol Network 10 Sep 7, 2021
C++ `std::unique_ptr` that represents each object as an NFT on the Ethereum blockchain

C++ `std::unique_ptr` that represents each object as an NFT on the Ethereum blockchain

null 1.4k Sep 15, 2021
A high performance blockchain kernel for enterprise users.

English | 简体中文 What is CITA CITA is a fast and scalable blockchain kernel for enterprises. CITA supports both native contract and EVM contract, by whi

CITAHub 1.2k Sep 17, 2021
Source project for the Internet Computer software

The Internet Computer is the world’s first blockchain that runs at web speed and can increase its capacity without bound. Like the Internet (which is composed of many machines adhering to TCP/IP protocol) and blockchain protocols (such as Bitcoin and Ethereum).

DFINITY 727 Sep 17, 2021
Cross-chain hub for Crypto Asset on Polkadot

ChainX ChainX is a community-driven project built on the next-generation blockchain framework substrate, the largest Layer-2 network of Bitcoin using

ChainX 214 Sep 4, 2021
Local blockchain for Free TON DApp development and testing.

TON OS Startup Edition Local blockchain for Free TON DApp development and testing. Have a question? Get quick help in our channel: TON OS Startup Edit

TON Labs 24 Sep 5, 2021
Private payments for mobile devices.

MobileCoin Fog This is the README file for MobileCoin Fog. Note to Developers MobileCoin Fog is a prototype. Expect substantial changes before and aft

MobileCoin Foundation 34 Sep 10, 2021
2021 春季黑客松

Demo Day 演示队伍注意事项 每一队伍演示时间为 6 分钟,然后会有 2 分钟评委们提问及点评。评委们根据以下维度打分: 产品完成度 技术难题 商业价值 创新性 用户体验 演示时讲个好故事,所以尽量演示: 项目源起,背后的市场应用,现在做到什么程度,未来半年到一年有什么发展计划。 在黑客松期间

null 20 Jun 24, 2021
Diem’s mission is to build a trusted and innovative financial network that empowers people and businesses around the world.

Note to readers: On December 1, 2020, the Libra Association was renamed to Diem Association. The project repos are in the process of being migrated. A

Diem 16k Sep 15, 2021
The Nervos CKB is a public permissionless blockchain, and the layer 1 of Nervos network.

Nervos CKB - The Common Knowledge Base master develop About CKB CKB is the layer 1 of Nervos Network, a public/permissionless blockchain. CKB uses Pro

Nervos Network 866 Sep 2, 2021
The Parity Bitcoin client

The Parity Bitcoin client. Gitter Installing from source Installing the snap Running tests Going online Importing bitcoind database Command line inter

Parity Technologies 682 Sep 6, 2021
The fast, light, and robust client for the Ethereum mainnet.

OpenEthereum Fast and feature-rich multi-network Ethereum client. » Download the latest release « Table of Contents Description Technical Overview Bui

OpenEthereum 1.1k Sep 12, 2021
Alternative Free Identity System

Alfis Alternative Free Identity System This project represents a minimal blockchain without cryptocurrency, capable of sustaining any number of domain

Revertron 58 Sep 16, 2021
Substrate: The platform for blockchain innovators

Substrate · Substrate is a next-generation framework for blockchain innovation ?? . Trying it out Simply go to substrate.dev and follow the installati

Parity Technologies 5.6k Sep 16, 2021
A node and runtime configuration for polkadot node.

MANTA NODE This repo is a fresh FRAME-based Substrate node, forked from substrate-developer-hub/substrate-node-templte ?? It links to pallet-manta-dap

Manta Network 14 Apr 25, 2021