Sunday, June 12, 2016

Blockchain

  • Design by contract

Design by contract (DbC), also known as contract programming, programming by contract and design-by-contract programming, is an approach to designing software.
It prescribes that software designers should define formal, precise and verifiable interface specifications for software components, which extend the ordinary definition of abstract data types with preconditions, postconditions, and invariants.

These specifications are referred to as "contracts", in accordance with a conceptual metaphor with the conditions and obligations of business contracts.
The DbC approach assumes all client components that invoke an operation on a server component will meet the preconditions specified as required for that operation. Where this assumption is considered too risky (as in multi-channel client-server or distributed computing) the opposite "defensive design" approach is taken, meaning that a server component tests (before or while processing a client's request) that all relevant preconditions hold true, and replies with a suitable error message if not.

The central idea of DbC is a metaphor on how elements of a software system collaborate with each other on the basis of mutual obligations and benefits. The metaphor comes from business life, where a "client" and a "supplier" agree on a "contract" that defines, for example, that:

    The supplier must provide a certain product (obligation) and is entitled to expect that the client has paid its fee (benefit).
    The client must pay the fee (obligation) and is entitled to get the product (benefit).
    Both parties must satisfy certain obligations, such as laws and regulations, applying to all contracts.


https://en.wikipedia.org/wiki/Design_by_contract



  • Cryptocurrency Tutorial


Cryptocurrency is a digital currency that functions as a medium of exchange, utilizing the process of cryptography enables users to transact securely using these digital coins.
Cryptocurrencies operate on a distributed ledger called a blockchain, where all transactions using a cryptocurrency is made public and permanently recorded.
Units of a cryptocurrency are produced through a process known as mining, where special computer software is used to solve mathematical problems in exchange for a unit or more of that cryptocurrency.
Due to the decentralized technology on which cryptocurrencies operate, the supply of a cryptocurrency is not subject to the control of a central authority; the total supply of a cryptocurrency is normally predetermined, which is made clear to all users.

Blockchain Technology
A blockchain is a public ledger of all cryptocurrency transactions.
Each group of transactions is referred to as a block, with each block then being combined chronologically into a chain.
Information that exists on the blockchain is shared and the public, therefore, every node connected to the network, possesses a copy of the blockchain.
Each node will be able to have access to all transactions that have ever taken place, or will take place on the blockchain.
The distributed nature of blockchain technology also means that the database cannot be controlled by a single entity, nor can it easily be hacked as there is not one single point of failure

Cryptocurrency Mining
Cryptocurrency mining is a process by which new coins are introduced into the existing circulating supply, as well as a process used to secure the network that the coins operate on.
The people who mine a coin, are known as miners.
Therefore, instead of having a central authority that produces and secures the money supply, this is spread out across the network.

The Mining Process
Transactions that occur on the network such as, “Alice sends 10 Bitcoins to Bob”, are collected by a miner and bundled up into a block.
The miner then verifies that all transactions in the block are valid.
If a miner attempts to submit a block with an invalid transaction, the block will be rejected.
An example of an invalid transaction would be, Alice, sending 10 Bitcoins to Bob, even though she does not have 10 Bitcoins to send.
After the miner has successfully verified that all transaction in the block is valid, he must then compute a cryptographic hash.
It is necessary for miners to perform this computation in-order to prevent just anyone from being able to create blocks, this, therefore, secures the network against fraudulent blocks.
Computing a cryptographic hash requires a large amount of computing power, as hundreds of millions of calculations are needed to be performed each second.
This process is known as proof-of-work.
Once the miner successfully solves the hash, the block is then relayed to the network to be checked against the consensus rules.
Once accepted, the block is then added to the blockchain network and the miner is rewarded with a set amount of the cryptocurrency.

Decentralized Applications
Typically associated with the Ethereum project, a decentralized application, or DApp, is an application that runs on a peer-to-peer network of computers, as opposed to a single computer.
The key benefit of this is, users of the network do not depend on a central computer in order to send and receive information.
let us consider some examples of centralized applications such as Facebook, Twitter, and YouTube. These are all examples of centralized applications because, in order to use them, the user is dependent on a network owned and operated by a central entity. This is in contrast with a decentralized application, where the user is not dependent on a central entity to send and receive information.
Even though a DApp does not necessarily require a blockchain from which to operate on top of, most DApps harness the power of blockchain technology using what is known as, smart contracts.
Smart contracts are self-executing contracts designed to enforce the terms of an agreement.
For example, if you want to purchase a house, this process would involve multiple third parties such as estate agents and lawyers, who would settle the purchase for you.
However, with the use of a smart contract, the process need only involve the buyer and the seller.

DApps rely on smart contracts in-order to access the blockchain and operate, much in the same way centralized applications rely on centralized servers to operate.

some common requirements of an application before it can be truly considered decentralized:
    The application must be open-source
    Application’s data must be stored on a decentralized blockchain
    The application must use a cryptographic token e.g. Bitcoin or one inherent to the application
    The application must generate tokens via a cryptographic algorithm, e.g. Proof-of-work

Smart Contracts
A smart contract is a self-executing contract that is designed to enforce the terms of an agreement created between two parties.
A well-known use of smart contracts can be found on the Ethereum blockchain, where they are integrated into decentralized applications (DApps).
The trustless and self-executing nature of smart contracts means that the operation of DApps need not depend on a centralized network.
However, the use of smart contracts does not come without risk. The code included in a smart contract may contain bugs and security holes that are exploitable.
This was the case when, in June of 2016, approximately $50 million worth of ETH was stolen from the Decentralized Autonomous Organization (DAO), due to an exploitable security hole in its smart contract

Initial Coin Offering (ICO)
An initial coin offering (ICO) is a means by which a start-up can raise capital by selling cryptocurrency inherent to their project, in exchange for a more valuable cryptocurrency, such as Bitcoin or Ethereum

The Whitepaper
In the cryptocurrency space, a whitepaper is a document presented by a start-up with the intention of informing and encouraging investors to participate in the start-up’s ICO.
A whitepaper contains more technical and in-depth discussions on the project that the start-up is building. This could include The consensus algorithm the project decides to use, how the nodes that operate on project’s platform would function, and the token system.

Hard Fork & Soft Fork
Hard Fork
A hard fork is a permanent divergence from the previous version of a blockchain; a new set of consensus rules are introduced into the network that is not compatible with the older network.
Under a hard fork, blocks (transactions) that are confirmed by nodes that are not yet upgraded to the latest version of the protocol software will be invalid. Nodes running the older version of the software will have to follow the new set of consensus rules for their blocks to be valid on the forked network
A hard fork can take place to augment the functionality of a blockchain, increase the security of operating on the network, or even to reverse transactions on the blockchain. With the latter scenario occurring for the Ethereum blockchain, where a hard fork was implemented in order to reverse transactions following a hack on the DAO (Decentralized Autonomous Organization).
Soft Fork
A soft fork is a backward compatible method of upgrading a blockchain. Soft forks do not require old nodes to upgrade to maintain consensus, because all blocks on the softforked blockchain follow the old set of consensus rules as well as their new ones. However, blocks produced by nodes conforming to the old set of consensus rules will violate the new set of consensus rules, and as a result, will likely be made stale by the upgrading mining majority. This is because for a soft fork to work, a majority of miners need to recognize and enforce the new set of consensus rules. If this majority is reached, then the older network will fall into disuse, with the newer blockchain gaining recognition as the ‘true’ blockchain

Proof-Of-Work & Proof-Of-Stake
Proof of Work
Proof-of-work (PoW) is a requirement that must be performed by a miner in order to add a block to the blockchain. PoW occurs in the mining process when a miner successfully solves a complex mathematical puzzle on the network. Answers to the problem are known as a hash; the hash that is produced must be valid, in that it must be lower than the target hash. A target hash is simply the hash value that has been determined by the network. A hash that is above the target hash will be invalid, and the puzzle will not be solved. As more of these puzzles are solved, the network will automatically increase its difficulty. What this means is that the target hash value will be lowered, so that the number of valid hash values capable of being produced is also lowered. This correspondingly makes it much more difficult for a miner to generate a valid hash and solve the network’s mathematical puzzle
PoW also serves as a security measure, it deters denial of service (DoS) attacks because the network requires the attacker to commit significant processing power to generate a valid hash value, which can be an extremely expensive process
Proof of Stake
A limitation to the PoW model is that a significant amount of electrical energy is wasted generating random guesses.
Proof-of-stake (PoS) aims to solve this energy problem by requiring miners to put up a stake or lock up a certain amount of their funds to validate a block, instead of having to generate hash values.
PoS miners are limited to mining a percentage of transactions that are reflective of their stake in the cryptocurrency.
For example, a miner who owns 5% of Bitcoin available may only mine 5% of blocks on the network.
Furthermore, there is no block reward in the PoS system, instead, miners are rewarded with transaction fees for the verification of a block.

https://www.mycryptopedia.com/cryptocurrency-tutorial/

  • Cryptocurrency
A cryptocurrency is a medium of exchange designed around securely exchanging information which is a process made possible by certain principles of cryptography.
Fundamentally, cryptocurrencies are specifications regarding the use of currency which seek to incorporate principles of cryptography to implement a distributed, decentralized and secure information economy.

Hundreds of cryptocurrency specifications now exist; most are similar to and derived from the first fully implemented cryptocurrency protocol, Bitcoin

cryptocurrency vs fiat money
When comparing cryptocurrencies to fiat money, the most notable difference is in how no group or individual may accelerate, stunt or in any other way significantly abuse the production of money
Instead, only a certain amount of cryptocurrency is produced by the entire cryptocurrency system collectively, at a rate which is bounded by a value both prior defined and publicly known

 In centralized economic systems such as the Federal Reserve System governments regulate the value of currency by simply printing units of fiat money or demanding additions to digital banking ledgers

 However, governments cannot produce units of cryptocurrency and as such, governments cannot provide backing for firms, banks or corporate entities which hold asset value measured in a decentralized cryptocurrency

 The underlying technical system upon which all cryptocurrencies are now based was created by the anonymous group or individual known as Satoshi Nakamoto for the purpose of creating an economy within which the practice of fractional reserve banking would be fundamentally impossible

 Within cryptocurrency systems the safety, integrity and balance of all ledgers is maintained by a swarm of mutually distrustful parties referred to as miners who are usually members of the public handling cryptocurrency transactions for a small fee

 Miners use resource-intensive computer software to help secure a particular cryptocurrencys network by increasing that networks ability to solve mathematic equations which the network directly uses to impede fraudulence.

 Subverting the underlying security of a cryptocurrency is mathematically possible, but the cost may be unfeasibly high
 Against Bitcoin's proof-of-work based system, an attacker would need computational power greater than that controlled by the entire swarm of miners in order to even have 1 / (2^(# authentication rounds for this cryptocurrency) - 1) of a chance

 Most cryptocurrencies are designed to gradually introduce new units of currency, placing an ultimate cap on the total amount of currency that will ever be in circulation. This is done both to mimic the scarcity (and value) of precious metals and to avoid hyperinflation.

 As a result, such cryptocurrencies tend to experience hyperdeflation as they grow in popularity and the amount of the currency in circulation approaches this finite cap.

 Compared with ordinary currencies held by financial institutions or kept as cash on hand, cryptocurrencies are less susceptible to seizure by law enforcement


 The first cryptocurrency, Bitcoin, was created in 2009 by pseudonymous developer Satoshi Nakamoto. It used SHA-256, a cryptographic hash function, as its proof-of-work scheme.
 Litecoin was released. It was the first cryptocurrency to use scrypt as its hash function instead of SHA-256
 Peercoin was the first to use a proof-of-work/proof-of-stake hybrid

http://en.wikipedia.org/wiki/Cryptocurrency

  • Cryptocurrency Storage

Hardware Wallets
These are special devices designed to hold a user’s private keys.
the cryptographic keys are stored in a special section of the device’s microcontroller
They feature a double-tiered protection system that comprises a PIN number and a password (seed).
The only drawback to these devices is that if you either lose it or forget both the PIN number and seed, there is no way to recover the funds held in the wallet.

Desktop Wallets
A desktop wallet is a software program
This implies that you can only access it from the computer on which it is installed. In most cases, a desktop wallet will only work with one cryptocurrency
However, they usually require a full install of the digital currency’s blockchain in order to function. The immobility of desktops and laptops also limit their functionality. And in case of a malware attack on the hard drive, your stored coins might be lost forever.

Paper Wallets
A paper wallet is one of the most secure storage options and is also referred to as cold storage.
It entails printing your private and public keys on paper for offline storage. These keys are then used for future access of your wallet using a specified software.
A paper wallet is impossible to attack using any digital tools because it is a physical storage option.
It is one of the best options for long-term storage and makes it easy to transfer cryptocurrency assets physically by simply handing over the paper.

Mobile Wallets
These are comparable to desktop wallets in that they require users to download and install an app only this time, it’s on a mobile device.

Online Wallets
An online wallet is one that is accessed by means of a web browser. It runs on the cloud which means that you can access it using any device in the world for as long as it has computing capabilities.
https://bitbounce.com/blog/types-cryptocurrency-storage-explained/


  • An initial coin offering (ICO) or initial currency offering is a type of funding using cryptocurrencies. 

In an ICO, a quantity of cryptocurrency is sold in the form of "tokens" ("coins") to speculators or investors, in exchange for legal tender or other cryptocurrencies such as Bitcoin or Ethereum
The tokens sold are promoted as future functional units of currency if or when the ICO's funding goal is met and the project launches.
In some cases like Ethereum the tokens are required to use the system for its purposes
An ICO can be a source of capital for startup companies
ICOs can allow startups to avoid regulatory compliance and intermediaries such as venture capitalists, banks and stock exchanges.
https://en.wikipedia.org/wiki/Initial_coin_offering



  • What is An Initial Coin Offering

The idea to presale coins of a cryptocurrency or token of a blockchain project has evolved in a crazy successful instrument to raise funds for the development of a new application
With the success of Ethereum ICO are more and more used to fund the development of a crypto project by releasing token which is somehow integrated into the project.

Maybe the first cryptocurrency distributed by an ICO was Ripple. In early 2013 Ripple Labs started to develop the Ripple called payment system and created around 100 billion XRP token. The company sold these token to fund the development of the Ripple platform.
https://blockgeeks.com/guides/initial-coin-offering/

  • Proof-of-stake
Proof-of-stake is a method of securing a cryptocurrency network through requesting users to show ownership of a certain amount of currency.
It is different from proof-of-work systems that run hashing algorithms to validate electronic transactions.
It is most commonly used as a supplement to proof-of-work in Peercoin

Peercoin's proof-of-stake system is based around the concept of "coin age," a measure of the product of the currency amount held times the amount of time it has been held for.

When generating a proof-of-stake block, the user sends some money to themselves, consuming their coin age in exchange for a preset reward.
This minting transaction becomes more likely to succeed over time until a valid block is found, generating a new block on the blockchain and a payout for the proving user.
This process secures the network and gradually produces new coins over time without consuming significant computational power
http://en.wikipedia.org/wiki/Proof-of-stake
  • BGX has made a mark in the market of decentralization. They are a multifunctional organization providing a processing platform in the mobile gaming field

They stand out because they are backing games and software with artificial intelligence
BGX developed a blockchain algorithm which enables them to process almost up to 100,000 transactions/second.
These transactions although high in volume, are operated at a small cost, while at the same time maintaining at the same time unparallel security.
BGX’S algorithm works ideally for building a platform for financial processing.

Weak points:
   There is a loophole where they have no clue what to do when users use separate tokens to buy games and benefit from it
https://icoshock.com/bgx-ico-review-ai-powdered-mobile-gaming-platform/


  • a smart contract, or simply contract, as a piece of code created by a blockchain user and executed by a blockchain node. A smart contract language (SCL) is a programming language that is either used to write a smart contract directly or is compiled to it.

https://github.com/s-tikhomirov/smart-contract-languages



  • Eth-Tweet

Eth-Tweet is a decentralized blogging platform that provides functionality similar to Twitter. However, because Eth-Tweet operates on top of the decentralized Ethereum blockchain, no centralized entity can control what a user decides to publish.
decentralization means there is no company or central authority in control of what is being published
The system is censorship resistant in the sense that once a message is published, it can only be removed by the publisher.
All accounts can receive donations in Ethereum's Ether cryptocurrency. Being able to receive donations can be an incentive to run a decentralized microblogging feed.
If you want to edit the source files, you can use Ethereum's Mix IDE which can be found here.
https://github.com/yep/eth-tweet





  • Top 5 Blockchain Programming Languages –

There are several programming languages that can help you create applications for blockchain
    C++
    Java
    Python
    Simplicity
    Solidity

C++
This blockchain programming language allows for effective management of resources and offers greater control over memory. Blockchain requires many users and miners to interact and operate both systematically and simultaneously.
C++ creates applications that can not only coordinate between numerous endpoints but also process their interactions quickly. It’s why blockchain projects like Bitcoin, Ethereum, and Ripple were all written in C++.

Java
It is also now useful in making simple and immutable blockchains. Immutability makes it impossible for anyone to change the contents in a block after it has been verified or “hashed”.
Every new block, which is added to a blockchain includes the hash of the previous block along with a new hash for the new block. Once hashed, any change in its content will produce a new “previousHash”, which will deter the new block from being added to the chain till its contents match with the contents of the previous block, thereby maintaining immutability.

Python
His goal was to create a simple and minimalistic programming language. The syntax and logic of this blockchain programming language uses reflects this very ambition of the creator

Simplicity
Simplicity is a blockchain programming language that was designed for smart contracts.
Solidity is an attempt to improve basic cryptocurrency languages like Bitcoin Script and Ethereum Virtual Machine (EVM). It uses static analysis – a technique that enables a universal algorithm to determine the cost of running any Simplicity program – to prevent programs from “running out of gas” during analysis.

Solidity
This blockchain programming language is high-level and contract-based. Its script is similar to scripts of some of the languages listed above like Java, and it borrows concepts like variables, functions, and classes from them.

Conclusion
The blockchain is revolutionizing the way data and assets are traded.
A Blockchain Developer must know one of the modern programming languages like Java or C++. These languages don’t just help create applications for blockchain, but also help learn contract-based or blockchain-based languages like Simplicity or Solidity.
https://acadgild.com/blog/best-blockchain-programming-languages


  • What Are the Top Five Blockchain Programming Languages? 

Taking into consideration the name "blockchain," it can be defined as the block that contains digital information and does not allow the hackers to extract this information in any way possible.
The blockchain pattern was designed to keep Bitcoins data safe in every aspect of the word

C++
It basically packs the data in the form of objects and sends it across to the user only to be opened at their end. Since the principle use of blockchain is in a similar format, it is one of the most coveted languages for working this out in the blockchain

Java
Creating the relationship between the data and sending it across to the user is quite simple with the use of Java language.it can run on almost any format of computers with a small installation of JRE or the Java runtime environment.

Python
you can perform many tasks with a single command in this language. It makes the work of building the block with the relevant information and linking them together with a much easier one to accomplish.

Ruby
enables you to use a heady mix of languages to create the required blockchain

Solidity
Solidity is a contract-based language that is primarily used to enhance the use of EVM machines.
One of the reasons why programmers prefer using this language to build the blockchain is the fact that it can catch hold of any iteration at the time of coding
It saves you a lot of time while creating the message to send across to another user.


https://dzone.com/articles/what-are-the-top-5-blockchain-programming-language


  • Solidity Tutorials

Solidity is a high-level language whose syntax is similar to that of JavaScript and it is designed to compile to code for the Ethereum Virtual Machine.
You can start using Solidity in your browser, with no need to download or compile anything. This application only supports compilation - if you want to run the code or inject it into the blockchain, you have to use a client like AlethZero.

https://ethereumbuilders.gitbooks.io/guide/content/en/solidity_tutorials.html



  • Solidity is a statically typed, contract-oriented, high-level language for implementing smart contracts on the Ethereum platform.

To get started with Solidity, you can use Remix, which is a browser-based IDE. Here are some example contracts:
Solidity is a statically-typed curly-braces programming language designed for developing smart contracts that run on the Ethereum Virtual Machine. Smart contracts are programs that are executed inside a peer-to-peer network where nobody has special authority over the execution and thus they allow to implement tokens of value, ownership, voting and other kinds of logic.
When deploying contracts, you should use the latest released version of Solidity. This is because breaking changes, as well as new features and bug fixes, are introduced regularly
https://github.com/ethereum/solidity



  • Solidity is a statically typed, contract-oriented, high-level language for implementing smart contracts on the Ethereum platform.

Solidity is an object-oriented, high-level language for implementing smart contracts. Smart contracts are programs which govern the behavior of accounts within the Ethereum state.
Solidity was influenced by C++, Python, and JavaScript and is designed to target the Ethereum Virtual Machine (EVM).
Solidity is statically typed, supports inheritance, libraries and complex user-defined types among other features.
https://solidity.readthedocs.io/en/v0.5.3/


  • Solidity lets you program on Ethereum, a blockchain-based virtual machine that allows the creation and execution of smart contracts, without requiring centralized or trusted parties.

Solidity is a statically typed, contract programming language that has similarities to Javascript and C. Like objects in OOP, each contract contains state variables, functions, and common data types. Contract-specific features include modifier (guard) clauses, event notifiers for listeners, and custom global variables

Some Ethereum contract examples include crowdfunding, voting, and blind auctions.

https://learnxinyminutes.com/docs/solidity/


  • Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third-party interference

These apps run on a custom built blockchain, an enormously powerful shared global infrastructure that can move value around and represent the ownership of property.

Smart money, smart wallet
The Ethereum Wallet is a gateway to decentralized applications on the Ethereum blockchain. It allows you to hold and secure ether and other crypto-assets built on Ethereum, as well as write, deploy and use smart contracts.

Build a new kind of decentralized application
Could your business be enhanced by operating on a cryptographically secure, decentralized, tamper-proof network?

https://ethereum.org/
  • Using Blockchain Technology for Secure Data Encryption

Similar to Bitcoin, Enigma removes the need for a trusted third party, enabling autonomous control of personal data. For the first time, users are able to share their data with cryptographic guarantees regarding their privacy.
http://www.newsbtc.com/2015/07/23/using-blockchain-technology-for-secure-data-encryption/

The blockchain is a way of storing all kinds of valuable data (like money and medical records) in the form of encrypted blocks, which are shared between thousands of random computers connected into a peer-to-peer network. Once recorded, the data in a block cannot be modified without altering the whole blockchain at once. With no centralized storage, corrupting Blockchain becomes literally impossible, since the only way to override the network is to get physical access to every computer in it.

https://expertise.jetruby.com/blockchain-technology-explained-1a07da48c187


Byzantine Fault Tolerance(BFT) algorithms
Understanding Blockchain Fundamentals, Part 1: Byzantine Fault Tolerance
Whenever a new transaction gets broadcasted to the network, nodes have the option to include that transaction to their copy of their ledger or to ignore it
When the majority of the actors which comprise the network decide on a single state, consensus is achieved.

A fundamental problem in distributed computing and multi-agent systems is to achieve overall system reliability in the presence of a number of faulty processes. This often requires processes to agree on some data value that is needed during computation

In order to create a secure consensus protocol, it must be fault tolerant.
the unsolvable Two Generals Problem.
the Byzantine Generals’ Problem
Byzantine Fault Tolerance

The Two generals Problem
describes a scenario where two generals are attacking a common enemy7
General 1 is considered the leader and the other is considered the follower.
Each general’s army on its own is not enough to defeat the enemy army successfully, thus they need to cooperate and attack at the same time
The Two Generals Problem has been proven to be unsolvable.

The Byzantine Generals Problem
a generalized version of the Two Generals Problem
describes the same scenario, where instead more than two generals need to agree on a time to attack their common enemy.
The leader-follower paradigm described in the Two Generals Problem is transformed to a commander-lieutenant setup.
In order to achieve consensus here, the commander and every lieutenant must agree on the same decision
if the commander is a traitor, consensus must still be achieved. As a result, all lieutenants take the majority vote.
The algorithm to reach consensus in this case is based on the value of majority of the decisions a lieutenant observes.

Theorem: For any m, Algorithm OM(m) reaches consensus if there are more than 3m generals and at most m traitors.
This implies that the algorithm can reach consensus as long as 2/3 of the actors are honest.
If the traitors are more than 1/3, consensus is not reached, the armies do not coordinate their attack and the enemy wins.

The important thing to remember is that the goal is for the majority of the lieutenants to choose the same decision, not a specific one.

Byzantine Fault Tolerance
Byzantine Fault Tolerance is the characteristic which defines a system that tolerates the class of failures that belong to the Byzantine Generals’ Problem.
The algorithm mentioned in the previous section is Byzantine Fault Tolerant as long as the number of traitors do not exceed one third of the generals.

How does this all relate to blockchain?
Blockchains are decentralized ledgers which, by definition, are not controlled by a central authority.
Due to the value stored in these ledgers, bad actors have huge economic incentives to try and cause faults.
Byzantine Fault Tolerance, and thus a solution to the Byzantine Generals’ Problem for blockchains is much needed.
In the absence of BFT, a peer is able to transmit and post false transactions effectively nullifying the blockchain’s reliability
To make things worse, there is no central authority to take over and repair the damage.

The big breakthrough when Bitcoin was invented, was the use of Proof-of-Work as a probabilistic solution to the Byzantine Generals Problem


https://medium.com/loom-network/understanding-blockchain-fundamentals-part-1-byzantine-fault-tolerance-245f46fe8419


  • Ethereum/Quorum

Quorum is an Ethereum-based distributed ledger protocol with transaction/contract privacy and new consensus mechanisms.
https://github.com/jpmorganchase/quorum


  • What is Quorum Blockchain?

The functioning of Quorum is similar to Ethereum but with a few differences. Here is how Quorum is different from Ethereum blockchain :

Network and peer permissions management
Enhanced transaction and contract privacy
Voting-based consensus mechanisms
Better performance
https://www.blockchain-council.org/blockchain/what-is-quorum-how-is-it-different-from-other-blockchain/


  • Hyperledger is an open source collaborative effort created to advance cross-industry blockchain technologies. It is a global collaboration, hosted by The Linux Foundation, including leaders in finance, banking, IoT, supply chain, manufacturing and technology.

https://www.hyperledger.org/


  • Interledger is an open protocol suite for sending payments across different ledgers. Like routers on the Internet, connectors route packets of money across independent payment networks. The open architecture and minimal protocol enable interoperability for any value transfer system. Interledger is not tied to any one company, blockchain, or currency. 

https://interledger.org/

Botnet


  • Botnet

A botnet is a number of Internet-connected computers communicating with other similar machines in which components located on networked computers communicate and coordinate their actions by command and control (C&C) or by passing messages to one another (C&C might be built into the botnet as P2P)
https://en.wikipedia.org/wiki/Botnet

  • The word Botnet is formed from the words ‘robot’ and ‘network’. Cybercriminals use special Trojan viruses to breach the security of several users’ computers, take control of each computer and organise all of the infected machines into a network of ‘bots’ that the criminal can remotely manage.
https://usa.kaspersky.com/resource-center/threats/botnet-attacks

  • Bot Mitigation

Good Bots
These are bots such as Google’s search bots or Pingdom which are operated by well-known and commonly-used services.
Bad Bots
These include comment spammers, SQL Injection worms, vulnerability scanners and other known malicious bots.
Suspected Bots
There are a huge number of bots on the web being used for various purposes. Unwanted bots generate redundant load on the webserver, pose the risk of scraping and content theft while not adding any value to the website itself.

https://www.incapsula.com/website-security/access-control.html
  • Browser-based Botnet: Attack Methodology
The attack was executed by an unidentified botnet, which employed browser-based bots that were able to retain cookies and execute JavaScript. Early in the attack they were identified as PhantomJS headless-browsers.
PhantomJS is a development tool that uses a bare-bone (or “headless”) browser, providing its users with full browsing capabilities but no user interface, no buttons, no address bar, etc. PhantomJS’s can be used for automation and load monitoring.besides using human-like bots, the attackers also made an effort to mimic human behavior, presumably to avoid behavior-based security rules. To that end, the attackers leveraged the number of available IP addressed to split the load in a way that would not trigger rate-limiting.At the same time, by constantly introducing new IPs, the attackers made sure that IP restriction would be just as ineffective. The bots were also programmed for human-like browsing patterns; accessing the sites from different landing pages and moving through them at a random pace and varied patterns, before converging on the target resource.
However, by using a known headless-browser webkit, the attackers left themselves open to detection by our Client Classification mechanism, which – interestingly enough – uses the same technology as our free plan ‘Bot Filtering’ feature. in this case, the attackers’ weapon of choice – the PhantomJS webkit – is one of those signatures.
while the attacker were ducking and diving to make their bots look like humans, all our team really had to do was to let our system discover the type of headless-browsers they were using. From there it was a simple task of blocking all PhantomJS instances. We even left a redemption option, offering the visitors to fill a CAPTCHA, just in case any of them were real human visitors.
https://www.incapsula.com/blog/headless-browser-ddos.html
  • 5 Bot Mitigation Techniques to Try on Your E-commerce Site

Install bot detection and protection software.
Keep a bot database.
Add CAPTCHAs and honeypots to all forms.
Do a regular sweep for duplicate content.
Watch your PPC campaigns and competitors carefully.
https://resources.distilnetworks.com/all-blog-posts/5-bot-mitigation-techniques-to-try-on-your-ecommerce-site

Saturday, June 11, 2016

Citrix XenDestop implementations architectures

1
2
3
4
5
6

VMware implementations architectures

1

2
3
4
5
6

VDI vs. DaaS


  • VDI vs. DaaS: How are cloud-hosted desktops different?

Known as Desktop as a Service (DaaS), this approach allows IT to outsource virtual desktops to a cloud service provider. You probably assume that DaaS and virtual desktop infrastructure (VDI) are very different, but they actually share most of the same benefits: simpler desktop management, less hardware and increased flexibility and mobility. Desktop as a Service has its own challenges, though, including security, licensing and data control.
http://searchvirtualdesktop.techtarget.com/feature/VDI-vs-DaaS-How-are-cloud-hosted-desktops-different

Friday, April 8, 2016

tinurl


  • When we asked Far where short links go when they die, he pointed to 301works.org . 301works is an Internet Archives initiative created to preserve short URL links in the event of a shutdown. If a short URL company faces closure 301works takes control of shortening domain services and ensures that links remain intact. While the technical side of the program has not been completely laid out, a number of companies have agreed to show the 301works seal including Bit.ly, Cligs, Twurl, Awe.sm and AppsFire. To apply check out 301works.org here. 


http://readwrite.com/2009/12/01/where-do-short-urls-die


  • Short URLs die a for a variety of reasons.


    URL is expired by the shortener service: This may be intentional, and desired by the short link creator. Sometimes, the creator wants the links to expire after a certain time. At other times it might be a consequence of the URL shortener's policy: they may expire links for non-paying customers, etc.
    Shortner service shuts down for economic reasons: Some times the entity operating the URL shortener shuts down or goes of of business. Many people believe that using the URL shortener of a large company like Google's goo.gl shortener will avoid this problem. But as the shutdown of Google Reader showed, even a much loved, popular service, from a big company, is not immune to shutdown, especially if the economics don't work out. And investments by venture capitalists to the contrary, the economics of URL shortening are quite fickle.
    Top-level domain(TLD) issues: At other times the URL shortener's domain registrar withdraws their registration or some other force majure event occurs with the TLD. Many URL shorteners have exotic top-level domains, like bit.ly (.ly is the top level domain for Libya.) is.gd (.gd is the top level domain for Grenada.) This keeps the URL base short. Unfortunately, unlike well known top-level domains like .com, .org, or .edu, less well known TLDs, and country specific TLDs suffer from regulatory instability. In bit.ly's case there was a concern that the Libyan government at the time, which contolled the .ly domaian, would revoke the company's domain registration. With is.gd, there is an ongoing dispute over the registrar for the domain (as of the time of this article's writing.)
