Skip to content

Commit

Permalink
Theory done.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevavuori Petteri committed May 18, 2018
1 parent 58430f0 commit 1674ff7
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions notebooks/III. Building a General Purpose Smart Contract.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"source": [
"<h1>Table of Contents<span class=\"tocSkip\"></span></h1>\n",
"<div class=\"toc\"><ul class=\"toc-item\"><li><span><a href=\"#1.-Introduction-to-the-Concept-of-Smart-Contracts\" data-toc-modified-id=\"1.-Introduction-to-the-Concept-of-Smart-Contracts-1\">1. Introduction to the Concept of Smart Contracts</a></span><ul class=\"toc-item\"><li><span><a href=\"#1.1-Smart-Contracts\" data-toc-modified-id=\"1.1-Smart-Contracts-1.1\">1.1 Smart Contracts</a></span></li><li><span><a href=\"#1.2-Decentralized-Applications\" data-toc-modified-id=\"1.2-Decentralized-Applications-1.2\">1.2 Decentralized Applications</a></span></li><li><span><a href=\"#1.3-Ethereum-Virtual-Machine-and-Gas\" data-toc-modified-id=\"1.3-Ethereum-Virtual-Machine-and-Gas-1.3\">1.3 Ethereum Virtual Machine and Gas</a></span></li></ul></li></ul></div>"
"<div class=\"toc\"><ul class=\"toc-item\"><li><span><a href=\"#1.-Introduction-to-the-Concept-of-Smart-Contracts\" data-toc-modified-id=\"1.-Introduction-to-the-Concept-of-Smart-Contracts-1\">1. Introduction to the Concept of Smart Contracts</a></span><ul class=\"toc-item\"><li><span><a href=\"#1.1-Smart-Contracts\" data-toc-modified-id=\"1.1-Smart-Contracts-1.1\">1.1 Smart Contracts</a></span></li><li><span><a href=\"#1.2-Decentralized-Applications\" data-toc-modified-id=\"1.2-Decentralized-Applications-1.2\">1.2 Decentralized Applications</a></span></li><li><span><a href=\"#1.3-Ethereum-Virtual-Machine-and-Gas\" data-toc-modified-id=\"1.3-Ethereum-Virtual-Machine-and-Gas-1.3\">1.3 Ethereum Virtual Machine and Gas</a></span></li><li><span><a href=\"#1.4-Decentralized-Autonomous-Organizations\" data-toc-modified-id=\"1.4-Decentralized-Autonomous-Organizations-1.4\">1.4 Decentralized Autonomous Organizations</a></span></li></ul></li><li><span><a href=\"#2.-Building-the-Smart-Contract-Net\" data-toc-modified-id=\"2.-Building-the-Smart-Contract-Net-2\">2. Building the Smart Contract Net</a></span></li></ul></div>"
]
},
{
Expand Down Expand Up @@ -68,7 +68,7 @@
"source": [
"### 1.2 Decentralized Applications\n",
"\n",
"Decentralized Applications or Dapps are applications that provide an interface to the blockchain. The Dapps provide e.g. a web-based interface, that uses the network of nodes to perform the actions defined by the Smart Contracts across every node in the network. "
"Decentralized Applications or DApps are applications that provide an interface to the blockchain. The DApps provide e.g. a web-based interface, that uses the network of nodes to perform the actions defined by the Smart Contracts across every node in the network. "
]
},
{
Expand All @@ -82,7 +82,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The actions to perform are defined by the Smart Contract that the Dapp is interfacing. Thus the Smart Contract forms the backend of the Dapp, while the Dapp itself provides the clientside frontend. This is how the execution of the applications gets distributed."
"The actions to perform are defined by the Smart Contract that the DApp is interfacing. Thus the Smart Contract forms the backend of the DApp, while the DApp itself provides the clientside frontend. This is how the execution of the applications gets distributed."
]
},
{
Expand All @@ -91,7 +91,7 @@
"source": [
"### 1.3 Ethereum Virtual Machine and Gas\n",
"\n",
"Let's imagine for a minute that you have a computer acting as a node part of the Ethereum network. You get the blockchain and a Dapp requests for running a piece of code within a Smart Contract. This certain piece of code has malicious code, that attempts to inflict harm on your computer running the node - you wouldn't want to run this code. This is why the Smart Contracts are executed in what is called Ethereum Virtual Machines or EVMs to isolate the Smart Contract codes from the node's, i.e. the user's, system."
"Let's imagine for a minute that you have a computer acting as a node part of the Ethereum network. You get the blockchain and a DApp requests for running a piece of code within a Smart Contract. This certain piece of code has malicious code, that attempts to inflict harm on your computer running the node - you wouldn't want to run this code. This is why the Smart Contracts are executed in what is called Ethereum Virtual Machines or EVMs to isolate the Smart Contract codes from the node's, i.e. the user's, system."
]
},
{
Expand All @@ -101,6 +101,36 @@
"<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS4AAAEKCAYAAACsfbhjAAAgAElEQVR4Xu2dB5hU1dnH/9O3sSzsInVpgiJiA8SKsSQqkCgWNCoktqioxKBSFEVEil2xoRKNnyWxoCL2qOgnAT/EoFGxRKUqAssu22an3nu/55x1l91lhil75869d/7zPHkwu+ee857fe+b3vOfcO7MOTdM08EUCJEACFiLgoLgslK0WoX777bf485//jPvuuw/77ruv/I342axZs/DAAw+gtLS0XRN75pln5PXnnXdeUv34/X789a9/xcKFC7FlyxaceeaZuPnmm1FeXp7U9Xo1qqyslEzGjx+PgQMH6tUt+zEZAYrLZAlJNhwziSsUCmHGjBkoKirC1VdfLf9dtmwZnnzySSxYsACdOnVKdlrtbheLS7s7ZQemI0BxmS4lyQWUSFyqqkqZPPvssxgxYgTmzJmDww8/HOLnS5YskZVZbW0trrvuOlx00UVYtWqVlIzP58OAAQNw/PHHw+l0Yp999onZT8soP//8c9x000146KGH0L17d/krRVGwevVqeb0Q1/vvv4/p06dj+/btmDZtGi688EJ88sknskobPHgw7rnnHlndnXDCCZg6dSr23ntvWTlt2rRJtunduzcefvhhXHLJJbKfzz77DLfccgtEZVhQUIDJkyfjrLPOwvPPP49HHnkEl156Ke666y68/fbbCed64403yrnyZR0CFJd1ctUq0kTievfdd6WM5s6dK6ufxYsXyy3k119/jQcffBDz589HYWEhrrnmGpx99tnIy8vDn/70Jym6/fffHy6XS4733HPPxexHXNv0Wrp0Kd544w0pn/z8/N2Irl+/HhMnTsS8efPk1lFI5pxzzkFJSQnGjRsnK7NBgwbhD3/4A4477jhMmjRJykn8d69evaTQHn/8cQwbNgzXXnstjj32WPTt23c3cU2YMAFlZWXNW+i6urqU5mrRpZCTYVNcFk17InGJykZUNd26dcMFF1wgKxkhG1GhiPOfli8hlGOOOaZZBC3Px4ToYvXT8vp33nkHL774YlxxrVixAk888YSs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y5lnFzzZfiMlc+LBONXuKyzIQZqOkILF+2JGFMI48fi4VLT0nYTqznVSs/hGPEESO1eBeIRsl0lnA0NsgaAT3ElbXgOXDOEKC4cibVyU2U4kqOE1tllwDFlV3+phud4jJdShhQDAIUF5dFKwIUFxeEFQhQXFbIkoExCnHdPu8GHHH48OZRxSJJ5sDUwDA5VI4ToLhyfAG0nf6Xn2zDg7NXtZIXxcVFYjYCFJfZMmKCeNrKi+IyQVIYQisCFBcXREwCLeU19fo53CpynZiKAMVlqnSYK5gmeYmoeMZlrtzkejQUV66vgATzbykvoiIBMxFI5mF3PjlvpowxFhIggaQIUFxJYWIjEiABMxFoJa4rZh6GIcO77hYfP6toppQxFhIggWZx/WvFSu3qa6chlrwoLi4UEiABMxFoFpemadqKlR8hlrwoLjOljLGQAAm0EpfAEUteFBcXCgmQgJkI7CauWPKiuMyUMsZCAiQQU1xt5SU+45bMsxXESQIkQAJGEIgrrpbyEv9NcRmRDo5BAiSQDIE9iqutvJLpkG1IgARIwAgC8jvnxV1FIwbjGCRAAiSgF4H/Bx7UlytH2pBtAAAAAElFTkSuQmCC\" style=\"max-width:100%;\" />"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Isolating the Smart Contract execution solves the problem of malicious code, such as viruses. Infinite or massive loops that would break or hinder the whole chain are however a different problem. This is where the concept of Gas helps out by making the developer of the DApp pay for any calculation performed by the Smart Contract (similar to gasoline, cars and mileage). \n",
"\n",
"Every operation, like summation, multiplication as well as IO and transaction related stuff costs a fixed amount of Gas. There is also a block-wise Gas limit. This drives the developers to perform more intensive operations off-chain, having only the crucials be part of the chain - the writing of good code is thus enforced."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1.4 Decentralized Autonomous Organizations\n",
"\n",
"Much like hierarchical organizations function with varying sets of instructions i.e. bureucracy, singular Smart Contracts can also be connected and organized to build up Decentralized Autonomous Organizations or DAOs. The DAOs enable the developers to build DApps utulizing multiple Smart Contracts. \n",
"\n",
"A prime example provided in the course is an autonomous vehicle, which itself is a combination of a multitude of autonomous systems. A single system can be thought of as a Smart Contract. The vehicle is effectively a hierarchy of Smart Contracts with an organization-distinct bureucracy for handling varying tasks of various levels. Or, as defined by Vitalik Buterin in his [blog post](https://blog.ethereum.org/2014/05/06/daos-dacs-das-and-more-an-incomplete-terminology-guide/):\n",
"\n",
"> The ideal of a decentralized autonomous organization is easy to describe: it is an entity that lives on the internet and exists autonomously, but also heavily relies on hiring individuals to perform certain tasks that the automaton itself cannot do."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2. Building the Smart Contract Net\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 1674ff7

Please sign in to comment.