Official implementation of the YeeCo Root Chain (Layer 1)

Overview

yeeroot

standard-readme compliant

Official implementation of the YeeCo Root Chain (Layer 1)

YeeCo is a permissionless, secure, high performance and scalable public blockchain platform powered by full sharding technology on PoW consensus.

📣 YeeCo Mainnet launched! (2020-08-10)

Latest release

  • v1.3.0 ⚠️ mandatory release (2020-11-04)
  • v1.2.0 ⚠️ mandatory release (2020-10-23)
  • v1.1.1 ⚠️ Hard fork release (2020-10-01)

Table of Contents

Description

Yeeco takes advantage of the 4 key mechanisms as follows:

  1. PoW (permissionless and secure)
  2. Full sharding (high performance and scalable)
  3. Multi-mining (resist 1% attack)
  4. CRFG (conditional reward finality gadget, introduce absolute finality on PoW to support lock-free cross shard transactions)

Install

Requirements

  1. Rust
    curl https://sh.rustup.rs -sSf | sh
  2. Openssl
  3. Rust nightly
    rustup toolchain add nightly
  4. rust nightly wasm
    rustup target add wasm32-unknown-unknown
    rustup target add wasm32-unknown-unknown --toolchain nightly
  5. wasm-gc
    cargo install wasm-gc
  6. Rust components: clippy rls docs src rustfmt
    rustup component list # list all the components installed
    rustup component add <name> # install component

Building

$ cd <project_base_dir>/runtime/wasm
$ sh build.sh
$ cd <project_base_dir>
$ cargo build

Usage

Start

  1. Start bootnodes router.

    $ ./yee bootnodes-router --dev-params

    Bootnodes router provides the bootnodes for each shard.

    You can try getting the bootnodes by the following RPC:

    $ curl -X POST --data '{"jsonrpc":"2.0","method":"bootnodes","params":[],"id":1}' localhost:50001 -H 'Content-Type: application/json'
  2. Start the nodes of the 4 shards

    $ ./yee --dev --dev-params --shard-num=0 --base-path=/tmp/yee/shard_0
    $ ./yee --dev --dev-params --shard-num=1 --base-path=/tmp/yee/shard_1
    $ ./yee --dev --dev-params --shard-num=2 --base-path=/tmp/yee/shard_2
    $ ./yee --dev --dev-params --shard-num=3 --base-path=/tmp/yee/shard_3

    Since we start the node without --mine, it will not mine new blocks.

  3. Start switch

    $ ./yee switch --dev-params --mine

    Switch provides proxy rpc of all the 4 shards. You can get the balance of a certain address of any shard by the following RPC:

    $ curl -X POST --data '{"jsonrpc":"2.0","method":"state_getBalance","params":["tyee15c2cc2uj34w5jkfzxe4dndpnngprxe4nytaj9axmzf63ur4f8awq806lv6"],"id":1}' localhost:10033 -H 'Content-Type: application/json'

    Switch can also work as a multi-miner. Since we start the switch with --mine, it will mine on the 4 shards.

Accounts

Test accounts:

Address                                                            Shard num    Private key
tyee1jfakj2rvqym79lmxcmjkraep6tn296deyspd9mkh467u4xgqt3cqkv6lyl    0            0xa8666e483fd6c26dbb6deeec5afae765561ecc94df432f02920fc5d9cd4ae206ead577e5bc11215d4735cee89218e22f2d950a2a4667745ea1b5ea8b26bba5d6
tyee15zphhp8wmtupkf3j8uz5y6eeamkmknfgs6rj0hsyt6m8ntpvndvsmz3h3w    1            0x40e17c894e03256ea7cb671d79bcc88276c3fd6e6a05e9c0a9546c228d1f4955d8f18e85255020c97764251977b77f3b9e18f4d6de7b62522ab29a49cede669f
tyee14t6jxhs885azsd9v4t75cre9t4crv6a89q2vg8472u3tvwm3f94qgr9w77    2            0x708084bc9da56d9d1b201f50830269887ff2ef74e619c6af6ba7cf506068326f7cc9c4d646c531e83507928114ff9ef66350c62dfda3a7c5d2f0d9e0c37e7750
tyee12n2pjuwa5hukpnxjt49q5fal7m5h2ddtxxlju0yepzxty2e2fads5g57yd    3            0xa079ef650520662d08f270c4bc088f0c61abd0224f58243f6d1e6827c3ab234a7a1a0a3b89bbb02f2b10e357fd2a5ddb5050bc528c875a6990874f9dc6496772

