๐ŸŒ 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>"
  }
}
Comments
  • 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
  • Chore: Removing old crates

    Chore: Removing old crates

    This PR removes a number of crates, each one compiling successfully in its own commit.

    • frame/treasury
    • frame/example
    • frame/did
    • frame/democracy

    TODO:

    • social-societies vs social-network-treasury (this will be tackled in #17 )
    • collective pallet removal, it's a bit more intertwined than the others

    Any other candidates for cleanup while I'm doing this?

    A0-pleasereview 
    opened by aphelionz 0
  • Update pallet-social-network-dao

    Update pallet-social-network-dao

    • Added update_society_dao_address extrinsic in pallet-social-network-dao
    • Added payout_society extrinsic in pallet-social-network-dao
    • pallet-social-network-dao used instead of pallet-treasury
    A0-pleasereview 
    opened by andor0 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")))
    jake@rack0:~/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
Marvin-Blockchain-Rust: A Rust-based blockchain implementation, part of the Marvin blockchain project.

Marvin Blockchain - Rust Implementation Welcome to the Rust implementation of the Marvin Blockchain. This project is part of a comparative study on bu

Joรฃo Henrique Machado Silva 3 Sep 6, 2024
The Polkadot Hackathon Global Series North America edition is the second in a series of hackathons that brings the cutting edge of blockchain to a global community.

Polkadot Hackathon Project We are translating Uniswap v2 to Ink. Dependencies Install cargo-contract for building Ink contracts: cargo install dylint-

Kristiyan Dilov 3 Jun 28, 2022
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 261 Dec 28, 2022
Polkadot Node Implementation

Polkadot Implementation of a https://polkadot.network node in Rust based on the Substrate framework. NOTE: In 2018, we split our implementation of "Po

Parity Technologies 6.5k Jan 6, 2023
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
Subsocial full node with Substrate/Polkadot pallets for decentralized communities: blogs, posts, comments, likes, reputation.

Subsocial Node by DappForce Subsocial is a set of Substrate pallets with web UI that allows anyone to launch their own decentralized censorship-resist

DappForce 74 Nov 24, 2022
A top-up of fatality based errors, originally developed for polkadot

fatality A generative approach to creating fatal and non-fatal errors. The generated source utilizes thiserror::Error derived attributes heavily, and

Bernhard Schuster 9 Sep 1, 2022
interBTC A trust-minimized bridge from Bitcoin to Polkadot.

interBTC A trust-minimized bridge from Bitcoin to Polkadot. Explore the specification ยป Report Bug ยท Request Feature This repository is hosted on GitH

Interlay 192 Dec 27, 2022
A re-write of polkadot staking miner using subxt to avoid hard dependency to each runtime version

Staking Miner v2 WARNING this library is under active development DO NOT USE IN PRODUCTION. The library is a re-write of polkadot staking miner using

Parity Technologies 19 Dec 28, 2022
A holistic, minimal documentation portal for the Polkadot developers.

polkadot-sdk-docs A holistic, minimal documentation portal for the Polkadot developers. Master Tutorial The very, very rough plan that I have so far i

Parity Technologies 9 May 26, 2023
generate peerid from secret_ed25119 for chains made with polkadot-sdk

genpeerid genpeerid is a command-line tool designed to generate a PeerId from an ED25519 secret key, formatted specifically for Polkadot and Substrate

Rotko Networks 3 Apr 3, 2024
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.3k Dec 22, 2022
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 1k Dec 30, 2022
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 314 Jan 6, 2023
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 7.7k Dec 30, 2022
An extensible open-source framework for creating private/permissioned blockchain applications

Exonum Status: Project info: Community: Exonum is an extensible open-source framework for creating blockchain applications. Exonum can be used to crea

Exonum 1.2k Jan 1, 2023
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 35 Jan 2, 2023
A value transfer bridge between the Monero blockchain and the Secret Network.

Secret-Monero-Bridge A value transfer bridge between the Monero blockchain and the Secret Network. Proof-of-Concept Video Demonstration: https://ipfs.

null 28 Dec 7, 2022
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.9k Dec 28, 2022