Sumeragi’s consensus algorithm
Blockchains have systems that allow them to first agree on a single version of the truth and then record that agreed-upon truth in their ledger. An agreement system is called a consensus. A consensus is complicated, and grasping the nuances of how and why a consensus acts in the way it does is far more than a business professional needs to know. (If you’re curious, though, or interested in getting into cryptocurrency mining, check out Book 6.) What does matter for you are the consequences of different consensus mechanisms and how they affect what you’re doing on that particular blockchain. Iroha’s consensus, Sumeragi, is worthy of note because it’s very different from traditional blockchains.
Here are a few key things that make Sumeragi different:
Sumeragi does not have a cryptocurrency.
Nodes that start consensus are added into the system by the Fabric member services. Nodes build a reputation over time based on how they’ve interacted with the ledger. This is a permission blockchain run by known entities.
New entries are added to the ledger in a unique way. The first node that starts consensus, called the leader, broadcasts the entry to a group of other nodes; those nodes then validate. If they don’t validate, the first node will rebroadcast after a predetermined duration of time.
Depending on your use case for blockchain, Iroha may be positive or negative. If you’re worried about censorship, Iroha may not be right for you. In this case, you’ll be better off looking at a blockchain that is censorship resistant. If you’re worried about other players on the network committing arbitrage, Iroha may also not be right — further investigation is needed. If you want to know all the players in your blockchain, Iroha may be exactly what you’re looking for.
Developing mobile apps
Skip this section if you aren’t part of the app development space.
Iroha is built for web and mobile app developers so they can access the strengths of the Hyperledger systems. The Iroha team saw that having a distributed ledger wasn’t useful if there were no applications utilizing it.
Iroha was developed for the following encapsulated C++ components:
Sumeragi consensus library
Ed25519 digital signature library
SHA-3 hashing library
Iroha transaction serialization library
P2P broadcast library
API server library
iOS library
Android library
JavaScript library
Blockchain explorer/data visualization suite
One of the major hurdles of the blockchain industry has been in making systems user-friendly. Iroha has created open-source software libraries for iOS, Android, and JavaScript and made common application programming interface (API) functions convenient to all.
Diving into Sawtooth
Sawtooth by Intel is another distributed ledger project in Hyperledger. It’s focused on being a highly modular platform for building new distributed ledgers for companies.
Sawtooth does not operate with a cryptocurrency. It maintains the security of the platform by allowing businesses to create private blockchains. These businesses running private blockchains then share the burden of computational requirements with the network. In its documentation, Sawtooth states that this type of setup will ensure universal agreement on the state of the shared ledger.
Sawtooth has taken the basic model of blockchains and turned it on its head. Most blockchains have three elements:
A shared record of the current state of the blockchain
A way of inputting new data
A way of agreeing on that data
Sawtooth merges the first two into a signal process it calls a transaction family. This model is best in use cases where all the participating parties have a mutual benefit to having a correct record.
Intel has allowed its software to be flexible enough to accommodate custom transaction families that reflect the unique requirements of each business. It also built three templates for building digital assets.
EndPointRegistry: A place to record items in a blockchain
IntegerKey: A shared ledger that is used for supply chain management
MarketPlace: A blockchain trading platform for buying, selling, and trading digital assets
Exploring the consensus algorithm: Proof of Elapsed Time
The consensus algorithm for Sawtooth is called proof of elapsed time (PoET). It was built to run in a secure area of the main processor of your computer, called a trusted execution environment (TEE). PoET leverages the security of the TEE to prove that time has passed by time-stamping transactions.
Other consensus algorithms have some kind of time-stamping element as well. The way they ensure that the records have not been changed is through publicly publishing their blockchains as proof that they have not been altered. The published ledger acts as a public witness that anyone can roll back and check. It’s sort of like publishing an ad in a newspaper to prove something happened.
PoET also has a lottery system that works a bit differently from other blockchains using proof of work. It randomly selects a node from the pool of validating nodes. The probability of a node being selected increases proportionally to how much processing resources that node contributed to the shared ledger. Measures may be put in place to prevent nodes from gaming the system and corrupting the ledger.
Check out Book 6, Chapter 2 for information about other consensus algorithms.
Deploying Sawtooth
The Hyperledger website has some fantastic documentation and tutorials at https://www.hyperledger.org/use/tutorials
. When you are within the tutorials page, navigate to Hyperledger Sawtooth to go through their collection of helpful tutorials.
You may also want to review Coding For Dummies, by Nikhil Abraham (John Wiley & Sons, Inc.), prior to trying these tutorials.
Building Your System in Fabric
A lot of work has gone into making Fabric accessible. The Hyperledger Composer is an easy-to-use tool that allows you to create blockchain application proof of concepts (PoCs). The best part is that it will enable you to define your business network with JavaScript, one of the most popular development languages in the world. This feature alone will significantly cut down on your need for specialized blockchain developers.
The Hyperledger Composer will decrease the development time and cost and enable you to get to the production-ready stage sooner. Another benefit of the Composer is that it utilizes LoopBacks. LoopBacks communicate digital data streams