Revert

you can revert the chain to certain number by revert

$ ./yee revert --shard-num=0 --base-path=/tmp/yee/shard_0 --target="{\"0\":1024, \"1\": 1024, \"2\": 1024, \"3\": 1024}"

Roadmap

  1. [Done] PoC-1: Tetris consensus demo (2019-02)

    tetris_demo

  2. [Done] PoC-2: Transfer feature based on Tetris (2019-05)

    gyee

  3. [Done] PoC-3: PoW consensus, static sharding (2019-07)

    Release notes

  4. [Done] PoC-4: Multi-mining, cross-shard transactions (2019-09)

    Release notes

  5. [Done] PoC-5: Dynamic sharding (2019-11)

    Release notes

  6. [Done] PoC-6: Cross chain (interoperate with branch chain) (2019-12)

    Release notes

  7. [Done] PoC-7: Smart contract (on branch chain) (2020-02-14)

    Release notes

  8. [Done] Testnet (2020-03)

    Release notes

  9. [Done] Mainnet (2020-Q3)

    Release notes

Contributing

Feel free to dive in! Open an issue.

Contributors

License

GPL

You might also like...
Example of a block root with a Verkle state root

Example of a block root with a Verkle state root Block content This is a standard RLP block containing 3 transactions, and an added VerkleProof field

1️⃣ el lisp number uno - one lisp to rule them all 🏆

luno el lisp number uno luno is the one lisp to rule them all. Still experimental, do not use it in production yet. goals embeddable small size simple

kindly is a simple Rust implementation of a set-user-ID-root program, similar to sudo but in a much reduced way.

kindly is a simple Rust implementation of a set-user-ID-root program, similar to sudo but in a much reduced way.

Transforms UDP stream into (fake) TCP streams that can go through Layer 3 & Layer 4 (NAPT) firewalls/NATs.
Transforms UDP stream into (fake) TCP streams that can go through Layer 3 & Layer 4 (NAPT) firewalls/NATs.

Phantun A lightweight and fast UDP to TCP obfuscator. Table of Contents Phantun Latest release Overview Usage 1. Enable Kernel IP forwarding 2. Add re

Following "ZK HACK III - Building On-chain Apps Off-chain Using RISC Zero"

RISC Zero Rust Starter Template Welcome to the RISC Zero Rust Starter Template! This template is intended to give you a starting point for building a

A non-root version of traceroute written in Rust

tracepath-rs A non-root version of traceroute written in Rust for Linux.

Checks whether the process is running as root/sudo/admin permission in Windows and Unix systems

Is_sudo Checks if program is running as sudo in unix systems, or using admin permission in windows. Usage use is_sudo::check; use is_sudo::RunningAs;

Run adb in Termux without root permissions!

termux-adb Run adb in Termux without root permissions! Description This is a launcher for adb which enables debugging of one Android device from anoth

Wrapper over MMTk to simplify integration with runtimes: thread management system, object header, root scanning

vmkit A library which provides bunch of building blocks to make a VM in Rust. Feautures MMTK integration out of the box Thread management provided by

Official Rust implementation of the Nimiq protocol
Official Rust implementation of the Nimiq protocol

Nimiq Core implementation in Rust (core-rs) Rust implementation of the Nimiq Blockchain Core Nimiq is a frictionless payment protocol for the web. Thi

Official Rust implementation of Apache Arrow

Native Rust implementation of Apache Arrow Welcome to the implementation of Arrow, the popular in-memory columnar format, in Rust. This part of the Ar

Official Rust implementation of the Nimiq protocol
Official Rust implementation of the Nimiq protocol

Nimiq Core implementation in Rust (core-rs) Rust implementation of the Nimiq Blockchain Core Nimiq is a frictionless payment protocol for the web. Thi

Official Implementation of Findora Network.

Findora Platform Wiki Contribution Guide Licensing The primary license for Platform is the Business Source License 1.1 (BUSL-1.1), see LICENSE. Except

The official rust implementation of the SpamProtectionBot API
The official rust implementation of the SpamProtectionBot API

SpamProtection-rs Table of contents About Supported Rust version Features How to use Credits License About SpamProtection-Rust is a Rust wrapper for I

Ecoball Node is the Official Rust implementation of the Ecoball protocol.

Ecoball Node is the Official Rust implementation of the Ecoball protocol. It is a fork of OpenEthereum - https://github.com/openethereum/

The spatial message broker and database for real-time multiplayer experiences. Official Rust implementation.

