...by Daniel Szego
quote
"On a long enough timeline we will all become Satoshi Nakamoto.."
Daniel Szego

Monday, February 13, 2017

The future of IT


The future of IT is simple....

Blockchain
Cryptocurrency
Artificial Intelligence
Machine Learning
Machine assisted human intelligence
Social phisics
Data Mining
White Paper
MVP
Company

Any other thing is just illusion...

Sunday, February 12, 2017

Creating simple name service on the Ethereum Blockchain

Let we implement a simple name service on the Ethereum Blockchain. The service is manifested by one smart contract, called NameService, providing functions to register a name for an address, getting an address for a registered name and rewriting the address of an already registered name. The accessibility is pretty simple, everyone can create a new DNS entry but an existing item can only from the owner of the address overwritten.


Testing the service can be done for the first run simply in Ethereum Studio sandbox, like registering a name and testing if the name can be read back.


Let we test the case from javascript side as well, extending the app.js side of the project with two simple javascript functions to read out and write the name service and some html code that integrates the code on the user interface.



Testing the result from the Javascript side, we get the same result as from the Ethereum Studio.










Deploying Ethereum Studio with Azure Blockchain as a Service, a step by step Approach

So let we create an environment for the Ethereum Studio directly via the azure.portal.

01. The first step is to find the necessary template under the Azure templates. Just search for Blockchain after clicking "New".

02. The first thing is as usual is to configure the basic elements of the virtual machine itself; in this case only one virtual machine as a development sandbox will be initiated.Parameters as resource group, name of the image, user access and location will be defined.



03. The next step is to select the size of the virtual machine, at the moment only one size is available.


04. The next step is to configure the additional features if the vistual machine itself, like network settings, storage account, monitoring or diagnostics.



05. If everything was working fine, we can just confirm in a brief summary windows, and purchase the machine. The virtual machine is created with the preconfigured Ethereum Studio Sandbox. Unfortunately, the Ethereum Studio license is not part of the Azure subscription, so on will be billed for that separately.

It is important to note that there is at the moment the possibility to get a free Integrated Development Environment via ether.camp: ether.camp.

Deploying a Consortium Blockchain with Azure Blockchain, a Service step by step approach

So let we create an Ethereum consortium Blockchain solutions by Azure. It means practically either clicking together the solution on the Azure portal or initializing the creation by powershell. Let we see how it looks like on the Azure portal. 

01. The first thing to is to search for the either the Ethereum or the Blockchain templates them-self. There are 10 pieces of them, we want to use the first one "Ethereum Consortium Blockchain".


02. We can find a brief summarizing about the Ethereum Consortium Blockchain solution under the following link. The configuration itself is carried out in three major steps, as a first step we have to define basic parameters like resource groups, authentication, location, or subscription. 



03. The next part is the structure of the network, we can configure here parameters like number of consortium members, number of mining nodes for a consortium member, number of transaction nodes, that are practical gateways of the users to produce transactions. For all nodes, there is a possibility choose the choose the size of the virtual machines and the redundancy of the storage.   


04. Last but not least, Ethereum node ID has to be set, it defines the common ID of the network, practically only nodes with the same ID can communicate with each other. On top password of the default Ethereum account and passphrase of the private key generation must be defined. 


05. If everything correctly set, the general terms must be accepted and the consortium blokchcain starts to be being deployed. 



06. If everything was working without errors, the consortium Blockchain has been created. 


07. You find under deployment / Microsoft.Azure.Blockchain ... both the link for the Admin site and for RPC endpoints as well.



How secure is Blockchain?


Well, that is a difficult question to be answered. It is regarded actually more secure as a classical client server model, however I guess there is still no explicit study or comparison on that. It is actually a question as well if the regard security rather from a theoretical or a practical point of view. 


NODE SECURITY: First of all the wallets are regarded pretty secure, as they are protected by cryptographic algorithms, like SHA-256 for bitcoin. However this construct has a practical trade off, if you your private key is not leaked or lost, the system is secure. However at both previously mentioned cases your money is probably lost, which gives many different constructs of storing your keys redundant but secure. As a conclusion, yes the system is from a cryptographic point of view secure but it must be really payed attention at the practical usage to behave secure. Typical examples scandals of the last couple if years, where investors stored Bitocoin in Web Wallets, in which coins and private keys were stored in a central server. Having hacked the central server, the private keys were leaked and the money was stolen. 

NETWORK SECURITY: On the other hand, we should consider the Blockchain and the transaction validation. Hacking the system basically mean elements like hacking a transaction, like making a double spending, hacking the Blockchain itself, like modifying an old transaction in the Blockchain or simply causing performance issues in the chain itself. As examples a 51% attack can cause double spending for Bitcoin, actually less than 51% can be enough if the attack is combined with a sybil attack, meaning partly of the communication of  the nodes are disabled. Considering the size of the current Bitcoin network and the Proof of Work consensus mechanism a successfully 51 attack would cost as much energy as small nuclear plant. There might be other attacks as well that are rather Denial as a Service trying to destabilize the network or hard-fork the ledger. 

CONSENSUS SECURITY: The situation is getting more and more complicated if we consider different consensus mechanism like, Proof of Stake or Proof of existence and beside public different other style of networks, like private or corporate networks. As a rule of thumb, we can say that the size of the network matters. Small networks are more unstable by design. At private or corporate networks, the main question is always how difficult is to hack a certain node. There are some opinions, that only the long-living public networks are secure enough simply because surviving long-enough many hacking attempts in a public domain provides a certain immunity.  

