BitVM IDE
Verify Your First ZKP on Bitcoin
Last updated
Verify Your First ZKP on Bitcoin
Last updated
BitVM IDE enables users to interact with the entire on-chain ZKP verification process with BitVM. Stay tuned as we continue adding more features!
BitVM expands Bitcoin's programmability and scalability by supporting Zero-Knowledge Proof (ZK Proof) natively on Bitcoin. BitVM IDE provides the first development environment for BitVM, enabling developers to easily create complex on-chain logic based on BitVM and test its core ZK verification functionalities.
To start the ZKP verification process, the user must sign and submit a Kickoff Transaction to the Bitcoin Testnet configured by the Nubit team. This transaction includes test BTC funding, which can be unlocked if the ZKP prover acts faithfully. To unlock the funding, the ZKP prover must later submit their assertions about the ZK verifier execution in BitVM.
Connect Wallet
Click the "Connect Wallet" button to get started. Upon clicking, users can choose to connect or download supported wallet plugins:
Xverse Wallet: Download from https://www.xverse.app/download
OKX Wallet: Download from https://www.okx.com/web3
After successfully connecting the wallet, BitVM IDE will automatically transfer test BTCs to the user's BTC wallet address.
Initiate the Transaction
Once the test BTC is credited, click the "Kickoff" button to create and submit a new Kickoff transaction. The Logs
section will display the transaction status and the on-chain hash value.
The user must interact with the ZK circuit embedding in BitVM IDE to construct the assertions about the ZK verifier execution.
Parameter Input
Users must input three parameters in the ZK Circuits module: x, y, and z. These parameters must satisfy the logic condition x × y == z.
To provide a complete experience, users can choose to input either correct or incorrect values for z, allowing them to explore different verification outcomes (e.g., Payout or Disprove):
Correct z value: Satisfies the condition x × y == z, demonstrating a successful verification scenario.
Incorrect z value: Fails to meet the condition x × y == z, simulating a failure and disprove scenario.
After constructing the assertion, the user must create and submit an Assert Transaction, utilizing the output of the Kickoff Transaction to proceed with the funding unlock process.
Submit the Proof
Click the "Assert" button to submit the assertion of the ZKP on-chain. BitVM IDE will validate whether the submitted logic is correct and provide the following results:
Valid: The assertion satisfies the condition and proceeds to the Payout step.
Invalid: The assertion fails the condition, allowing users to proceed to the Disprove step.
This branch occurs if the assertion is entirely correct, meaning no one can challenge the Assert transaction submitted by the user. After the challenge period, the user could get the locked funding back. The "Payout" button will be activated. Click the button to submit the payout transaction. Users will then receive the BTC deposited during the Kickoff step, completing the process.
This branch occurs if the assertion is partially incorrect, meaning anyone can challenge the Assert Transaction submitted by the user. The "Disprove" button will be activated. Click the button to submit a disprove with the evidence of why the assertion is incorrect. If the disprove succeeds, the original proof will be deemed invalid, ending the transaction process.
View On-Chain Status
At any step, users can click the "Check on-Chain" button to view the current transaction status in a blockchain explorer.
Reset the Page
After completing the Payout or Disprove step, users can click the "Reset" button to return the page to its initial state and start a new transaction process.
Transaction Details
The Logs section records detailed information for each step, including:
Transaction Status: For Kickoff, Assert, Payout, and Disprove submissions and processing.
On-Chain Hash Value: For transaction tracking.
Error Messages: To help users identify issues.
Logs auto-scroll to display the latest information, and users can scroll back to view the history.
Ensure the wallet plugin is installed and connected to the Bitcoin Testnet network to avoid transaction submission issues.
If transactions remain "Pending" for a long time, it may be due to network congestion. Please wait patiently or reset the game process.