Hemi
DiscordGithub
  • 🏠Main
    • Welcome to the Hemi Docs
    • Getting Started
      • Developer Quickstart
      • Enthusiast Quickstart
      • Miner Quickstart
    • Network Details
  • ⛰️Foundational Topics
    • The Architecture
      • Consensus and Security Protocols
      • Ethereum Rollups
        • Pros & Cons
        • Decentralized Rollups
      • Sequencer Consensus
        • Proof-of-Stake (PoS)
        • PoS-Only Pitfalls
        • PoS Solutions
      • Proof-of-Proof (PoP)
        • Proof-of-Proof Consensus & Bitcoin Finality
        • Proof-of-Proof vs. Merged Mining
        • Running a PoP Mining
      • Tunnels
        • Ethereum Tunnel
        • Bitcoin Tunnel
      • Ethereum Virtual Machine (EVM)
      • Blocks
      • Transactions
      • Gas
    • Nodes & Clients
      • Node Guides
    • Wallet Support
  • 📖How-To Tutorials
    • Using Hemi
      • Wallet Setup
        • EVM Wallet Setup
        • BTC Wallet Setup
          • Switch Bitcoin Networks
      • Tunnel from Ethereum
        • Tunnel ERC20s via Native Tunnel
        • Tunnel ERC20s via 3rd Party
          • Tunnel via Stargate
      • Tunnel from Bitcoin
        • Tunnel BTC via Native Tunnel
        • Tunnel BTC via 3rd Party
      • Stake
      • Developer Tooling
        • Set Up a Safe Wallet
        • Create a Capsule
      • PoP Mining
        • CLI PoP Miner
          • (Testnet) Add tHEMI to MetaMask
          • (Mainnet) Add PoPPoints to Metamask
        • Web PoP Miner (deprecated)
    • Developing on Hemi
      • General
        • HelloWorld.sol
        • Deploy an ERC-20 Token
      • hVM & hBK
        • Using the hBK Demo App
        • Get Bitcoin Balance with Remix
  • ⚙️Building Bitcoin Apps
    • Introduction
    • Hemi Virtual Machine (hVM)
      • Motivation
      • Feature Summary
      • Deploy on hVM
    • Hemi Bitcoin Kit (hBK)
      • Overview
      • hBK Smart Contract
  • ⚙️Tooling
    • viem
    • Contract Addresses
    • Contract Verification
    • Data Indexing
    • Oracles
  • 📝Incentives
    • Points
    • Grants
    • Retroactive Funding
    • One-Off Spends
  • ⚡Additional Resources
    • Partners
    • FAQ
    • Official Links
    • Brand Kit
  • 📨Send Feedback
    • Bug Report
    • Contact Us
Powered by GitBook
On this page
  • 🌐 Overview
  • 🔍 Tiny Bitcoin Daemon (TBC)
  • 🎚️ Processed Bitcoin View

Was this helpful?

Edit on GitHub
Export as PDF
  1. Building Bitcoin Apps

Hemi Virtual Machine (hVM)

📜 TL;DR:

  • Hemi’s hVM is an EVM upgraded with Bitcoin awareness.

  • The Hemi network maintains an EVM-visible Bitcoin node using Hemi’s custom “Tiny Bitcoin” (TBC) daemon.

  • A “Processed Bitcoin View” synchronizes all Hemi nodes as part of the EVM state transition.


🌐 Overview

  • Hemi’s hVM is an EVM upgraded with Bitcoin awareness via new precompile contracts that smart contracts can call to get data from the Bitcoin node embedded in the EVM.


🔍 Tiny Bitcoin Daemon (TBC)

  • The Hemi network maintains an EVM-visible Bitcoin node using Hemi’s custom “Tiny Bitcoin” (TBC) daemon. TBC syncs with the regular Bitcoin network over P2P and indexes Bitcoin blocks up to the height specified by the protocol.

  • When a Hemi Sequencer creates a block, they can optionally include an additional “Bitcoin Attributes Deposited” transaction communicating one or more new Bitcoin headers to the Hemi protocol.


🎚️ Processed Bitcoin View

  • When these transactions occur, all nodes on the Hemi network process these Bitcoin blocks at the same Hemi block height creating a “Processed Bitcoin View” synchronized across all Hemi nodes as part of the EVM state transition.

  • This synchronization ensures execution of all Bitcoin-aware smart contracts are deterministic across all nodes.


To expose Bitcoin data to smart contracts, hVM introduces a number of new precompile contracts accessible in the EVM which fetch the latest data from the Processed Bitcoin View maintained by the embedded TBC node at the time the request is made.


PreviousIntroductionNextMotivation

Last updated 10 months ago

Was this helpful?

⚙️