Giter VIP home page Giter VIP logo

infrablockchain / yosemite-public-blockchain Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 1.0 110.55 MB

YOSEMITE Public Blockchain - General Purpose Public Blockchain for Business

Home Page: https://yosemitex.com

License: Other

CMake 2.01% Shell 2.26% C++ 48.59% C 1.41% WebAssembly 43.29% Python 2.37% Objective-C 0.01% Dockerfile 0.04% Ruby 0.03%
blockchain yosemite yosemitex stablecoin proof-of-transaction pot eosio eos cpp cpp14

yosemite-public-blockchain's Introduction

YOSEMITE Public Blockchain - General Purpose Public Blockchain for Business

No Native Cryptocurrency

Using programmable fiat-pegged stable tokens (e.g. USD, EUR, CNY) as base currencies

Proof-of-Transaction (PoT)-based Blockchain Consensus

To overcome the shortcomings of current public blockchains, we developed a more reasonable and fair consensus algorithm, Proof-of-Transaction (PoT)

General Financial Platform

Smart contract based blockchain system designed for enterprise uses

Key Features of YOSEMITE Public Blockchain

No Native Cryptocurrency

New method of public blockchain design that avoids issuing native cryptocurrency minted by the blockchain itself. There is no single distinguished built-in native token, only user-created tokens are issued and circulated on the YOSEMITE blockchain. In other smart contract based blockchains like Ethereum and EOS, custom tokens implemented as smart contracts are totally separate from the native cryptocurrency (ETH, EOS) used for executing blockchain transactions. In contrast, YOSEMITE blockchain lets any custom user token conforming to the YOSEMITE Standard Token interface become a Transaction Fee Token just as a native cryptocurrency can in other blockchain systems.

YOSEMITE Standard Token Model

The YOSEMITE blockchain provides a unique YOSEMITE Standard Token model. Every account created can mint a YOSEMITE Standard Token and inherently run standard token operations natively supported at the blockchain core level. Interoperability among the tokens on the YOSEMITE blockchain is enforced and guaranteed by the blockchain core system.

Fiat-Pegged Stable Tokens, Asset-Backed Security Tokens

User-created fiat-pegged stable tokens (e.g. USD tokens backed by an equivalent amount of USD held in reserve) issued by trusted entities (e.g. enterprises, financial institutions, governments) are selected as the transaction fee tokens. Asset-backed security tokens (e.g. company shares, gold backed tokens, ...) can be also issued and traded through on-chain token exchange using fiat-pegged stable tokens as base currencies.

Transaction Fee Tokens Selected from User-Created Tokens

Among the user-issued tokens, the elected block producers can select some tokens to be used for blockchain transaction fee payment, whereas typically a pre-built native cryptocurrency is used in other blockchain systems. Whenever any blockchain transaction is executed on the YOSEMITE blockchain, the block-producer-designated transaction fee tokens are collected as a transaction fee from users.

Proof-of-Transaction (PoT) Consensus Mechanism

The block producers of the YOSEMITE blockchain are elected by a unique consensus mechanism designed by YOSEMITE: Proof-of-Transaction (PoT) using Transaction-as-a-Vote (TaaV). The block producers are continuously elected and evicted by the transparent and fair vote index, the proof of generating meaningful transactions. The PoT mechanism incentivizes the application service providers, who are directly contributing to the blockchain ecosystem by generating blockchain transactions associated with real economic activity.

Delegable Transaction Fee Payment

The transaction fee payer is always specified separately from the accounts directly involved in a transaction, the transaction fee payment can be delegated to some other account. For the sake of a seamless and convenient user experience, blockchain service providers can pay blockchain transaction fees on behalf of the service’s users.

Smart Contract Enabled General Financial Platform

The YOSEMITE public blockchain is designed to be a general financial platform supporting smart contracts. Business entities can process their financial transactions on the YOSEMITE blockchain using the fiat-pegged stable tokens and custom smart contract codes developed to meet the needs of their business process.

Integrated KYC/AML Support and Account Recovery

The integrated KYC/AML process for YOSEMITE blockchain accounts is provided by trusted Identity Authorities designated by block producers, which lays the foundation for the secure and reliable financial transactions maintaining regulatory compliance. The blockchain account recovery is provided by the Identity Authorities mitigating the blockchain key loss problem.

Scalable Blockchain Architecture