WorldQL Server Rust implementation of WorldQL, the spatial message broker and database for real-time multiplayer experiences Setup Instructions ⚠️ Thi

CodeChain's official implementation in Rust.

CodeChain CodeChain is a programmable open source blockchain technology optimal for developing and customizing multi-asset management systems. Build D

A Rust implementation of the Message Layer Security group messaging protocol

Molasses An extremely early implementation of the Message Layer Security group messaging protocol. This repo is based on draft 4 of the MLS protocol s

A Rust implementation of the Message Layer Security group messaging protocol

Molasses An extremely early implementation of the Message Layer Security group messaging protocol. This repo is based on draft 4 of the MLS protocol s

Comments
  • Error while Building on Ubuntu System

    Error while Building on Ubuntu System

    Hey Maybe I am just super stupid and forgot some things, but even better if you can help me instant :D

    Was following the Instructions 1 by 1 but got this Error while building:

    `student@photonics-vm:~/yee/yeeroot-1.3.0/runtime/wasm$ sh build.sh
    warning: the feature `alloc` has been stable since 1.36.0 and no longer requires an attribute to enable
      --> /home/student/yee/yeeroot-1.3.0/core/crfg/primitives/src/lib.rs:20:43
       |
    20 | #![cfg_attr(not(feature = "std"), feature(alloc))]
       |                                           ^^^^^
       |
       = note: `#[warn(stable_features)]` on by default
    
    warning: 1 warning emitted
    
    warning: unused variable: `shard_num`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-sharding/src/lib.rs:219:58
        |
    219 |                     ScaleOutPhase::Started{observe_util, shard_num} => {
        |                                                          ^^^^^^^^^ help: try ignoring the field: `shard_num: _`
        |
        = note: `#[warn(unused_variables)]` on by default
    
    warning: unused variable: `shard_num`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-sharding/src/lib.rs:231:62
        |
    231 |                     ScaleOutPhase::NativeReady{observe_util, shard_num} => {
        |                                                              ^^^^^^^^^ help: try ignoring the field: `shard_num: _`
    
    warning: unused variable: `shard_num`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-sharding/src/lib.rs:244:56
        |
    244 |                     ScaleOutPhase::Ready{observe_util, shard_num} => {
        |                                                        ^^^^^^^^^ help: try ignoring the field: `shard_num: _`
    
    warning: unused variable: `shard_num`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-sharding/src/lib.rs:266:46
        |
    266 |                     ScaleOutPhase::Committed{shard_num, shard_count} => {
        |                                              ^^^^^^^^^ help: try ignoring the field: `shard_num: _`
    
    warning: unused variable: `shard_count`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-sharding/src/lib.rs:266:57
        |
    266 |                     ScaleOutPhase::Committed{shard_num, shard_count} => {
        |                                                         ^^^^^^^^^^^ help: try ignoring the field: `shard_count: _`
    
    warning: 5 warnings emitted
    
    warning: unused imports: `Codec`, `MaybeDisplay`, `MaybeSerializeDebug`, `Member`, `SimpleArithmetic`
      --> /home/student/yee/yeeroot-1.3.0/srml/yee-tracker/src/lib.rs:35:3
       |
    35 |         Codec, Decode, Encode,
       |         ^^^^^
    ...
    38 |         Member, SimpleArithmetic,
       |         ^^^^^^  ^^^^^^^^^^^^^^^^
    39 |         MaybeDisplay, MaybeSerializeDebug,
       |         ^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^
       |
       = note: `#[warn(unused_imports)]` on by default
    
    warning: 1 warning emitted
    
    warning: unused import: `StorageValue`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-sudo/src/lib.rs:129:20
        |
    129 | use srml_support::{StorageValue, Parameter, Dispatchable, decl_module, decl_event, decl_storage, ensure};
        |                    ^^^^^^^^^^^^
        |
        = note: `#[warn(unused_imports)]` on by default
    
    warning: 1 warning emitted
    
       Compiling srml-indices v1.0.0 (https://github.com/yeeco/substrate.git?branch=yee-v1.0#d50272d1)
    warning: unused import: `result`
      --> /home/student/yee/yeeroot-1.3.0/srml/yee-pow/src/lib.rs:52:12
       |
    52 | use rstd::{result, prelude::*};
       |            ^^^^^^
       |
       = note: `#[warn(unused_imports)]` on by default
    
    warning: 1 warning emitted
    
    warning: the item `As` is imported redundantly
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-crfg/src/lib.rs:271:28
        |
    44  | use primitives::traits::{MaybeSerializeDebug, As};
        |                                               -- the item `As` is already imported here
    ...
    271 |         use primitives::traits::{As};
        |                                  ^^
        |
        = note: `#[warn(unused_imports)]` on by default
    
    warning: 1 warning emitted
    
       Compiling yee-srml-relay v0.4.0 (/home/student/yee/yeeroot-1.3.0/srml/yee-relay)
    error[E0282]: type annotations needed
       --> /home/student/.cargo/git/checkouts/substrate-a761d01d47485ffa/d50272d/srml/indices/src/lib.rs:128:7
        |
    128 |         let i = (try_index % enum_set_size).as_();
        |             ^ consider giving `i` a type
    
    error[E0282]: type annotations needed
       --> /home/student/.cargo/git/checkouts/substrate-a761d01d47485ffa/d50272d/srml/indices/src/lib.rs:156:8
        |
    156 |             let item_index = (try_index % enum_set_size).as_();
        |                 ^^^^^^^^^^ consider giving `item_index` a type
    
       Compiling yee-srml-executive v0.4.0 (/home/student/yee/yeeroot-1.3.0/srml/yee-executive)
    error: aborting due to 2 previous errors
    
    For more information about this error, try `rustc --explain E0282`.
    error: could not compile `srml-indices`
    
    To learn more, run the command again with --verbose.
    warning: build failed, waiting for other jobs to finish...
    warning: field is never read: `authority_id`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-executive/src/lib.rs:507:2
        |
    507 |     authority_id: [u8; 32],
        |     ^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: `#[warn(dead_code)]` on by default
    
    warning: field is never read: `pow_target`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-executive/src/lib.rs:508:2
        |
    508 |     pow_target: U256,
        |     ^^^^^^^^^^^^^^^^
    
    warning: field is never read: `timestamp`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-executive/src/lib.rs:509:2
        |
    509 |     timestamp: u64,
        |     ^^^^^^^^^^^^^^
    
    warning: field is never read: `work_proof`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-executive/src/lib.rs:510:2
        |
    510 |     work_proof: WorkProof,
        |     ^^^^^^^^^^^^^^^^^^^^^
    
    warning: field is never read: `extra_version`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-executive/src/lib.rs:512:2
        |
    512 |     extra_version: u32,
        |     ^^^^^^^^^^^^^^^^^^
    
    warning: field is never read: `extra`
       --> /home/student/yee/yeeroot-1.3.0/srml/yee-executive/src/lib.rs:513:2
        |
    513 |     extra: PowSealExtra,
        |     ^^^^^^^^^^^^^^^^^^^
    
    warning: 6 warnings emitted
    
    error: build failed
    `
    
    opened by DaRabus 0
Releases(v1.3.0)
Owner
YeeCo
For a trustful 5G world
YeeCo
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 31, 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
Minimal implementation of the Mimblewimble protocol.

Grin Grin is an in-progress implementation of the Mimblewimble protocol. Many characteristics are still undefined but the following constitutes a firs

null 5k Dec 28, 2022
IBC modules and relayer - Formal specifications and Rust implementation

ibc-rs Rust implementation of the Inter-Blockchain Communication (IBC) protocol. This project comprises primarily four crates: The ibc crate defines t

Informal Systems 296 Jan 4, 2023
A Rust implementation of BIP-0039

bip39-rs A Rust implementation of BIP0039 Changes See the changelog file, or the Github releases for specific tags. Documentation Add bip39 to your Ca

Infincia LLC 49 Dec 9, 2022
Rust implementation of Zcash protocol

The Parity Zcash client. Gitter Blog: Parity teams up with Zcash Foundation for Parity Zcash client Installing from source Installing the snap Running

Parity Technologies 183 Sep 8, 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
Implementation of the Kademlia DHT protocol in Rust

kademlia-dht Simple implementation of the Kademlia DHT protocol in Rust with state dumping features for educational purposes (not production-ready). T

Leonardo Folgoni 18 Sep 24, 2022
Martinez is vNext Ethereum implementation written in pure Rust with Erigon architecture as design.

?? Martinez ?? Next-generation implementation of Ethereum protocol ("client") written in Rust, based on Erigon architecture. Why run Martinez? Look at

Arthur·Thomas 23 Jul 3, 2022
Official implementation of the YeeCo Root Chain (Layer 1)

yeeroot Official implementation of the YeeCo Root Chain (Layer 1) YeeCo is a permissionless, secure, high performance and scalable public blockchain p

YeeCo 29 Sep 20, 2022