http://vepa.in/technology/the-trouble-with-url-shorteners


  • With services like Domainr and IWantMyName, you can easily get a custom domain to use with link shorteners. Here at CoSchedule we bought cos.sc as our custom domain, and integrated it with Bit.ly. When we shorten a link, it appears like so:

http://coschedule.com/blog/link-shorteners/

FictionBook


  • FictionBook is an open XML-based e-book format which originated and gained popularity in Russia. FictionBook files have the .fb2 filename extension.The FictionBook format does not specify the appearance of a document; instead, it describes its structure. For example, there are special tags for epigraphs, verses and quotations. All ebook metadata, such as author name, title, and publisher, is also present in the ebook file. This makes the format convenient for automatic processing, indexing, and ebook collection management, and allows automatic conversion into other formats.

https://en.wikipedia.org/wiki/FictionBook

Windows To Go


  • What is Windows To Go?


Windows To Go is a portable Windows installation on USB media (thumb drives, disc drives). Microsoft has introduced this feature in Windows 8 Enterprise for business users (admins, maintenance people or mobile users). Windows To Go enables users to carry their own Windows environment and boot it on several computers.
Due to license issues Windows To Go is officially restricted on Enterprise version of Windows 8, 8.1 and Windows 10.
http://borncity.com/win/2015/02/09/create-windows-to-go-from-any-windows-88-110-with-rufus/


  • Running Windows 8 from an External USB drive with Windows To Go 

