<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nikolay Angelov</title>
    <description>The latest articles on DEV Community by Nikolay Angelov (@nikolayangelov).</description>
    <link>https://dev.to/nikolayangelov</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F86277%2Ff4fc5254-b6c3-43d5-bf8a-dac5dd232710.jpg</url>
      <title>DEV Community: Nikolay Angelov</title>
      <link>https://dev.to/nikolayangelov</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nikolayangelov"/>
    <language>en</language>
    <item>
      <title>Workshop - Create Decentralized Application</title>
      <dc:creator>Nikolay Angelov</dc:creator>
      <pubDate>Sun, 30 Sep 2018 08:33:06 +0000</pubDate>
      <link>https://dev.to/nikolayangelov/workshop---create-decentralized-application-2b6m</link>
      <guid>https://dev.to/nikolayangelov/workshop---create-decentralized-application-2b6m</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Hello everybody. My name is &lt;strong&gt;Nikolay Angelov&lt;/strong&gt; (&lt;a href="//../"&gt;http://nikolaytech.com&lt;/a&gt;) and I have put together this &lt;strong&gt;Workshop&lt;/strong&gt; in which we will be creating a very simple but powerful &lt;strong&gt;Decentralized Application&lt;/strong&gt; using a few tools.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;general&lt;/strong&gt; idea for the &lt;strong&gt;App&lt;/strong&gt; will be to store &lt;strong&gt;Certificates&lt;/strong&gt; (&lt;strong&gt;Images&lt;/strong&gt;) in a &lt;strong&gt;decentralized&lt;/strong&gt; way using &lt;strong&gt;IPFS&lt;/strong&gt; and saving the &lt;strong&gt;hash&lt;/strong&gt; of the &lt;strong&gt;image&lt;/strong&gt; inside an &lt;strong&gt;Ethereum&lt;/strong&gt; &lt;strong&gt;Smart-Contract&lt;/strong&gt;. That way we are certain that no one has altered the &lt;strong&gt;Certificate&lt;/strong&gt; and that it hasn’t been changed.&lt;/p&gt;

