When designing a blockchain system it is important to make definition for a large number of aspects. You have to define what network components you require. In some systems there is basically only one component, that does everything, from verifying transactions, maintaining a copy of the ledger, accepting and broadcasting transactions, maintaining peers, ensuring consensus, validating identities, check permissions and executing smart contracts.

But before we can decide any of these, the purpose of a blockchain has to get defined. Public blockchains with their currencies are the most famous example. In first place there purpose is to transfer value, but in general, people want to execute “smart contracts” on a blockchain. (We discuss later what a smart contract is.). There is many discussions about how many transactions a blockchain can process per second. Also how much data can be stored in the system. In Bitcoin that is about 1MB per 10 minutes that have around 1000 transactions. Who is supposed to become part of the blockchain, get a copy. Can everyone join and setup a peer or is there maintained a list of participants and organizations. Blockchain is a system that will help to create transparency. But the first thing businesses ask is how it is possible to keep data private with managed reading and write permissions. And, as in any software development project, the utilized technology need to get decided, starting with programming language, database and operating system.

what is a smart contract

Basically a smart contract is a piece of code, that works with information on the blockchain and some input arguments from the transactions. Because of that, in some systems smart contracts are called chain code. Usually when transactions get executed in the same order, get executed against the same ledger state and the same transaction, they produce the same outcome. This property is called deterministic. To guaranty this behavior the Etherium blockchain has introduced a new programming language just for this requirement.

Other blockchains allow to develop smart contracts in statically typed languages, such as Java, Rust, Go or C++. It is usually not recommended to allow the development of contracts in dynamically typed languages, as the behavior is less predictable, especially for inexperienced developers. That contains PHP, Ruby and Javascript.

An other type of languages for smart contracts is designed to describe behavior in business terms. Such languages usually do not allow much complexity, but are therefor better understandable for users without programming experience.

Smart Contracts get deployed direct to the blockchain. That means the Source or at least the binary is stored in a transaction. Doing so can guaranty that it is absolutely clear, what transaction was processed by witch chain code ans specific by witch version of the chain code.

vocabulary

Designing Systems of such complexity, you have to be very precise. I believe that language need to be controlled very much. Often people say: “store that data on blockchain”. But that let a lot of open options.

  1. store on the blockchain itself
  2. store on the ledger of the blockchain
  3. store in the configuration for the blockchain

Also “Create a user.” allow a number of options for interpretation:

  1. create a key value pair
  2. store some username-password credentials on the blockchain
  3. store some credentials outside the blockchain
  4. create a signed certificate.

Naming for the different software components. Many people have different definition want is a peer. In hyperledger Fabric a peer is a server machine, that will connect to the orderer to get the blockchains and all new transactions. In other systems a peer is like a user or organization that also maintains its copy of the ledger and blockchain. In Fabric one Organization can operate a number of peers. What I want to say is, that you need clear definitions for words like: peer, organization, participant, channel.

In the next post you can read about an actually new design. I am going to present a blockchain data structure that will provide phenomenal attributes.

Contents
  1. 1. what is a smart contract
  2. 2. vocabulary