https://www.youtube.com/watch?v=1WAAZ76cSEw


  • How to create Windows to Go flash drive | Win 8, 8.1 

https://www.youtube.com/watch?v=gYQ6De6hfzQ

s3 browser


  • s3 browser

S3 Browser is a freeware Windows client for Amazon S3 and Amazon CloudFront. Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. Amazon CloudFront is a content delivery network (CDN). It can be used to deliver your files using a global network of edge locations.
http://s3browser.com

BCD to gray code conversion


  • BCD to gray code conversion

Binary coded decimal (BCD) requires a minimum of 4 bits to represent all possible digits from 0 to 9. There are ten possible configurations for a BCD with the following corresponding Gray codes, which also require a minimum of 4 bits:
https://www.answers.com/Q/How_do_you_convert_bcd_into_Gray_code

Plop Boot Manager


  • How To Boot From Live USB in VMware Player/VirtualBox - Ubuntu/Linux Mint

a way for making VirtualBox or VMware Player boot from live USB devices since this feature hasn't been implemented yet natively in both software. The trick we will use will rely on the Plop boot manager which allows via a live iso to boot from USB devices.
http://www.upubuntu.com/2012/11/how-to-boot-from-live-usb-in-vmware.html



  • Plop Boot Manager 5.0 - Download