&lt;p&gt;To create our app we will need to install a few tools and I will explain how in this &lt;strong&gt;document&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Tool List:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Ganache&lt;/strong&gt; (&lt;a href="https://truffleframework.com/ganache"&gt;https://truffleframework.com/ganache&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;InterPlanetary File System&lt;/strong&gt; - IPFS (&lt;a href="https://ipfs.io/"&gt;https://ipfs.io/&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;MetaMask&lt;/strong&gt; (&lt;a href="https://metamask.io/"&gt;https://metamask.io/&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;JavaScript&lt;/strong&gt; + &lt;strong&gt;js&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Installing Ganache
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Ganache&lt;/strong&gt; is a fast and customizable blockchain &lt;strong&gt;emulator&lt;/strong&gt;. It allows you to make calls to the &lt;strong&gt;blockchain&lt;/strong&gt; without the overheads of running an actual &lt;strong&gt;Ethereum&lt;/strong&gt; node.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Transactions are "mined" &lt;strong&gt;instantly&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;  No transaction cost.&lt;/li&gt;
&lt;li&gt;  Accounts can be recycled, reset and instantiated with a fixed amount of Ether (no need for faucets or mining).&lt;/li&gt;
&lt;li&gt;  Gas price and mining speed can be modified.&lt;/li&gt;
&lt;li&gt;  A convenient GUI gives you an overview of your test chain events.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now it’s time to install &lt;strong&gt;Ganache&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Open &lt;a href="https://github.com/trufflesuite/ganache/releases/tag/v1.2.2"&gt;https://github.com/trufflesuite/ganache/releases/tag/v1.2.2&lt;/a&gt; and select the appropriate version based on the operation system you are using.&lt;/li&gt;
&lt;li&gt; For &lt;strong&gt;Windows&lt;/strong&gt; &lt;strong&gt;Download&lt;/strong&gt; the .&lt;strong&gt;exe&lt;/strong&gt;
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/Ganache-download.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e1gSRHxs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/Ganache-download-300x210.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now &lt;strong&gt;depending&lt;/strong&gt; on your Windows settings, &lt;strong&gt;Windows Defender SmartScreen&lt;/strong&gt; can warn you that this installation is not safe. Just ignore it and follow the steps to install &lt;strong&gt;Ganache&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/windows-security-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9ufVWiEZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/windows-security-1-300x278.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking on “&lt;strong&gt;More Info&lt;/strong&gt;”, a new screen will appear showing you the &lt;strong&gt;installation&lt;/strong&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/windows-security-2.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MWuBb8fn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/windows-security-2-300x279.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then you just need to click &lt;strong&gt;next&lt;/strong&gt; and &lt;strong&gt;follow&lt;/strong&gt; the normal &lt;strong&gt;installation&lt;/strong&gt; &lt;strong&gt;instructions&lt;/strong&gt; and Ganache should be running on your computer.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Now you can allow or forbid Ganache to analyze your data. Make a choice and click &lt;strong&gt;continue&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/support-ganache.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wl0Nce1A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/support-ganache-300x143.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Congratulations&lt;/strong&gt;! You successfully installed &lt;strong&gt;Ganache&lt;/strong&gt;!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Run your &lt;strong&gt;Ganache&lt;/strong&gt; and you should get a screen with all of your accounts, their coins and some other &lt;strong&gt;information&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/Ganache.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kbzvAlJx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/Ganache.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s leave &lt;strong&gt;Ganache&lt;/strong&gt; for now and &lt;strong&gt;install&lt;/strong&gt; the rest of the things we need.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Infura Provider for IPFS
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;IPFS&lt;/strong&gt; is &lt;strong&gt;a peer-to-peer&lt;/strong&gt; &lt;strong&gt;distributed&lt;/strong&gt; &lt;strong&gt;file&lt;/strong&gt; &lt;strong&gt;system&lt;/strong&gt; that seeks to connect all computing devices with the same system of files. In some ways, &lt;strong&gt;IPFS&lt;/strong&gt; is similar to the &lt;strong&gt;World Wide Web&lt;/strong&gt;, but &lt;strong&gt;IPFS&lt;/strong&gt; could be seen as a single &lt;strong&gt;BitTorrent&lt;/strong&gt; &lt;strong&gt;swarm&lt;/strong&gt;, exchanging objects within one &lt;strong&gt;Git&lt;/strong&gt; repository. In other words, &lt;strong&gt;IPFS&lt;/strong&gt; provides a high-throughput, content-addressed block &lt;strong&gt;storage&lt;/strong&gt; model, with content-addressed hyperlinks. (Source: &lt;a href="https://en.wikipedia.org/wiki/InterPlanetary_File_System"&gt;Wikipedia&lt;/a&gt;)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Installing &lt;strong&gt;IPFS&lt;/strong&gt; might be a hard process for &lt;strong&gt;beginners&lt;/strong&gt;, so I have decided to use the &lt;strong&gt;API&lt;/strong&gt; &lt;strong&gt;provided&lt;/strong&gt; by &lt;a href="https://infura.io"&gt;https://infura.io&lt;/a&gt;
Note: If you are &lt;strong&gt;interested&lt;/strong&gt; in &lt;strong&gt;installing&lt;/strong&gt; this &lt;strong&gt;yourself&lt;/strong&gt; just &lt;strong&gt;talk&lt;/strong&gt; to me and I will help you.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Installing MetaMask Plugin
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;MetaMask&lt;/strong&gt; is a bridge that allows you to visit the distributed web of tomorrow in your browser today. It allows you to run &lt;strong&gt;Ethereum&lt;/strong&gt; &lt;strong&gt;dApps&lt;/strong&gt; right in your browser without running a full &lt;strong&gt;Ethereum&lt;/strong&gt; &lt;strong&gt;node&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MetaMask&lt;/strong&gt; includes a &lt;strong&gt;secure&lt;/strong&gt; identity &lt;strong&gt;vault&lt;/strong&gt;, providing a user interface to manage your identities on different sites and sign &lt;strong&gt;blockchain&lt;/strong&gt; &lt;strong&gt;transactions&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Open &lt;a href="https://metamask.io/"&gt;https://metamask.io/&lt;/a&gt; and get the Plugin for your browser.
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DX5M5YrY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-1.png" alt=""&gt;&lt;/a&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-2.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fy_xCgfh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-2.png" alt=""&gt;&lt;/a&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MnKg3_xV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-3.png" alt=""&gt;
&lt;/li&gt;
&lt;li&gt; Now &lt;strong&gt;MetaMask&lt;/strong&gt; should appear in your browser &lt;strong&gt;Extensions&lt;/strong&gt;. (Upper right Corner)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-4.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y-jHke-2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-4.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You might get a screen that tells you to try the new &lt;strong&gt;version&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please go with the old version and select “No thanks, maybe later” as the new version is pain right now.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-5.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yN4EdSx_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-5.png" alt=""&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Now you need to click “&lt;strong&gt;Accept&lt;/strong&gt; to the next few screens until you are prompted to &lt;strong&gt;create&lt;/strong&gt; a &lt;strong&gt;password&lt;/strong&gt;. This is because &lt;strong&gt;MetaMask&lt;/strong&gt; is actually a wallet that has to be secured&lt;br&gt;&lt;br&gt;
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-6.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OCpRAjKo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-6.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Now&lt;/strong&gt; you have a &lt;strong&gt;Wallet&lt;/strong&gt;, &lt;strong&gt;On the next screen will appear&lt;/strong&gt; your 12 keywords called &lt;strong&gt;Mnemonics&lt;/strong&gt;. You need to store those in a secure place since they will later allow you to access your wallet in case of a breach or stolen/forgotten password. In our case, we don’t really care as we are going to run our own &lt;strong&gt;network&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-7.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1AINSz4n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-7.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now we just need to connect &lt;strong&gt;MetaMask&lt;/strong&gt; to our early started &lt;strong&gt;Ganache&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It’s an easy task - go on the top left corner of &lt;strong&gt;MetaMask&lt;/strong&gt; and you will see “&lt;strong&gt;Main Network&lt;/strong&gt;” and an &lt;strong&gt;Arrow. Click the Arrow.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-8.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R98M68ED--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-8.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; On the drop-down select “&lt;strong&gt;Localhost 8545&lt;/strong&gt;” which is our &lt;strong&gt;Ganache&lt;/strong&gt; local address.
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-9.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gh639Lm4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-9.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Now we are connected to our &lt;strong&gt;Network&lt;/strong&gt; and we just need to import a &lt;strong&gt;Wallet&lt;/strong&gt; that has coins. For that, we need to Go to our running &lt;strong&gt;Ganache&lt;/strong&gt; and &lt;strong&gt;select the Key Icon (&lt;/strong&gt;“&lt;strong&gt;Show Keys&lt;/strong&gt;”) &lt;strong&gt;right of the first&lt;/strong&gt; &lt;strong&gt;address&lt;/strong&gt; that we have on the list.&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/ganache-account.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VwXFJqwA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/ganache-account.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; After that just copy the &lt;strong&gt;Private Key&lt;/strong&gt;.&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/ganache-private-key.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--72_ex1Js--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/ganache-private-key.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Then we go back to &lt;strong&gt;MetaMask&lt;/strong&gt; to import this &lt;strong&gt;Key&lt;/strong&gt; to our Wallet.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The &lt;strong&gt;Import&lt;/strong&gt; is located on the same row as the Network we selected by on the right side.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-10.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5G1PDr-n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-10.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click this and then Select “&lt;strong&gt;Import Account&lt;/strong&gt;”&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-11.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n9gQCJWw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-11.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Paste the &lt;strong&gt;Private Key&lt;/strong&gt; that we copied from &lt;strong&gt;Ganache&lt;/strong&gt; in the box and *&lt;strong&gt;&lt;em&gt;Import&lt;/em&gt;&lt;/strong&gt;*&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-12.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IdTHXMJT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-12.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Now we have &lt;strong&gt;Money&lt;/strong&gt; and we can go and start Coding Stuff.&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/metamask-13.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tg8YKDNY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/metamask-13.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Creating the Smart Contract
&lt;/h2&gt;

&lt;p&gt;To create our &lt;strong&gt;Smart Contract&lt;/strong&gt; we are going to use an online editor called &lt;strong&gt;Remix&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;On a more advanced level, Remix&lt;/strong&gt; actually supports running and deploying on &lt;strong&gt;contracts&lt;/strong&gt; but we don’t really need all of its functions for the basics.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Go and open&lt;/strong&gt; &lt;a href="https://remix.ethereum.org"&gt;&lt;strong&gt;https://remix.ethereum.org&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;and you will see a Text Editor.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/remix-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jbyzlkpr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/remix-1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; On the top left corner there is a “&lt;strong&gt;plus&lt;/strong&gt;” icon with which we can start our first &lt;strong&gt;Contract&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/remix-2.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jVuPh_P7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/remix-2.png" alt=""&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click it and then we need to type the name of our new &lt;strong&gt;Contract&lt;/strong&gt;. Let’s called it &lt;strong&gt;CertificatesRegistry&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/remix-3.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gHQOCIkm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/remix-3.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Now it is time to start &lt;strong&gt;Coding&lt;/strong&gt; Here are our first lines of code that basically define the &lt;strong&gt;Version&lt;/strong&gt; of &lt;strong&gt;Solidity&lt;/strong&gt; that we are using and the actual &lt;strong&gt;Contract&lt;/strong&gt;.
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/contract-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BPFZCy3E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/contract-1.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; We want to store &lt;strong&gt;Certificates&lt;/strong&gt; and keep some &lt;strong&gt;Data&lt;/strong&gt; for them.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;First thing is that we are storing the Image for the &lt;strong&gt;Certificate&lt;/strong&gt; on &lt;strong&gt;IPFS&lt;/strong&gt; for that reason we need to keep the &lt;strong&gt;Hash&lt;/strong&gt; of it.&lt;br&gt;&lt;br&gt;
I would suggest keeping the information of when the &lt;strong&gt;Certificate&lt;/strong&gt; was added as well.&lt;/p&gt;

&lt;p&gt;Let’s see how this thing look in &lt;strong&gt;Solidity&lt;/strong&gt; &lt;strong&gt;Code&lt;/strong&gt; and add it to our code.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/contract-2.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fOZ4ezhW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/contract-2.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Now we have a &lt;strong&gt;structure&lt;/strong&gt; where we can store the &lt;strong&gt;data&lt;/strong&gt; we need but we want to keep multiple &lt;strong&gt;Certificates&lt;/strong&gt; on our web page, so we should have an &lt;strong&gt;Array&lt;/strong&gt; of &lt;strong&gt;Certificates&lt;/strong&gt;.
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/contract-3.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6jDUlI5f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/contract-3.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; So we can store all the &lt;strong&gt;Data&lt;/strong&gt; in the &lt;strong&gt;world&lt;/strong&gt;, but we &lt;strong&gt;don’t&lt;/strong&gt; have a way to &lt;strong&gt;Add&lt;/strong&gt; new &lt;strong&gt;Certificates&lt;/strong&gt;. Maybe it is time for us to create one &lt;strong&gt;function&lt;/strong&gt; that will do that for us.
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/contract-4.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--I70kZ0gr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/contract-4.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; The last thing we need in our &lt;strong&gt;Contract&lt;/strong&gt; is a way to get all the &lt;strong&gt;Certificates&lt;/strong&gt; that we have. In &lt;strong&gt;Solidity&lt;/strong&gt; you cannot return &lt;strong&gt;Arrays&lt;/strong&gt;, so we need a &lt;strong&gt;Function&lt;/strong&gt; that will give us the &lt;strong&gt;Count&lt;/strong&gt; of &lt;strong&gt;Certificates&lt;/strong&gt; that we have and then we need &lt;strong&gt;another&lt;/strong&gt; one that will be giving the &lt;strong&gt;Information&lt;/strong&gt; for the &lt;strong&gt;specific&lt;/strong&gt; &lt;strong&gt;Certificate&lt;/strong&gt;.
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/contract-5.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YnX_cNZS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/contract-5.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; And this is the very basic &lt;strong&gt;Contract&lt;/strong&gt; that we are going to be using.&lt;/li&gt;
&lt;li&gt; To use it we need to deploy it in our &lt;strong&gt;Ganache&lt;/strong&gt; local &lt;strong&gt;network&lt;/strong&gt;. How can we do that? Well, that is the reason we use &lt;strong&gt;Remix&lt;/strong&gt;… as &lt;strong&gt;Remix&lt;/strong&gt; does that for us with only a few &lt;strong&gt;clicks&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt; On the right side of the Editor, we can see some more information. There we have a few &lt;strong&gt;Buttons&lt;/strong&gt;.
Which are “Compile” “&lt;strong&gt;Run&lt;/strong&gt;” “Analysis” “Testing” “Debugger” and some Settings.
We care only for “&lt;strong&gt;Run&lt;/strong&gt;” right now, so just go ahead and select “&lt;strong&gt;Run&lt;/strong&gt;”&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/remix-run.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dtMH8FTs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/remix-run.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; After that, we have a few more things. “&lt;strong&gt;Environment&lt;/strong&gt;”, “Account”, “Gas Limit” and so on. Currently, our eyes are on &lt;strong&gt;Environment&lt;/strong&gt;. There we have few options in a drop-down menu which are &lt;strong&gt;basically&lt;/strong&gt; &lt;strong&gt;options&lt;/strong&gt; for us to tell &lt;strong&gt;Remix&lt;/strong&gt; where were went to &lt;strong&gt;play&lt;/strong&gt; and &lt;strong&gt;deploy&lt;/strong&gt; our &lt;strong&gt;Contract&lt;/strong&gt;. We want to use our &lt;strong&gt;Ganache&lt;/strong&gt; so we should select the Third Option “&lt;strong&gt;Web3 Provider&lt;/strong&gt;”
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/remix-web3-provider.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lKqkFBAG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/remix-web3-provider.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then we get a screen asking us if we are sure that we want to connect to &lt;strong&gt;Ethereum&lt;/strong&gt; &lt;strong&gt;Node&lt;/strong&gt;. Please select “&lt;strong&gt;Ok&lt;/strong&gt;” and then on the next &lt;strong&gt;screen&lt;/strong&gt; &lt;strong&gt;Click&lt;/strong&gt; “&lt;strong&gt;Ok&lt;/strong&gt;” again without changing anything in the box.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/remix-ok.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Hgm3vANw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/remix-ok.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This way we connect &lt;strong&gt;Remix&lt;/strong&gt; to our &lt;strong&gt;Ganache&lt;/strong&gt; and when we do that &lt;strong&gt;Remix&lt;/strong&gt; &lt;strong&gt;automatically&lt;/strong&gt; fills the &lt;strong&gt;Accounts&lt;/strong&gt; with the ones from &lt;strong&gt;Ganache&lt;/strong&gt;, so we actually have &lt;strong&gt;money&lt;/strong&gt;. (Not like &lt;strong&gt;MetaMask&lt;/strong&gt;)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Now we need to &lt;strong&gt;Deploy&lt;/strong&gt; the &lt;strong&gt;Contract&lt;/strong&gt;. That happens from the *&lt;em&gt;Deploy&lt;br&gt;
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/remix-deploy.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R9d8-suC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/remix-deploy.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
*&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After that in the &lt;strong&gt;Deployed&lt;/strong&gt; &lt;strong&gt;Contract&lt;/strong&gt; &lt;strong&gt;Section&lt;/strong&gt;, we will see information about our &lt;strong&gt;Contract&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
The most important thing from there is the &lt;strong&gt;Address&lt;/strong&gt; where our &lt;strong&gt;Contract&lt;/strong&gt; is Located, but for now, leave it as it is we will return back in few minutes. &lt;strong&gt;(Please DO NOT CLOSE the Remix)&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/remix-deployed.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cRI7TOg3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/remix-deployed.png" alt=""&gt;&lt;/a&gt;Creating our JavaScript Front-End
&lt;/h2&gt;

&lt;p&gt;Well, we have our &lt;strong&gt;Contract&lt;/strong&gt; and everything set up. Now we need a way to interact with it and upload &lt;strong&gt;Certificates&lt;/strong&gt;. For that reason, we will be creating &lt;strong&gt;JavaScript&lt;/strong&gt; Page.&lt;/p&gt;

&lt;p&gt;I have prepared some &lt;strong&gt;Code&lt;/strong&gt; &lt;strong&gt;Skeleton&lt;/strong&gt; as &lt;strong&gt;Resource&lt;/strong&gt; which holds the &lt;strong&gt;CSS&lt;/strong&gt;, &lt;strong&gt;HTML&lt;/strong&gt; and some initial &lt;strong&gt;helper&lt;/strong&gt; &lt;strong&gt;functions&lt;/strong&gt; we might need and there is &lt;strong&gt;no&lt;/strong&gt; need to &lt;strong&gt;code&lt;/strong&gt; them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Download the Code Skeleton from &lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/CertificatesRegistry.zip"&gt;Certificate-Registry-Skeleton&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Un-zip&lt;/strong&gt; the Zip &lt;strong&gt;Archive&lt;/strong&gt; and there you will find all the &lt;strong&gt;Files&lt;/strong&gt; we need. We even have the &lt;strong&gt;Contract&lt;/strong&gt; if you had a hard time writing it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The main that we are going to &lt;strong&gt;Edit&lt;/strong&gt; is &lt;strong&gt;certificates.js&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Open the &lt;strong&gt;Folder&lt;/strong&gt; or the &lt;strong&gt;js&lt;/strong&gt; file in &lt;strong&gt;Editor&lt;/strong&gt; of your choice.&lt;/li&gt;
&lt;li&gt; Now we need only one last &lt;strong&gt;Installation&lt;/strong&gt; before we get into &lt;strong&gt;JavaScript&lt;/strong&gt; and &lt;strong&gt;finish&lt;/strong&gt; this &lt;strong&gt;Workshop&lt;/strong&gt; and that is our &lt;strong&gt;HTTP-server&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt; To install &lt;strong&gt;HTTP-server&lt;/strong&gt; you need to open your &lt;strong&gt;terminal&lt;/strong&gt; (&lt;strong&gt;Command Prompt)&lt;/strong&gt; and type the following in there:&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;npm install –g HTTP-server&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt; After that go to the project directory and run in your &lt;strong&gt;terminal&lt;/strong&gt; (&lt;strong&gt;Command Prompt&lt;/strong&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;HTTP-server&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s get back into the &lt;strong&gt;JavaScript&lt;/strong&gt; editor and our &lt;strong&gt;certificates.js&lt;/strong&gt; File. There you can see a few things prepared and there Two &lt;strong&gt;Functions&lt;/strong&gt; that have “&lt;strong&gt;TODO&lt;/strong&gt;” which we actually need to Code.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/Javascript-todo-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zZwfAIpr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/Javascript-todo-1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because the actual &lt;strong&gt;Skeleton&lt;/strong&gt; is already prepared and we have our &lt;strong&gt;HTTP-server&lt;/strong&gt; &lt;strong&gt;running&lt;/strong&gt; we can open and see the &lt;strong&gt;Page&lt;/strong&gt; first look. (&lt;strong&gt;Not&lt;/strong&gt; everything will &lt;strong&gt;Work&lt;/strong&gt; but we can see what we have)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Let’s go and Check it out. Open &lt;a href="http://localhost:8080"&gt;http://localhost:8080&lt;/a&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/demo-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--THuQJdE8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/demo-1.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is our &lt;strong&gt;Initial&lt;/strong&gt; Version. Of course, the &lt;strong&gt;Buttons&lt;/strong&gt; don’t work right now and it is time to make them do stuff. Let’s start with “&lt;strong&gt;Submit Certificate&lt;/strong&gt;”&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Before Starting with our “&lt;strong&gt;TODO&lt;/strong&gt;” items we need to set up our &lt;strong&gt;Connection&lt;/strong&gt; to the &lt;strong&gt;Contract&lt;/strong&gt;. That will be happening with Web3 which is provided by the &lt;strong&gt;MetaMask&lt;/strong&gt;, so the first thing we need to do is check if the user has &lt;strong&gt;MetaMask&lt;/strong&gt; installed and if they don’t we need to tell them to install it.&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/javascript-code-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LmXR3zSU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/javascript-code-1.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; After that, we need to &lt;strong&gt;Connect&lt;/strong&gt; to the &lt;strong&gt;Contract&lt;/strong&gt;. That is the reason we have an &lt;strong&gt;Empty&lt;/strong&gt; &lt;strong&gt;Variable&lt;/strong&gt; on top which is &lt;strong&gt;ContractAddress&lt;/strong&gt;. We need to write our &lt;strong&gt;Contract Address&lt;/strong&gt; and we get that information from our &lt;strong&gt;Remix&lt;/strong&gt;. (&lt;strong&gt;Hopefully&lt;/strong&gt;, you didn’t close it. I did warn you J)
Go back to the &lt;strong&gt;Remix&lt;/strong&gt; and in the &lt;strong&gt;Deployed&lt;/strong&gt; &lt;strong&gt;Contracts&lt;/strong&gt; just click the small icon and it will copy the &lt;strong&gt;Address&lt;/strong&gt; of the &lt;strong&gt;Contract&lt;/strong&gt; and then past it to this variable.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/javascript-remix-contract.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U59mCmJ_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/javascript-remix-contract.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/javascript-contract-address.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vN8XdPMl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/javascript-contract-address.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The &lt;strong&gt;Contract&lt;/strong&gt; &lt;strong&gt;Address&lt;/strong&gt; will be different for &lt;strong&gt;everybody&lt;/strong&gt;, so don’t copy this from my screen and just do the &lt;strong&gt;Steps&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Now the real &lt;strong&gt;Connection&lt;/strong&gt;. For that, we need something called &lt;strong&gt;ABI&lt;/strong&gt;, but I have &lt;strong&gt;already&lt;/strong&gt; &lt;strong&gt;prepared&lt;/strong&gt; it for you in our &lt;strong&gt;Config&lt;/strong&gt; Folder, so we will use it from the &lt;strong&gt;Skeleton&lt;/strong&gt; and this &lt;strong&gt;Address&lt;/strong&gt; that we just wrote. It looks like this.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/javascript-connecting.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AaZj0B4E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/javascript-connecting.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically saying… Hey, &lt;strong&gt;Web3&lt;/strong&gt; here is this &lt;strong&gt;Contract&lt;/strong&gt; and it is located on that &lt;strong&gt;Address&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This way our &lt;strong&gt;JavaScript&lt;/strong&gt; knows how to &lt;strong&gt;communicate&lt;/strong&gt; with the &lt;strong&gt;Contract&lt;/strong&gt; and where to find it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; The first “&lt;strong&gt;TODO&lt;/strong&gt;” that we are going to code is from the first function “&lt;strong&gt;uploadCertificate&lt;/strong&gt;” which is the one interacting and uploading files the &lt;strong&gt;IPFS&lt;/strong&gt; and then adding the information to our &lt;strong&gt;Contract&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the Skeleton, I have already prepared the &lt;strong&gt;IPFS&lt;/strong&gt; and connected it to the &lt;strong&gt;Infura&lt;/strong&gt; &lt;strong&gt;Provider&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
You can see that from the first two lines.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/ipfs-settings.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--74zs2wS6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/ipfs-settings.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we have left to &lt;strong&gt;code&lt;/strong&gt; the actual upload.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; First, we pick the &lt;strong&gt;Div&lt;/strong&gt; element where our &lt;strong&gt;File&lt;/strong&gt; Form is &lt;strong&gt;located&lt;/strong&gt; and we want to check if the &lt;strong&gt;User&lt;/strong&gt; has selected &lt;strong&gt;any&lt;/strong&gt; &lt;strong&gt;file&lt;/strong&gt; before &lt;strong&gt;doing&lt;/strong&gt; If he didn’t select a file we display an &lt;strong&gt;Error&lt;/strong&gt; using the &lt;strong&gt;Helper&lt;/strong&gt; function “&lt;strong&gt;showError&lt;/strong&gt;”.
&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/upload-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kFCJdhzI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/upload-1.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Now if the &lt;strong&gt;User&lt;/strong&gt; has selected a file it is time for us to upload it to &lt;strong&gt;IPFS&lt;/strong&gt; and get its hash.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/upload-2.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VTpbRZmx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/upload-2.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; We have the &lt;strong&gt;Hash&lt;/strong&gt; of the &lt;strong&gt;Certificate&lt;/strong&gt; and now we can add it to our &lt;strong&gt;Smart Contract&lt;/strong&gt;. This is done with our variable “&lt;strong&gt;contract&lt;/strong&gt;” with which we made a connection to our *&lt;strong&gt;&lt;em&gt;Smart Contract.&lt;/em&gt;&lt;/strong&gt;*&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/upload-3.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JF1d0us2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/upload-3.png" alt=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; With this, we have our &lt;strong&gt;Uploading&lt;/strong&gt; of &lt;strong&gt;Certificates&lt;/strong&gt; functionality ready and we can go on our &lt;strong&gt;Page&lt;/strong&gt; and check it out. Just go again on &lt;a href="http://localhost:8080"&gt;http://localhost:8080&lt;/a&gt; and try to &lt;strong&gt;submit&lt;/strong&gt; a &lt;strong&gt;certificate&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/view-upload-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jcUbaEb_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/view-upload-1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now when you click &lt;strong&gt;Submit, MetaMask&lt;/strong&gt; will &lt;strong&gt;Pop-up&lt;/strong&gt; and ask you if you want to make a &lt;strong&gt;Transaction&lt;/strong&gt;. This is because we are trying to &lt;strong&gt;Record&lt;/strong&gt; the &lt;strong&gt;Information&lt;/strong&gt; in the &lt;strong&gt;Blockchain&lt;/strong&gt; and &lt;strong&gt;MetaMask&lt;/strong&gt; asks for &lt;strong&gt;permission&lt;/strong&gt; to do that. Just &lt;strong&gt;Click&lt;/strong&gt; “&lt;strong&gt;Submit&lt;/strong&gt;” in &lt;strong&gt;MetaMask&lt;/strong&gt; and the magic will happen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/view-upload-2.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AbnqBd_U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/view-upload-2.png" alt=""&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you did everything &lt;strong&gt;correct&lt;/strong&gt; you will get this nice &lt;strong&gt;Success&lt;/strong&gt; &lt;strong&gt;Message&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/view-upload-3.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--itycI202--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/view-upload-3.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; All Good. We can upload certificate images to &lt;strong&gt;IPFS&lt;/strong&gt; and can store the &lt;strong&gt;information&lt;/strong&gt; in the &lt;strong&gt;Blockchain&lt;/strong&gt;, but we cannot still view it. Maybe it is time to start &lt;strong&gt;Coding&lt;/strong&gt; our Second “&lt;strong&gt;TODO&lt;/strong&gt;” (&lt;strong&gt;Function&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt; Ok let’s jump and Code our &lt;strong&gt;viewGetCertificates&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/view-1.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fxi0t3D---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/view-1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Here we first need to get the &lt;strong&gt;number&lt;/strong&gt; of how many &lt;strong&gt;Certificates&lt;/strong&gt; we have stored. That is because we want to &lt;strong&gt;iterate&lt;/strong&gt; over them on our &lt;strong&gt;JavaScript&lt;/strong&gt; and &lt;strong&gt;not&lt;/strong&gt; inside the &lt;strong&gt;Solidity&lt;/strong&gt; as &lt;strong&gt;for&lt;/strong&gt; &lt;strong&gt;loops&lt;/strong&gt; in &lt;strong&gt;Solidity&lt;/strong&gt; are quite expensive.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/view-2.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GPplkOIq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/view-2.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Now we have the number of &lt;strong&gt;Certificates&lt;/strong&gt; and we want to get their information one by one and append them to our &lt;strong&gt;HTML&lt;/strong&gt; using &lt;strong&gt;jQuery&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/view-3.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OD8PaT9E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/view-3.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With this, we now should have View of Certificates working as well.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Let’s open our page again at &lt;a href="http://localhost:8080"&gt;http://localhost:8080&lt;/a&gt; and click “&lt;strong&gt;View Certificates&lt;/strong&gt;” to see if our &lt;strong&gt;Certificate&lt;/strong&gt; that we previously uploaded is there.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/certificate.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CYgBnaBB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/certificate.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now we have a fully working Decentralized App with IPFS which is Decentralized Storage.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  You can hit me with any questions or follow me on:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com"&gt;&lt;strong&gt;http://nikolaytech.com&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://linkedin.com/in/thedi"&gt;&lt;strong&gt;https://linkedin.com/in/thedi&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Email:&lt;/strong&gt; &lt;a href="//mailto:nikolay@nikolaytech.com"&gt;&lt;strong&gt;nikolay@nikolaytech.com&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>workshop</category>
      <category>blockchain</category>
      <category>tutorial</category>
      <category>dapp</category>
    </item>
    <item>
      <title>Winning Next Block Blockchain Hackathon</title>
      <dc:creator>Nikolay Angelov</dc:creator>
      <pubDate>Sat, 22 Sep 2018 20:18:41 +0000</pubDate>
      <link>https://dev.to/nikolayangelov/winning-next-block-blockchain-hackathon-ga8</link>
      <guid>https://dev.to/nikolayangelov/winning-next-block-blockchain-hackathon-ga8</guid>
      <description>&lt;p&gt;Hello, guys :) My &lt;strong&gt;Blockchain&lt;/strong&gt; &lt;strong&gt;team&lt;/strong&gt; and &lt;strong&gt;myself&lt;/strong&gt; participated in one of the biggest &lt;strong&gt;Hackathons&lt;/strong&gt; in &lt;strong&gt;Bulgaria&lt;/strong&gt; lately - &lt;strong&gt;Next Block Hackathon&lt;/strong&gt;, and the &lt;strong&gt;professional&lt;/strong&gt; &lt;strong&gt;jury&lt;/strong&gt; selected our project – we &lt;strong&gt;won&lt;/strong&gt; the first place! I wanted to share the &lt;strong&gt;story&lt;/strong&gt; with you :) So here it goes.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Starting with the Plan&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;It’s &lt;strong&gt;Sunday&lt;/strong&gt;, a few days before the beginning of the &lt;strong&gt;Hackathon&lt;/strong&gt;. I presented the idea of joining the &lt;strong&gt;Hackathon&lt;/strong&gt; in our team chat. As usual, everyone is &lt;strong&gt;sceptical&lt;/strong&gt; about it, but still, I managed to gather and convince four people to join me and create a team called &lt;strong&gt;Riders on the Chain&lt;/strong&gt; for this challenge with the idea of making a &lt;strong&gt;crypto training bot&lt;/strong&gt;. Yes, that’s right - our first idea was to program a crypto trading bot. Once again, I managed to convince them all, thank God! We held a meeting, had a bunch of ideas throw on the &lt;strong&gt;whiteboard&lt;/strong&gt; but the &lt;strong&gt;majority&lt;/strong&gt; decided to do &lt;strong&gt;Car tracking system&lt;/strong&gt;. To be honest, I didn't agree on that, but well... it was a &lt;strong&gt;team decision&lt;/strong&gt; and the majority won.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nikolaytech.com/wp-content/uploads/2018/09/photo_2018-09-10_19-27-12.jpg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pm2DHZwU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/photo_2018-09-10_19-27-12-300x169.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Problem&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Have you ever tried buying a &lt;strong&gt;second-hand car&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;How often have you encountered sellers who are trying to cheat you by &lt;strong&gt;changing the odometer data&lt;/strong&gt; or the &lt;strong&gt;car service data&lt;/strong&gt; in order to sell you a wrecked car for a &lt;strong&gt;high&lt;/strong&gt; price? If you are as lucky as I am, chances are this has happened to you a lot. In our home country of Bulgaria, we tend to say that buying a car is “a matter of luck". However… what if for some odd reason you are an &lt;strong&gt;honest&lt;/strong&gt; car owner who actually has a &lt;strong&gt;perfectly serviced&lt;/strong&gt; car he wants to sell? Chances are, if your warranty period has &lt;strong&gt;expired&lt;/strong&gt;, nobody would trust you about the car info you are providing.&lt;/p&gt;