The enterprise level blockchain scalability enabled by the PoT-based BFT consensus with short block time and fast block finality, the YOSEMITE’s off-chain state-channel exchange technology and the future multi-blockchain architecture. The YOSEMITE blockchain enables financial transaction processing at global scale.

YOSEMITE Public Blockchain code base is forked from EOSIO

YOSEMITE Public Blockchain is released under the open source MIT license and is offered “AS IS” without warranty of any kind, express or implied. Any security provided by the YOSEMITE Public Blockchain software depends in part on how it is used, configured, and deployed. YOSEMITE Public Blockchain is built upon many third-party libraries such as Binaryen (Apache License) and WAVM (BSD 3-clause) which are also provided “AS IS” without warranty of any kind. Without limiting the generality of the foregoing, Yosemite X Inc. makes no representation or guarantee that YOSEMITE Public Blockchain or any third-party libraries will perform as intended or will be free of errors, bugs or faulty code. Both may fail in large or small ways that could completely or partially limit functionality or compromise computer systems. If you use or implement YOSEMITE, you do so at your own risk. In no event will Yosemite X Inc. be liable to any party for any damages whatsoever, even if it had been advised of the possibility of damage.

YOSEMITE Public Blockchain 'Sentinel' Test-net

YOSEMITE Blockchain Explorer

  1. YOSEMITE Blockchain Explorer Backend
  2. YOSEMITE Blockchain Explorer Web Frontend

Client Library

  1. Java Client Library

Supported Operating Systems

  1. Centos 7
  2. Ubuntu 18.04
  3. MacOS 10.13 and higher (MacOS 10.14.x recommended)

Resources

Getting Started

YOSEMITE is based on EOSIO software. So instructions detailing the process of getting the software, building it, running a simple test network that produces blocks, account creation to the blockchain can be helped by Getting Started on the EOSIO Developer Portal. But the names of programs and scripts are changed.

nodeos -> yosemite
cleos  -> clyos ('cl'ient + 'yos'emite)
keosd  -> keyos (key + 'yos'emite)

Client Tool

clyos : https://developers.eos.io/eosio-nodeos/docs/cleos-overview

Key Store Daemon

keyos : https://developers.eos.io/eosio-nodeos/docs/keosd-overview

Build and Install

To build YOSEMITE, use yosemite_build.sh. To install and unsintall, use yosemite_install.sh and yosemite_uninstall.sh.

yosemite-public-blockchain's People

Contributors

andrewscheidecker avatar arhag avatar asiniscalchi avatar b1bart avatar bezalel avatar brianjohnson5972 avatar bytemaster avatar cj-oci avatar dskvr avatar elmato avatar ericiles avatar eugenechung avatar heifner avatar jgiszczak avatar kesar avatar larryk85 avatar mitza-oci avatar moskvanaft avatar nathanielhourt avatar noprom avatar paulcalabrese avatar pmesnier avatar sergmetelin avatar spoonincode avatar taokayan avatar tbfleming avatar thomasbcox avatar wanderingbort avatar zorba80 avatar zreyn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

cryptobuks

yosemite-public-blockchain's Issues

token freeze

  • Who can freeze a token? Just its creator?
  • Do we need freezing specific accounts with the token?

Adjust unittests and tests for YOSEMITE

Directory Description

  • unittests : tests for smart contracts
  • tests : tests for chain node (including plugins)
  • scripts : test scripts for tests
  • programs/eosio-launcher : node executer for tests

Executing unit test

  • How to execute only one test case of unittests
    cd build/unittests
    ./unit_test -t auth_tests/linkauth_special --report_level=detailed --color_output -- --binaryen
  • How to execute all test cases of unittests (except weighted_cpu_limit_tests)
    ./unit_test -t !wasm_tests/weighted_cpu_limit_tests --report_level=detailed --color_output -- --binaryen

How To Determine Native Token Symbol

The EOS.IO software determines its native token symbol at compile time, which its default is SYS,4.
contracts/eosiolib/core_symbol.hpp.in

We must make a decision whether to use compile time approach or runtime approach. For compile time approach, we have to make binaries and release them for each FIAT token(e.g. DKRW, DUSD). For runtime approach, there are two ways to determine the native token symbol, genesis block approach or smart contract(yx.system or yx.ntoken) approach.

[yx.ntoken] issuen action is notified to user accounts