https://www.plop.at/en/bootmanager/download.html

Remote Desktop Connection Manager

Microsoft itself also offers a manager tool called Remote Desktop Connection Manager 2.7 (RDCMan) that helps you manage multiple remote desktop connections. It’s similar to Windows Servers’ built-in MMC Remote Desktop Snap-in but more flexible.
https://www.microsoft.com/en-us/download/details.aspx?id=44989

Sunday, March 20, 2016

Data Distribution Service(DDS)


  • The Data Distribution Service for Real-Time Systems (DDS) is an Object Management Group (OMG) machine-to-machine middleware "m2m" standard that aims to enable scalable, real-time, dependable, high-performance and interoperable data exchanges between publishers and subscribers. DDS addresses the needs of applications like financial trading, air-traffic control, smart grid management, and other big data applications.

https://en.wikipedia.org/wiki/Data_Distribution_Service


  • OpenDDS is an open source C++ implementation of the Object Management Group (OMG) Data Distribution Service (DDS). Java applications can use OpenDDS through JNI bindings. OpenDDS is supported by OCI and the source code is hosted on GitHub.

http://opendds.org/

JVM (Java Virtual Machine) vs CLR (Common Language Runtime)

We present empirical evidence to demonstrate that there is
little or no difference between the Java Virtual Machine and
the .NET Common Language Runtime, as regards the compilation
and execution of object-oriented programs

