Improved Privacy-preserving Layer 2 Scaling

HPB Global
HPB-Foundation
Published in
4 min readApr 17, 2021

Summary

The Blockchain Layer 2 [1] Solution is a technology that increases transaction throughput and reduces transactional fees without changing the underlying structure of the blockchain and its consensus algorithm. In most blockchain systems, the transaction histories and addresses of both transaction parties are all transparent. We add privacy on top of a Layer 2 solution to make it privacy-preserving while taking the computational overload into a practical level.

Layer-2 Scaling

Layer 2 scaling solutions are designed to scale the throughput by handling transactions off-chain. It is designed to improve the blockchain’s transactions throughput and reduce transaction fees, whilst still maintaining decentralization. Layer 2 has great potential to make blockchain applications scale for mass adoption.

Some key factors can’t be missed in order to build the blockchain with more security, decentralization, and scalability. Layer 2 does not change the design scheme of the underlying Layer 1 blockchain, nor does it change the consensus algorithm since it still relies on the security and consensus mechanism provided by it. Layer 2 usually handles a large amount of data and calculations off-chain and only performs verification on chain (e.g. the Lightning Network). The Layer 2 scaling solutions on Ethereum share the same approach, but their off-chain data and calculations are usually verified online through smart contracts. At present, all Layer 2 solutions launched by major tech teams usually introduce trustless transaction custody (Operator) off-chain to facilitate the transactions’ packaging and batch calculation. In order to ensure fraud-proof off-chain calculations, on-chain smart contracts usually are embedded with zero-knowledge proof algorithms and trusted computing technology.

The comparison of Layer-2 Solutions

In this part, we will introduce the existing Layer-2 solutions that have been implemented on Ethereum. These programs share the same design in scaling by introducing a transaction custody (Operator), i.e. most layer 2 solutions are centered around a server or cluster of servers, each of which serves as an off-chain node (which may be referred to as a node, validator, sequencer, block producer). Depending on the implementation, these layer 2 nodes may be run by the businesses or entities that use them, or by a 3rd party operator, or by a large group of individuals.

Generally speaking, all transactions in the system will be sent to these nodes first, and the nodes will pack and calculate the received transactions. This calculation can only update the user’s balance according to the transaction, or it can include transaction verifications. Then the nodes batch the data and anchor it to the underlying blockchain. Of course, the data submitted to the underlying blockchain must be compressed, or may just be the root value of a binary tree and it can not be altered. When these batched transactions are confirmed on-chain, the corresponding off-chain transactions are also confirmed. The details of how this is done vary significantly between different layer 2 technologies and implementations.

Comparison of Different Layer — 2 Solutions:

A Layer-2 solution with Improved Privacy Protection

Similar to other Layer 2 solutions, HPB will also introduce a “semi-trustless” transaction custody into the system. The transaction custody updates the user’s transaction balance in a privacy-preserving way. The update calculation is semi-trustless, that is, the transaction custody cannot change the user’s data at will, while the balance calculated based on the transaction data is always correct. This correctness is guaranteed by the zero-knowledge proof technology. But users need to trust the transaction custody will not leak transaction data, since transaction custody has all transaction information and balances. The overall process is as follows:

  • Transaction was signed and sent to the transaction custody;
  • Transaction custody packs all transactions within a period of time, and makes a cryptographic commitment (commitment) on the updated transaction balances. This data was calculated with zero-knowledge proofs, and the commitment and proofs will be sent to the underlying blockchain together;
  • Commitments and zero-knowledge proofs are verified on-chain by smart contracts. When the verification is confirmed, the transactions are completed.

Compared with other Layer 2 scaling solutions, our solution is more privacy preserving. Considering that complete privacy (anonymous transactions) requires a greater computational cost, we have weighed the feasibility and decided to secure user transaction data privacy first, following up with anonymous transactions in further development.

References

[1] Layer 2 scaling. Ethereum doc. URL https://ethereum.org/en/developers/docs/ layer-2-scaling/.

[2] V. Buterin. An incomplete guide to rollups. URL https://vitalik.ca/general/2021/01/05/ rollup.html.

[3] A. Gluchowski. Zk rollup: scaling with zero-knowledge proofs. Matter Labs, 2019. URL https: //pandax-statics.oss-cn-shenzhen.aliyuncs.com/statics/1221233526992813.pdf.

[4] A. Miller, I. Bentov, R. Kumaresan, and P. McCorry. Sprites: Payment channels that go faster than lightning. CoRR abs/1702.05812, 306, 2017.

[5] J. Poon and V. Buterin. Plasma: Scalable autonomous smart contracts. White paper, 2017.

About HPB

High Performance Blockchain (HPB) is a revolutionary permissionless blockchain architecture that combines HPB’s customized hardware Blockchain Offload Engine (BOE), with high-performance blockchain software, enabling unrivaled scalability.

| Website | Twitter | Telegram | Reddit | Youtube | Github |

--

--