when system depository issues new native tokens, "issuen" action instead of 'transfer' action is notified to user accounts.
need to check if there is a way to notify only 'trasfer' actions on user accounts

$YOSEMITE_CLEOS push action yx.ntoken issuen '["producer.a",{"quantity":"100000.0000 DKRW","issuer":"sysdepo"},"issuen test"]' -p sysdepo@active
executed transaction: a60a8741da2360948e6450bd58408e7f00c433d9b3d5c519d0a6f2987ec7b710  136 bytes  2099 us
#     yx.ntoken <= yx.ntoken::issuen            {"to":"producer.a","quantity":{"quantity":"100000.0000 DKRW","issuer":"sysdepo"},"memo":"issuen test...
#       sysdepo <= yx.ntoken::issuen            {"to":"producer.a","quantity":{"quantity":"100000.0000 DKRW","issuer":"sysdepo"},"memo":"issuen test...
#    producer.a <= yx.ntoken::issuen            {"to":"producer.a","quantity":{"quantity":"100000.0000 DKRW","issuer":"sysdepo"},"memo":"issuen test...

Commenting out all the resource limit check logics for the general smart contract platform

As our roadmap,
https://docs.google.com/spreadsheets/d/1StkJAtmHXjCj18N32YS2sYWBMZy_tHnp7NnSWhKL0T0/edit#gid=0,
says that target for the smart contract platform is 2019 July. But the EOS.IO software is already the smart contract platform based on its EOS token model, which is not fit to our fee-based system.

We must commenting out the all the checking logics of resource limitation for CPU, NET, and RAM DB not to check limit per account. We're going to modify the logics for our system.

#ifdef YX_SMART_CONTRACT_PLATFORM
#endif

[yx.ntoken] ntoken::createn

naming needs to be changed to 'initialize'
This transaction is one time 'initialization' transaction which should be called by system account (not by a depository) in BIOS process

[yx.ntoken] hard-coded KYC checking

currently KYC_VECTOR_REAL_NAME_AUTH and KYC_VECTOR_BANK_ACCOUNT_AUTH is hard-coded KYC policy for the native token operations, needs to think about configurable impl.

Event Notification Plugin

Let's make optional appbase-plugin to notify dapps their registered events using WebSocket. The foremost feature is notification of transaction irreversibility.

Adjust /v1/chain/get_currency_balance and get_currency_stats

  • consider yx.ntoken and yx.token
    For native token balance, /v1/chain/get_native_token_balance and get_native_token_stats will be added.
    For non-native token balance, /v1/chain/get_token_balance and get_token_stats will be added.
  • /v1/chain/get_currency_balance and /v1/chain/get_currency_stats are not compatible for Yosemite. They are not supported.

Identity Authority

In current implementation, the authorized Depositories also have the right for verifying user's identity(KYC) and publishing KYC info (only whether an account has gone through KYC process provided by a trusted entity) on blockchain. The separate authority account management should be implemented on system contract for registering identity authorities whose right should be authorized by the active block producers.
The authorized Identity Authorities have the right for managing user info and KYC info on blockchain.

[ChainCore] Transaction-as-a-Vote(TaaV) for Proof-of-Transaction(PoT) implementation

YOSEMITE Proof-of-Transaction(PoT) and Transaction-as-a-Vote (TaaV)

Proof-of-Transaction (PoT) incentivizes the application service providers directly contributing to the blockchain ecosystem by generating actual blockchain transactions, quantitatively measured by Transaction-as-a-Vote (TaaV).

The key idea that makes Proof-of-Transaction a novel blockchain consensus mechanism is the concept of Transaction-as-a-Vote (TaaV). Transactions generated by the client side of the blockchain applications can optionally include a vote for a block producer candidate who can potentially participate or is already participating in the blockchain consensus process. In blockchain transaction messages which would incur some transaction fee, there is an optional "transaction vote" field where a blockchain account address can be specified as a vote. That means the entity generating the transaction on blockchain wants the blockchain core node having the voted address to be a block producer.

transaction fee management

  • Currently each system contract manages its own transaction fee setup. (yosemite::fee_contract)
  • transaction fee amount for each system operation should be managed in one contract (system_contract), tx fee can only be updated by 2/3+1 agreement of active block producers
  • design more flexible fee system (supporting different fee policy for different account type, need to be incorporated to the account type/state design)

