Official implementation of the YeeCo Root Chain (Layer 1)

Related tags

Cryptography yeeroot
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...
As part of the IOP Stackā„¢ Morpheus is a toolset to have gatekeeper-free identity management and verifiable claims as a 2nd layer on top of a blockchain

Internet of People Internet of People (IoP) is a software project creating a decentralized software stack that provides the building blocks and tools

Aptos-core strives towards being the safest and most scalable layer one blockchain solution.
Aptos-core strives towards being the safest and most scalable layer one blockchain solution.

Aptos-core strives towards being the safest and most scalable layer one blockchain solution. Today, this powers the Aptos Devnet, tomorrow Mainnet in order to create universal and fair access to decentralized assets for billions of people.

Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer of security for your most sensitive files.

Koofr Vault https://vault.koofr.net Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer o

Consensus layer peer-to-peer connection setup

Consensus Layer P2P This project is a basic setup for a consensus layer peer-to-peer connection, as specified in the consensus layer specifications of

Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.

stress4844 Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844 blobs. ca

Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer

Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.

Scalable layer-2 registry and prover for subspaces
Scalable layer-2 registry and prover for subspaces

Subspacer Note: this does not fully implement the functionality described in the Spaces protocol yet and should be considered a proof of concept. Scal

A Bitcoin Native Smart Contract & Finance Layer
A Bitcoin Native Smart Contract & Finance Layer

What's bitcoinOS bitcoinOS A Bitcoin Native Smart Contract & Finance Layer. Bitcoin Wallet as a Smart Contract The first Turing-complete native smart

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

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
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

Nimiq 72 Sep 23, 2022
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/

Ecoball Chain 2 Jun 9, 2022
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

CodeChain 259 Dec 21, 2022
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

Trail of Bits 109 Dec 13, 2022
The implementation of the chain extension for `pallet-assets`

Pallet assets chain extension āš ļø Chain extension contains vulnerabilities: Don't use it in the production. Fixing vulnerabilities requires changes on

Supercolony 2 Aug 22, 2022
Official Repository for the InvArch platform.

InvArch The Future of Innovation The worldā€™s first intellectual property tokenization & networking platform. Official Repository for the InvArch platf

InvArch 29 Jan 4, 2023
the official Rust and C implementations of the BLAKE3 cryptographic hash function

BLAKE3 is a cryptographic hash function that is: Much faster than MD5, SHA-1, SHA-2, SHA-3, and BLAKE2. Secure, unlike MD5 and SHA-1. And secure again

BLAKE3 team 3.7k Jan 6, 2023
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
Dione is an anonymize and encrypted messaging system build on top on a peer to peer layer.

Secure and Anonymous Messaging WARNING: Currently Dione is not ready to be used nor does it fulfill its goal of being an anonymous messenger. In order

Dione 41 Jan 5, 2023
OpenSSL compatibility layer for the Rust SSL/TLS stack

An OpenSSL compatibility layer for the Rust SSL/TLS stack. MesaLink is an OpenSSL compatibility layer for the Rust SSL/TLS stack, namely rustls, webpk

MesaLock Linux 1.5k Dec 23, 2022