Source: Bitcoin Magazine; Compiler: Wuzhu, Golden Finance
Rollups have recently become the focus of BTC expansion, becoming the first thing to truly steal the spotlight from the Lighting Network in a broader sense of attention. Rollups aim to be an off-chain second layer that is not constrained or restricted by the core Liquidity of the Lighting Network, meaning that end users need someone to allocate (or “lend out”) funds in advance to receive money, or intermediate routing Nodes need channel balances to facilitate the full flow of payment amounts from sender to receiver.
These systems were initially run on Ethereum and other Turing Complete systems, but recently the focus has shifted to porting them to UTXO-based blockchains, such as BTC. This article does not intend to discuss the current implementation on BTC, but to explore the idealized Rollup functionality that people have been pursuing for a long time, which depends on the capability currently not supported by BTC, i.e. the ability to directly verify Zero-Knowledge Proof (ZKP) on BTC.
The basic architecture of Roll is as follows: a single account (UTXO in BTC) stores the balances of all users in Rollup. This UTXO contains a commitment, which exists in the form of the Merkle root of a Merkle tree, committing all current balances of existing accounts in Rollup. All these accounts are authorized using Public Key/Private Key pairs, so in order to make off-chain expenditures, users still need to sign certain content using the Secret Key. This part of the structure allows users to exit at any time without permission, as long as they make a transaction to prove that their account is part of the Merkle tree, they can unilaterally exit Rollup without the permission of the operator.
The operator of Rollup must include a ZKP in the transaction to update the merkle root of the on-chain account balance during the process of completing off-chain transactions. Without this ZKP, the transaction will be invalid and cannot be included in the Block chain. This proof allows people to verify whether all changes to the off-chain account are properly authorized by the account holder, and whether the operator does not maliciously update the balance to steal funds from users or dishonestly reallocate them to other users.
The question is, if only the merkle tree root is published on-chain, and users can view and access it, how do they include their branches in the tree so that they can withdraw without permission whenever they want?
Proper Rollup
In the appropriate Rollup, every time a new off-chain transaction is confirmed and the Rollup account’s state changes, the information is directly put on the blockchain. Not the entire tree, which would be absurd, but the information needed to rebuild the tree. In a simple implementation, the summary of all existing accounts in the Rollup will include the balance, and the account will only be added in the transaction updating the Rollup.
In more advanced implementations, use balance differences. This is essentially a summary of which accounts have increased or decreased funds during the update process. This allows each Rollup update to only contain the account balance changes that occurred. Then, users can simply scan the chain and “compute” from the beginning of the Rollup to obtain the current state of account balances, allowing them to reconstruct the current balance Merkle tree.
This can save a lot of expenses and Block space (thus saving funds), while still allowing users to ensure access to the information needed for unilateral exit. The rollup rule requires these data to be included in the formal rollup provided to users using the Block chain, and transactions that do not include account summaries or account differences are considered invalid transactions.
Validity Period
Another way to address the issue of user withdrawal data availability is to place the data elsewhere outside the Block chain. This introduces subtle issues, as rollup still needs to ensure that the data is available elsewhere. Traditionally, other Block chains are used for this purpose, specially designed to serve as data availability layers for systems like rollup.
This creates a dilemma where the security guarantee is equally strong. When data is directly posted to the BTCBlock chain, Consensus rules can ensure that it is absolutely correct. However, when it is posted to an external system, the best it can do is verify the SPV proof, which means the data has been posted to another system.
This requires verifying that the data exists in other on-chain proofs, which ultimately is an Oracle Machine problem. The BTC Block chain cannot fully verify anything other than what happens on its own Block on-chain. The best it can do is verify ZKP. However, ZKP cannot verify whether the Block containing rollup data is truly publicly broadcast after generation. It cannot verify whether external information is truly public to everyone.
This opens the door to data withholding attacks, that is, creating commitments to publish data and using it to advance rollup, but the data is not actually available. This prevents users from withdrawing funds. The only real solution is to rely entirely on the value and incentive structure of systems other than BTC.
Dilemma
This poses a dilemma for rollup. When it comes to data availability issues, there is basically a binary choice of whether to publish data to the BTC blockchain or elsewhere. This choice has significant implications for the security and sovereignty of rollup, as well as its scalability.
On the one hand, using BTCBlock chain as the data availability layer will set a hard limit on the scalability of rollup. Block space is limited, which sets a limit on the number of rollups that can exist at a time and the total number of transactions that all rollups can be processed off-chain. Each rollup update requires Block space proportional to the number of accounts whose balances have changed since the last update. Information theory only allows data to be compressed to a certain extent, at which point there is no more potential for expansion.
On the other hand, using different layers to achieve data availability eliminates the hard cap on scalability gains, but it also brings new security and sovereignty issues. In Rollups that use BTC to achieve data availability, if the data that users need to extract is not automatically published to the blockchain, the state of the Rollup cannot change. With Validiums, this guarantee depends entirely on the ability of the external system used to resist fraud and data concealment.
Now, any Block producer on the external data availability system can hijack the funds of BTCRollup users by producing Blocks instead of actually broadcasting the Block, thus making the data available.
So, what would it be like if we really achieved the ideal Rollup implementation on BTC and realized unilateral user withdrawals?
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
Bitcoin Magazine: What challenges does Rollup face?
Source: Bitcoin Magazine; Compiler: Wuzhu, Golden Finance
Rollups have recently become the focus of BTC expansion, becoming the first thing to truly steal the spotlight from the Lighting Network in a broader sense of attention. Rollups aim to be an off-chain second layer that is not constrained or restricted by the core Liquidity of the Lighting Network, meaning that end users need someone to allocate (or “lend out”) funds in advance to receive money, or intermediate routing Nodes need channel balances to facilitate the full flow of payment amounts from sender to receiver.
These systems were initially run on Ethereum and other Turing Complete systems, but recently the focus has shifted to porting them to UTXO-based blockchains, such as BTC. This article does not intend to discuss the current implementation on BTC, but to explore the idealized Rollup functionality that people have been pursuing for a long time, which depends on the capability currently not supported by BTC, i.e. the ability to directly verify Zero-Knowledge Proof (ZKP) on BTC.
The basic architecture of Roll is as follows: a single account (UTXO in BTC) stores the balances of all users in Rollup. This UTXO contains a commitment, which exists in the form of the Merkle root of a Merkle tree, committing all current balances of existing accounts in Rollup. All these accounts are authorized using Public Key/Private Key pairs, so in order to make off-chain expenditures, users still need to sign certain content using the Secret Key. This part of the structure allows users to exit at any time without permission, as long as they make a transaction to prove that their account is part of the Merkle tree, they can unilaterally exit Rollup without the permission of the operator.
The operator of Rollup must include a ZKP in the transaction to update the merkle root of the on-chain account balance during the process of completing off-chain transactions. Without this ZKP, the transaction will be invalid and cannot be included in the Block chain. This proof allows people to verify whether all changes to the off-chain account are properly authorized by the account holder, and whether the operator does not maliciously update the balance to steal funds from users or dishonestly reallocate them to other users.
The question is, if only the merkle tree root is published on-chain, and users can view and access it, how do they include their branches in the tree so that they can withdraw without permission whenever they want?
Proper Rollup
In the appropriate Rollup, every time a new off-chain transaction is confirmed and the Rollup account’s state changes, the information is directly put on the blockchain. Not the entire tree, which would be absurd, but the information needed to rebuild the tree. In a simple implementation, the summary of all existing accounts in the Rollup will include the balance, and the account will only be added in the transaction updating the Rollup.
In more advanced implementations, use balance differences. This is essentially a summary of which accounts have increased or decreased funds during the update process. This allows each Rollup update to only contain the account balance changes that occurred. Then, users can simply scan the chain and “compute” from the beginning of the Rollup to obtain the current state of account balances, allowing them to reconstruct the current balance Merkle tree.
This can save a lot of expenses and Block space (thus saving funds), while still allowing users to ensure access to the information needed for unilateral exit. The rollup rule requires these data to be included in the formal rollup provided to users using the Block chain, and transactions that do not include account summaries or account differences are considered invalid transactions.
Validity Period
Another way to address the issue of user withdrawal data availability is to place the data elsewhere outside the Block chain. This introduces subtle issues, as rollup still needs to ensure that the data is available elsewhere. Traditionally, other Block chains are used for this purpose, specially designed to serve as data availability layers for systems like rollup.
This creates a dilemma where the security guarantee is equally strong. When data is directly posted to the BTCBlock chain, Consensus rules can ensure that it is absolutely correct. However, when it is posted to an external system, the best it can do is verify the SPV proof, which means the data has been posted to another system.
This requires verifying that the data exists in other on-chain proofs, which ultimately is an Oracle Machine problem. The BTC Block chain cannot fully verify anything other than what happens on its own Block on-chain. The best it can do is verify ZKP. However, ZKP cannot verify whether the Block containing rollup data is truly publicly broadcast after generation. It cannot verify whether external information is truly public to everyone.
This opens the door to data withholding attacks, that is, creating commitments to publish data and using it to advance rollup, but the data is not actually available. This prevents users from withdrawing funds. The only real solution is to rely entirely on the value and incentive structure of systems other than BTC.
Dilemma
This poses a dilemma for rollup. When it comes to data availability issues, there is basically a binary choice of whether to publish data to the BTC blockchain or elsewhere. This choice has significant implications for the security and sovereignty of rollup, as well as its scalability.
On the one hand, using BTCBlock chain as the data availability layer will set a hard limit on the scalability of rollup. Block space is limited, which sets a limit on the number of rollups that can exist at a time and the total number of transactions that all rollups can be processed off-chain. Each rollup update requires Block space proportional to the number of accounts whose balances have changed since the last update. Information theory only allows data to be compressed to a certain extent, at which point there is no more potential for expansion.
On the other hand, using different layers to achieve data availability eliminates the hard cap on scalability gains, but it also brings new security and sovereignty issues. In Rollups that use BTC to achieve data availability, if the data that users need to extract is not automatically published to the blockchain, the state of the Rollup cannot change. With Validiums, this guarantee depends entirely on the ability of the external system used to resist fraud and data concealment.
Now, any Block producer on the external data availability system can hijack the funds of BTCRollup users by producing Blocks instead of actually broadcasting the Block, thus making the data available.
So, what would it be like if we really achieved the ideal Rollup implementation on BTC and realized unilateral user withdrawals?