&lt;p&gt;We are living in an economy where &lt;strong&gt;car trading&lt;/strong&gt; has turned into a &lt;strong&gt;trustless business&lt;/strong&gt;, where both sellers and buyers are incentivized to cheat and lie. How about a 180 degrees change to the market?&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;We asked ourselves: What is next then?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;It was already late &lt;strong&gt;Monday&lt;/strong&gt;, we had already registered our team to the Hackathon and it was about time to start preparing since we already knew what we were going to do. We had the &lt;strong&gt;Car&lt;/strong&gt; itself ready (Just a small &lt;strong&gt;Arduino car)&lt;/strong&gt;, but still, we lacked &lt;strong&gt;planning&lt;/strong&gt;. Issues like &lt;strong&gt;What are we going to do with this car? How are we going to store the Data?&lt;/strong&gt; and so on occurred. A large debate later, we figured those out and finally started &lt;strong&gt;working&lt;/strong&gt; on the actual project on Thursday.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preslav Mihaylov&lt;/strong&gt; and &lt;strong&gt;Rosen Krumov&lt;/strong&gt; started &lt;strong&gt;tackling&lt;/strong&gt; whatever was necessary for the actual &lt;strong&gt;Car&lt;/strong&gt;. They were quick at figuring out the pieces of Hardware for the connection with the Blockchain and got them, as well as all details in terms of &lt;strong&gt;Cryptography&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I wish this were the &lt;strong&gt;happy&lt;/strong&gt; end of the &lt;strong&gt;story&lt;/strong&gt;, but sadly…&lt;/p&gt;