implementing yx.identity contract (managing identity info for each blockchain account)

For each blockchain account, Identity Authority can manage below information

  • account type (e.g. normal, system, ...)
  • KYC info. (e.g. email, phone, real name, bank account, ...)
  • account state (e.g. blacklisted account, ...)
  • Identity-Authority specific data (arbitrary string data)

once an Identity Authority sets identity info. for an account, only the Identity Authority account can modified the identity info for the account.

[yx.ntoken] invalid action notification for transaction fee transfer

for tx fee transfer, separate token transfer action (specifying tx fee amount) should be notified to the fee account.

$YOSEMITE_CLEOS push action yx.ntoken transfern '[ "producer.a", "producer.b", {"quantity":"10000.0000 DKRW","issuer":"sysdepo"}, "producer.a", "memo" ]' -p producer.a
executed transaction: 8fe5f4647657a9576b6fae3e37eda9899e12a9d5fbd4902cac68c8c7673b7efc  152 bytes  1667 us
#     yx.ntoken <= yx.ntoken::transfern         {"from":"producer.a","to":"producer.b","quantity":{"quantity":"10000.0000 DKRW","issuer":"sysdepo"},...
#    producer.a <= yx.ntoken::transfern         {"from":"producer.a","to":"producer.b","quantity":{"quantity":"10000.0000 DKRW","issuer":"sysdepo"},...
#         eosio <= yx.ntoken::transfern         {"from":"producer.a","to":"producer.b","quantity":{"quantity":"10000.0000 DKRW","issuer":"sysdepo"},...    =======> invalid action notification
#    producer.b <= yx.ntoken::transfern         {"from":"producer.a","to":"producer.b","quantity":{"quantity":"10000.0000 DKRW","issuer":"sysdepo"},...

[yx.ntoken] ntransfer problem with fee charing

For example, user1 has native tokens like 10000.0000@d1, 100@d2 and the tx fee of ntransfer is 100.
When user1 tries to do 'ntransfer' 10000@d1 to user2, the fee can be charged with 100@d1, so the ntransfer can fail.

Change the system account name and the prefix of system accounts

libraries/chain/include/eosio/chain/config.hpp

const static uint64_t system_account_name    = N(eosio);
const static uint64_t null_account_name      = N(eosio.null);
const static uint64_t producers_account_name = N(eosio.prods);

const static uint64_t eosio_auth_scope       = N(eosio.auth);
const static uint64_t eosio_all_scope        = N(eosio.all);

const static uint64_t eosio_any_name = N(eosio.any);
const static uint64_t eosio_code_name = N(eosio.code);

...

[yx.ntoken] invalid abi for wpntransfer

$YOSEMITE_CLEOS push action yx.ntoken wptransfer '[ "useraccount3", "useraccount2", "10000.0000 DKRW", "useraccount2", "memo" ]' -p useraccount3 -p useraccount2
#     yx.ntoken <= yx.ntoken::wptransfer        {"from":"useraccount3","to":"useraccount2","asset":"10000.0000 DKRW","payer":"useraccount2","memo":"...
#     yx.ntoken <= yx.ntoken::payfee            {"payer":"useraccount2","asset":"100.0000 DKRW"}
#     yx.ntoken <= yx.ntoken::feetransfer       {"payer":"useraccount2","asset":{"asset":"100.0000 DKRW","issuer":"sysdepo1"}}
#  useraccount2 <= yx.ntoken::feetransfer       {"payer":"useraccount2","asset":{"asset":"100.0000 DKRW","issuer":"sysdepo1"}}
#      yx.txfee <= yx.ntoken::feetransfer       {"payer":"useraccount2","asset":{"asset":"100.0000 DKRW","issuer":"sysdepo1"}}
#     yx.ntoken <= yx.ntoken::wpntransfer       "30f2d414217315d620f2d414217315d600e1f5050000000004444b5257000000000000815695b0c720f2d414217315d6046...
#  useraccount3 <= yx.ntoken::wpntransfer       "30f2d414217315d620f2d414217315d600e1f5050000000004444b5257000000000000815695b0c720f2d414217315d6046...
#  useraccount2 <= yx.ntoken::wpntransfer       "30f2d414217315d620f2d414217315d600e1f5050000000004444b5257000000000000815695b0c720f2d414217315d6046...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.