Hcash Technology Research and Development

Technology research and development:

 

1. Firstly, our developers and researchers have had a full discussion about our goals. Our short-term goal is to get the test net ready by the end of September. We have converted the goal into small tasks and assigned them to different team members, so the work can be distributed to ensure the R&D progress goes smoothly.

 

2. We have had further, more detailed discussions about the Hcash consensus mechanism, and confirmed that it is not only innovative, but also feasible.  We have also analysed the security and efficiency of the mechanism. We have proven, that in theory, it can prevent ‘selfish mining’ (a form of economic attack), that it shows robustness (fault-tolerance), consensus convergence, and supports a high throughput.

 

Design Rationale of the Consensus Mechanism in Hcash:

 

When designing the consensus mechanism for Hcash, we need to determine which technology for the permissionless distributed ledger should be adopted, blockchain-based or DAG(Directed Acyclic Graph)-based? On one hand, blockchain has been well studied in the aspects of the consensus model, scalability, efficiency, security, robustness, privacy preservation, etc. It has also been widely applied and thoroughly testified in various decentralized cryptocurrencies or systems such as Bitcoin, Ethereum, and so on. Hence, blockchain is considered as a reliable technique for a permissionless distributed ledger, though there is still lots of room for the improvement of this promising technology. On the other hand, the DAG technique has been leveraged recently in a few cryptocurrencies. These DAG-based cryptocurrencies are merited for their potential high throughput, especially in the case of massive transactions. However, DAG-based distributed systems lack sufficiently rigid and convincing investigation and evaluation, as well as sophisticated trial in practice. Furthermore, we find that there are some security issues in the existing DAG-based cryptocurrencies, for instance, IOTA's security heavily relies on the transaction frequency,  security flaws exists in the consensus model of Byteball (specifically, in the strategy algorithm for moving forward stable points of the distributed system); Byteball's security depends on a few “witness” nodes, which leads to potential centralization. Consequently, we have adopted blockchain-based, instead of DAG-based technology in Hcash. 

In 2008, Satoshi Nakamoto presented a creative way to apply blockchain technology to a decentralised digital currency system in the Bitcoin whitepaper.  Since then, people have proposed many new digital currency solutions to refine, adjust, extend and improve existing protocols. The most striking ideas and implementations include: Ethereum (with a virtual machine layer which supports smart contracts), CryptoNodes and ZeroCash (with a different solutions to protect privacy), Dash and Decred (which implemented mixed consensus mechanisms and basic DAO), IOTA and ByteBall (which increases transaction throughput with DAG), Bitcoin-NG (which increases transaction throughput with a keyblock and microblock dual chain structure), and side chain technology (which bridges different digital currency systems)

 

Proof-of-work (PoW), the consensus scheme implemented in bitcoin and many other well-known decentralized cryptocurrencies, has lots of merits including trustworthy sustainability, strong robustness against malicious participants, delicate incentive compatibility, and openness to any participant (i.e., participants can join and leave dynamically). Meanwhile, PoW has been criticized due to its waste of resources and a potential centralization of hash power. Thus, alternative consensus models have been introduced to (fully or partially)  replace PoW, like proof-of-stake (PoS). However, PoS is controversial for its sustainability and security, due to lack of practical trials and the risk of data forgery.

 

Another drawback of PoW is its relatively poor efficiency. Bitcoin, equipped with PoW, can only support very limited transaction throughput (say, at most 7 transactions per second (TPS)), which greatly constrains the scalability of Bitcoin’s system. So far, five approaches have been proposed to solve or relieve this issue, as shown below: 

 

1) Shorten the block interval;

2) Extend the block size;

3) Adopt two-layer chain structure (i.e., keyblock/microblock);

4) Introduce the lightning network;

5) Apply DAG-based framework/structure 

 