&lt;p&gt;&lt;a href="//../wp-content/uploads/2018/09/ks0159_2_.jpg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wBhh-es3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/v1/../wp-content/uploads/2018/09/ks0159_2_-300x300.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Hardware Problems all over the place&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;They started working on the &lt;strong&gt;Car&lt;/strong&gt; prototype and &lt;strong&gt;encountered&lt;/strong&gt; many &lt;strong&gt;problems&lt;/strong&gt; mainly because of our decision to keep the concept of &lt;strong&gt;decentralization&lt;/strong&gt; and keep all &lt;strong&gt;processes&lt;/strong&gt; in the &lt;strong&gt;car&lt;/strong&gt; hardware itself. We started by connecting to our Wifi but then found it hard to make &lt;strong&gt;Web3&lt;/strong&gt; work at all with the &lt;strong&gt;Arduino modules&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
This was a concern since the actual &lt;strong&gt;Web3&lt;/strong&gt; module written in &lt;strong&gt;C++&lt;/strong&gt; doesn’t compile in &lt;strong&gt;C&lt;/strong&gt; which leads to the &lt;strong&gt;rewriting&lt;/strong&gt; of almost the entire &lt;strong&gt;Web3&lt;/strong&gt; by our team member &lt;strong&gt;Rosen Krumov&lt;/strong&gt; in pure &lt;strong&gt;C&lt;/strong&gt; (I am so proud of him!).&lt;/p&gt;