The JVM . . .
• is stack-based
• is secure—type safety is guaranteed by preventing explicit
pointer manipulation
• has automatic memory management (garbage collection)
• is object-oriented, with primitive instructions for creating
objects, accessing object members

https://www.cs.utah.edu/~asbill/jsinger.pdf



  • Application virtualization software refers to both application virtual machines and software responsible for implementing them. Application virtual machines are typically used to allow application bytecode to run portably on many different computer architectures and operating systems. The application is usually run on the computer using an interpreter or just-in-time compilation (JIT).

https://en.wikipedia.org/wiki/Comparison_of_application_virtualization_software

Open Data Protocol (OData)


  • OData, short for Open Data Protocol, defines a protocol for the querying and updating of data utilizing existing Web protocols. OData is a REST-based protocol for querying and updating data and is built on standardized technologies such as HTTP, Atom/XML, and JSON. It is different from other REST-based web services in that it provides a uniform way to describe both the data and the data model.

It is considered to be a flexible technology for enabling interoperability between disparate data sources, applications, services and clients
http://www.webopedia.com/TERM/O/odata-open-data-protocol.html




  • OData - the best way to REST

An open protocol to allow the creation and consumption of queryable and interoperable RESTful APIs in a simple and standard way.
http://www.odata.org


  • In computing, Open Data Protocol (OData) is an open protocol which allows the creation and consumption of queryable and interoperable RESTful APIs in a simple and standard way.

