Introduction to Blockchain Technology. Tiana Laurence
Чтение книги онлайн.
Читать онлайн книгу Introduction to Blockchain Technology - Tiana Laurence страница 7
Public blockchain nodes
Public blockchains are open to anyone in the world to participate in the functions of the network, only limited by their access to the internet, hardware, and electricity. This means that you can be a miner earning cryptocurrency as your secure blocks, a full node checking transactions, or a lightweight node sending and receiving messages on the network. There are no gating mechanisms, no one to ask permission and no licensing fee. The software is held in an open license such as the Apache or MIT license. Prominent examples of this type of network include Bitcoin and Ethereum.
Permissioned blockchain nodes
Permissioned blockchains are private networks that utilize some blockchain technology but not all. Most don’t incorporate any kind of mining and so do not have a native cryptocurrency. This means that there are no disinterested third parties securing blocks, the blocks and transactions are all processed by known participants. The participants all have a vested interest in the integrity of the records. Often these networks are built by for-profit companies and are operated by consortiums such as R3.
Nodes on a Corda network
R3 (www.r3cev.com) built a consortium with more than 100 of the world’s leading banks and insurance companies. They work to streamline redundant business processes by integrating blockchain technology.
Corda is the blockchain protocol behind R3. It is a distributed ledger platform, often referred to as “DLT” (distributed ledger technology). Breaking down the jargon, a “ledger” is a general term for describing records used to account for something and “distributed” means that the record is kept in more than one location. It is designed specifically to manage and synchronize financial agreements between regulated financial institutions.
The R3 platform works very differently from public blockchains. There is no mining, and the transmission of data is not public in the same sense as it is on platforms such as Ethereum or Bitcoin. Unlike public blockchains that broadcast their transactions to the whole network, transactions execute in parallel on different nodes. Each node is unaware of the other’s transactions. The history of each network is on a need-to-know basis and cannot be viewed by the public.
Key features of Corda include the following:
■ Controlled access to the network;
■ Observer node for regulators;
■ Transactions are validated only by the parties involved;
■ Compatible with multiple consensus mechanisms;
■ No mining and no cryptocurrency.
Nodes on a Hyperledger Fabric network
Nodes on Hyperledger Fabric (see also: https://www.hyperledger.org/projects/fabric) are called Peers and Orderers. Unlike public blockchains that have nodes validating transactions or mining, the nodes on Fabric host the ledger’s data and make sure it’s in order. The data they host may include smart contracts, orderers, policies, channels, applications, organizations, identities, and membership. Another important distinction is that a Fabric peer can host more than one blockchain ledger. This feature allows for flexible architecture in the design of your private blockchain system.
Blockchain applications connect with peers on Fabric through APIs, application programming interfaces. The APIs allow you to invoke Fabric smart contracts in order to create transactions. Once you have submitted your transaction, they will be ordered and committed to Fabric. This does not just happen right away. The transaction must get approval from enough peers before the ledger is changed. It is possible to have two or more peers agree to cooperate privately. In Fabric this is called a channel. In the channel, the peers agree to collaborate to share and manage identical copies of the ledger associated with their channel.
Otherwise, when you submit a transaction, there is a three-phase process. This process ensures all peers keep their ledgers consistent with each other, see figure 5. This is where orderer peers are important. Their job is to ensure that every peer’s ledger is kept consistent. Single peers cannot update the ledger by themselves.
■ Phase 1: an update to the ledger is requested by a blockchain application. Peers will endorse the transaction. Once a transaction has gained enough endorsements, the transaction will move to phase 2.
■ Phase 2: the endorsed transactions are collected together and packaged into blocks. The orderer is crucial to this process. Peer audit by an orderer ensures this is done correctly.
Figure 5 The Fabric three-phase process.
■ Phase 3: the new block that was created is broadcast back to every peer so that they can update their blockchain record. Each transaction in the new block is then validated by the peer before being applied to its copy of the ledger.
Federated blockchain nodes
Federated blockchain nodes can exist in both public blockchains and private blockchains. Federation is when the system, or rather the user of a system, elect nodes to process transactions. Designating a few nodes to do most of the work of maintaining the blockchain records has its advantages and disadvantages.
One of the main reasons why systems choose this type of architecture is because it can reduce the raw cost of processing transactions and it can increase the speed at which the blockchain is updated and transactions are cleared.
However, there are some very good reasons to not have federated nodes. Blockchains are often judged to be less resilient to corruption when they have fewer nodes operating and securing the network. It is more feasible to take over a handful of computers and their operators then it is the ten thousand or more nodes that operate at any given time on the Bitcoin network.
Here are a few examples of blockchain networks that operate with some form of federation or designated nodes.
Factom is a public blockchain that has two classes of federated nodes, see figure 6. Half of these are processing transactions whilst the other half watch to make sure that the nodes processing the transactions are accurate and not censoring transactions. Users of the system elect nodes to be Federated Factom nodes. Factom does not use mining but does have a native cryptocurrency. The Federated nodes are rewarded with “Factoids” the Factom cryptocurrency for processing transactions. The nodes can then sell Factoids back into the market to those who wish to utilize the Factom blockchain.
Figure 6 The Factom federated network.
Waves is a public blockchain that limits participation in the network to nodes that hold sufficient “waves” of cryptocurrency. Currently, the limit is set to approximately 1,000 waves. The Waves blockchain is a peer-to-peer