&lt;p&gt;We saw a truly needed light at the end of the tunnel after several hard days of work in which &lt;strong&gt;Preslav&lt;/strong&gt; and &lt;strong&gt;Rosen&lt;/strong&gt; figured out how the &lt;strong&gt;Car&lt;/strong&gt; will communicate with the &lt;strong&gt;Blockchain&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The car seems to work, but what is next?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Well on &lt;strong&gt;Wednesday&lt;/strong&gt; it seemed that the &lt;strong&gt;Car&lt;/strong&gt; will actually &lt;strong&gt;work&lt;/strong&gt;, so the rest of the team used after hours time to start working on the &lt;strong&gt;project&lt;/strong&gt;. I started creating the &lt;strong&gt;Smart Contract&lt;/strong&gt; needed to store the data and everything we needed in a &lt;strong&gt;decentralized&lt;/strong&gt; matter, while &lt;strong&gt;Ivan Abadzhiev&lt;/strong&gt; and &lt;strong&gt;Simeon Kotashki&lt;/strong&gt; started working on the actual &lt;strong&gt;website&lt;/strong&gt; and displaying all the &lt;strong&gt;Data&lt;/strong&gt; we had. It looked like those were easy tasks, but…&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The day of the Next Block Hackathon&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;As usual, I was late for the start of the Hackathon at 8:30 but we still managed to &lt;strong&gt;register&lt;/strong&gt; the entire team we instantly started &lt;strong&gt;working&lt;/strong&gt; without paying too much attention to the &lt;strong&gt;instructions&lt;/strong&gt; and &lt;strong&gt;presentation&lt;/strong&gt; – we were &lt;strong&gt;eager to code.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What&lt;/strong&gt; &lt;strong&gt;was ready&lt;/strong&gt; &lt;strong&gt;prior to the Hackathon&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We only had a &lt;strong&gt;Car&lt;/strong&gt; that we thought was ready, barely anything about the &lt;strong&gt;Smart Contract&lt;/strong&gt; and the actual &lt;strong&gt;Web page.&lt;/strong&gt; It turned out the car wasn’t exactly working, like – barely, so half the team had to focus on the car problems and me – on the &lt;strong&gt;Smart Contract&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Trusting your Team&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you don’t trust your team in those types of &lt;strong&gt;competitions&lt;/strong&gt;, you’re usually done before even getting started. Knowing my team definitely helps – I have full &lt;strong&gt;trust&lt;/strong&gt; in them, so I stayed focused on improving the &lt;strong&gt;Contract&lt;/strong&gt; that we had without needing to constantly check on what everyone was doing.&lt;/p&gt;

&lt;p&gt;This turned out to be a good strategy since everything was going very &lt;strong&gt;smooth&lt;/strong&gt; till 14:00 we had the &lt;strong&gt;Car&lt;/strong&gt; fully &lt;strong&gt;working&lt;/strong&gt; with the &lt;strong&gt;Contract&lt;/strong&gt; and we had a &lt;strong&gt;Frond-end&lt;/strong&gt; that was just a mockup.&lt;/p&gt;

&lt;p&gt;We now had 5 hours to create our &lt;strong&gt;JavaScript&lt;/strong&gt; so we started gathering data from the &lt;strong&gt;Blockchain&lt;/strong&gt; and &lt;strong&gt;populate&lt;/strong&gt; it on our &lt;strong&gt;Front-end&lt;/strong&gt;. In our experience, those are easy tasks that we accomplish on a daily basis so we took the time to relax during lunch.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Time to Make it Work&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Lunch&lt;/strong&gt; is &lt;strong&gt;over&lt;/strong&gt;, we went back to our &lt;strong&gt;desks&lt;/strong&gt; and started &lt;strong&gt;working&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I didn't have that much work, so I was slacking a bit and &lt;strong&gt;networking&lt;/strong&gt; around the &lt;strong&gt;conference&lt;/strong&gt; and just checked with the team if they need &lt;strong&gt;help&lt;/strong&gt; on anything. It is only around 16:30 that we &lt;strong&gt;figured&lt;/strong&gt; out that we want to &lt;strong&gt;store&lt;/strong&gt; some more &lt;strong&gt;data&lt;/strong&gt; in our &lt;strong&gt;Contract&lt;/strong&gt; and change some of the &lt;strong&gt;mechanics&lt;/strong&gt;, allowing us to can have a moving chart when the &lt;strong&gt;Car&lt;/strong&gt; passes new &lt;strong&gt;Mileages&lt;/strong&gt;. The best choice was to use &lt;strong&gt;Events&lt;/strong&gt; and I needed to &lt;strong&gt;code&lt;/strong&gt; them in our &lt;strong&gt;Contract&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
This meant that we needed to &lt;strong&gt;redeploy&lt;/strong&gt; things and that was &lt;strong&gt;not&lt;/strong&gt; that easy process, as you needed to &lt;strong&gt;recompile&lt;/strong&gt; the &lt;strong&gt;device&lt;/strong&gt; &lt;strong&gt;code&lt;/strong&gt; and stuff, so every time we did it we needed to be very &lt;strong&gt;careful&lt;/strong&gt;, but everything went &lt;strong&gt;smooth&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Disasters&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We had both &lt;strong&gt;Smart Contract&lt;/strong&gt; and &lt;strong&gt;Car&lt;/strong&gt; &lt;strong&gt;fully&lt;/strong&gt; &lt;strong&gt;working&lt;/strong&gt; and we were very pleased until we tried to access our &lt;strong&gt;front-end&lt;/strong&gt; and it didn't load at all. Like really – at all.&lt;/p&gt;

