Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Blockchain and Decentralization: Technology sta...

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

Blockchain and Decentralization: Technology stack and a case study

Brief overview of the available tools. Presenting a case study developed during an R'n'D.

Avatar for Andrey Shevchenko

Andrey Shevchenko

January 25, 2019

More Decks by Andrey Shevchenko

Other Decks in Programming

Transcript

  1. PRESENTER PRESENTER Andriy Shevchenko / Senior So ware Engineer @

    Cogniance Lead Engineer of Blockchain R&D initiative aShevc
  2. PART II PART II TECHNOLOGY STACK AND A CASE STUDY

    TECHNOLOGY STACK AND A CASE STUDY
  3. MAJOR STAGES OF DECENTRALIZED MAJOR STAGES OF DECENTRALIZED SOFTWARE DEVELOPMENT

    SOFTWARE DEVELOPMENT Bitcoin release. January of 2009 Ethereum release. The first wide adopted smart contracts system. July of 2015
  4. BITCOIN SCRIPT LANGUAGE BITCOIN SCRIPT LANGUAGE =====Pay to Public Key:======

    0x21 {Public Key} OP_CHECKSIG ===============Pay to Public Key Hash:=================== OP_DUP OP_HASH160 {PubKeyHash} OP_EQUALVERIFY OP_CHECKSIG
  5. ETHEREUM SMART CONTRACT ETHEREUM SMART CONTRACT pragma solidity >=0.4.0 <0.6.0;

    contract SimpleStorage { uint storedData; function set(uint x) public { storedData = x; } function get() public view returns (uint) { return storedData; } }
  6. ETHEREUM GENERALIZED: ETHEREUM GENERALIZED: Ethereum is powered by EVM -

    the runtime environment that is used to run smart contract code written with Turing complete language called Solidity Each operation executed by EVM is evaluated in terms of complexity. Depending from the overall complexity of the code executed in a smart contract, users are paying for contracts execution in Ether - Ethereum platform cryptocurrency.
  7. ETHEREUM OPERATIONAL CODES ETHEREUM OPERATIONAL CODES EVALUATION EVALUATION Ethereum uses

    a concept called Gas as a unit of computational power. Each operation has a corresponding amount of Gas units required to run it.
  8. REQUIRED COMPONENTS OF AN REQUIRED COMPONENTS OF AN ETHEREUM TRANSACTION

    ETHEREUM TRANSACTION Gas limit - evaluation of a computational complexity of a transaction, usually provided by the node user connected to Gas price - amount of Ether user is willing to pay per a unit of computational power spent. Median value is provided by the connected node Gas to Ether rate is dynamic and can be seen . here
  9. ETHEREUM TRANSACTION FLOW AND ETHEREUM TRANSACTION FLOW AND SCENARIOS SCENARIOS

    When user submits a transaction, certain amount of Ether is getting locked Ether locked = Gas limit * Gas price If gas price is set too low, the nodes may never start processing, or will start processing a er a long while When processing starts, nodes start spending Gas on the transaction execution
  10. ETHEREUM TRANSACTION FLOW AND ETHEREUM TRANSACTION FLOW AND SCENARIOS SCENARIOS

    If Gas limit is exceeded, the execution halts and nodes are collecting the reward, while reverting the transaction If Gas limit is higher or equal to Gas spent, the transaction completes. If there is an unspent Gas, the corresponding Ether amount is returned to the user
  11. ARE WE GOOD TO GO FROM THERE... ARE WE GOOD

    TO GO FROM THERE... Or why Ethereum is not good enough.. yet
  12. ETHEREUM SCALABILITY PROBLEM ETHEREUM SCALABILITY PROBLEM Currently, full validating Ethereum

    nodes must validate all the transactions in the network Inability to validate transactions in parallel drastically limits Tx/sec Current theoretical Ethereum throughput is 25 Tx/sec. It is 7 Tx/sec for Bitcoin For comparison, theoretical throughput for Visa is 56K Tx/sec, with current average of 1,700
  13. CURRENT TECHNOLOGY STACK CURRENT TECHNOLOGY STACK Full-featured public blockchain networks

    Ethereum, NEO, EOS, IOTA Full-featured private blockchain networks Hyperledger Fabric, Quorum, R3 Corda Decentralized storage engines IPFS, Sia, Swarm Supportive tools ledger-agnostic protocols, monetary platforms, data platforms, digital identity tools More details here
  14. DIGITAL CONTENT STORE DIGITAL CONTENT STORE Collection of unique purchasable

    digital content Secure funds transfer: must be done only a er the buyer confirmation Only buyers must have access to a purchased content Funds are transferred in a store-specific cryptocurrency
  15. ETHEREUM-BASED TOKENS ETHEREUM-BASED TOKENS Tokens are simple assets that live

    on top of Ethereum platform Can represent digital or real world assets The properties and functions of each token are subject to its intended use. Ethereum token is represented by a corresponding token contract
  16. CASE STUDY: DST TOKEN CASE STUDY: DST TOKEN DST token

    is used as a means of payment in a digital store Token is released through a token sale event(ICO) which is managed by a dedicated contract Token is purchased by transferring Ether to a token sale contract address Token has a fixed supply and a fixed exchange rate