In June of 2019, Hedera announced its plan to build its Hedera Consensus Service (HCS) — the announcement included a webinar hosted by Hedera Co-Founder Dr. Leemon Baird, detailed blog posting, and a whitepaper authored in-part by IBM. Since then, Hedera has been hard at work building this new service to get it into the hands of application developers.
We’re excited to share that the Hedera Consensus Service is now available on the Hedera mainnet. It offers developers the ability to create verifiable timestamps and ordered events for any application. HCS utilizes the native speed, fairness, and security of hashgraph consensus, with the trust and governance of the Hedera public network.
Where Hedera Consensus Service really shines is when the applications using it require:
- Transaction ordering without intermediaries
- Application-specific privacy controls
- High-throughput with finality in ordering
- Real-time auditability
We’ve started to see applications using HCS for asset tracking across a supply chain, decentralized ordering of transfers for a Hyperledger Fabric network, auditing of payable events across an advertising platform, and much more. HCS enables endless use cases across industries to easily integrate decentralized ordering for applications on a trusted network.
It can be used by traditional applications or blockchain based frameworks such as Hyperledger Fabric, R3’s Corda, and others. These frameworks, combined with HCS, allow enterprises to develop networks custom to their business, regulatory, and security requirements while still benefiting from fully decentralized consensus on a public network.
In this postings, we'll get into the details of the latest software release on the Hedera mainnet. You'll also learn how to get started building with HCS, explain early results observed on the testnet, describe how HCS came to be, and provide real-world examples for how HCS is being incorporated into decentralized applications.
Getting started with HCS
The RC4 upgrade contained updates to the mirror node v.0.5.4, updated SDKs, fees to support new HCS API calls, and more. The release notes for RC4 and a blog posting which dives into the details of HCS can be found here. You can always find the latest release notes in the official Hedera documentation.
Testnet access & tutorials
The fastest way to get started with Hedera Consensus service is to sign up for a testnet account using the Hedera Portal — with our new and improved onboarding experience, it takes less than 5 minutes. Step-by-step instructions for testnet access are found in the documentation.
The Hedera Developer Advocacy team has also created a step-by-step tutorial "HCS: Submit your first message!". It quickly walks you through setting up your environment and using HCS to create a topic, subscribe to it, and sending your first message.
"SDK Extension Components" for easier development
Hedera wants to make it as easy as possible to adopt the Hedera Consensus Service, so developers have more time to focus on building game-changing applications. In an effort to realize this goal, we’ve created the open source “SDK Extension Components” for Java.
These components provide additional functionality over and above the Java SDK for HCS, to make it easier and quicker to develop applications. This includes things like sending messages to HCS, chunking and re-assembly of large messages, protobuf application message structures, persistence of transactions sent and messages sent/received, and mirror node topic subscriptions. There are also two demo open source demo applications which utilize the SDK Extension Components included in the repository.
HCS Mirror Node APIs
To use HCS, you'll need to be operating a Hedera mirror node or using a mirror node API which supports HCS. Both Hedera and members of the Hedera developer community have made mirror node APIs for both the mainnet and testnet available. There are also paid mirror node services, with compliance benefits that have been recently announced, such as Armanino.
You can see all of the Hedera official and community supported network explorers and mirror node API services on the Hedera's explorers page. Mirror node API's supported by HCS, made available today, can be found below:
Mainnet HCS-supported mirror node APIs
Testnet HCS-supported mirror node APIs
Hedera Consensus Service: How’d we get here?
Hedera has always been focused on building tools and services which take advantage of the native throughput, security, and fair ordering of hashgraph consensus for application builders.
The cryptocurrency service was the first to take full advantage of hashgraph consensus: it offered inexpensive ($0.0001 USD) transactions, fair ordering with consensus timestamps, and achieved finality in seconds. And every HBAR cryptocurrency transaction offered a memo field, with the ability to store a 100 byte message in each transaction. And it’s exactly where HCS started.
The Cryptocurrency memo field at Hedera18
If you’ve been following Hedera for some time, you’ll remember we hosted the Hedera18 developer conference on October of 2018 in Dallas, TX, and global hackathon. The event attracted over 500 attendees for the conference in Dallas, TX and 230 participants in the global hackathon.
Ken Anderson, Developer Advocate at Hedera Hashgraph, presented a talk “The Power of the Memo Field”. In his presentation, Ken explained how to create scalable, verifiable, and fairly ordered log of messages with timestamps by sending the smallest amount of HBAR cryptocurrency and filling the 100 byte memo field of the transaction with a message. It costs a measly $0.0001 USD to send one of these transactions. The thinking was that it might open the door for developers to use the cryptocurrency service in a unique way — there were ideas floating around for certain use cases, but we weren’t exactly sure how it would be adopted.
A scalable decentralized messaging queue
As developers began to grasp the memo field capabilities, they started incorporating it into their applications — it was used for things like payable events on an advertising platform (AdsDax), tracking events in a supply chain (Armada Chain), and other types of applications which required high-throughput, ordering, and auditability. No longer were applications limited by the low-throughput and expense of smart contracts.
One of the very first applications to utilize Hedera was the advertising platform AdsDax — they created a scalable decentralized messaging queue with timestamps for tracking payable advertising events to create transparency and reduce fraud.
Decentralized ordering for Hyperledger Fabric & other private networks
Once IBM joined the Hedera Governing Council, we began working with the Hyperledger Fabric team on native hashgraph functionality for enterprise private distributed ledger architectures. IBM, as well as other companies on the governing council, validated that private networks and consortiums will require a consensus layer with public trust, fair ordering, and timestamps.
As part of this work, the Hedera Consensus Service whitepaper was written by the Hedera team and co-authored by Bryan Gross, Principal Product Manager at IBM. The whitepaper outlines how someone might use a “consensus service” for fully decentralized consensus on the validity and order of blockchain transactions on a private Hyperledger Fabric network, without the need to configure a RAFT or Kafka ordering service. It could also be used in conjunction with a private network for financial markets, matching engines (like those used in Uber or AirBnb), or supply chain negotiations.
Early results on the Hedera testnet
By January 28th, 2020 early access for HCS was in full swing — we’d received 56 requests to begin building and on-boarded over ten members of the Hedera developer community. We worked alongside them for testing of HCS and product feedback. Collaboration with prompted small bug fixes and clarification of remittances and fees. The onboarding of these applications to HCS on testnet also brought with it performance and scalability testing.
Testnet throughput skyrocketed
Applications with access to HCS on testnet brought an uplift in the number of transactions we started to see. The testnet was historically processing an average volume of 25,000 transactions per day. But after the deployment of HCS, transactions increased to around 3,000,000 per day, with a spike of 23,000,000 transactions on February 8th during a stress test.