The following components are the principal building blocks that can be perceived as the architectural cornerstones of an enterprise blockchain:
Digital Tokens
Anything that can be transacted over the blockchain takes the form of digital tokens. Digital tokens represent assets that hold value and have some form of ownership. Assets can be a physical asset like a car, house, cash, etc. and non-physical or tangible assets like patents, copyrights, intellectual property, etc. Digital tokens are secured using cryptographic hash algorithms which takes care of confidentiality aspect. Tokens also have one more level of security in terms of authentication and authorization. It must be signed by the owner to maintain secured identity. The concept of authentication and authorization can be achieved with Public Key Infrastructure (PKI) using private/public key cryptography.
Smart Contract
Smart Contract is one of the core component of modern day blockchain or the so called blockchain 2.0. It’s a contract which defines and executes transactions in the form of a software code written in a programming language of choice. It comprises of business operations that act on the state of the blockchain ledger. It contains business logic conditions that affect the state of a digital token (asset) in terms of its value and ownership. The conditional logic or the business rules compiled together makes up a well-defined contract that suggests how this transaction will be carried out and hence, the term ‘smart’ contract. The smart contract can be written in any programming language like Java, NodeJS, Scala etc. Smart contract can be made secured through encryption and digital signing.
Ledger
The blockchain ledger is an electronic health record of a business. It is a system of records containing all transactions in the order of its occurrence in a given business network. These transactions are initiated by the client application and executed using smart contracts. The transactions by itself represent some kind of transfer of value of digital tokens recorded in the ledger. The ledger must be immutable, i.e., no one should be able to tamper with the transactions, once recorded in the ledger. The blockchain ledger is shared across all entities in a business network. Each node in the network maintains its own copy of the ledger. In a private blockchain network, ledgers are often permissioned, which means only authorized entities can act on a ledger.
Security
Security in the blockchain can be enforced using authentication and authorization. Different form of policies can be created that can communicate different level of access controls for every step in the blockchain workflow. One possible example could be say, only nodes with appropriate permission levels can perform ledger validation. Another aspect of security in the blockchain is the trust based communication. Trust based communication can be established using cryptography digital certificates. Every transaction occurring between entities in the network can be digitally signed to protect its identity and verified using private/public key pair. The transaction payload itself can be encrypted using crypto hash algorithms to maintain confidentiality. In a public blockchain, every node in the network has the visibility and access to the transaction and block creation. In a permissioned blockchain, ledger access and manipulation to the ledger is controlled through the use of access control policies and creation of private conduits with only nodes within that conduit can transact with each other.
Consensus
Consensus means agreement in majority. In a blockchain, all the nodes are equipped with their copy of the ledger that is synchronized as and when the new transaction occurs. Every new transaction when validated and accepted by all the nodes in the network, the ledger is said to be in the state of consensus. It means all the participants in the network agree to and accept the current state of ledger. There are many aspects of the blockchain workflow where the consensus is required. Consensus by itself can be adhering to different policies and thereupon validating the same. The nodes refer to existing set of checklist or rules or policies to validate different lifecycle phase of transactions, right from its inception until it is finally recorded in the blockchain. The consensus in some way implies network integrity. The consensus as such cannot be broken through any kind of corrupt or hacking practice. In order to break the consensus, a whole new blockchain will need to be created with ‘broken records, ‘ and that can be a huge task. There are different industry-wide consensus protocols one can use in the blockchain application viz. Proof-Of-Work, Proof-of-Stake, Practical Byzantine Fault Tolerance and many more. We will briefly discuss the popular algorithms in the ‘Consensus Algorithm’ section.
Nodes
Nodes are the most important component in the network deployment model of blockchain. A node can be a physical box or different logical processes (nodes) in one physical box. They are the backbone of the blockchain architecture. Nodes collaborate with each other to form a peer model and work together to arrive at the consensus and keep the network in a consistent state. They typically validate and execute transactions in the network. Nodes in a blockchain can play various roles like the miners, validators, orderer, monitoring node, health check node, etc. (For more on miners and mining concept, you can refer to chapter 2 that explains permissionless Ethereum blockchain.) These roles assume more significance in a permissioned enterprise blockchain scenario. This is because in a permissioned blockchain, the network is managed and controlled using access control policies and these policies can be attached to the role of each node in the network. Each node in the network, by fulfilling its role equipped with set of policies, forms a group of powerful trusted entities that keeps the entire blockchain network more secure, stable, resilient and consistent.
In the next article, we will look at the Blockchain Reference architecture