Blockchain

Useful terms in Blockchain:

Block

A bitcoin block contains the header, transaction count, and block content. The block content section contains all of the data regarding the individual transactions, and the transaction count is the number of transactions in the block. The block header is what links one block to another and contains the following elements:

  • The block version number (i.e. the software version)
  • The 256-bit hash of the previous block header
  • The 256-bit hash derived from all of the transactions in the block (this involves the Merkle Root)
  • A timestamp
  • The current difficulty target (a 256-bit number, usually starting with a string of leading zeros).
  • Nonce (a random 32-bit number). Miners change the value of the nonce in order to find a hash that is below the current difficulty target.

https://www.ssl2buy.com/wiki/symmetric-vs-asymmetric-encryption-what-are-differences

 

Truffle is a development environment, testing framework and asset pipeline for Ethereum, aiming to make life as an Ethereum developer easier. With Truffle, you get:

  • Built-in smart contract compilation, linking, deployment and binary management.
  • Automated contract testing with Mocha and Chai.
  • Configurable build pipeline with support for custom build processes.
  • Scriptable deployment & migrations framework.
  • Network management for deploying to many public & private networks.
  • Interactive console for direct contract communication.
  • Instant rebuilding of assets during development.
  • External script runner that executes scripts within a Truffle environment.

 

web3.js API (command line tool to run nodes). Once a Solidity contract is compiled with solc and sent to the network, you can call it using the Ethereum web3.js JavaScript API and build web apps that interact with contracts. (No need to install this yet, read up on DApp Frameworks below first.)

 

testrpc (test environment). You can run a test network using geth, or another fast way of getting a testnet running is using testrpc. Testrpc will create a bunch of pre-funded accounts for you that will be listed when it starts up. It’s is also super fast, so easier to develop and test with. You can start with testrpc, then when your contracts are in good shape, move to geth on a testnet, which can be started by specifying a networkid like: geth — networkid “12345”. Here’s the testrpc repo but I’ll review everything you need to install again in the tutorial part later. [Update: The developer of testrpc is now focusing on ethersim as a replacement for testrpc and I’ll update this tutorial eventually to use ethersim too. You can start using it now in if you’d like.

Meteor (client). Another stack a lot of DApp devs use include web3.js + Meteor which is a general webapp framework (The ethereum-meteor-wallet repo has a good starter example, and SilentCiero is building a lot of Meteor integrations with web3.js and DApp boilerplates).

APIs (outside network with blockchain). BlockApps.net is creating a RESTful API for DApps based on a Haskell node they run as a centralized service to save you the trouble of running a local Ethereum node. This departs from the completely decentralized model of DApps but is useful when running an Ethereum node locally isn’t realistic. For example if you want to serve your DApp to users who won’t be running local nodes either and reach a wider audience with just a web browser or mobile device. BlockApps has a command line tool called bloc in the works that can be used after creating a developer account with them.

The Solidity real-time compiler and Cosmo are both a fast way to get started compiling your smart contracts right away in a browser.

Sample Contracts and DApps. Search Github for DApp repos and .sol files to see what cool stuff people do and how. A big list of DApps with repos is also here: dapps.ethercasts.com, although some of the list’s details are a little out of date. Ether.fund/contracts also has some examples of Solidity and Serpent contracts people have written, but not sure if these have been tested or verified for correctness.

 

nonce. To validate duplicate transcations
The nonce is basically just a counter that keeps track of how many transactions an address has sent.
https://ethereum.stackexchange.com/questions/27432/what-is-nonce-in-ethereum-how-does-it-prevent-double-spending

ABI. The ABI, Application Binary Interface, is basically how you call functions in a contract and get data back.
An ABI determines such details as how functions are called and in which binary format information should be passed from one program component to the next…

https://ethereum.stackexchange.com/questions/234/what-is-an-abi-and-why-is-it-needed-to-interact-with-contracts

 

use cases list

https://www.cbinsights.com/research/industries-disrupted-blockchain/

Author: Hitesh Ahuja

Aspiring Product Manager with overall 8 years of IT experience in building scalable Mobile, and Web Applications. Efficient in conceptualizing, wireframing, implementing and releasing enterprise services to scale product platform, and PGDBM degree from Narsee Monjee Institute of Management Studies

Leave a comment