https://en.wikipedia.org/wiki/Open_Data_Protocol


  • The purpose of the Open Data protocol (hereafter referred to as OData) is to provide a REST-based protocol for CRUD-style operations (Create, Read, Update and Delete) against resources exposed as data services. A “data service” is an endpoint where there is data exposed from one or more “collections” each with zero or more “entries”, which consist of typed named-value pairs. OData is published by Microsoft under OASIS (Organization for the Advancement of Structured Information Standards) Standards so that anyone that wants to can build servers, clients or tools without royalties or restrictions.

https://msdn.microsoft.com/en-us/library/ff478141.aspx

Systems-on-a-Chip (SoCs)


  • server specialization and flexibility of the network is on the increase – and this means different workloads can be directed to the most appropriate hardware. Some applications require more compute, while others need more memory bandwidth or storage I/O. Some would benefit from Digital Signal Processing (DSP) functionality, while others would prefer a Field-Programmable Gate Array (FPGA)

The future of data center compute is in Systems-on-a-Chip (SoCs) customized for different workloads

Examples of existing ARM chips bound for the data center include the X-Gene SoC from Applied Micro, AMD’s Opteron A1100 (codenamed ‘Seattle’), and Cavium’s ThunderX.

http://www.datacenterdynamics.com/colo-cloud-/dcd-converged-arm-is-finally-arriving-to-the-data-center/92006.fullarticle


  • SoC vs. CPU 

