Hemi 백서

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 13쪽 중 3쪽

roof (PoP) consensus mechanism** uniquely positions the Hemi Network by: * Allowing Bitcoin miners to secure Hemi indirectly, without direct involvement in Hemi's consensus processes. * Facilitating scalable transaction throughput in the Hemi ecosystem without expanding its Bitcoin footprint significantly. * Setting a high barrier for network reorganizations, as disrupting Hemi would necessitate a highly improbable 51% attack on Bitcoin itself, a task too daunting even for nation-states. * This approach not only extends Bitcoin's security to the Hemi Network but also introduces a scalable, robust framework for transaction processing and network integrity. # Proof-of-Proof Consensus & Bitcoin Finality {% hint style="info" %} ## 📜 TL;DR: * In **Proof-of-Proof (PoP) consensus**, a PoP miner periodically publishes proof of the Hemi Network’s state to the Bitcoin blockchain. * By building on Bitcoin, PoP consensus **inherits the security and finality** of Bitcoin’s consensus. * After **six Bitcoin blocks**, PoP consensus reaches a state of **superfinality**, where the security of the Hemi Network exceeds that of Bitcoin. {% endhint %} *** ## 🌐 Overview * Proof-of-Proof (PoP) is the Hemi Network’s additive consensus protocol, building on **Bitcoin’s consensus** for superior security. PoP miners publish cryptographic network-state proofs to the Bitcoin blockchain, protecting Hemi consensus with Bitcoin's proof of work. * Hemi blocks achieve **finality** typically nine blocks (approximately an hour and a half) after their proofs are published to Bitcoin. *** ## ⏱️ Finality Delay in the Hemi Network * The Hemi Network accounts for fluctuations in Bitcoin's transaction fees and block timings, recognizing that network-state proofs might not appear in every block. * To manage this variability, a **finality delay** of nine Bitcoin blocks is implemented. > If no competing fork publishes proofs to Bitcoin during this period, the network assumes finality, requiring a **51% attack on both the Hemi and Bitcoin networks** to alter this. *** {% hint style="success" %} ## 👀 Sneak Peek WIP *♾️ Superfinality: A New Benchmark in Blockchain Security* *Upon reaching this finality, the Hemi Network attains a state of **'superfinality,'** where its chain state's security surpasses Bitcoin's.* *How?* *This is achieved by combining Bitcoin’s **Proof-of-Work** consensus with Hemi’s **Proof-of-Stake**. After superfinality, altering the Hemi Network’s state proof would be economically infeasible even for nation-states. An attacker would need so simultaneously 51% attack Bitcoin and Hemi, which is even harder than attacking Bitcoin itself.* {% endhint %} # Proof-of-Proof vs. Merged Mining {% hint style="info" %} ## 📜 **TL;DR:** * [**Merged mining** ](https://www.techopedia.com/definition/merged-mining)allows Bitcoin miners to simultaneously mine a Bitcoin sidechain, which can limit decentralization and lead to an attack on the sidechain. * The **Proof-of-Proof (PoP)** consensus protocol utilized by Hemi enables PoP miners to independently publish data to the Bitcoin blockchain, cutting off this attack vector. {% endhint %} *** ## ⛔️ The Trouble With Merged Mining * Bitcoin miners must choose to participate by running nodes for the sidechain, which can curtail decentralization. * This makes the sidechain more susceptible to attack, as Bitcoin miners can collude to attack the sidechain at no cost while reaping Bitcoin block rewards. * Merged mining can introduce new security problems and issues with incentives. *** ## 🔍 **How Proof-of-Proof Works** * Hemi uses a consensus protocol called **Proof-of-Proof (PoP)**, which allows Hemi to exceed Bitcoin's security at scale. * Bitcoin miners don’t need to participate in Hemi directly; they confirm blocks that include Hemi transactions and collect transaction fees for doing so. * Users who *do* want to earn rewards in Hemi’s native token can run a super-lightweight PoP miner to publish Hemi consensus data to Bitcoin. <mark style="color:orange;">**👉**</mark>[ <mark style="color:orange;">**It’s simple: Help create proofs and get tokens.**</mark>](/foundational-topics/the-architecture/proof-of-proof/pop-mining#run-a-pop-miner)&#x20; * Each new Hemi block receives a Bitcoin confirmation, making reorganization increasingly unlikely until the block reaches finality. * Bitcoin requires about 60 minutes to reach finality; **Hemi takes nine Bitcoin blocks (about 90 minutes)** to reach finality and **achieves** [**Superfinality**](/foundational-topics/the-architecture/consensus-and-security-protocols) (*WIP*) in just **two hours.** Thus, in the Proof-of-Proof protocol, unlike with merged mining, Bitcoin miners needn’t be active to benefit; they can’t collude to attack the chain, and superfinality comes fast. *** # Running a PoP Mining {% hint style="info" %} ### 📜 **TL;DR:** * Participants can secure the Hemi Network to Bitcoin and earn rewards by operating the PoP Miner application. {% endhint %} *** ## 🌐 **Overview** * Mining within the Hemi Network involves a specialized process designed to intertwine the security of the Hemi Network with that of the Bitcoin blockchain. * This is achieved through the operation of the PoP Miner application, which plays a pivotal role in this symbiotic security mechanism. *** ## 🛠️ **How It Works** 1. **Fetching Headers**: The PoP Miner retrieves network headers from the Bitcoin Finality Governor for Bitcoin blockchain publication. 2. **Transaction Construction**: The miner constructs Bitcoin transactions embedding aforementioned Hemi Network headers. 3. **Proof of Publication**: Miners broadcast transactions through the Governor. These transactions are then integrated into Hemi’s consensus layer after being validated via the Bitcoin network, resulting in miner rewards. *** ## ⛏️ Run a PoP Miner The [CLI](/how-to-tutorials/using-hemi/pop-mining/setup-part-1) (Command Line Interface) version of PoP mining is designed for long-term, continuous operation. It requires some technical knowledge for setup and maintenance but provides robust security and operational efficiency.&#x20; *** ## 💸 **Earning Rewards** | | | | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 🔍 **Tracking Miner Activity** | Visit the [Hemi Block Explorer](https://testnet.explorer.hemi.xyz) and visit [Run a PoP Miner](/how-to-tutorials/using-hemi/pop-mining/setup-part-1) to see your miner's history and activity. | | ⏳ **Payout Processing Time** | It takes about **4 hours** on mainnet (30 minutes on testnet) after sending a transaction to receive a PoP payout. | | ⚡️ **Quick Confirmation Rewards** | You will earn PoP rewards for transactions that are quickly confirmed **(within the next 2-3 Bitcoin blocks)**. | | 🎁 **Rewards** | <p>Testnet rewards are fixed, with each successful transaction earning <strong><code>1</code></strong> <strong>tHEMI</strong>. Payouts occur after the transaction is successfully confirmed. You may expect a brief delay between transaction confirmation and the distribution of tHEMI to your address.<br><br><em>In future testnets and on the mainnet, rewards will depend on the number of active PoP miners.</em></p> | | 🔗 **Additional Links** | [**github.com/hemilabs/heminetwork**](https://github.com/hemilabs/heminetwork) | {% hint style="danger" %} **Protect Your Private Key** Your private key is the most sensitive part of your Bitcoin wallet and should be treated with the highest level of security. Access to your private key grants complete control over the funds associated with the wallet, including the Bitcoin you send to the miner and the rewards you collect. If someone gains access to your private key, they can steal your funds and rewards without your ability to recover them. {% endhint %} {% hint style="info" %} ### 📝 **Tips** * 🚫 **Single Key, Single Miner**: Using the same key for multiple PoP miner instances can lead to conflicts, as they may attempt to use the same Bitcoin UTXO simultaneously, causing operational issues. * 🗂 **Purpose of** **`popm-address.json`**: This file serves as a secure storage for your generated keys, meant for reference. The actual Bitcoin key used by the PoP Miner is specified through an environment variable at the program's start. * 🔑 **Unified Private Key**: Your single private key generates both a Bitcoin address and a Hemi address. The Hemi network automatically processes your public key from Bitcoin transactions, converting it into a Hemi address to receive payouts. * ⚡ **Bitcoin Testnet Dynamics**: Bitcoin testnet can undergo periods of rapid block generation due to block difficulty adjustments after inactive periods. This unusual pace can temporarily impact the timing and processing of payouts. {% endhint %} *** ## 🕵️ **Behind the Scenes** * A Bitcoin Secure Sequencer (BSS) generates and broadcasts a new block. * BSS nodes send the block header to Bitcoin Finality Governor (BFG) nodes. * BFG nodes direct the header to PoP Miners. * Miners create and send back signed Bitcoin transactions containing the header. * BFG nodes push these transactions into the Bitcoin network. * Once included in a Bitcoin block, BFG nodes generate PoP Transactions with proofs of Bitcoin inclusion. * These transactions and Bitcoin headers are incorporated into a new Hemi block by a BSS node, updating the EVM with the latest Bitcoin state. * Rewards are calculated and distributed to PoP Miners post-mining. # Tunnels {% hint style="info" %} ## 📜 **TL;DR:** * Bridging i.e. Tunneling allows the transfer of assets between disparate blockchains (such as between distinct L1s or between an L1 and an L2). * While bridging addresses the siloed nature common to most blockchains, it typically suffers from centralization because most blockchains do not maintain state awareness of other networks. * Hemi Network enables sophisticated asset transfer and decentralization by maintaining protocol-level state awareness of both Bitcoin and Ethereum. {% endhint %} *** ## 🌐 **Overview** * Blockchain networks typically operate as independent systems with no knowledge of other networks, creating a siloed environment. This isolation makes it impossible to transfer assets directly from one chain to another. * **Bridges** are developed to address this issue, enabling asset transfers between different blockchains. They function by accepting a token from one blockchain **(chain A)** and issuing a corresponding placeholder or wrapped token on another blockchain **(chain B).** This wrapped token represents the original token and can be redeemed for it. *** ## 🖼️ **Example** * To illustrate, consider the process of transferring bitcoin to Ethereum. A user sends bitcoin to a bridge connecting to the Ethereum network. This bridge then issues a wrapped Ethereum token representing the bitcoin. * The user can utilize this wrapped bitcoin within the Ethereum network or return it to the bridge to reclaim the original bitcoin on the Bitcoin network. *** ## 🔍 **Broader Applications & Limitations of Bridges** * Bridges are not limited to transferring assets between distinct blockchains. They can also facilitate transfers between different network layers, like connecting a Layer 1 (**L1**) blockchain like Ethereum to a Layer 2 (**L2**) rollup chain. This connection allows assets to benefit from the L2's lower fees and other features. * However, bridges often rely on centralized infrastructure due to the lack of protocol-level awareness between the connected chains. For example, while an L2 might maintain the state of its corresponding L1, the L1 lacks inherent knowledge of the L2. This disconnect necessitates a centralized third party to maintain awareness of both chains. *** ## 🔒 Security and Efficiency * The security model behind Hemi’s Ethereum Tunnels leverages the strengths of both Ethereum and Bitcoin. By integrating Bitcoin finality, Hemi ensures that cross-chain transactions achieve a level of finality backed by Bitcoin’s Proof-of-Work consensus, widely considered the most secure consensus mechanism in blockchain technology.&#x20; * This significantly reduces the time it takes to finalize cross-chain transactions and provides strong protection against censorship or fraud attempts during the tunneling process. * The decentralized Challenger role also strengthens Hemi’s security. Rather than relying on a centralized entity to raise disputes, any participant in the Hemi ecosystem can act as a Challenger, further decentralizing the network and increasing its resistance to fraud.&#x20; * This approach contrasts with centralized bridges, which can be vulnerable to manipulation or collusion by a single entity overseeing the dispute process. *** ## &#x20;🏗️ A Phased Approach The phased approach to Hemi’s Ethereum and Bitcoin Tunnels aims to progressively enhance the security, decentralization, and asset support for cross-chain transfers. Each phase introduces key improvements to the settlement mechanisms and expands the range of assets that can be tunneled across Ethereum, Bitcoin, and Hemi, all while focusing on increasing trust minimization and reducing reliance on centralized actors. <table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><p></p><h3>Phase 0 (Current State)</h3><p><strong>Ethereum Tunnels:</strong></p><ul><li>Optimistic (fault-dispute) model, where disputes are raised within a dispute window.</li><li>ETH-based assets tunneled between Ethereum and Hemi.</li></ul><p><strong>Bitcoin Tunnels:</strong></p><ul><li>Over-collateralized multisig/threshold signatures, providing moderate decentralization.</li><li>BTC itself tunneled to and from Hemi.</li></ul></td><td></td><td></td></tr><tr><td><p></p><h3>Phase 1 (Expansion)</h3><p><strong>Ethereum Tunnels:</strong></p><ul><li>ZK proof-based settlement with an optimistic fallback if the ZK system fails.</li><li>ETH-based assets plus support for Hemi-native assets, including BTC-based assets, tunneled to Ethereum.</li></ul><p><strong>Bitcoin Tunnels:</strong></p><ul><li>Introduction of BitVM2+hVM, a decentralized 1-of-N trust system for enhanced security.</li><li>BTC itself, with groundwork for supporting fungible BTC assets (BRC-20s, Runes).</li></ul></td><td></td><td></td></tr><tr><td><p></p><h3>Phase 2 (Maturity)</h3><p><strong>Ethereum Tunnels:</strong></p><ul><li>Redundant ZK proof system (2-of-3), providing higher security with multiple ZK proofs.</li><li>Full support for Hemi-native assets, including BTC-based fungible and non-fungible assets (Ordinals) tunneled to Ethereum.</li></ul><p><strong>Bitcoin Tunnels:</strong></p><ul><li>A mature BitVM2+hVM model for trust minimization.</li><li>Full support for fungible BTC assets (BRC-20s, Runes) and non-fungible assets (Ordinals).</li></ul></td><td></td><td></td></tr></tbody></table> *** {% hint style="success" %} ## 👀 Sneak Peek WIP **Introducing Tunnels for Decentralized Asset Transfers** To promote greater decentralization and address the limitations of bridges, the Hemi Network introduces **tunnels**.&#x20; ***Tunnels*** allow for sophisticated, noncustodial bidirectional asset transfers between networks, such as Bitcoin and Ethereum. Unlike traditional bridges, tunnels within the Hemi Network maintain state awareness of both networks at the protocol level. This enables a variety of custodianship approaches, both centralized and decentralized. For instance, BRC-20 tokens can be tunneled from Bitcoin to the Hemi Network or Ethereum, facilitating trading on Ethereum-based decentralized exchanges (DEXes). Additionally, tunnels benefit from the security features of the Hemi Network’s Bitcoin-based superfinality {% endhint %} # Ethereum Tunnel {% hint style="info" %} ## 📜 **TL;DR:** * Hemi’s Ethereum Tunnels facilitate secure and efficient asset transfers between Ethereum and the Hemi network.&#x20; * While similar to other “lock-and-mint” cross-chain mechanisms, Hemi’s Tunnels are distinguished by their integration with Bitcoin’s Proof-of-Work finality model and decentralized dispute mechanisms, offering faster settlement times and enhanced security. * By integrating these features, Hemi’s Ethereum Tunnels offer a more efficient and secure mechanism for cross-chain asset transfers, benefiting from both Ethereum’s smart contract capabilities and Bitcoin’s unrivaled security. {% endhint %} *** ## 🚊 How Ethereum Tunnels Work The Ethereum Tunnel process involves locking assets on one network while minting corresponding representative tokens on the other network. For Ethereum-native assets, tokens are minted on Hemi once the assets are locked in a Hemi validation contract on Ethereum. This allows seamless asset transfers across chains, enabling users to leverage the strengths of both networks while minimizing the friction of cross-chain operations. #### **Deposit to Hemi** 1. The process begins with the user initiating a deposit transaction on Ethereum. This deposit locks up Ethereum-native tokens in a Hemi validation contract on Ethereum. The validation contract plays a critical role by securing the assets and ensuring they remain locked throughout the tunneling process. 2. Once the deposit is secured in an Ethereum block, Hemi’s block derivation protocol kicks in. The Sequencer, responsible for ordering and generating Hemi blocks, is required to include the deposit in the first Hemi block derived from the Ethereum block that contains the deposit transaction. This ensures that the deposit is acknowledged in Hemi’s L2 environment almost immediately after its validation on Ethereum.&#x20; 3. After the deposit is included, Hemi mints a representative token on the Hemi Network, which serves as the equivalent of the locked asset on Ethereum. This token can now be freely used within the Hemi ecosystem, allowing users to engage with dApps or perform any transaction that requires the asset. You should receive your deposit within **0-2 minutes**. #### **Withdrawal to Ethereum** 1. To return the assets back to Ethereum, the user submits a withdrawal transaction on Hemi. When the withdrawal request is submitted, the representative tokens on Hemi are burned, which signals the user’s intent to withdraw their corresponding Ethereum-native assets.&#x20; 2. Hemi’s state transition system updates its rollup state root, which is then submitted to Ethereum by a Publisher. The state root acts as a cryptographic proof of the transactions that occurred on Hemi, including the user’s withdrawal request. 3. The key to finalizing the withdrawal lies in Hemi’s use of Bitcoin finality, which is a significant differentiator from other optimistic rollup bridges. (In traditional optimistic rollups, the finality of cross-chain transactions is delayed by a dispute window, during which fraud proofs can be raised. Hemi accelerates this process by leveraging Bitcoin’s highly secure Proof-of-Work consensus mechanism to finalize the state root on Ethereum.) This process takes roughly 4**0 minutes.** 4. Once Bitcoin finality is achieved, and assuming no disputes are raised through the decentralized Challenger role, the state root is confirmed, and the user can submit a withdrawal proof on Ethereum to claim their assets from the Hemi validation contract. A proof may take up to **24 hours.** 5. The withdrawal proof ensures that the burned representative tokens on Hemi correspond to the original locked Ethereum-native tokens. Upon successful validation of the proof, the Ethereum-native assets are unlocked, completing the c
프로젝트로 돌아가기