Among them, 1) compromises certain stability/security aspects of a decentralized system, which has been shown by the practices of ETH. More specifically, the short block interval (20-30s) adopted in ETH did cause instability of the system, and to combat this issue, the "GHOST" protocol (somewhat controversial) was implemented. For 2); it seems simple but causes a communication burden to the network. While 3) was presented in Bitcoin-NG; its main idea is as follows: the block created by a miner after solving hash puzzle is called a keyblock. After the creation of a keyblock (say, block A), the corresponding miner can release several microblocks before a keyblock succeeding block A is generated. The security and robustness of the decentralized system rely on the PoW mechanism for keyblock, and the system throughput can be improved greatly due to frequent release of microblocks. However, Bitcoin-NG is problematic for its vulnerability to selfish mining and a potential attack by keyblock proposer's spawning massive microblocks which undermines the convergence property of the system, and causes network overburdening because of massive forks. Regarding 4); it provides an efficient off-chain transaction mechanism, targeting transactions with small value and high frequency.As for 5); it draws interest for its potential high throughput, however, this novel technique still needs to be sufficiently investigated and evaluated both theoretically, and practically.

 

To date, existing decentralized cryptocurrencies have adopted either a PoW consensus mechanism or a hybrid consensus model of PoW and PoS. However, these systems still encounter the issue of very limited efficiency/throughput, and if post-quantum cryptographic schemes are equipped in these systems, the throughput of such systems will become worse and even unbearable. The Hcash project aims to build secure, efficient, robust and reliable decentralized system. Highlighted features such as newly-proposed hybrid consensus scheme, a post-quantum digital signature, linkability among various blockchain-based and DAG-based decentralized cryptocurrencies, smart contract mechanism and a postquantum privacy-preserving scheme will be proposed and implemented eventually. First, we present a novel hybrid consensus scheme with strong robustness, high throughput as well as sufficient flexibility. With a newly-proposed two-layer framework of blockchain, a significant improvement in the efficiency is offered, without compromising the security. Additionally, using a hybrid consensus model, both PoW and PoS miners are incentivized to take part in the consensus process, thereby enhancing the security and flexibility of the consensus scheme, and providing a mechanism that supports basic DAO for future protocol updates and project investments.

 

Our new consensus mechanism is based on the original codebase of Decred, and inherits the merits Bitcoin-NG, based on which we propose key innovations to make our scheme more secure, efficient and flexible.  Note that our new consensus scheme can support post-quantum cryptographic schemes smoothly with an acceptable throughput. Firstly, with the methodology from Bitcoin-NG's keyblock/microblock structure, we offer a two-layer chain structure. To tackle the aforementioned security issue existed in Bitcoin-NG, we present two-level mining mechanism and incorporate this mechanism into the two-layer chain structure. More specifically, two level of difficulties of the PoW hash puzzle are set, and these difficulties can be adjusted dynamically. When solving a hash puzzle, a PoW miner can create a keyblock once the hard-level difficulty is met, and publish a microblock in the case that a low-level difficulty is satisfied. In this way, the system throughput could be enhanced significantly (up to 447 TPS, and can be even higher if needed), and the security of the system is not compromised since malicious miners cannot spawn massive microblocks freely. Furthermore, to tackle the selfish mining issue, strengthening the robustness against “the 51% attack” of PoW miners, and offering the sufficient flexibility (supporting both PoW and PoS mining), we borrow the idea of Decred's ticket-voting mechanism (a practical and flexible PoS scheme), and combine it with our newly-proposed two-layer chain structure to devise a secure, efficient and flexible hybrid consensus scheme. In Hcash, keyblocks should be confirmed by certain voting tickets, and both PoW and PoS miners play important roles on the consensus of the system. With this new hybrid scheme, we further implement basic DAO to provide PoW and PoS miners an effective mechanism for future protocol updating and project investments. Our mechanism supports the segregated witness scheme, which facilitates the implementation of the lightning network and post-quantum signature schemes in the future. The schematic framework of our consensus mechanism is shown in Figure I.

 

Figure I. Solution Diagram

 

In Table I, comparisons are made between Hcash and a few well-known decentralized cryptocurrencies. Table I also includes throughputs of Hcash with different parameters for keyblock/microblock generations. The current release of Hcash corresponds to the row marked with bold font. 

 

 

keyBlock

Block time

Block size

microBlock

Block time

Transaction size

Transaction throughput

TPS

BTC

10 min

1MB

--

250B

6.99

BTC (after Aug 2017)

10 min

2MB

--

250B

13.98

BCC

10 min

8MB

--

250B

55.92

Decred

5 min

1.25MB

--

250B

17.48

Hcash