SMART CONTRACT SECURITY: The situation is getting complicated with smart-contract systems, like Ethereum as well. As these solutions are "self-programmed" in a certain way further question is how secure is the smart-contract itself that is running on the Blockchain. As an example The DAO project was hacked not because of problems of the Blockhain itself, but because the smart-constract code was simply not designed secure enough.




Monday, January 30, 2017

How to build up consulting business based on the technology Blockchain


Considering the fact that Blockchain is in the Hype phase it is important to analyse the possibilities how consulting business can be built up based on the technology. If we consider the standard consulting business, Blockchain has more or less similar characteristics as the standard technologies:

- Infrastructure: Infrastructure consulting is relevant if we consider private or corporate Blockchain solutions. In these scenarios it is important to analyse how many P2P nodes should be set up, where should be these nodes set up considering the internal corporate networks and firewall settings. In case of a public Blockchain solution infrastructure consulting is much less relevant. 

- Development: certainly the most important part of each application is the development. It contains on the one hand implementing Blockchain Apps, like Smart Contracts on the Blockchain, on the other hand related applications like web user interfaces communicating with the Blockchain. 

- Testing - Quality Assurance: This part is much more important than with standard software development as Blockchain applications usually planned to be highly secure highly available applications usually with strong cryptography requirements.  

- Classical Consulting: As the field is pretty complex general consulting is an important element of the area as well. Typically simply choosing the necessary Blockchain platform might be a complex issues, like choosing between Proof of Work, Proof of Stake, or public private or corporate Blockchain solutions. If low-code or no-code applications will be possible for application development, importance of the general consulting will be much higher.    


Saturday, January 21, 2017

The dawn of Robo-Lawyers


Next target of the digital distribution might be the legal system especially consulting services of the legal systems. These systems are sometimes unnecessary over-complicated and required years of learning to get even the basic competence. It is currently in discussion rather with the  cryptocurrency regulations. However, apart from this field it is an interesting area to provide automated legal advisory services to everyone on affordable price.

Saturday, January 14, 2017

Creating a simple job shop smart contract on the Ethereum Blockchain

Let we create a simple job shop smart contract. For the first run, let we create a smart contract called Job having some variables like description, responsible for the job, an internal jobID and a state of the job.

On the other hand, let we create a JobShop smart contract that practically uses a mapping for storing the different jobs mapped to a fictive primary key called jobID and having two functions for creating and assigning jobs for an account. 

  
After having the job task or job address, the job status can be set to done. In real life scenarios certainly this simplified functionality can be extended with for instance more variables, events raised if a job has been finished or with delegation and reporting functionalities.  

Friday, January 13, 2017

Analysing optimal technology choice for a project based on agile technology curve

Considering a usual enterprise software architecture, we can usually consider three phases: There is usually a setup phase of the technology that is pretty slow and expensive despite covers not too many use cases (Q1). Most software development frameworks have an agile part in the middle that provides the possibility to cover uses cases very fast very agile on a low cost basis. At the end, there is usually an architecture limit of the technology where the basic framework has to be further developed (Q2). A relative big effort is usually required to implement uses cases after the technology limit implying slow and costly delivery (Figure 1). 



Figure1. Agile technology curve and the performance of a project.

Let we consider the above curve from another perspective, let we consider a P project with a set of uses cases and let we analyse the question if a given T technology is an optimal choice for the project. We can say: 

- A technology is under performing for a given project or a set of use-cases if only a small part of the agile part is used. In this case the technology is simply not used enough, considering the pretty expensive set up phase. In this case another technology is perhaps a better choice.

- A technology is optimal performing for a given project or a set of use-cases if a large part of the agile phase is used to cover the use-cases, meaning simple that setting up cost at the beginning pays off. This case is the optimal technology choice,

- A technology is over performing for a given project or a set of use-cases if  many use cases are implemented outside the technology limit, meaning that the project will be probably unnecessary expensive and slowly delivered because of the use-cases outside the technology limit. In this case another technology is perhaps a better choice

- A technology is not performing for a given project or a set of use-cases if we do not use anything from the agile middle phase of the technology, meaning that after setting up the software framework, use-cases only outside the technology limit are implemented. In this case another technology is surely a better choice   






Thursday, January 12, 2017

Creating a simple order process on the Ethereum Blockchain

Let we create a simple order workflow on the Ethereum Blockchain. The workflow imitates an order request, containing information on which material was ordered, how many items and on the order price. We define two smart contracts, on the one hand similarly to our previous example we define an ApprovementActivity. The activity realizes the usual Approve, Reject and Delegate functionalities as in our previous example, However the functionalities are extended with a callback function, that informs the original workflow as soon as the internal state has been changed. Additionally, there is an event that is raised to the client side, as soon as a new Approval set.

Code of ApprovementActivity is the following:


Workflow itself is realized by another smart contract, called OrderWF. The workflow is pretty simple, it is initiated with the necessary input parameters, sets the initial state and creates an activity to be approved. Communication regarding the state changed is realized by the callback function. As a second possible communication way a reference for the original workflow has been given over to the Activity, however this functionality is currently not used.


Certainly the process just an over simplified prototype version.  For a real scale solution additional functionalities should be built up, like reading the order details from the ApprovementActivity smart contract, working rather with groups than with individual addresses, fine tuning permissions and so on...