What is a CPU?
it is ultimately a very fast calculator. It fetches data from memory, and then performs some kind of arithmetic (add, multiply) or logical (and, or, not) operation on that data.

What is an SoC?
An SoC, or system-on-a-chip to give its full name, integrates almost all of these components into a single silicon chip. Along with a CPU, an SoC usually contains a GPU (a graphics processor), memory, USB controller, power management circuits, and wireless radios (WiFi, 3G, 4G LTE, and so on). Whereas a CPU cannot function without dozens of other chips, it’s possible to build complete computers with just a single SoC.

The difference between an SoC and CPU
The number one advantage of an SoC is its size: An SoC is only a little bit larger than a CPU, and yet it contains a lot more functionality
Due to its very high level of integration and much shorter wiring, an SoC also uses considerably less power
Cutting down on the number of physical chips means that it’s much cheaper to build a computer using an SoC
The only real disadvantage of an SoC is a complete lack of flexibility. With your PC, you can put in a new CPU, GPU, or RAM at any time — you cannot do the same for your smartphone
http://www.extremetech.com/computing/126235-soc-vs-cpu-the-battle-for-the-future-of-computing



  • In hardware design, there are two approaches to solving the vast computing needs of a site like Facebook. There's the approach of “scale up” — building ever-increasing amounts of computing power in a given system. Or you can “scale out,” building an ever-increasing fleet of simple systems, each with a moderate amount of computing power.

As we continued to evolve our infrastructure, we realized 2S was the wrong tool for some of our needs. To provide our infrastructure with capacity that scales out with the demand, we designed a modular chassis that contains high-powered system-on-a-chip (SoC) processor cards, code-named “Yosemite.
https://code.facebook.com/posts/1616052405274961/introducing-yosemite-the-first-open-source-modular-chassis-for-high-powered-microservers-/



  • FPGAs provide a unique combination of highly parallel custom computation, relatively low manufacturing/engineering costs, and low power requirements.


FPGAs can be applied to assist a wide variety of enterprise applications.
    Offloading Communication Protocol Processing
    Encryption
    Spam Filtering
    Quantifying Speedup and Characterizing FPGA-Appropriate Applications
   
    Offloading Communication Protocol Processing
    Any time that information is transferred from one processor to another, some communication is necessary. If this communication does not go through shared memory, it requires the serialization and deserialization of various data structures and objects.  This translation overhead may be significant when considering the performance of large distributed or networked systems. In this case study, we look at how we can offload object marshaling for Remote Procedure Calls (RPCs) to an FPGA.
   
    Encryption
    As networked systems and services gain popularity, the security and computational overhead of encrypted communication becomes more important. Reconfigurable computing platforms seem to be ideal for accelerating encryption due to their adaptability and highly parallel execution model
   
    Spam Filtering
    Regular expressions are used by many e-mail systems to filter for spam. These systems may match against tens to hundreds of thousands of regular expressions. While this highly parallel problem can be mapped to FPGAs quite effectively, the conventional FPGA design methodology and execution model presents several practical problems for developers trying to create
   
   research.microsoft.com/en-us/projects/fpga_apps/



  • A set of FPGAs built onto a datacenter server rack could function as a GPU to boost the performance of one workload and get a software update that turns half into CPUs and the other half into image- or video-processing specialists – without requiring users to buy new hardware or even switch servers in between workloads.

