Dwarves
Memo
Type ESC to close search bar

Plonky2

Introduction

Plonky2 is a non-Interactive Proof of Proof of Knowledge (NIPoPoK) chain developed to reduce the size of the blockchain and speed up transaction confirmations. It is built on the foundation of ZK-SNARKs (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge), an advanced cryptographic technology that enables affirmative proofs without revealing inside information. Plonky2 allows transactions to be confirmed on the fly using certificates similar to Merkle trees, where only a small portion of data is needed to confirm the entire Merkle tree. Plonky2 certificates are very small, only about 1/20th of similar attestations used in traditional blockchain systems, thus helping to reduce blockchain size and speed up transaction processing. Plonky2 is being used in several blockchain projects such as Ethereum and Polkadot to improve the performance and scalability of the system.

The target of Plonky2

Blockchain is a decentralized information storage and conversion technology that allows parties to exchange information and transact directly with each other without the involvement of an intermediary. Transactions are confirmed and written to a new block in the blockchain, forming a reliable and unmodifiable history of transactions. An important issue of blockchain is its size. Since each new block added to the blockchain must be stored and backed up across the entire network, the size of the blockchain increases over time. This leads to problems with transaction processing speed, scalability, and storage costs.

Some blockchains like Bitcoin use Proof of Work (PoW) to verify new transactions and generate new blocks. However, the use of PoW requires huge computation and high energy usage, negatively affects the environment and is costly. So many new technologies have been developed to solve the blockchain size problem, speed up transaction processing and reduce storage costs. Plonky2 is one of those new technologies, with the ability to reduce blockchain size significantly using non-interactive attestation (NIPoPoK) and Merkle tree structure.

Plonky2 is a new technology in the blockchain field, developed to reduce blockchain size and speed up transaction confirmation by using non-interactive attestation (NIPoPoK) and Merkle tree structure. NIPoPoK is a method of building attestations for blocks in the blockchain without downloading the entire blockchain, requiring only a small number of blocks (usually only about 1% of the total block) called “superblocks”. With NIPoPoK, confirmation of new transactions becomes faster and requires less resources than confirmations on the entire blockchain.

The Merkle tree is a layered data structure that allows for fast and efficient data integrity checking. Using the Merkle tree structure in Plonky2, the blocks of the blockchain can be grouped into smaller “superblocks”, which reduces the blockchain size significantly. The use of Plonky2 in the blockchain will help speed up transaction confirmations and reduce blockchain size, while reducing storage costs and increasing the scalability of the system. Plonky2 has been used in many blockchain projects, such as Ethereum and Bitcoin Cash.

How Plonky2 work

Non-Interactive attestation (NIPoPoK) is a method of attesting in the blockchain without interacting with other entities in the system. Instead of downloading the entire blockchain to confirm a block, NIPoPoK requires only a small number of blocks (usually only about 1% of the total block) called “superblocks” to verify the validity of a new block. The main difference between NIPoPoK and interactive attestation (PoK) is that PoK requires interaction between entities in the system for authentication. This means that entities must exchange information with each other to perform authentication. Meanwhile, NIPoPoK does not require interaction between entities, which minimizes communication and synchronization in the system. The other difference between NIPoPoK and PoK is that PoK typically uses more complex protocols for authentication, while NIPoPoK uses simpler maths to compute authentication. However, this does not mean that NIPoPoK is less secure, because NIPoPoK uses the latest techniques to ensure the safety and security of data. With the development of technology, NIPoPoK is being widely used in blockchain to minimize the interaction and synchronization in the system, while helping to speed up transaction confirmation and reduce blockchain size.

Merkle tree is a binary tree data structure used to store data and perform data integrity validation efficiently. Merkle trees are widely used in blockchain systems to minimize data size and speed up transaction integrity validation. Merkle tree is created by breaking data into smaller elements, called leaf nodes, then creating pairs of these leaves and hashing them together to form new nodes, until there are only leaves left. a single node at the top of the tree, called the root node. When there is a change in the data, simply recalculate the hash of the affected nodes and the root node will change, helping to verify the integrity of the data quickly and efficiently.

Plonky2 uses a Merkle tree to verify transaction integrity. Instead of validating the entire blockchain like other methods, Plonky2 simply uses a small number of blocks (superblocks) created by the Merkle tree to verify the validity of a new transaction. Since then, Plonky2 reduces the size of data to be processed and speeds up transaction validation significantly. Merkle tree is used to generate superblocks, where each superblock is created by taking root nodes of Merkle trees for a certain period of time. Superblocks are stored in a linked list, and Plonky2 uses this list to verify the integrity of the new transaction. If a transaction is invalid, Plonky2 will re-query the superblock to find the invalid transaction and thereby confirm the integrity of the system.

Application of Plonky2

Blockchain projects using Plonky2 and how Plonky2 improves system performance and scalability:

Example for using Plonky2

An example of the use of Plonky2 is in the blockchain system of rewards points for loyalty programs. This system uses Plonky2 to reduce the size of the blockchain and speed up transaction processing.

In this system, each time a customer makes a purchase or uses the company’s service, they will be allocated a number of reward points corresponding to the amount spent. These reward points are recorded on the blockchain and can be used in exchange for other products or services of the company. However, because the number of customers and the number of transactions in the system can be very large, recording every transaction on the blockchain can lead to the blockchain being too large and the transaction processing slow.

To solve this problem, the system uses Plonky2 to reduce the size of the blockchain. Instead of recording every transaction on the blockchain, the system only stores the transaction summary (transaction summary) as a Merkle tree. Plonky2 is used to confirm these transaction summaries and prove that all the transactions that have been performed are valid. As a result, this reward points blockchain system can process thousands of transactions per second, and the blockchain size increases only slightly if the number of customers and transactions increases.

Challenge of Plonky2

Safety and security issues when using Plonky2

During authentication, Plonky2 asks the nodes to specify a specific number of Merkle tree elements. However, if a node sends incorrect elements or changes the Merkle tree, it can cause validation errors and affect the integrity of the blockchain. Therefore, ensuring the correctness of the Merkle tree is very important.

In addition, Plonky2 also depends on the security of the hash system and the elliptic curve. If one of these factors is broken, then the authentication will not be secure and lead to security problems. Another problem for Plonky2 is a preimage attack, where an attacker uses previously known information to find secret hashes. If attacked, Plonky2 will no longer guarantee the integrity of the data. Therefore, when using Plonky2, developers need to pay attention to security and safety issues to ensure the integrity and security of the blockchain system.

Challenges in implementing and using Plonky2 on different blockchain systems

Compare Plonky 2 with others

Comparison between Plonky2 and other technologies in improving the performance and scalability of the blockchain system:

Reference