&lt;p&gt;We started &lt;strong&gt;looking&lt;/strong&gt; for what was wrong and we were getting very weird &lt;strong&gt;errors&lt;/strong&gt; all over the places without the ability to &lt;strong&gt;debug&lt;/strong&gt; them. I had made minor changes to the &lt;strong&gt;Contract&lt;/strong&gt; and I was sure that it’s &lt;strong&gt;working&lt;/strong&gt; &lt;strong&gt;correctly&lt;/strong&gt; but the team thought the error can only be in the contract, so we &lt;strong&gt;spread&lt;/strong&gt; the effort to try and debug it. Everyone messing with everything didn’t turn out to be the best team decision, quite the opposite - it just made things worse and got me nervous. I decided to go for a more selfish solution and well – I just ignored everyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Serbian Music&lt;/strong&gt; &lt;strong&gt;saves the day&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;H&lt;/strong&gt;&lt;strong&gt;eadphones&lt;/strong&gt; on, high volume and &lt;strong&gt;Semsa&lt;/strong&gt; on (no judgment please, yes – I do like good &lt;strong&gt;Serbian&lt;/strong&gt; music, I’m from &lt;strong&gt;Vidin&lt;/strong&gt; near the &lt;strong&gt;Serbian&lt;/strong&gt; border after all)!&lt;/p&gt;

&lt;p&gt;I can see on my side the team going all over the place but I’m still ignoring them – let them &lt;strong&gt;work&lt;/strong&gt;. I need to know why we only get a blank page.&lt;/p&gt;

&lt;p&gt;Here we go! And I see a &lt;strong&gt;"console.log(test)"&lt;/strong&gt; input by a team member who omitted to make it as a string, so it was &lt;strong&gt;stopping&lt;/strong&gt; the &lt;strong&gt;execution&lt;/strong&gt; of the entire page…I can still see many &lt;strong&gt;errors&lt;/strong&gt;, but at least the page was &lt;strong&gt;loading&lt;/strong&gt; and now I can start to do a real &lt;strong&gt;debug&lt;/strong&gt;. Now it was the time to find what is really &lt;strong&gt;breaking&lt;/strong&gt; the &lt;strong&gt;interaction&lt;/strong&gt; between the &lt;strong&gt;JavaScript&lt;/strong&gt; &lt;strong&gt;Web3&lt;/strong&gt; and the &lt;strong&gt;Smart Contract&lt;/strong&gt;. Jumping into that &lt;strong&gt;code&lt;/strong&gt; and reading the &lt;strong&gt;error&lt;/strong&gt; it seemed like the problem was that we only estimate the amount of &lt;strong&gt;Gas&lt;/strong&gt; &lt;strong&gt;Limit&lt;/strong&gt; without specifying it. I changed it but… no. - it &lt;strong&gt;didn't&lt;/strong&gt; &lt;strong&gt;fix&lt;/strong&gt; the &lt;strong&gt;problem&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And here I am back at square one... Going around the code and trying to &lt;strong&gt;figure&lt;/strong&gt; out what the hell is going on. Then I got the &lt;strong&gt;brilliant&lt;/strong&gt; idea to check the &lt;strong&gt;ABI&lt;/strong&gt; that we had, so I just went and re-copied the &lt;strong&gt;ABI&lt;/strong&gt; and…. Miracle - it &lt;strong&gt;worked&lt;/strong&gt;!&lt;br&gt;&lt;br&gt;
&lt;strong&gt;I have no words to describe&lt;/strong&gt; &lt;strong&gt;the feeling and relief when it&lt;/strong&gt; &lt;strong&gt;actually ran&lt;/strong&gt;...&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why is ABI wrong if we didn't&lt;/strong&gt; &lt;strong&gt;play with&lt;/strong&gt; &lt;strong&gt;it?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Why the &lt;strong&gt;hell&lt;/strong&gt; was the &lt;strong&gt;ABI&lt;/strong&gt; changed at all? Well, my guess is -- between the multiple &lt;strong&gt;commits&lt;/strong&gt; and &lt;strong&gt;pulls&lt;/strong&gt; that we did, one of our Git clients managed to &lt;strong&gt;auto&lt;/strong&gt; &lt;strong&gt;Merge&lt;/strong&gt; the &lt;strong&gt;ABI&lt;/strong&gt; file and &lt;strong&gt;messed&lt;/strong&gt; it up very hard.&lt;/p&gt;

&lt;p&gt;Now you might think to yourself... Wow man, this should have been the first thing that you needed to check but that is not quite true. The &lt;strong&gt;error&lt;/strong&gt; that we were getting was so &lt;strong&gt;weird&lt;/strong&gt; and &lt;strong&gt;out of place&lt;/strong&gt; that it didn't even make &lt;strong&gt;sense&lt;/strong&gt; to check for this.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Now let's&lt;/strong&gt; &lt;strong&gt;go and impress the jury&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Nothing could stop us from winning now. Or not exactly…&lt;/p&gt;

&lt;p&gt;What &lt;strong&gt;happened&lt;/strong&gt; is that we went to try everything with the &lt;strong&gt;Car&lt;/strong&gt; and the &lt;strong&gt;Car&lt;/strong&gt; was &lt;strong&gt;not&lt;/strong&gt; able to send anything to our &lt;strong&gt;Ganache server&lt;/strong&gt; that was &lt;strong&gt;running&lt;/strong&gt; on a Google Cloud. We became &lt;strong&gt;nervous&lt;/strong&gt; immediately and &lt;strong&gt;Rosen&lt;/strong&gt; and &lt;strong&gt;Preslav&lt;/strong&gt; started &lt;strong&gt;working&lt;/strong&gt; instantly to fix it.&lt;/p&gt;

&lt;p&gt;They had spent more than 15-20 minutes trying different things without success when we found out that the &lt;strong&gt;actual&lt;/strong&gt; &lt;strong&gt;problem&lt;/strong&gt; was the &lt;strong&gt;internet&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
We were using &lt;strong&gt;Ivan&lt;/strong&gt;’s &lt;strong&gt;phone&lt;/strong&gt; as a &lt;strong&gt;Hotspot&lt;/strong&gt; because the public network &lt;strong&gt;Next&lt;/strong&gt; gave us had firewalls. It seemed like me listening to &lt;strong&gt;my&lt;/strong&gt; music with his &lt;strong&gt;Hotspot&lt;/strong&gt; somehow limited his internet connection and that was causing the &lt;strong&gt;issue&lt;/strong&gt;&lt;strong&gt;.&lt;/strong&gt; We switched to a &lt;strong&gt;different&lt;/strong&gt; phone and the &lt;strong&gt;Car&lt;/strong&gt; started &lt;strong&gt;working&lt;/strong&gt; again. Crazy day!&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Time to present&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Finally, time to present and &lt;strong&gt;Preslav&lt;/strong&gt; was ready with his &lt;strong&gt;Pitching&lt;/strong&gt;. To be sure that everything will work we had a setup with three different phone hotspots holding all the different parts and pieces we needed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  One for the &lt;strong&gt;Preslav's&lt;/strong&gt; laptop, so he can actually show the website&lt;/li&gt;
&lt;li&gt;  One for the &lt;strong&gt;Car&lt;/strong&gt; connection&lt;/li&gt;
&lt;li&gt;  One for the &lt;strong&gt;Laptop&lt;/strong&gt; that was connected to the &lt;strong&gt;Google Cloud&lt;/strong&gt; and keeping the &lt;strong&gt;Ganache&lt;/strong&gt; running there&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every point here was &lt;strong&gt;critical&lt;/strong&gt; if any of the &lt;strong&gt;phones&lt;/strong&gt; went &lt;strong&gt;crazy&lt;/strong&gt; we would not be able to present. Luckily that didn't happen.&lt;br&gt;&lt;br&gt;
During the presentation, the people from the jury were looking &lt;strong&gt;interested&lt;/strong&gt; in the project and asked many &lt;strong&gt;valuable&lt;/strong&gt; &lt;strong&gt;questions&lt;/strong&gt;, so we were proud of our presentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Other Projects on the table&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let see what the other teams did.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  First were the guys from &lt;strong&gt;Automaton Network&lt;/strong&gt; and they wanted to use their &lt;strong&gt;Core&lt;/strong&gt; &lt;strong&gt;platform&lt;/strong&gt; to create a &lt;strong&gt;hotel&lt;/strong&gt; &lt;strong&gt;reservation&lt;/strong&gt; website. They even created a way for them to &lt;strong&gt;Reserve&lt;/strong&gt; &lt;strong&gt;rooms&lt;/strong&gt; on random with random dates and such. It was looking good and we started getting scared.&lt;/li&gt;
&lt;li&gt;  The second project was about &lt;strong&gt;Sales Managment&lt;/strong&gt; and to help businesses do sales and payments.&lt;/li&gt;
&lt;li&gt;  The third team presented a &lt;strong&gt;Crypto&lt;/strong&gt; trading bot. They had a website on which you can set up multiple conditions and different rules for the &lt;strong&gt;Bot&lt;/strong&gt; to follow. After that, you could just click one button and the Bot will start trading while following this &lt;strong&gt;rules&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;  The fourth team was from two very &lt;strong&gt;young&lt;/strong&gt; guys. They created a &lt;strong&gt;Crypto&lt;/strong&gt; trading bot, but they had an &lt;strong&gt;AI&lt;/strong&gt; that was &lt;strong&gt;learning&lt;/strong&gt; how to do it. They managed to &lt;strong&gt;train&lt;/strong&gt; their &lt;strong&gt;model&lt;/strong&gt; from losing a lot of money to be able to not lose any or make a small profit. Which was &lt;strong&gt;amazing&lt;/strong&gt;, so congratulation to them!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The concurrence was really great and everyone definitely deserved an award!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Awards&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The closing ceremony with the award was going to be during the Afterparty so we had to wait a little longer until we knew if we had impressed the jury more than our biggest concurrent– according to our own feeling – the great team with the Automaton network!&lt;/p&gt;