In one example of FPGA-boosted datacenters, Microsoft was able to boost the throughput of servers running its Bing search engine by 95 percent at a cost of an additional 10 percent per server and 30 percent overall, according to a Microsoft report published in June 2014.
https://goparallel.sourceforge.net/intel-creates-xeon-fpga-powerhouse-with-16-7b-altera-buy



  • A field-programmable gate array (FPGA) is an integrated circuit designed to be configured by a customer or a designer after manufacturing – hence "field-programmable". 

https://en.wikipedia.org/wiki/Field-programmable_gate_array

RISC vs CISC

The CISC Approach
the entire task of multiplying two numbers can be completed with one instruction:
MULT is what is known as a "complex instruction." It operates directly on the computer's memory banks and does not require the programmer to explicitly call any loading or storing functions. It closely resembles a command in a higher level language. For instance, if we let "a" represent the value of 2:3 and "b" represent the value of 5:2, then this command is identical to the C statement "a = a * b."

One of the primary advantages of this system is that the compiler has to do very little work to translate a high-level language statement into assembly. Because the length of the code is relatively short, very little RAM is required to store instructions. The emphasis is put on building complex instructions directly into the hardware.


The RISC Approach
RISC processors only use simple instructions that can be executed within one clock cycle. Thus, the "MULT" command described above could be divided into three separate commands: "LOAD," which moves data from the memory bank to a register, "PROD," which finds the product of two operands located within the registers, and "STORE," which moves data from a register to the memory banks. In order to perform the exact series of steps described in the CISC approach, a programmer would need to code four lines of assembly:

there are more lines of code, more RAM is needed to store the assembly level instructions. The compiler must also perform more work to convert a high-level language statement into code of this form

https://cs.stanford.edu/people/eroberts/courses/soco/projects/risc/risccisc/

Advanced RISC Machines (ARM)


  • An ARM processor is one of a family of CPUs based on the RISC (reduced instruction set computer) architecture developed by Advanced RISC Machines (ARM).

http://whatis.techtarget.com/definition/ARM-processor

  • ARM architecture
ARM is a family of instruction set architectures for computer processors developed by British company ARM Holdings, based on a reduced instruction set computing (RISC) architecture.
http://en.wikipedia.org/wiki/ARM_architecture

  • An ARM processor is one of a family of CPUs based on the RISC (reduced instruction set computer) architecture developed by Advanced RISC Machines (ARM).
ARM makes 32-bit and 64-bit RISC multi-core processors. RISC processors are designed to perform a smaller number of types of computer instructions so that they can operate at a higher speed, performing more millions of instructions per second (MIPS).
http://whatis.techtarget.com/definition/ARM-processor

OpenCL(Open Computing Language)


  • OpenCL(Open Computing Language) is the open, royalty-free standard for cross-platform, parallel programming of diverse processors found in personal computers, servers, mobile devices and embedded platforms.

https://www.khronos.org/opencl/


  • Open Computing Language (OpenCL) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-programmable gate arrays (FPGAs) and other processors or hardware accelerators.

https://en.wikipedia.org/wiki/OpenCL

Tuesday, January 5, 2016

auto login

  • HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Determines whether the automatic logon feature is enabled. Automatic logon uses the domain, user name, and password stored in the registry to log users on to the computer when the system starts. The Log On to Windows dialog box is not displayed.
https://technet.microsoft.com/en-us/library/cc939702.aspx

  • Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="Administrator"
"DefaultPassword"="Password"
"AutoAdminLogon"="1"
"ForceAutoLogon"="1"
https://stackoverflow.com/questions/21379759/how-to-automatically-logon-to-windows-7-using-a-password

  • Autologon for Windows v3.01
https://technet.microsoft.com/en-us/sysinternals/bb963905.aspx

linux certification

  • The Linux Essentials Professional Development Certificate validates a demonstrated understanding of:

    FOSS, the various communities, and licenses
    knowledge of open source applications in the workplace as they relate to closed source equivalents
    basic concepts of hardware, processes, programs and the components of the Linux Operating System
    how to work on the command line and with files
    how to create and restore compressed backups and archives
    system security, users/groups and file permissions for public and private directories
    how to create and run simple scripts
https://www.lpi.org/certification/linux-essentials/

  • LPIC-1: Linux Server Professional Certification

    Work at the Linux command line
    Perform easy maintenance tasks: help users, add users to a larger system, backup and restore, shutdown and reboot
    Install and configure a workstation (including X) and connect it to a LAN, or a standalone PC to the Internet
https://www.lpi.org/certification/get-certified-lpi/lpic-1-linux-server-professional/



  •     Administer a small to medium-sized site
    Plan, implement, maintain, keep consistent, secure, and troubleshoot a small mixed (MS, Linux) network, including a:
        LAN server (Samba, NFS, DNS, DHCP, client management)
        Internet Gateway (firewall, VPN, SSH, web cache/proxy, mail)
        Internet Server (web server and reverse proxy, FTP server)
    Supervise assistants
    Advise management on automation and purchases

https://www.lpi.org/certification/get-certified-lpi/lpic-2-linux-network-professional/
   
   
  •     300: Mixed Environment
    303: Security
    304: Virtualization and High Availability
https://www.lpi.org/certification/get-certified-lpi/lpic-3-linux-enterprise-professional/

The cross-functional team

  • The cross-functional team is a group of people who collectively represent the entire organization’s interests in a specific product or product family. This team provides benefits for the individuals on the team, the product and its customers, and the organization at large.
http://pragmaticmarketing.com/resources/enabling-cross-functional-teams-a-leadership-role-for-product-managers

Search domain

Search domain means the domain that will be automatically appended when you only use the hostname for a particular host or computer. This is basically used in a local network.
Lets say you have a domain name like xyz.com (it may be available globally or may be local only) and you have 100 computers in the LAN.
Now you want this domain name to be automatically appended when you look for any computer by just hostname of the computer