Giter VIP home page Giter VIP logo

blockchain's Introduction

What is Blockchain?

Blockchain is a decentralized distributed ledger (data structure) where data is being stored inside blocks in form of transactions

Blockchain is a data structure, which is arrange of data in computer memory, such as Excel sheet, Google Doc and PDF files.

Suppose that we have a book, in which each page make reference for the previous page through a page number one less than a current page number. We can detect and identify the removal of a page when a page has been removed through the page number.

Book Ordering Block Ordering
Page 1,2,3,4,5 Block "88m795" built on "48m775",
Block "87m885" built on "88m795",
Block "5l8ugO" built on "87m885"
Implicit that the page builds on the pages whose Number is one less(page 5 builds on page 4)(5 minus 1) "48m775", "88m795", "87m885", "5l8ugO" represent fingerprints or hashes of the blocks.

Blocks in chain refer to previous blocks like books

Also, we can detect the alteration of contents of specific page through page number.

If anyone changes the content of the page, then the next page number will not match. since the page number is produced by crunching the content of the previous page.

Blocks Detailed

Blockchain has the similar mechanism as the book, each block is built on top of the recent block and use its previous block’s content as a signature. Building a block & adding it in the Blockchain is the task of the miner nodes

  • In public Blockchain it is made computationally difficult to add a block to prevent attacks.

  • Miners try to guess a number in such a way that if it gets crunched with the most recent block’s fingerprint than it will create a new fingerprint which will be less that the last/most recent block in the Blockchain.

  • It takes time & computational power to add a Block in the Blockchain. Hence there is some reward (25 BTC in case of Bitcoin Blockchain)

  • Private Blockchain can chose other methods to add a block as they can trust the miners using a contract etc.

What is Smart Contract?

Smart contract is a term used to describe computer program code that is capable of facilitating, executing, and enforcing the negotiation or performance of an agreement (i.e. contract) using blockchain technology.

  • The entire process is automated can act as a complement, or substitute, for legal contracts, where the terms of the smart contract are recorded in a computer language as a set of instructions.

What is Ethereum Virtual Machine ?

  • Ethereum is a programmable Blockchain
  • It allows user to create their own operations
  • Ethereum in the narrow sense refers to a suite of protocols that define a platform for decentralized applications.
  • At the heart of it is the Ethereum Virtual Machine (“EVM”), which can execute code of arbitrary algorithmic complexity.
  • In computer science terms, Ethereum is “Turing complete”.
  • Developers can create applications that run on the EVM using friendly programming languages modelled on existing languages like JavaScript and Python.

What is SOLIDITY?

  • High-level object-oriented language for smart contratcs
  • Solidity was initially proposed in August 2014 by Gavin Wood
  • Solidity lets you program on Ethereum, a blockchain-based virtual machine
  • Solidity is a statically typed programming language
  • A Contract programming language that has similarities to Javascript and C
  • Contract-specific features include modifier (guard) clauses, event notifiers for listeners, and custom global variables.
  • Solidity is compiled to bytecode that is executable on the EVM

Click following link for further learning !

Installation and usage

Program is written in java, solidity. it one may need solidity shoulde be installed ( https://docs.continuum.io/anaconda/install ) or install python 2.7 and then install Numpy, Scipy, Pandas, matplotlib,jupyter manually as follows.

Remix

If you just want to try Solidity for small contracts, you can try Remix which does not need any installation. If you want to use it without connection to the Internet, you can go to https://github.com/ethereum/browser-solidity/tree/gh-pages and download the .ZIP file as explained on that page.

npm / Node.js

This is probably the most portable and most convenient way to install Solidity locally.

A platform-independent JavaScript library is provided by compiling the C++ source into JavaScript using Emscripten. It can be used in projects directly (such as Remix). Please refer to the solc-js repository for instructions.

It also contains a commandline tool called solcjs, which can be installed via npm:

npm install -g solc

Docker

We provide up to date docker builds for the compiler. The stable repository contains released versions while the nightly repository contains potentially unstable changes in the develop branch.

docker run ethereum/solc:stable solc --version

Acknowledgement : Some images and articles are from other sites or materials - Toshendra Sharma : Ethereum development, Rafael pass : a Course in Cryptography, Arvind Narayanan, Joseph Bonneau : Bitcoin and Cryptocurrency Technologies, Ravinder Deol : Ethereum Blockchain

Meta

Yoonsu Park - http://www.patternics.com Distributed under the MIT license. See LICENSE for more information( https://en.wikipedia.org/wiki/MIT_License ). https://github.com/blockchain99/blockchain

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.