&lt;p&gt;After grabbing a deserved bite, we got to the party right on time for the ceremony.&lt;/p&gt;

&lt;p&gt;First was announced the third team which was the &lt;strong&gt;Crypto Bot&lt;/strong&gt; which you could set up your own conditions. That was not that &lt;strong&gt;surprising&lt;/strong&gt; as we were &lt;strong&gt;expecting&lt;/strong&gt; at least one of the &lt;strong&gt;bots&lt;/strong&gt; to be in the &lt;strong&gt;Top 3&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Time for the second place where we expected either us or Automaton to win. What followed got us all worried - they announced the &lt;strong&gt;second&lt;/strong&gt; place and the other &lt;strong&gt;Crypto trading bot&lt;/strong&gt; is a winner, which definitely surprised us in well not such a nice way… We knew that both us and &lt;strong&gt;Automaton&lt;/strong&gt; had a big chance for the &lt;strong&gt;first&lt;/strong&gt; &lt;strong&gt;place&lt;/strong&gt;, so the only thing was to just wait a bit and see how it goes.&lt;/p&gt;

&lt;p&gt;Now they announce the &lt;strong&gt;First place&lt;/strong&gt;... We all stand up and could barely hold our breath… &lt;strong&gt;Yes&lt;/strong&gt;, &lt;strong&gt;it happened&lt;/strong&gt;! &lt;strong&gt;We heard our team name, we were the winners&lt;/strong&gt;!! We yield like kids and ran to the &lt;strong&gt;stage to get our price.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Final Words&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I want to &lt;strong&gt;Thank&lt;/strong&gt; the organizers, the &lt;strong&gt;participants&lt;/strong&gt; in the &lt;strong&gt;Hackathon&lt;/strong&gt; and the &lt;strong&gt;jury&lt;/strong&gt; for the &lt;strong&gt;great work&lt;/strong&gt;. This was my very first &lt;strong&gt;Hackathon&lt;/strong&gt; and it was a lot of &lt;strong&gt;fun&lt;/strong&gt;. All of the projects were very good and I hope we all face each other on other &lt;strong&gt;Hackathons&lt;/strong&gt; in the &lt;strong&gt;future&lt;/strong&gt; :)&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Of course, I want to thank my entire team for making this happen and the work&lt;/strong&gt;. Thank you, guys!&lt;/p&gt;

&lt;p&gt;&lt;a href="//../wp-content/uploads/2018/09/photo_2018-09-18_11-41-44.jpg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iZnewPpr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://nikolaytech.com/wp-content/uploads/2018/09/photo_2018-09-18_11-41-44-300x200.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The original article in my website: &lt;a href="http://nikolaytech.com/winning-the-next-block-blockchain-hackathon"&gt;http://nikolaytech.com/winning-the-next-block-blockchain-hackathon&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can follow me on:&lt;br&gt;
&lt;a href="http://nikolaytech.com/"&gt;http://nikolaytech.com/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/thedi/"&gt;https://www.linkedin.com/in/thedi/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.facebook.com/ghkgk"&gt;https://www.facebook.com/ghkgk&lt;/a&gt;&lt;/p&gt;

</description>
      <category>conference</category>
      <category>hackathon</category>
      <category>blockchain</category>
      <category>winning</category>
    </item>
    <item>
      <title>Issues in the Blockchain Ecosystem;</title>
      <dc:creator>Nikolay Angelov</dc:creator>
      <pubDate>Sun, 29 Jul 2018 18:20:53 +0000</pubDate>
      <link>https://dev.to/nikolayangelov/issues-in-the-blockchain-ecosystem-4pe</link>
      <guid>https://dev.to/nikolayangelov/issues-in-the-blockchain-ecosystem-4pe</guid>
      <description>&lt;p&gt;Let me share with you some of the &lt;strong&gt;&lt;a href="http://nikolaytech.com/blockchain-ecosystem-issues/"&gt;Issues in the Blockchain Ecosystem&lt;/a&gt;&lt;/strong&gt; that we face today.&lt;br&gt;
In fact, that was my very first Talk that I did in public. It was very challenging as you all know &lt;strong&gt;Blockchain&lt;/strong&gt; isn't an easy topic, but at the same time, it was very rewarding and fun.&lt;/p&gt;

&lt;h1&gt;
  
  
  Issues in the Blockchain Ecosystem
&lt;/h1&gt;

&lt;p&gt;Everybody in the world is talking about how great the &lt;strong&gt;Blockchain&lt;/strong&gt; is and how it will change the world, but in reality, we are far away from this happening. Beforehand we need to solve many &lt;strong&gt;issues&lt;/strong&gt; that we currently face and it might be a long road.&lt;/p&gt;

&lt;p&gt;When we speak about &lt;strong&gt;Blockchain&lt;/strong&gt; we need to know that there are only two operations that we can perform in the &lt;strong&gt;Blockchain&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Read Operation
&lt;/h3&gt;

&lt;p&gt;The first operation that we can perform is the &lt;strong&gt;Read Operation&lt;/strong&gt;.&lt;br&gt;
&lt;strong&gt;Read operation&lt;/strong&gt; is very simple to understand as the &lt;strong&gt;Blockchain&lt;/strong&gt; is public and free for everybody.&lt;br&gt;
Currently, this operation is one of the rare parts of the &lt;strong&gt;Blockchain&lt;/strong&gt; that we have no &lt;strong&gt;issues&lt;/strong&gt; with and that is because of the following properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Completely free.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No limits on how much you want to read from the Blockchain.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anyone can do it.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anyone can verify that the information is correct and not corrupted.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Write Operation
&lt;/h3&gt;

&lt;p&gt;The second operation is a lot more tricky than the previous one and that is the &lt;strong&gt;Write Operation&lt;/strong&gt;.&lt;br&gt;
We can simply say that most of the &lt;strong&gt;Scaling&lt;/strong&gt; problems in the &lt;strong&gt;Blockchain&lt;/strong&gt; are coming from this operation.&lt;br&gt;
This is because of the fact that trying to change the &lt;strong&gt;State&lt;/strong&gt; of data in the &lt;strong&gt;Blockchain&lt;/strong&gt; is very hard and difficult process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Validations
&lt;/h3&gt;

&lt;p&gt;Many &lt;strong&gt;validations&lt;/strong&gt; are performed when we want to simply change the &lt;strong&gt;data state&lt;/strong&gt;, purely because you need to be sure that the information you are writing is actually the correct one as the &lt;strong&gt;Blockchain&lt;/strong&gt; is &lt;strong&gt;immutable&lt;/strong&gt;.&lt;br&gt;
Here is the first major problem that we face.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do we get into Consensus of what to be recorded in the Blockchain?
&lt;/h3&gt;

&lt;p&gt;We have all experienced going out with friends and having a hard time agreeing on where we should go, while in real life we can just play a game of &lt;strong&gt;Rock-Paper-Scissors&lt;/strong&gt; and the winner chooses, in &lt;strong&gt;Blockchain&lt;/strong&gt;, you can imagine that this is a very hard process. That is why we have &lt;strong&gt;Consensus Algorithms&lt;/strong&gt; with which we decide what will happen with the data and who will create the next block.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The most Popular Consensus Algorithm is Proof of Work.&lt;/strong&gt;&lt;br&gt;
In &lt;strong&gt;Proof of Work&lt;/strong&gt;, we give a very hard puzzle to everybody to race and complete, while the winner has the right to create the new Block and receive the rewards for doing so.&lt;/p&gt;