5 min

2MB

18.75 sec

250B

447.39

Hcash

5min

8MB

18.75 sec

250B

1789.57

Table I. Hcash transaction throughput compared mainstream cryptocurrencies

 

Table II offers the relation between adversary’s PoW power and PoS capabilities (measured in proportion overall PoW power or PoS capabilities), and the success possibility of an adversary undermining the system.

Tiket pool proportion

Computing power proportion

0.0500

0.1000

0.1500

0.2000

0.2500

0.3000

0.3500

0.4000

0.4500

0.5000

0.0500

0.0001

0.0005

0.0014

0.0032

0.0060

0.0102

0.0159

0.0239

0.0348

0.0500

0.1000

0.0001

0.0010

0.0030

0.0068

0.0127

0.0212

0.0330

0.0491

0.0708

0.1000

0.1500

0.0002

0.0015

0.0048

0.0107

0.0200

0.0332

0.0515

0.0758

0.1080

0.1500

0.2000

0.0003

0.0022

0.0068

0.0151

0.0281

0.0465

0.0714

0.1042

0.1464

0.2000

0.2500

0.0004

0.0029

0.0090

0.0201

0.0371

0.0610

0.0930

0.1342

0.1861

0.2500

0.3000

0.0005

0.0037

0.0116

0.0257

0.0472

0.0771

0.1164

0.1662

0.2272

0.3000

0.3500

0.0006

0.0046

0.0145

0.0320

0.0585

0.0950

0.1420

0.2003

0.2697

0.3500

0.4000

0.0008

0.0057

0.0179

0.0394

0.0715

0.1150

0.1701

0.2367

0.3138

0.4000

0.4500

0.0009

0.0070

0.0219

0.0479

0.0863

0.1375

0.2010

0.2756

0.3595

0.4500

0.5000

0.0012

0.0086

0.0266

0.0579

0.1035

0.1631

0.2352

0.3174

0.4069

0.5000

0.5500

0.0014

0.0104

0.0323

0.0699

0.1237

0.1923

0.2732

0.3624

0.4561

0.5500

0.6000

0.0017

0.0128

0.0394

0.0844

0.1476

0.2262

0.3156

0.4109

0.5071

0.6000

0.6500

0.0021

0.0158

0.0483

0.1025

0.1766

0.2657

0.3635

0.4634

0.5602

0.6500

0.7000

0.0027

0.0197

0.0600

0.1255

0.2122

0.3126

0.4177

0.5204

0.6155

0.7000

0.7500

0.0035

0.0252

0.0758

0.1557

0.2573

0.3689

0.4798

0.5825

0.6730

0.7500

0.8000

0.0046

0.0334

0.0986

0.1974

0.3159

0.4380

0.5516

0.6504

0.7329

0.8000

0.8500

0.0065

0.0466

0.1341

0.2584

0.3955

0.5248

0.6354

0.7249

0.7954

0.8500

0.9000

0.0103

0.0721

0.1975

0.3562

0.5096

0.6369

0.7346

0.8072

0.8606

0.9000

0.9500

0.0216

0.1409

0.3419

0.5388

0.6869

0.7873

0.8538

0.8983

0.9287

0.9500

1.0000

1.0000

1.0000

1.0000

1.0000

1.0000

1.0000

1.0000

1.0000

1.0000

1.0000

Table II: Probability of adversary's succeeding in an attack with fraction of total hash power and fraction of total stake

 

The detailed description and analysis (including security and efficiency analysis) of the novel hybrid consensus scheme implemented in Hcash will be given in our research paper which will appear in the near future.

 

3. We have successfully established the Hcash private network environment and experiment environment, based on which, we can do iterative code development and functionality tests.

 

4. We have performed functional module definition and division, based on which we can define interfaces between modules.

 

5. We have started implementing the Hcash dual chain structure, and two-level mining mechanism, based on the design of the Hcash consensus mechanism. We have already implemented block production and chaining of keyblocks and microblocks.

 

6. We have designed test cases and verification solutions. Two-level block production and chaining have been verified. Two-level block network synchronisation is still under development.

 

7. We have done code analysis, and reviewed completed functional modules. We have also completed the dynamic PoW difficulty adjustment algorithm. The PoS module is still under development.