Diego Martín Moreno

Diego Martín Moreno

Diego Martín es Data Engineering Manager en LUCA con más de 15 años de experiencia en computación distribuida y en los últimos años centrado en realización de aplicaciones Big Data y Blockchain.
AI & Data
Blockchain technology
In the previous article we talked about the basic concepts of the blockchain, and now we will focus on the current technologies to implement a blockchain solution. Blockchain and Smart Contract started in the 90s conceptually, but it has been in the last 9 years when different technological solutions have appeared, at this moment there are many implementations, but we can highlight three: On the one hand, we have Corda R3, which is a blockchain created in 2014, focused around the finance sector, where a monetary concept does not exist, and a notary concept does. We also have Hyperledger, a blockchain born in 2015. It´s use is more general, with a modular design, without money, and where the chain or ledger that we create is stuck to the design of our smart contract. And finally, there´s Ethereum, which is a blockchain also established in 2015, with a much more general design, with its own money, ether, and where the network is focused on the design of Dapp applications (a decentralised application), to allow us to create decentralised applications that can be executed within Ethereum. In the interest of technology, we will focus on Ethereum. For example, we can build an application in blockchain, which is already a flexible network and, moreover, it has public test environments, where we can construct our applications with practically no cost. To begin, we should talk about Ethereum, a network with its own currency and ether, which is the key element for the whole system. In order to execute the smart contracts, we need to have Gas at our disposal, which we get through Ether, which comes with our Ethereum accounts, to be able to pay the miners, that mine for us or execute our smart contract. Furthermore, other than Ether, Ethereum also has the second basic component in the network, the Ethereum Virtual Machine (EVM), which is the software that carriers out all the network nodes, and that allows us to safely execute a smart contract. This EVM can be implemented in different languages, it simply needs to comply with the specifications of the Ethereum Yellow Paper. At this time two large implementations exist, on the one hand Geth, which is the implementation in Go of the EVM, and on the other we have Parity, which is the Rust implementation. The biggest advantages of the EVM are: 1. It´s deterministic. It always gives us the same result, for the same data and the same operations, like 2+2 always equals 4. 2. Its terminable: Our operations can´t be indefinitely executed, as all the execute instructions in the EVM have a gas cost and we have to limit the spending on each smart contract. 3. It´s isolated. No one can manipulate the execution of the smart contract. The nodes and the ether form the base of the system, and now we can already deploy our smart contracts, which are programs that can be developed in distinct languages although they are all carried out in the same network. Nowadays, in Ethereum Solidity is the main programming language of Smart Contract, which is a mix between C and Javascript. We now have all the elements in place to build our applications in Ethereum, a network with nodes to carry out the contracts, currency to pay for the transition, and a language to construct the smart contract. Now the question arises, what type of blockchain do I want to use? When we talk about networks within Blockchain, we have 3 types, depending on the privacy of each one: - Public networks. These are the networks that anyone can join. In the case of Ethereum, its denominated by Mainnet, which also offers public tests like the network Ropsten. Its main characteristic is that the information on the network will be public. These types of networks conform to public agreements, certificates or whichever type of functionality is necessary to be in the public domain. Economic costs are also higher with these types of networks. - Semi-public networks. This type of network is orientated around the sharing of information between distinct organisations, and where the smart contract is assigned to manage the relationships between the members (automatically and without supervision), which improves productivity of the processes. One of the advantages of this network is that it doesn’t need as many resources as the public one. There is already an implementation of Ethereum which is Quorum, of JP Morgan, specified for semi-public networks. In Spain, they have access to Alastria which is a semi-public network implemented through Quorum. - Private networks. The last type of network, which would be used within a business that doesn’t need to communicate outside of itself, where we like to simplify processes and where we have all the information audited. As we can see, we have distinct types of networks for different uses that, depending on our use case, we should select a specific type of network. And all of this is happening today, but we need to be ready for future changes and the future of the best technologies that exist, as for example, future changed to Ethereum. At Ethereum, there are a variety of projects designed to improve the network. Like Plasma, which is a project that improves Ethereum’s capabilities of carrying out more transactions per second. There´s also Casper, which was born from the idea to diminish network consumption with a new protocol that uses the algorithms Proof-Of-Stake (PoS) and Proof-of-Work (PoW). As we have seen in this article, blockchain is still a relatively young technology, that continues to improve and change with time, but that has come to stay and modify the solutions we can give in many cases, just as with Big Data technologies. You can also follow us on Twitter, YouTube and LinkedIn
July 16, 2019
AI & Data
What are Blockchain and Smart Contracts?
Blockchain is the new technology for the treatment of data that everyone speaks about, but what is blockchain? Blockchain is a chain of blocks in which we have stored information, and where to connect the blocks, we use a hash (the hash is an output of a fixed size, which normally works through a text string and gives the same result with the same input, in ethereum is generated with the function KECCAK-256) that we generate and that allows us to connect them to each other. In this way if someone wanted to maliciously modify a block, they should modify the entire text string from that point, with a computational cost so high that prevents any attack. Therefore blockchain serves to store information, which cannot be manipulated and does not need to be validated by a central entity, if not by the network members themselves. Blockchain diagram. Source (Bitcoin: A Peer-to-Peer Electronic Cash System) Before we continue, it's interesting to talk a little about the history of blockchain to understand where we stand. Blockchain has several important milestones in its history: In 1991 Stuart Haber and W. Scott Stornetta publish the first document about the blockchain concept (How to time-stamp a digital document). Satoshi Nakamoto in 2008 publishes his Bitcoin document that comes out in October of that year. "Bitcoin: A Peer-to-Peer Electronic Cash System" And in 2009 version 0.1 of Bitcoin is published in Sourceforge. As we can see, conceptually blockchain comes from the 90s, but the first implementation has less than 10 years. Smart Contract On the other hand we have the Smart Contract, which is the second element that has given all the potential to blockchain. But what is a smart contract? A Smart Contract, a name used used by Nick Szabo for the first time in 1996 through the publication of his article ‘Smart Contracts: Building Blocks for Digital Markets’, is a computer program, which executes an agreement between two parties in a system not controlled by either party. The conjunction of these two technologies, blockchain and smart contract leads us to decentralized applications (Dapp), autonomous applications, not controlled by any entity, and where data and transactions are stored in blockchain. For the Dapp we have three types of applications: Type 1. Dapp with its own blockchain, such as Bitcoin. Like the operating system of our computer. Type 2. Dapp that uses type 1 dapp. With its own protocols and tabs like Omni Protocol, which are general type applications such as Excel. Type 3. Dapp that uses type 2 dapps. It uses type 2 dapps for its operation, like µRaiden. These applications would be like an Excel macro. All this opens a path that did not exist before and allows us to make applications that could not be made before. This blockchain boom allows us to distribute information and ensures that it cannot be unduly modified. In addition, it allows us to autonomously execute contractual conditions between two parties, without the need for arbitration or control from one entity above all others (such as a bank today). What does blockchain offer us for the business models of the future? It opens the way to new ways of integrating business models, facilitating exchanges between different companies or simplifying functional processes, but above all where transactions are executed automatically, in an environment that cannot be manipulated, neither in data nor in contracts, and with traceability of everything that happens. Think of applications for traceability of goods, management of digital assets or simplifying processes between different companies.
July 8, 2019