&lt;h3&gt;
  
  
  The problems of Proof of Work Consensus
&lt;/h3&gt;

&lt;p&gt;Their many problems with &lt;strong&gt;Proof of Work&lt;/strong&gt; such are being very expensive, very slow and the fact that there might be many winners of the &lt;strong&gt;Puzzle Solving&lt;/strong&gt; competition which can create problems (&lt;strong&gt;Forks&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;Ok, now we had some brief introduction to what &lt;strong&gt;Blockchain&lt;/strong&gt; is and its time to start checking out the problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scalability
&lt;/h2&gt;

&lt;p&gt;When we talk about &lt;strong&gt;Blockchain scalability issues&lt;/strong&gt; we have few metrics with which we can measure the problem. Which are the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Transactions Throughput&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Transactions Latency&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Transactions Fees&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Storage&lt;/strong&gt;
And I am going to use these metrics to point out some &lt;strong&gt;issues&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Transactions Throughput
&lt;/h3&gt;

&lt;p&gt;This is basically the maximum rate at which the system can write transactions to the &lt;strong&gt;Blockchain&lt;/strong&gt;. So we measure &lt;strong&gt;Transactions Throughput&lt;/strong&gt; by the number of &lt;strong&gt;transactions per second (tps)&lt;/strong&gt; that the network can handle. To calculate the &lt;strong&gt;transactions per second&lt;/strong&gt; of &lt;strong&gt;Blockchain&lt;/strong&gt; isn't that hard and that is because of the fact that every block has a size limit and takes a certain amount of time to be created.&lt;/p&gt;

&lt;p&gt;In the case of &lt;strong&gt;Bitcoin&lt;/strong&gt;, the block size is measured by actual size and it is 1 MB per block, which puts &lt;strong&gt;Bitcoin&lt;/strong&gt; at an average of 7 tps.&lt;br&gt;
While in &lt;strong&gt;Ethereum&lt;/strong&gt; it is measured by &lt;strong&gt;Gas Limit&lt;/strong&gt;, as there we have &lt;strong&gt;Smart Contracts&lt;/strong&gt; and their computation time is also concerned when creating a new block. The &lt;strong&gt;Gas limit&lt;/strong&gt; of &lt;strong&gt;Ethereum&lt;/strong&gt; is currently (When the &lt;a href="http://nikolaytech.com/blockchain-ecosystem-issues/"&gt;Article&lt;/a&gt; was written) 7,996,070 and usually, the network produces from 10 to 15 tps.&lt;br&gt;
Of course we have a lot faster networkers then this two, but in reality, they achieve this by sacrificing something else, while &lt;strong&gt;Bitcoin&lt;/strong&gt; and &lt;strong&gt;Ethereum&lt;/strong&gt; are looking for full solution or solutions that only improve the network and have no bad impacts at all.&lt;/p&gt;

&lt;p&gt;This is very slow and the business needs, a bigger throughput. For example, many people compare &lt;strong&gt;Blockchain&lt;/strong&gt; &lt;strong&gt;Transactions Throughput&lt;/strong&gt; to what &lt;strong&gt;Visa&lt;/strong&gt; can handle, but I really don't like that comparison, because of the fact that &lt;strong&gt;Visa&lt;/strong&gt; is able to do that with very hight &lt;strong&gt;Fees&lt;/strong&gt; and we don't want that.&lt;br&gt;
That's why I will just shoot and say that we should be aiming for over &lt;strong&gt;100 000 tps&lt;/strong&gt; in a case that we really want to use &lt;strong&gt;Blockchain&lt;/strong&gt; to change the world.&lt;br&gt;
This might sound really high, but I like the quote from &lt;strong&gt;W. Clement Stone&lt;/strong&gt; which says &lt;strong&gt;"Aim for the moon. If you miss, you may hit a star."&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Transactions Latency
&lt;/h3&gt;

&lt;p&gt;I already mention that each block takes a certain amount of time to be created and this is basically called &lt;strong&gt;Block Time&lt;/strong&gt;. Which is a necessary evil, as it takes time for every &lt;strong&gt;Node&lt;/strong&gt; in the network to hear about a new block and in case of superfast &lt;strong&gt;Block Interval&lt;/strong&gt;, we will be seeing a lot of &lt;strong&gt;Forks&lt;/strong&gt;.&lt;br&gt;
This &lt;strong&gt;Transactions Latency&lt;/strong&gt; is also connected to the &lt;strong&gt;Consensus Algorithm&lt;/strong&gt; as its the algorithm job to keep the &lt;strong&gt;Block Interval&lt;/strong&gt; at the same pace.&lt;br&gt;
In &lt;strong&gt;Bitcoin&lt;/strong&gt;, we have a new block every 9-10 minutes and in &lt;strong&gt;Ethereum&lt;/strong&gt; we have a new block every 10-15 secs.&lt;br&gt;
This interval is very slow as in reality every single transaction is being &lt;strong&gt;executed&lt;/strong&gt; at Block Creation. This is very important to be known as many people miss understand the measurement thing "&lt;strong&gt;Transactions per second&lt;/strong&gt;" and think that transactions are executed each second when they are &lt;strong&gt;not&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This latency is even bigger when the possibility of &lt;strong&gt;Forks&lt;/strong&gt; exists, as most business currently wait for 6 blocks confirmations to accept your transaction and in case of &lt;strong&gt;Bitcoin&lt;/strong&gt; that we will put you at 1 Hour wait.&lt;/p&gt;

&lt;h3&gt;
  
  
  Transactions Fees
&lt;/h3&gt;

&lt;p&gt;In some cases, &lt;strong&gt;transactions fees&lt;/strong&gt; can be bad and good. The reason behind that is that you decide what fee you are going to give. You are free to choose to give a fee as little as 0.10$ or as much as 50,000$ but giving a higher fee will increase the chance of your transaction being included in the next block.&lt;br&gt;
That's because of the few things we already covered like blocks having a limited size and the &lt;strong&gt;Proof of Work&lt;/strong&gt; being very expensive.&lt;br&gt;
Your fee is basically bribing the &lt;strong&gt;Miners&lt;/strong&gt; (People that solve the &lt;strong&gt;Proof of Work&lt;/strong&gt; puzzle) as they are the one deciding which transaction will get into the block.&lt;br&gt;
The issue is when the network is loaded and there many pending transactions, then the average fees can get pretty nasty and hit over 40$ in &lt;strong&gt;Bitcoin&lt;/strong&gt; which is a lot. While in &lt;strong&gt;Ethereum&lt;/strong&gt; there was a game called &lt;strong&gt;Cryptokitties&lt;/strong&gt; which loaded the network so much that the transactions skyrocket to 4$ when a normal transaction was being processed for 0.10$ previously.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Storage
&lt;/h3&gt;

&lt;p&gt;Currently, all of the &lt;strong&gt;Blockchain&lt;/strong&gt; is being stored at every single &lt;strong&gt;Node&lt;/strong&gt; and you can imagine that this is not really good as the information is being duplicated thousands and thousands of time. The information being store everywhere is not the main issue here.&lt;/p&gt;

&lt;p&gt;The main issue is the fact that all the Networks do is grow and that's because of their properties of being &lt;strong&gt;immutable&lt;/strong&gt;. That makes it so at some point the &lt;strong&gt;Blockchain&lt;/strong&gt; will be hard to store and will take enormous time to download, which reduces the &lt;strong&gt;Decentralization&lt;/strong&gt; part of the chain by a lot.&lt;br&gt;
For the network to be fully &lt;strong&gt;Decentralized&lt;/strong&gt; everyone on the world should be able to download and connect to the network without any trouble and having chains being over 500 GB makes this harder, which reduces the number of people being able to participate and leads to &lt;strong&gt;Centralization&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Storage&lt;/strong&gt; is as well a blocker of many easy solutions to all of the previously mentioned problems. Such solution can be just increasing the &lt;strong&gt;Block Size&lt;/strong&gt; that will lead to bigger transactions throughput and lower fees, but in that way, we will be storing way more data and we will get really fast to 500 GB+,  which will be really bad for the health of the network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scalability Solution
&lt;/h2&gt;

&lt;p&gt;When we talk about the solutions we aim to find ones that fix everything without creating bad impact at all and such &lt;strong&gt;solutions&lt;/strong&gt; exist and are being developed constantly. Some of them are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Lightning Network&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Raden&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Casper&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sharding&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am going to cover each of these scalability solutions in a later article, so if you are curious about them you can stay tuned by following me on my website &lt;a href="http://nikolaytech.com"&gt;http://Nikolaytech.com&lt;/a&gt; :)&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>issues</category>
      <category>scalability</category>
      <category>crypto</category>
    </item>
  </channel>
</rss>
